@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* 
    ======================================
         GLOBAL UNIFIED HEADER - CLASSIC DESIGN
    ======================================
*/

/* 1. Base Header Layout */
#site-header {
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
    background: transparent !important;
    border: none !important;
}

#site-header.header-solid, #site-header.scrolled {
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

#site-header .top_header {
    width: 100% !important;
    background: transparent !important;
}

#site-header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 20px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* 2. Logo - Safely Sized and Spaced (V4.4 Backup) */
#site-header .logo {
    display: block !important;
    height: 60px !important; 
    width: 180px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    margin-right: 20px !important;
}

#site-header .logo img {
    position: absolute !important;
    top: 50% !important;
    left: -20px !important;
    transform: translateY(-50%) scale(1.6) !important;
    height: 60px !important; 
    width: 100% !important;
    object-fit: contain !important;
    filter: none !important;
}

/* 3. Navigation Links - Smaller and tighter as requested */
#site-header .nav_links {
    display: flex !important;
    gap: 20px !important; /* Tighter gap */
    list-style: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
}

#site-header .nav_links li {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

#site-header .nav_links a {
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 500 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important; /* Smaller text as requested */
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: color 0.3s ease !important;
    white-space: nowrap !important;
}

#site-header.header-solid .nav_links a, #site-header.scrolled .nav_links a {
    color: #333 !important;
}

#site-header .nav_links a:hover, #site-header .nav_links li.active a {
    color: #d4a574 !important;
}

/* 4. Desktop Search Bar - CLASSIC PERSISTENT VIEW */
#site-header .desktop-search-bar {
    display: flex !important;
    align-items: center !important;
    height: 40px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    width: 220px !important;
    margin: 0 15px !important;
}

#site-header.header-solid .desktop-search-bar, #site-header.scrolled .desktop-search-bar {
    background: #f8f8f8 !important;
    border: 1px solid #ddd !important;
}

#site-header .desktop-search-bar input {
    flex-grow: 1 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 15px !important;
    color: #fff !important;
    font-size: 13px !important;
    outline: none !important;
    width: 100% !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#site-header.header-solid .desktop-search-bar input, #site-header.scrolled .desktop-search-bar input {
    color: #333 !important;
}
#site-header.header-solid .desktop-search-bar input::placeholder, #site-header.scrolled .desktop-search-bar input::placeholder {
    color: #888 !important;
}
#site-header .desktop-search-bar input::placeholder {
    color: rgba(255,255,255,0.8) !important;
}

#site-header .desktop-search-bar button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#site-header.header-solid .desktop-search-bar button, #site-header.scrolled .desktop-search-bar button {
    color: #333 !important;
}

#site-header .desktop-search-bar button:hover {
    color: #d4a574 !important;
}

/* 5. Header Icons */
#site-header .header_icons {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

#site-header .header_icons .icon {
    font-size: 20px !important;
    cursor: pointer !important;
    color: #fff !important;
    position: relative !important;
}

#site-header .header_icons .icon a {
    color: inherit !important; 
    text-decoration: none !important;
}

#site-header.header-solid .header_icons .icon, #site-header.scrolled .header_icons .icon,
#site-header.header-solid .header_icons .icon i, #site-header.scrolled .header_icons .icon i,
#site-header.header-solid .open_Menu, #site-header.scrolled .open_Menu,
#site-header.header-solid .open_Menu i, #site-header.scrolled .open_Menu i {
    color: #1a1a1a !important;
}

#site-header .count {
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: #d4a574 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: bold !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 6. Categories Swiper Bar - Enabled for Products Page */
#site-header .categories-bar { display: block !important; }

