/* =====================================================
   RESPONSIVE NAVIGATION SYSTEM
   ===================================================== */

/* Mobile Bottom Navigation Styles */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #000000;
    border-top: 1px solid #1c1c1e;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    height: calc(60px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    transition: all 0.2s ease;
    transform-origin: center;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Hide bottom nav on tablet and desktop */
@media (min-width: 768px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Add padding to body on mobile to prevent content being hidden by bottom nav */
@media (max-width: 767px) {
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }
}

/* =====================================================
   RESPONSIVE TOP NAVBAR
   ===================================================== */

/* Mobile: Simplified navbar (Logo + Avatar only) */
@media (max-width: 767px) {

    /* Hide desktop nav links on mobile */
    .nav-links {
        display: none !important;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block !important;
    }

    /* Keep logo and cart/sign-in visible */
    .navbar {
        padding: 0.8rem 4%;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Simplify navbar items on mobile */
    .nav-item-dropdown,
    .nav-cart-btn {
        display: flex !important;
    }
}

/* Tablet: Show some nav items */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    /* Hide mobile menu button */
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Desktop: Full navigation */
@media (min-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    /* Hide mobile menu button */
    .mobile-menu-btn {
        display: none !important;
    }
}

/* =====================================================
   MOBILE MENU OVERLAY (When hamburger is clicked)
   ===================================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.mobile-menu-links a {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    transition: all 0.3s ease;
}

.mobile-menu-links a:active {
    transform: scale(0.95);
    color: #0071e3;
}

/* =====================================================
   SAFE AREA INSETS (iPhone X+ notch support)
   ===================================================== */

@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        height: max(60px, calc(60px + env(safe-area-inset-bottom)));
    }

    body {
        padding-bottom: max(70px, calc(70px + env(safe-area-inset-bottom))) !important;
    }
}

/* =====================================================
   TOUCH OPTIMIZATIONS
   ===================================================== */

@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets on mobile */
    .bottom-nav-item {
        min-height: 48px;
        min-width: 48px;
    }

    /* Remove hover effects on touch devices */
    .bottom-nav-item:hover {
        opacity: 1;
    }
}