/* Brand New Mobile Menu CSS */

/* Desktop Navigation - Hide on mobile */
.desktop-nav {
    display: flex;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.desktop-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: #f59e0b;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger color when header is not scrolled (transparent) */
.header:not(.scrolled) .mobile-menu-btn span {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Hamburger color when header is scrolled */
.header.scrolled .mobile-menu-btn span {
    background: #ffffff !important;
    box-shadow: none;
}

/* Force white hamburger in light mode across all pages and header states */
html body:not([data-theme="dark"]) .header .mobile-menu-btn span {
    background: #ffffff !important;
}

/* Dark mode hamburger colors */
[data-theme="dark"] .header:not(.scrolled) .mobile-menu-btn span {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .header.scrolled .mobile-menu-btn span {
    background: #ffffff !important;
    box-shadow: none;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay - Enhanced to match order panel */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.3) 100%);
    backdrop-filter: blur(4px) saturate(120%);
    -webkit-backdrop-filter: blur(4px) saturate(120%);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode mobile menu overlay */
[data-theme="dark"] .mobile-menu-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.5) 100%) !important;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu - Enhanced slide-in animation matching order panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    transform: translateX(100%);
    box-shadow: -15px 0 60px rgba(0, 0, 0, 0.15), -5px 0 25px rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

/* Dark mode mobile menu */
[data-theme="dark"] .mobile-menu {
    background: #1f2937 !important;
    box-shadow: -15px 0 60px rgba(0, 0, 0, 0.3), -5px 0 25px rgba(0, 0, 0, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
    right: 0;
    transform: translateX(0);
    animation: slideInFromRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
    from {
        right: -100%;
        opacity: 0.8;
    }
    to {
        right: 0;
        opacity: 1;
    }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

/* Dark mode mobile menu header */
[data-theme="dark"] .mobile-menu-header {
    background: #374151 !important;
    border-bottom-color: #4b5563 !important;
}

/* Mobile menu brand (logo + site name) */
.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-brand a {
    cursor: pointer !important;
    pointer-events: auto !important;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-menu-brand img {
    height: 45px;
    width: auto;
    object-fit: contain;
    display: none;
}

.mobile-menu-brand img.show {
    display: block;
}

.mobile-menu-brand h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: pointer !important;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark mode mobile menu header text and close button */
[data-theme="dark"] .mobile-menu-brand h3 {
    color: #ffffff !important;
}

[data-theme="dark"] .mobile-menu-close {
    color: #ffffff !important;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Initial state for menu items - hidden and positioned to the right */
.mobile-menu-list li {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
}

/* Animation delay for each menu item */
.mobile-menu-list li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-list li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-list li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-list li:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-list li:nth-child(5) { transition-delay: 0.5s; }

/* Animated state when menu is active */
.mobile-menu.active .mobile-menu-list li {
    opacity: 1;
    transform: translateX(0);
}

/* Menu item styling */
.mobile-menu-list li {
    border-bottom: 1px solid #eee;
}

.mobile-menu-link {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu-link:hover {
    background: #f5f5f5;
    color: #10b981;
    padding-left: 30px;
}

.mobile-menu-link.active {
    background: #e5e7eb;
    color: #1f2937;
    font-weight: 600;
}

/* Dark mode mobile menu list items and links */
[data-theme="dark"] .mobile-menu-list li {
    border-bottom-color: #4b5563 !important;
}

[data-theme="dark"] .mobile-menu-link {
    color: #ffffff !important;
}

[data-theme="dark"] .mobile-menu-link:hover {
    background: #374151 !important;
    color: #10b981 !important;
    padding-left: 30px;
}

[data-theme="dark"] .mobile-menu-link.active {
    background: #374151 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Blur effect when mobile menu is open */
@media (max-width: 768px) {
    /* Blur the main page content when mobile menu is open */
    body.mobile-menu-open .hero,
    body.mobile-menu-open .about,
    body.mobile-menu-open .services,
    body.mobile-menu-open .shop,
    body.mobile-menu-open .contact,
    body.mobile-menu-open .footer,
    body.mobile-menu-open main,
    body.mobile-menu-open section,
    body.mobile-menu-open .detail-container,
    body.mobile-menu-open .shop-page-container {
        filter: blur(3px);
        transition: filter 0.3s ease;
    }
    
    /* Ensure mobile menu stays clear */
    body.mobile-menu-open .mobile-menu,
    body.mobile-menu-open .mobile-menu * {
        filter: none !important;
    }
    
    /* Blur header elements but keep mobile menu button clear */
    body.mobile-menu-open .header .logo,
    body.mobile-menu-open .header .desktop-nav,
    body.mobile-menu-open .header .btn-primary {
        filter: blur(2px);
        transition: filter 0.3s ease;
    }
    
    body.mobile-menu-open .mobile-menu-btn {
        filter: none !important;
    }
}

/* Dark mode blur effects */
@media (max-width: 768px) {
    [data-theme="dark"] body.mobile-menu-open .hero,
    [data-theme="dark"] body.mobile-menu-open .about,
    [data-theme="dark"] body.mobile-menu-open .services,
    [data-theme="dark"] body.mobile-menu-open .shop,
    [data-theme="dark"] body.mobile-menu-open .contact,
    [data-theme="dark"] body.mobile-menu-open .footer,
    [data-theme="dark"] body.mobile-menu-open main,
    [data-theme="dark"] body.mobile-menu-open section,
    [data-theme="dark"] body.mobile-menu-open .detail-container,
    [data-theme="dark"] body.mobile-menu-open .shop-page-container {
        filter: blur(3px) !important;
        transition: filter 0.3s ease;
    }
    
    [data-theme="dark"] body.mobile-menu-open .header .logo,
    [data-theme="dark"] body.mobile-menu-open .header .desktop-nav,
    [data-theme="dark"] body.mobile-menu-open .header .btn-primary {
        filter: blur(2px) !important;
        transition: filter 0.3s ease;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn,
    .mobile-menu-overlay,
    .mobile-menu {
        display: none !important;
    }
}
