/* ========================================
   CUSTOM HEADER - MINIMAL DESIGN
   Based on Reference Design
   Cache-buster: 2.3
   ======================================== */

/* Reset Journal2 Header Styles */
header,
#header,
.header-wrapper {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Hide Journal2 Default Elements */
.journal-top-header,
.journal-secondary,
.top-bar,
#logo,
.mobile-trigger,
.mobile-menu-item,
.journal-menu-bg,
#header .tablet-mobile-logo {
    display: none !important;
}

/* Custom Header Container - Solid White & Sticky */
.custom-header {
    width: 100%;
    background-color: #FFFFFF !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    position: sticky !important;
    top: 0;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Global Scrolled State: Sticky, Blurred, and Slimmer */
.custom-header.scrolled {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 0;
    /* Slimmer on scroll */
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Base Navigation Colors - Explicitly Black */
.custom-logo-text,
.custom-nav a,
.custom-header-icon {
    color: #000000 !important;
}

.custom-hamburger span {
    background-color: #000000 !important;
}

/* Homepage Only: Transparent Overlay (Initial State Only) */
.home-header:not(.scrolled) {
    position: absolute !important;
    background-color: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    top: 0;
    left: 0;
}

.home-header:not(.scrolled) .custom-logo-text,
.home-header:not(.scrolled) .custom-nav a,
.home-header:not(.scrolled) .custom-header-icon {
    color: #FFFFFF !important;
}

.home-header:not(.scrolled) .custom-hamburger span {
    background-color: #FFFFFF !important;
}

.custom-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header Sections */
.custom-header-left,
.custom-header-right {
    flex: 1;
}

.custom-header-center {
    flex: 0 0 auto;
    text-align: center;
}

/* Logo Styling */
.custom-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.custom-logo-text:hover {
    opacity: 0.7;
}

/* Left Section - Navigation (Horizontal) */
.custom-header-left {
    display: flex;
    align-items: center;
}

.custom-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex !important;
    /* Force flex */
    flex-direction: row !important;
    /* Force horizontal */
    gap: 30px;
}

.custom-nav a {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-nav a:hover {
    opacity: 0.7;
}

/* Right Section - Icons */
.custom-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.custom-header-icons {
    display: flex;
    align-items: center;
    gap: 25px;
}

.custom-header-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: relative;
    color: #000000;
    transition: all 0.3s ease;
}

.custom-header-icon:hover {
    color: #666666;
}

.custom-header-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.2;
}

/* Cart Badge - Beige Square Style */
.custom-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #C1B59C;
    /* Beige color */
    color: #111111;
    font-size: 9px;
    font-weight: 600;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
}

/* Mobile Hamburger Style */
.custom-hamburger {
    display: none !important;
    /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: -10px;
    width: 40px;
    height: 40px;
}

.custom-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #000000;
    transition: all 0.3s ease;
}

/* Mobile Menu Styling - Side Panel Redesign */
.custom-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Start from right */
    width: 100%;
    /* Full width */
    max-width: none;
    height: 100vh;
    background-color: #FFFFFF;
    /* White for readability */
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.custom-mobile-menu.active {
    transform: translateX(-100%);
    /* Slide in from right */
}

/* Mobile Menu Header */
.custom-mobile-menu-header {
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

.custom-mobile-menu-logo {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #111111;
}

.custom-mobile-menu-close {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #111111;
}

.custom-mobile-menu-close svg {
    width: 20px;
    height: 20px;
}

/* Mobile Menu Links */
.custom-mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 25px;
}

.custom-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.custom-mobile-menu li {
    margin-bottom: 25px;
}

.custom-mobile-menu a {
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.custom-mobile-menu a:hover {
    color: #888888;
    padding-left: 5px;
}

/* Mobile Menu Footer */
.custom-mobile-menu-footer {
    padding: 30px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-mobile-menu-footer a {
    font-size: 11px;
    color: #666666;
    letter-spacing: 0.1em;
}

.custom-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    /* Subtle dim */
    z-index: 9999;
}

.custom-menu-overlay.active {
    display: block;
}

/* Mobile specific overrides */
@media (max-width: 1024px) {
    .custom-header {
        position: fixed;
        /* Sticky on mobile */
        padding: 15px 0;
        background-color: rgba(255, 255, 255, 0.95);
    }

    .custom-header-inner {
        padding: 0 20px;
    }

    .custom-nav {
        display: none;
    }

    .custom-hamburger {
        display: flex !important;
        /* Show on mobile */
    }

    .custom-logo-text {
        font-size: 20px;
    }

    .custom-header-icons {
        display: none !important;
    }
}

/* ========================================
   SEARCH OVERLAY STYLES
   ======================================== */
.custom-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #FFFFFF;
    z-index: 10002;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.custom-search-overlay.active {
    transform: translateY(0);
}

.custom-search-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-search-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 60px;
}

.custom-search-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: -10px;
    color: #111111;
    transition: transform 0.3s ease;
}

.custom-search-close:hover {
    transform: rotate(90deg);
}

.custom-search-close svg {
    width: 32px;
    height: 32px;
}

.custom-search-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 100px;
}

