/* ====== CLEAN MOBILE MENU SYSTEM - GUARANTEED TO WORK ====== */

/* Mobile Menu Button - LUXURY GOLD THEME MATCHING DESKTOP */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
    border: 2px solid var(--accent-gold-light);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.mobile-menu-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* NUCLEAR MOBILE MENU OVERLAY - ABSOLUTELY HIDDEN BY DEFAULT */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: -1 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    display: none !important;
    transform: translateX(-100vw) !important;
}

/* OVERLAY ACTIVE STATE - ONLY WHEN EXPLICITLY ACTIVATED */
.mobile-menu-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 9998 !important;
    transform: translateX(0) !important;
}

/* NUCLEAR MOBILE MENU DRAWER - ABSOLUTELY HIDDEN BY DEFAULT */
.mobile-menu-drawer {
    position: fixed !important;
    top: 0 !important;
    left: -200% !important;
    width: 85% !important;
    max-width: 320px !important;
    height: 100vh !important;
    background: white !important;
    z-index: -1 !important;
    transition: left 0.3s ease !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    display: none !important;
    flex-direction: column !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-100vw) !important;
}

/* DRAWER ACTIVE STATE - ONLY WHEN EXPLICITLY ACTIVATED */
.mobile-menu-drawer.active {
    display: flex !important;
    left: 0 !important;
    z-index: 9999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--accent-warm);
    border-bottom: 1px solid var(--light-gray);
}

.mobile-menu-header h3 {
    margin: 0;
    color: var(--accent-gold-dark);
    font-weight: 600;
    font-size: 1.2rem;
}

.mobile-menu-close {
    background: var(--accent-gold);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: var(--accent-gold-dark);
    transform: scale(1.1);
}

/* Mobile Menu Items */
.mobile-menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.mobile-menu-nav li {
    border-bottom: 1px solid var(--light-gray);
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 60px;
    gap: 0.5rem;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a:active {
    background: var(--accent-warm);
    color: var(--accent-gold-dark);
    transform: translateX(8px);
    border-left: 3px solid var(--accent-gold);
    padding-left: calc(1.5rem - 3px);
}

/* Mobile Search */
.mobile-menu-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.mobile-search-form {
    display: flex;
    gap: 0.5rem;
}

.mobile-search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 16px;
    background: var(--off-white);
}

.mobile-search-btn {
    padding: 0.75rem 1rem;
    background: var(--accent-gold);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.mobile-search-btn:hover {
    background: var(--accent-gold-dark);
}

/* Mobile Cart */
.mobile-menu-cart {
    padding: 1rem 1.5rem;
    background: var(--off-white);
}

.mobile-cart-btn {
    background: var(--accent-gold);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
}

.mobile-cart-btn:hover {
    background: var(--accent-gold-dark);
    transform: translateY(-2px);
}

/* ====== RESPONSIVE BEHAVIOR ====== */

/* MOBILE NAVIGATION - Ensure mobile menu works on all devices ≤1024px */
@media (max-width: 1024px) {
    /* Ensure mobile menu button is always visible and functional */
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        z-index: 1100 !important;
        position: relative !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        border-radius: 8px !important;
        transition: background-color 0.2s ease !important;
    }
    
    .mobile-menu-btn:hover,
    .mobile-menu-btn:active {
        background: rgba(212, 175, 55, 0.1) !important;
    }
    
    /* Hamburger icon styling - for 3 span elements */
    .mobile-menu-btn span {
        display: block !important;
        width: 24px !important;
        height: 2px !important;
        background: var(--accent-gold-dark) !important;
        border-radius: 1px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Hide desktop navigation on mobile */
    .nav-menu,
    .nav-search,
    .nav-cart {
        display: none !important;
    }
    
    /* Mobile drawer and overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        backdrop-filter: blur(4px);
    }
    
    .mobile-menu-overlay.active {
        display: block !important;
    }
    
    .mobile-menu-drawer {
        display: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        z-index: 9999;
        flex-direction: column;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
        padding: var(--spacing-xl) 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-menu-drawer.active {
        display: flex !important;
        left: 0 !important;
    }
    
    /* Device-specific drawer sizing for optimal mobile experience */
    @media (max-width: 375px) {
        .mobile-menu-drawer {
            width: 90% !important;
            max-width: 320px !important;
        }
    }
    
    @media (min-width: 376px) and (max-width: 480px) {
        .mobile-menu-drawer {
            width: 85% !important;
            max-width: 340px !important;
        }
    }
    
    @media (min-width: 481px) and (max-width: 768px) {
        .mobile-menu-drawer {
            width: 80% !important;
            max-width: 360px !important;
        }
    }
    
    @media (min-width: 769px) and (max-width: 1024px) {
        .mobile-menu-drawer {
            width: 75% !important;
            max-width: 400px !important;
        }
    }
}

/* Desktop - Hide mobile menu */
@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-overlay,
    .mobile-menu-drawer {
        display: none !important;
    }
}

/* REMOVED - Mobile now shows desktop navigation for complete parity */