/* ==========================================================================
   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: #0E0E0E;
    color: #FFFFFF;
    border-right: 1px solid rgba(212, 175, 55, 0.25);
    z-index: 202;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
    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-header button {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 1.8rem;
    cursor: pointer;
}

.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;
    color: #FFFFFF;
    transition: color 0.2s ease;
}

.mobile-drawer-nav a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   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-circle-grid,
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 36px 20px;
    }

    .category-circle-frame {
        width: 148px;
        height: 148px;
    }

    .category-circle-name {
        font-size: 1.15rem;
    }

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

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

    .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: 60px;
        padding: 0 16px;
    }

    .main-header .site-logo-img {
        height: 48px;
        max-width: 180px;
    }

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

    .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-slide {
        padding: 30px 0 50px 0;
    }

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

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

    .hero-content h1 {
        font-size: 2.1rem;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 24px;
        max-width: 100%;
    }

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

    .hero-media-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .hero-media-img {
        height: 300px;
        width: 100%;
        object-fit: cover;
        border-radius: var(--border-radius);
    }

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

    /* 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 Circular Grid (Mobile) */
    .categories-section {
        padding: 60px 0 70px;
    }

    .categories-header {
        margin-bottom: 35px;
    }

    .categories-circle-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 16px;
        max-width: 440px;
        margin: 0 auto;
    }

    .category-circle-card,
    .category-card {
        max-width: 165px;
        height: auto;
    }

    .category-circle-frame {
        width: 130px;
        height: 130px;
    }

    .category-circle-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        bottom: -8px;
    }

    .category-circle-name {
        font-size: 1.05rem;
    }

    .category-circle-subtext {
        font-size: 0.7rem;
    }

    /* Fresh Drops Grid */
    .fresh-drops-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }



    /* Banners & Deals */
    .split-banner-content h2,
    .deal-content h2,
    .signature-content h2 {
        font-size: 1.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;
    }

    .floating-contact-actions {
        bottom: 74px;
        left: 14px;
        gap: 10px;
    }

    .float-btn {
        width: 44px;
        height: 44px;
    }

    .float-btn svg {
        width: 22px;
        height: 22px;
    }

    .float-btn-tooltip {
        display: none !important;
    }



    /* 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;
    }
}

/* 3. Small Mobile Phones (Max 480px) */
@media (max-width: 480px) {
    .main-header .site-logo-img {
        height: 42px;
        max-width: 150px;
    }

    .categories-circle-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 12px;
    }

    .category-circle-frame {
        width: 120px;
        height: 120px;
    }

    .category-circle-name {
        font-size: 0.98rem;
    }

    .category-circle-badge {
        font-size: 0.6rem;
        padding: 3px 9px;
        bottom: -7px;
    }

    .category-circle-subtext {
        font-size: 0.68rem;
    }
}

