/* Header Fixes - Final Clean Version */

/* 1. Global Layout Wrappers (Full Width Backgrounds) */
#header {
    width: 100%;
    font-family: 'Inter', sans-serif;
    /* Default font */
    z-index: 999;
    position: sticky;
    top: var(--global-strip-height, 40px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.top-bar-wrapper {
    background-color: #1A1A1A;
    border-bottom: 1px solid #2a2a2a;
    width: 100%;
}

.middle-bar-wrapper {
    background-color: #fff;
    width: 100%;
    padding: 25px 0;
}

.nav-bar-wrapper {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
}

/* 2. Content Container (Boxed 1140px) */
.header-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 30px;
    /* Increased padding from edges */
    display: flex;
    align-items: center;
}

/* 3. Top Bar Styling */
.top-bar-wrapper .header-container {
    justify-content: flex-end;
    /* Everything to right */
    height: 40px;
    font-size: 13px;
    color: #d7d7d7;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-right a {
    text-decoration: none;
    color: #d7d7d7;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.top-right a:hover {
    color: #D1B26C;
}

.top-right .sep {
    color: #444;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-left: 10px;
}

.social-icons a i {
    font-size: 16px;
    /* User requested larger icons */
    color: #d7d7d7;
}

.social-icons a:hover i {
    color: #D1B26C;
}

