/*
Theme Name: Luxury Twenty Twenty-Five Pro
Theme URI: https://wordpress.org/themes/twentytwentyfive
Author: ChiemInn Media
Description: A child theme of Twenty Twenty-Five matching the Next.js design.
Version: 1.1.7
Template: twentytwentyfive
*/

/* Custom CSS from Globals */
:root {
    --background: #121212;
    --foreground: #F0F0F0;
    --accent: #CD7F32;
    --muted: #2A2A2A;
    --muted-foreground: #A0A0A0;
    --card: #1E1E1E;
    --border: #333333;
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    /* Header Height Variable for consistent spacing */
    --header-height: 8rem;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
}

/* 
   AERO HEADER BASE 
   Fixed Position for Overlay Effect 
   Matches Next.js defaults: bg/70, blur-md (12px)
   REMOVED DEFAULT MASK to fix visibility issue.
*/
.site-header {
    /* Removed background and blur from here to prevent containing block trap */
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: none;
    transition: all 0.3s ease;
    padding: 0 !important;
    overflow: visible !important; /* Critical: allow menu to escape header */
}

/* Blur effect moved to pseudo-element */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: -1;
    pointer-events: none;
}

.site-header-inner {
    max-width: var(--wp--style--global--wide-size, 1536px);
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    overflow: visible !important; /* Critical for mobile menu */
}

/* 
   CONTENT OFFSET
   Ensures content starts below the fixed header initially
*/
body .wp-site-blocks>header+* {
    margin-top: var(--header-height);
}

/* 
   BLOCK STYLES (Overrides) 
*/

