/* ==========================================================================
   LUXORA - Complete Responsive & Mobile Stylesheet
   ========================================================================== */

/* Anti-Overflow Global Safety Rule */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

/* Mobile Bottom Navigation Bar (Visible only on mobile <= 768px) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    z-index: 99;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-primary);
}

.mobile-nav-item.active {
    color: var(--color-accent);
}

/* Mobile Slide-out Drawer Menu */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #FFFFFF;
    z-index: 202;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 30px;
    transition: left var(--transition-smooth);
}

.mobile-drawer.active {
    left: 0;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-drawer-nav a {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

/* 1. Large Laptops / Tablets (Max 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .hero-grid,
    .product-detail-grid,
    .deal-grid,
    .split-banner-grid,
    .cart-grid,
    .dashboard-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .fresh-drops-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    /* Mobile Shop Filter Trigger & Off-canvas Drawer */
    .mobile-filter-trigger {
        display: none;
    }

    .mobile-filter-header {
        display: none;
    }

    .filter-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 290;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .filter-backdrop.active {
        display: block;
        opacity: 1;
    }

    @media (max-width: 1024px) {
        .mobile-filter-trigger {
            display: inline-flex !important;
            align-items: center;
            gap: 8px;
            background: #FFFFFF !important;
            border: 1px solid var(--color-accent) !important;
            color: var(--color-primary) !important;
            font-weight: 700 !important;
            font-size: 0.82rem !important;
            padding: 8px 16px !important;
            border-radius: 6px !important;
            cursor: pointer;
            box-shadow: var(--shadow-sm);
        }

        .mobile-filter-header {
            display: flex !important;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 16px;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--color-border);
        }

        .btn-close-filter {
            background: none;
            border: none;
            font-size: 2rem;
            line-height: 1;
            color: var(--color-primary);
            cursor: pointer;
            padding: 0 4px;
        }

        .filter-sidebar {
            display: block !important;
            position: fixed !important;
            top: 0 !important;
            left: -350px !important;
            width: 320px !important;
            max-width: 85vw !important;
            height: 100vh !important;
            background: #FFFFFF !important;
            z-index: 300 !important;
            overflow-y: auto !important;
            padding: 24px !important;
            box-shadow: 10px 0 30px rgba(0,0,0,0.25) !important;
            border-radius: 0 !important;
            transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        }

        .filter-sidebar.mobile-open {
            left: 0 !important;
        }
    }

    .gallery-wrapper {
        flex-direction: column-reverse;
    }

    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
    }

    .footer-newsletter {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-newsletter-form {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

/* 2. Mobile Devices & Small Tablets (Max 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 64px; /* Room for fixed mobile bottom nav */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .header-container {
        height: 68px;
        padding: 0 16px;
    }

    .brand-logo {
        font-size: 1.35rem;
        letter-spacing: 0.08em;
    }

    .brand-logo-img {
        height: 48px;
        max-height: 50px;
        max-width: 170px;
    }

    .header-right {
        gap: 12px;
    }

    .icon-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Section Headers */
    .section-padding {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-header h2 {
        font-size: 1.9rem;
    }

    .section-header-flex {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* Hero Section Mobile Overrides */
    .hero-slider-section {
        min-height: auto;
    }

    .hero-slide {
        padding: 30px 0 60px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-tag-pill {
        font-size: 0.72rem;
        padding: 6px 14px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 2.15rem;
        line-height: 1.15;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .hero-highlights-row {
        justify-content: center;
        gap: 8px 14px;
        padding: 10px 14px;
        margin-bottom: 24px;
        width: 100%;
    }

    .hero-highlight-item {
        font-size: 0.75rem;
    }

    .hero-btn-group {
        justify-content: center;
        width: 100%;
        gap: 12px;
    }

    .hero-btn-main, .hero-btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.82rem;
    }

    .hero-media-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-top: 10px;
    }

    .hero-media-frame {
        padding: 6px;
        border-radius: 16px;
    }

    .hero-media-img {
        height: 340px;
        width: 100%;
        object-fit: cover;
        border-radius: 12px;
    }

    .hero-floating-badge.badge-top {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
    }

    .hero-floating-badge.badge-bottom {
        position: relative;
        left: 0;
        bottom: 0;
        margin-top: 14px;
        width: 100%;
        padding: 12px 16px;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .hero-controls-bar {
        bottom: 12px;
        padding: 6px 10px;
        gap: 8px;
        max-width: 95%;
    }

    .slider-dots {
        gap: 5px;
    }

    .dot {
        width: 8px;
        height: 6px;
    }

    .dot.active {
        width: 22px;
    }

    .hero-arrow-btn {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    /* Product Grids */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-content {
        padding: 12px;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-rating {
        font-size: 0.75rem;
    }

    .current-price {
        font-size: 0.95rem;
    }

    .add-to-cart-btn {
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    /* Categories Grid */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .category-card {
        height: 260px;
    }

    /* Fresh Drops Grid */
    .fresh-drops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* Banners & Deals */
    .split-banner-content h2,
    .deal-content h2,
    .signature-content h2 {
        font-size: 1.8rem;
    }

    .editorial-main-img {
        max-height: 320px;
    }

    .editorial-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .editorial-thumb img {
        height: 48px;
    }

    .editorial-thumb span {
        font-size: 0.65rem;
    }

    .editorial-floating-badge {
        bottom: 10px;
        left: 10px;
        padding: 6px 12px;
    }

    .editorial-floating-badge strong {
        font-size: 0.8rem;
    }

    .countdown-box {
        gap: 8px;
    }

    .timer-unit {
        min-width: 58px;
        padding: 8px;
    }

    .timer-unit .number {
        font-size: 1.3rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .insta-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* Footer Mobile Overrides */
    .main-footer {
        padding-top: 50px;
        padding-bottom: 84px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-newsletter {
        padding: 24px 20px;
        margin-bottom: 36px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-input-group {
        flex-direction: column;
        border-radius: var(--border-radius);
    }

    .footer-newsletter-btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
        gap: 16px;
    }

    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .payment-methods {
        justify-content: center;
    }

    .section-header-flex {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .section-header-flex .sub-title-badge {
        margin-bottom: 2px;
    }

    .section-header-flex h2 {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .section-header-flex .btn {
        padding: 8px 14px;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .back-to-top-btn {
        bottom: 74px;
        right: 10px;
        width: 36px;
        height: 36px;
    }


    /* Shop Top Controls Bar Mobile Responsive Optimization */
    .shop-top-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }

    .shop-top-bar > div:first-child {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .shop-top-bar > div:last-child {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        border-top: 1px solid var(--color-border) !important;
        padding-top: 10px !important;
    }

    .shop-top-bar select {
        flex: 1 !important;
        max-width: 220px !important;
        font-size: 0.82rem !important;
        padding: 6px 10px !important;
    }

    /* Product Details Page Mobile Responsive Adjustments */
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .product-action-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .product-action-buttons .btn {
        width: 100% !important;
    }

    /* Checkout & Cart Grid Mobile */
    .cart-grid, .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}