/* 7. Mobile View Specifics - OFF CANVAS MENU */
@media (max-width: 991px) {
    #site-header .desktop-search-bar {
        display: none !important;
    }
    
    #site-header .top_header .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 6px 14px !important;
        height: 76px !important;
        gap: 10px !important;
    }

    /* The mobile menu (.nav_links) styles that created the white menu have been removed. 
       The restored dark menu (#mobile-offcanvas-menu) is now the only mobile navigation. */
    #site-header .nav_links {
        display: none !important;
    }

    /* Header Elements Positioning */
    #site-header .logo { 
        width: auto !important;
        max-width: 190px !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
        flex: 0 1 auto !important;
        z-index: 10 !important;
    }
    #site-header .logo img { 
        position: static !important;
        top: auto !important;
        left: auto !important;
        height: 64px !important; 
        width: auto !important;
        max-width: 100% !important;
        transform: none !important; 
        filter: none !important; 
    }
    
    #site-header .header_icons {
        margin-left: auto !important;
        gap: 6px !important;
        align-items: center !important;
        flex: 0 0 auto !important;
    }

    #site-header .header_icons .icon {
        font-size: 17px !important;
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #site-header .open_Menu {
        display: flex !important;
        font-size: 21px !important;
        color: #fff !important;
        cursor: pointer !important;
        width: 38px !important;
        height: 38px !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0,0,0,0.1) !important;
        border-radius: 6px !important;
    }
    
    #site-header.header-solid .open_Menu, #site-header.scrolled .open_Menu { 
        color: #1a1a1a !important; 
        background: rgba(0,0,0,0.05) !important;
    }

    /* Prevent content from hiding under fixed header on inner pages */
    body:not(:has(.hero-section)) {
        padding-top: 70px !important;
    }

    /* Fixed Mobile Search Dropdown */
    #site-header .mobile-search-dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        padding: 15px 20px !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
        z-index: 1000 !important;
        border-top: 1px solid #f0f0f0 !important;
    }

    /* Ensure dropdown is hidden when not active */
    #site-header:not(.search-open) .mobile-search-dropdown {
        display: none !important;
    }

    #site-header .mobile-search-dropdown .search_box {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #d0d5dd !important;
        border-radius: 28px !important;
        height: 52px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
        gap: 8px !important;
    }

    #site-header .mobile-search-dropdown .mobile-search-back {
        width: 34px !important;
        height: 34px !important;
        border: none !important;
        background: transparent !important;
        color: #334155 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

    #site-header .mobile-search-dropdown .mobile-search-icon {
        color: #475569 !important;
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }

    #site-header .mobile-search-dropdown .mobile-search-submit {
        width: 34px !important;
        height: 34px !important;
        border: none !important;
        border-radius: 50% !important;
        background: #f1f5f9 !important;
        color: #334155 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

    #site-header .mobile-search-dropdown .search_box input {
        flex: 1 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        font-size: 16px !important; /* Better for iOS to prevent zooming */
        font-weight: 500 !important;
        color: #1a1a1a !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #site-header .mobile-search-dropdown .search_box input::placeholder {
        color: #94a3b8 !important;
        font-weight: 400 !important;
    }

    /* Premium mobile suggestions floating list */
    #site-header .mobile-search-dropdown .search_suggestions {
        border-radius: 24px !important;
        margin-top: 15px !important;
        border: none !important;
        box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important;
        padding: 10px 0 !important;
        background: #ffffff !important;
        max-height: 400px !important;
        overflow-y: auto !important;
    }

    #site-header .mobile-search-dropdown .suggestion_item {
        padding: 12px 20px !important;
        border-bottom: 1px solid rgba(0,0,0,0.03) !important;
        gap: 15px !important;
    }

    #site-header .mobile-search-dropdown .suggestion_item:last-child {
        border-bottom: none !important;
    }

    #site-header .mobile-search-dropdown .suggestion_item img {
        width: 50px !important;
        height: 50px !important;
        border-radius: 12px !important;
        object-fit: cover !important;
        background: #f8f8f8 !important;
        padding: 4px !important;
        border: 1px solid #f0f0f0 !important;
    }

    #site-header .mobile-search-dropdown .suggestion_info h4 {
        font-size: 14px !important;
        font-weight: 600 !important;
        margin-bottom: 4px !important;
        color: #1a1a1a !important;
        line-height: 1.3 !important;
    }

    #site-header .mobile-search-dropdown .suggestion_info .price {
        font-size: 13px !important;
        color: #d4a574 !important;
        font-weight: 700 !important;
    }
}