/* Strong Glass */
.is-style-glass-strong {
    background-color: rgba(18, 18, 18, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

/* Light Glass */
.is-style-glass-light {
    background-color: rgba(18, 18, 18, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Mask / Fade Out - Optional Style */
.is-style-header-mask {
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}


/* Admin Bar Support */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Navigation Links */
.wp-block-navigation-item__content {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    color: var(--foreground);
}

.wp-block-navigation-item__content:hover {
    opacity: 1;
    color: var(--accent);
}

/* --- MOBILE NAVIGATION REFINEMENT --- */

/* Hamburger Button Styling */
.wp-block-navigation__responsive-container-open {
    padding: 0;
    color: var(--foreground);
    background: transparent;
    border: none;
}

.wp-block-navigation__responsive-container-open svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Mobile Overlay Background */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #121212 !important; /* Deep dark background */
    z-index: 9999;
}

/* Mobile Menu Links */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    font-size: var(--mobile-menu-font-size, 1.1rem) !important; 
    font-family: var(--font-sans) !important; 
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.6rem 0 !important;
    color: var(--foreground) !important;
    opacity: 0.9 !important;
    text-align: right !important;
    width: auto !important;
}

/* Container Overlay: Floating Drawer on the right */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: rgba(18, 18, 18, 0.98) !important; 
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 99999 !important;
    height: auto !important;
    max-height: 85vh !important;
    width: 280px !important;
    position: fixed !important;
    top: calc(var(--header-height) + 10px) !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important; 
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding-top: 4rem !important;
    padding-bottom: 2rem !important;
    padding-right: 2rem !important;
    padding-left: 2rem !important;
    gap: 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important; /* Right aligned */
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Close/Toggle Menu Icons */
.wp-block-navigation__responsive-container-close {
    top: 1.25rem !important;
    right: 1.25rem !important;
}

.wp-block-navigation__responsive-container-close svg {
    width: 40px;
    height: 40px;
    fill: var(--foreground);
}

/* Mobile Logo Support inside drawer (if used) */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-site-logo {
    margin-bottom: 3rem;
}

/* Footer Adjustments */
footer {
    background-color: var(--background);
    color: var(--foreground);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: auto;
}


/* collection-styles */
/* Product Card Layout & Styling */
.tml-product-card {
    aspect-ratio: 3 / 4;
    background-color: rgba(30, 30, 30, 0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.tml-product-card:hover {
    background-color: rgba(40, 40, 40, 0.6);
}

.tml-product-card .wp-block-post-featured-image {
    flex: 1;
    overflow: hidden;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tml-product-card .wp-block-post-featured-image img {
    transition: transform 0.7s ease-out;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain !important;
}

.tml-product-card:hover .wp-block-post-featured-image img {
    transform: scale(1.08);
}

.tml-product-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.tml-product-card-content .wp-block-post-title {
    margin: 0;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.tml-product-card:hover .wp-block-post-title a {
    color: var(--accent);
}

.tml-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Filter Buttons (Replica of Next.js Tabs) */
.tml-filter-buttons ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.tml-filter-buttons li {
    margin: 0;
}

.tml-filter-buttons a {
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a1a1aa;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    padding-bottom: 2px;
}

.tml-filter-buttons a:hover {
    color: #fff;
}

.tml-filter-buttons li.current-cat a {
    color: #fff;
    border-bottom-color: #fff;
}

/* Archive Grid */
.tml-product-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 3rem 2rem;
}
@media (min-width: 768px) {
    .tml-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .tml-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}\n
/* Stories Page Styles */
.stories-grid-wrapper {
    padding: 2rem 0;
}

.stories-search-bar {
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.stories-search-form {
    width: 100%;
    max-width: 600px;
}

.stories-search-input-wrapper {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: border-color 0.3s;
}

.stories-search-input-wrapper:focus-within {
    border-bottom-color: var(--accent);
}

.stories-search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--foreground);
    padding: 1rem 3rem 1rem 0;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    outline: none !important;
}

.stories-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0;
}

.stories-product-grid {
    display: grid;
    gap: 4rem 2rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .stories-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stories-card {
    aspect-ratio: 16 / 10;
    background-color: #1E1E1E;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

/* .stories-card-overlay-link was removed in favor of block-based link */

.stories-card .wp-block-post-featured-image {
    flex: 1;
    overflow: hidden;
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Style the link generated by post-featured-image as an overlay */
.stories-card .wp-block-post-featured-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.stories-card .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    transition: transform 0.7s ease-out, opacity 0.3s ease;
    opacity: var(--stories-card-img-opacity, 0.75);
}

.stories-card:hover .wp-block-post-featured-image img {
    transform: scale(1.08);
}

.stories-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
}

.stories-card-content .wp-block-post-title {
    margin: 0;
    font-size: 1.75rem;
    transition: color 0.3s;
    color: var(--foreground);
}

.stories-card:hover .wp-block-post-title {
    color: var(--accent);
}

.stories-card-content .wp-block-post-excerpt {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.read-more-btn {
    margin-top: 0.5rem;
}

.read-more-btn .btn-text {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: all 0.3s;
    font-weight: 500;
}

.stories-card:hover .read-more-btn .btn-text {
    border-bottom-color: var(--accent);
}

/* Return Navigation */
.catalog-return-nav .return-link,
.stories-return-nav .return-link {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stories-return-nav .return-link:hover {
    color: var(--accent);
}

.stories-return-nav .arrow {
    font-size: 1.25rem;
}

/* --- CUSTOM LANGUAGE SWITCHER (Polylang) --- */
/* High specificity selector to beat WordPress block styles */
header.site-header .tml-lang-switcher,
.tml-lang-switcher {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 1001 !important;
    margin-left: 1rem !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    height: auto !important;
    width: auto !important;
    padding: 0 !important;
}

.tml-lang-current {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    background: rgba(42, 42, 42, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.tml-lang-current img {
    width: 24px !important;
    height: auto !important;
    border-radius: 2px !important;
    display: block !important;
}

.tml-lang-arrow {
    font-size: 0.7rem !important;
    opacity: 0.6 !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.tml-lang-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 5px !important;
    background: rgba(30, 30, 30, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 4px !important;
    min-width: 160px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Show on hover - use high specificity */
header.site-header .tml-lang-switcher:hover .tml-lang-dropdown,
.tml-lang-switcher:hover .tml-lang-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

header.site-header .tml-lang-switcher:hover .tml-lang-current,
.tml-lang-switcher:hover .tml-lang-current {
    background: rgba(42, 42, 42, 0.9) !important;
    border-color: var(--accent) !important;
}

.tml-lang-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 14px !important;
    text-decoration: none !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    transition: background 0.2s !important;
    white-space: nowrap !important;
}

.tml-lang-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--accent) !important;
}

.tml-lang-item img {
    width: 20px !important;
    height: auto !important;
    border-radius: 2px !important;
}

.tml-lang-item .tml-lang-name {
    font-size: 0.875rem !important;
    font-family: var(--font-sans) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* --- MOBILE & SAFARI OPTIMIZATIONS --- */
@media screen and (max-width: 782px) {
    /* Restore visibility in the header bar, but make it horizontal and compact */
    header.site-header .site-header-inner .tml-lang-switcher {
        display: flex !important;
        margin-left: 1rem !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        vertical-align: middle !important;
    }

    header.site-header .site-header-inner .tml-lang-current {
        display: none !important; /* Hide the dropdown trigger on mobile header */
    }

    header.site-header .site-header-inner .tml-lang-dropdown {
        position: static !important;
        display: flex !important;
        flex-direction: row !important; /* Flags side-by-side */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        min-width: auto !important;
        gap: 12px !important;
    }

    header.site-header .site-header-inner .tml-lang-item {
        padding: 0 !important;
        background: transparent !important;
    }

    header.site-header .site-header-inner .tml-lang-item .tml-lang-name {
        display: none !important; /* Hide names in the slim header */
    }

    header.site-header .site-header-inner .tml-lang-item img {
        width: 26px !important; /* Perfect size for mobile touch */
    }

    /* Keep the styles for the switcher when it is inside the navigation drawer */
    .is-menu-open .tml-lang-switcher {
        display: flex !important;
        margin: 2rem 0 0 0 !important;
        width: 100% !important;
        justify-content: flex-end !important;
        position: static !important;
    }

    .is-menu-open .tml-lang-dropdown {
        position: static !important;
        display: flex !important;
        flex-direction: column !important; /* Stacked in drawer */
        align-items: flex-end !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent !important;
        min-width: 100% !important;
    }

    .is-menu-open .tml-lang-item {
        padding: 0.75rem 0 !important;
        justify-content: flex-end !important;
    }

    .is-menu-open .tml-lang-item .tml-lang-name {
        display: block !important; /* Show names in the spacious drawer */
    }
}


/* Safari Fixes for all glass elements */
.site-header::before, 
.tml-lang-dropdown, 
.is-menu-open, 
.is-style-glass-strong, 
.is-style-glass-light {
    -webkit-backdrop-filter: blur(24px) !important;
}