.custom-search-field {
    width: 100%;
    max-width: 800px;
    position: relative;
    border-bottom: 1px solid #111111;
    display: flex;
    align-items: center;
    transition: border-bottom-color 0.3s ease;
}

.custom-search-field:focus-within {
    border-bottom-color: #666666;
}

.custom-search-field input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px 0;
    font-family: inherit;
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #111111;
    outline: none;
}

.custom-search-field input::placeholder {
    color: #CCCCCC;
}

.custom-search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #111111;
    transition: opacity 0.3s ease;
}

.custom-search-submit:hover {
    opacity: 0.6;
}

.custom-search-submit svg {
    width: 32px;
    height: 32px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .custom-search-inner {
        padding: 20px;
    }

    .custom-search-field input {
        font-size: 24px;
    }

    .custom-search-close svg,
    .custom-search-submit svg {
        width: 24px;
        height: 24px;
    }
}

/* ========================================
   COLLECTIONS DROPDOWN STYLES
   Glassmorphism style matching reference
   ======================================== */

/* Collections Trigger Arrow */
.collections-trigger {
    position: relative;
}

.collections-arrow {
    display: inline-block;
    margin-left: 3px;
    vertical-align: middle;
    transition: transform 0.3s ease;
    position: relative;
    top: -1px;
}

.collections-dropdown.active~.custom-header .collections-arrow {
    transform: rotate(180deg);
}

/* Backdrop — blurs the entire page content behind */
.collections-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.collections-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Dropdown Panel — Glassmorphism */
.collections-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1002;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    max-height: 100vh;
}

.collections-dropdown.active {
    transform: translateY(0);
}

.collections-dropdown-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 50px 40px;
}

/* Dropdown Header */
.collections-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.collections-dropdown-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: #111111;
    letter-spacing: 0.02em;
}

.collections-dropdown-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: -8px;
    color: #111111;
    transition: transform 0.3s ease;
}

.collections-dropdown-close:hover {
    transform: rotate(90deg);
}

.collections-dropdown-close svg {
    width: 22px;
    height: 22px;
}

/* Category Grid — horizontal row like reference */
.collections-dropdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0 40px;
    justify-content: center;
    align-items: flex-start;
    padding: 5px 0;
}

/* Category Item — minimal text links */
.collections-dropdown-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 5px;
    text-decoration: none;
    color: #222222;
    transition: all 0.3s ease;
    position: relative;
}

.collections-dropdown-item::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 5px;
    right: 5px;
    height: 1px;
    background-color: #111111;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.collections-dropdown-item:hover {
    color: #000000;
}

.collections-dropdown-item:hover::after {
    transform: scaleX(1);
}

.collections-item-name {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.collections-item-arrow {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.collections-dropdown-item:hover .collections-item-arrow {
    opacity: 0.7;
    transform: translateX(0);
}

/* ========================================
   HOMEPAGE ONLY — White dropdown text
   ======================================== */
.home-dropdown .collections-dropdown-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.home-dropdown .collections-dropdown-title {
    color: #FFFFFF;
}

.home-dropdown .collections-dropdown-close {
    color: #FFFFFF;
}

.home-dropdown .collections-dropdown-item {
    color: #FFFFFF;
}

.home-dropdown .collections-dropdown-item::after {
    background-color: #FFFFFF;
}

.home-dropdown .collections-dropdown-item:hover {
    color: rgba(255, 255, 255, 0.85);
}

.home-dropdown .collections-subcategories .collections-subitem {
    color: #FFFFFF !important;
}

.home-dropdown .collections-subcategories .collections-subitem:hover {
    color: #D3D3D3 !important; /* Light gray hover */
}

/* Base Dropdown Subitem State (Inner Pages) */
.collections-subcategories .collections-subitem {
    color: #222222; /* Standard black */
    white-space: nowrap; /* Prevents text from squishing into the 0-width container */
    display: block;
}

/* Base Dropdown Subitem Hover State */
.collections-subcategories .collections-subitem:hover {
    color: #888888; /* Standard gray hover */
}

/* Base Dropdown Subcategories (Inner Pages) */
.collections-subcategories {
    display: none !important;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 25px; /* Adds extra padding so blur completely clears the text */
    width: 0; /* Vital: prevents flex item from widening parent column, fixing horizontal shake */
    overflow: visible;
    animation: fadeIn 0.3s ease;
}



/* Show Subcategories on Hover */
.collections-dropdown-column:hover .collections-subcategories {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   MOBILE COLLECTIONS SUB-MENU
   ======================================== */
.mobile-collections-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.mobile-collections-arrow {
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.mobile-collections-parent.open .mobile-collections-arrow {
    transform: rotate(180deg);
}

.mobile-collections-sub {
    list-style: none;
    padding: 0 0 0 15px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-collections-parent.open .mobile-collections-sub {
    max-height: 500px;
    padding-top: 12px;
}

.mobile-collections-sub li {
    margin-bottom: 12px;
}

.mobile-collections-sub a {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #666666 !important;
    letter-spacing: 0.1em;
}

.mobile-collections-sub a:hover {
    color: #111111 !important;
}

/* Hide desktop dropdown on mobile */
@media (max-width: 1024px) {

    .collections-dropdown,
    .collections-backdrop {
        display: none !important;
    }
}