/* Extra small phones: prevent crowding and overlap */
@media (max-width: 480px) {
    #site-header .top_header .container {
        padding: 6px 10px !important;
        height: 74px !important;
        gap: 8px !important;
    }

    #site-header .logo {
        max-width: 200px !important;
    }

    #site-header .logo img {
        height: 68px !important;
    }

    #site-header .header_icons {
        gap: 4px !important;
    }

    #site-header .header_icons .icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    #site-header .open_Menu {
        width: 36px !important;
        height: 36px !important;
        font-size: 20px !important;
    }

    /* Keep header clean on small screens */
    #site-header .header_icons .search-toggle,
    #site-header .header_icons .icon:nth-child(2) {
        display: none !important;
    }

    #site-header .count {
        top: -5px !important;
        right: -5px !important;
        width: 15px !important;
        height: 15px !important;
        font-size: 9px !important;
    }
}

@media (min-width: 992px) {
    #site-header .open_Menu, #site-header .search-toggle, #site-header .mobile-search-dropdown {
        display: none !important;
    }
}


/* Dropdown specific fixes (ONLY targeting text color and drop margin to prevent layout breaks) */

#site-header .nav_links .has_dropdown {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

#site-header .nav_links .has_dropdown::after {
    content: '' !important;
    position: absolute !important;
    bottom: -30px !important;
    left: 0 !important;
    width: 100% !important;
    height: 30px !important;
    background: transparent !important;
}

/* Base dropdown container */
#site-header .nav_dropdown,
#site-header .sub_dropdown {
    position: absolute !important;
    background: #ffffff !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    border: 1px solid #eaeaea !important;
    min-width: 250px !important;
    padding: 0 !important;
    z-index: 1000 !important;
    border-radius: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#site-header .nav_dropdown {
    top: 100% !important; 
}

[dir="ltr"] #site-header .nav_dropdown,
html:not([dir="rtl"]) #site-header .nav_dropdown {
    left: 0 !important;  
}

[dir="rtl"] #site-header .nav_dropdown {
    right: 0 !important;  
}

/* Hover effect to show menus */
#site-header .nav_links .has_dropdown:hover > .nav_dropdown,
#site-header .has_sub_dropdown:hover > .sub_dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Sub-dropdown positioning */
#site-header .sub_dropdown {
    top: -1px !important; /* Align border with parent */
}
[dir="ltr"] #site-header .sub_dropdown,
html:not([dir="rtl"]) #site-header .sub_dropdown {
    left: 100% !important;
}
[dir="rtl"] #site-header .sub_dropdown {
    left: 100% !important; /* Open to the Right (limn) instead of Left */
    right: auto !important;
}

/* List items */
#site-header .nav_dropdown li,
#site-header .sub_dropdown li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}
#site-header .nav_dropdown li:last-child,
#site-header .sub_dropdown li:last-child {
    border-bottom: none !important;
}

/* Links */
#site-header .nav_dropdown li > a,
#site-header .sub_dropdown li > a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    color: #1a1a1a !important;
    direction: ltr !important; 
    text-align: left !important;
    font-size: 13px !important;
    padding: 15px 20px !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    background: transparent !important;
    border: none !important;
}

#site-header .nav_dropdown li > a:hover,
#site-header .sub_dropdown li > a:hover {
    background: #fdfdfd !important;
    color: #d4a574 !important;
}

#site-header .nav_dropdown .arrow-indicator {
    font-size: 11px !important;
    color: #999 !important;
}
#site-header .nav_dropdown li > a:hover .arrow-indicator {
    color: #d4a574 !important;
}