/* 4. Middle Bar Styling (Logo - Contact - Search - Cart) */
.middle-flex {
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.logo-area {
    flex-shrink: 0;
}

.site-logo {
    height: 80px;
    /* Adjusted height */
    width: auto;
    display: block;
    transition: height 0.25s ease;
}

/* Contact */
.contact-area {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.contact-area .icon-box i {
    font-size: 28px;
    color: #fff;
}

.contact-area .text-box {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.contact-area .label {
    font-size: 12px;
    color: #D1B26C;
    /* Gold accent */
}

.contact-area .email-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* Vertical Divider */
.vertical-divider {
    width: 1px;
    height: 40px;
    background-color: #e6e6e6;
}

/* Search Bar */
.search-area {
    flex-grow: 1;
    /* Takes available space */
    max-width: 450px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-form input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border-radius: 50px;
    border: 1px solid #e6e6e6;
    outline: none;
    font-family: 'Inter', sans-serif;
    background: #fff;
    transition: all 0.25s ease;
}

/* Availability CTA (shared) */
.availability-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    min-width: 220px;
    text-decoration: none;
}

.availability-cta .availability-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.availability-cta .availability-title {
    font-size: 13px;
    font-weight: 700;
    display: block;
}

.availability-cta .availability-subtitle {
    font-size: 12px;
    display: block;
}

.availability-cta .availability-caret {
    margin-left: auto;
    font-size: 12px;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #111;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

/* User Actions */
.actions-area {
    display: flex;
    align-items: center;
    gap: 25px;
}

.account-icon i {
    font-size: 24px;
    color: #111;
    transition: transform 0.2s ease, font-size 0.25s ease;
}

.cart-wrapper {
    position: relative;
}

.cart-icon {
    font-size: 24px;
    color: #111;
    position: relative;
    display: block;
    transition: transform 0.2s ease, font-size 0.25s ease;
}

.availability-cta {
    background: #fafafa;
    color: #1a1a1a;
    border: 1px solid #e8dcc7;
    border-radius: 0;
    box-shadow: 0 4px 10px rgba(17, 17, 17, 0.08);
    transition: all 0.25s ease;
}

.availability-cta .availability-icon {
    background: transparent;
    border-color: transparent;
    color: #111;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.25s ease, color 0.25s ease;
}

.availability-cta .availability-title {
    color: #2a2114;
    font-size: 14px;
}

.availability-cta .availability-subtitle,
.availability-cta .availability-caret {
    color: #666;
}

.availability-cta:hover {
    background: #f5f5f5;
    border-color: #dccfb8;
    color: #111;
    box-shadow: 0 6px 12px rgba(17, 17, 17, 0.1);
}

.availability-cta:hover .availability-icon {
    background: transparent;
    color: #d1b26c;
    transform: scale(1.12) rotate(-8deg);
}

/* Shrink on scroll */
header.sticky-active .middle-bar-wrapper {
    padding: 12px 0;
}

header.sticky-active .site-logo {
    height: 44px;
}

header.sticky-active .search-form input {
    padding: 9px 16px;
}

header.sticky-active .availability-cta {
    padding: 6px 10px;
}

header.sticky-active .account-icon i,
header.sticky-active .cart-icon {
    font-size: 20px;
}

header.sticky-active .availability-cta .availability-title {
    font-size: 12px;
}

header.sticky-active .availability-cta .availability-subtitle {
    font-size: 11px;
}

header.sticky-active .horizontal-menu {
    gap: 26px;
}

header.sticky-active .horizontal-menu>li>a {
    font-size: 13px;
    padding: 12px 0;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #D1B26C;
    color: #fff;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Jost', sans-serif;
}

/* 5. Navigation Menu */
.nav-flex {
    justify-content: center;
    /* Center the menu */
    position: relative;
}

.horizontal-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.horizontal-menu>li>a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    /* Size for Inter */
    padding: 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    /* User requested Inter for menu */
}

.horizontal-menu>li>a:hover {
    color: #D1B26C;
}

.horizontal-menu .emoji {
    height: 18px;
    width: 18px;
    vertical-align: sub;
}

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    border-top: 3px solid #D1B26C;
    display: none;
    z-index: 1000;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 8px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.submenu li a:hover {
    background: #f9f9f9;
    color: #D1B26C;
    padding-left: 25px;
}

/* Mobile tweaks */
@media (max-width: 900px) {
    .top-bar-wrapper .header-container {
        height: 32px;
        font-size: 11px;
    }

    .top-right {
        gap: 8px;
    }

    .middle-bar-wrapper {
        padding: 8px 0;
    }

    .middle-flex {
        justify-content: space-between;
        gap: 10px;
        flex-wrap: wrap;
    }

    .vertical-divider,
    .search-area {
        display: none;
    }

    .header-container {
        padding: 0 16px;
    }

    .site-logo {
        height: 48px;
    }

    .availability-cta {
        background: transparent;
        border: none;
        padding: 0;
        min-width: auto;
        order: 5;
        box-shadow: none;
        margin-left: 0;
    }

    .availability-cta .availability-text,
    .availability-cta .availability-caret {
        display: none;
    }

    .availability-cta .availability-icon {
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
    }

    .actions-area {
        gap: 12px;
        order: 4;
        margin-left: auto;
    }

    .account-icon i,
    .cart-icon {
        font-size: 20px;
    }

    header.sticky-active .site-logo {
        height: 34px;
    }

    .logo-area {
        order: 1;
    }

    .mobile-toggle {
        order: 2;
        margin-left: 20px;
    }

    .nav-bar-wrapper {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .availability-cta:hover {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .availability-cta:hover .availability-icon {
        background: transparent;
        border: none;
    }
}

/* Mobile Toggle Button - Hidden on Desktop */
.mobile-toggle {
    display: none;
    /* Default hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    text-decoration: none;
}

.mobile-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #111;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .mobile-toggle {
        display: flex;
    }

    .middle-flex {
        flex-wrap: nowrap;
    }
}

/* Burger to X animation */
.mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- Mobile / Responsive --- */
@media (max-width: 992px) and (min-width: 901px) {
    .middle-flex {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
        padding: 15px 20px;
        /* More padding on mobile */
    }

    .logo-area {
        order: 1;
        width: auto;
    }

    .actions-area {
        order: 2;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .search-area {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .search-form input {
        background: #fff;
        color: #111;
        border: 1px solid #e6e6e6;
    }

    .search-form input::placeholder {
        color: #999;
    }

    .contact-area,
    .vertical-divider {
        display: none;
    }

    .nav-bar-wrapper {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .top-bar-wrapper {
        display: none;
    }
}

/* Extra Small Mobile (<=480px) - Centered Layout */
@media (max-width: 480px) {
    .middle-flex {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 10px;
    }

    .logo-area {
        order: 1;
        width: auto;
        display: flex;
        justify-content: flex-start;
    }

    .site-logo {
        height: 42px;
    }

    .actions-area {
        order: 4;
        justify-content: flex-end;
        width: auto;
    }

    .search-area {
        order: 3;
        width: 100%;
    }
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== MOBILE MENU CONTAINER ===== */
.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.mobile-menu-container.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.menu-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.close-menu {
    background: none;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 40px;
    height: 40px;
}

.close-menu:hover {
    color: #D1B26C;
}

.mobile-menu-content {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-links li a {
    display: block;
    padding: 18px 30px;
    font-size: 18px;
    color: #333;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: 0.3s;
}

.mobile-links li a:hover {
    background: #f8f8f8;
    color: #D1B26C;
    border-left-color: #D1B26C;
    padding-left: 35px;
}

/* No scroll when menu open */
body.no-scroll {
    overflow: hidden;
}

/* Account Dropdown */
.account-dropdown {
    position: relative;
}

.account-icon.logged-in {
    background: transparent;
    color: #fff !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.account-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.account-dropdown:hover .account-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-menu .dropdown-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
}

.account-dropdown-menu .greeting {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.account-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #444;
    font-size: 14px;
    transition: all 0.2s;
}

.account-dropdown-menu a:hover {
    background: #f8f8f8;
    color: #111;
}

.account-dropdown-menu a i {
    width: 18px;
    color: #888;
}

.account-dropdown-menu a:hover i {
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.account-dropdown-menu .logout-link {
    color: #dc2626;
}

.account-dropdown-menu .logout-link i {
    color: #dc2626;
}
