/* ============================================================
   MULTI-VIEW RESPONSIVE SYSTEM — Art by Adliya Furnishing
   Comprehensive responsive rules for 5 device tiers:

   1. Desktop    : 1440px+     (large monitors, 4K downscaled)
   2. Laptop     : 1024–1440px (MacBook, standard laptops)
   3. Tablet     : 768–1024px  (iPad, Android tablets)
   4. Phone      : 375–768px   (iPhone, Galaxy, Pixel)
   5. Small Phone: 320–375px   (iPhone SE, Galaxy A01)

   This file loads LAST to act as the final cascade layer.
   ============================================================ */

/* ===== VIEWPORT & GLOBAL RESETS ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-height: 100dvh;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================================================
   TIER 1: DESKTOP — 1440px+ (Large Monitors)
   =================================================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1360px;
        padding: 0 40px;
    }

    /* Hero — larger type, more breathing room */
    .hero-slides {
        height: 520px;
        min-height: 520px;
    }

    .hero-content {
        gap: 60px;
    }

    .hero-text {
        max-width: 580px;
    }

    .hero-text h1 {
        font-size: 56px;
    }

    .hero-text h2 {
        font-size: 40px;
    }

    .hero-text p {
        font-size: 16px;
        line-height: 1.8;
    }

    .hero-image img {
        max-height: 480px;
    }

    /* Section spacing */
    .section-padding {
        padding: 72px 0;
    }

    .section-title {
        font-size: 36px;
    }

    /* Product grids — 4 columns */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .trending-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }

    /* Promo grid */
    .promo-grid {
        gap: 24px;
    }

    /* Deal section */
    .deal-grid {
        max-width: 1200px;
        gap: 56px;
    }

    /* Brand story */
    .brand-story-grid {
        gap: 72px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 40px;
    }

    /* Testimonials */
    .testimonial-layout {
        gap: 40px;
    }

    /* Feature grid */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    /* Shop layout */
    .products-layout {
        grid-template-columns: 280px 1fr;
        gap: 40px;
    }

    /* Best sellers — wider hero card */
    .bs-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Newsletter */
    .newsletter-content {
        gap: 48px;
    }
}

/* ===================================================================
   TIER 2: LAPTOP — 1024–1440px (Standard Laptops)
   =================================================================== */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 1200px;
        padding: 0 24px;
    }

    /* Hero */
    .hero-slides {
        height: 460px;
        min-height: 460px;
    }

    .hero-content {
        gap: 40px;
    }

    .hero-text {
        max-width: 520px;
    }

    .hero-text h1 {
        font-size: 46px;
    }

    .hero-text h2 {
        font-size: 32px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .hero-image img {
        max-height: 420px;
    }

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

    .section-title {
        font-size: 32px;
    }

    /* Product grids */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

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

    /* Features */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* Deal */
    .deal-grid {
        gap: 40px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 30px;
    }

    /* Products layout */
    .products-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }

    /* Best sellers */
    .bs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===================================================================
   TIER 3: TABLET — 768–1024px (iPad, Android Tablets)
   =================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 100%;
        padding: 0 24px;
    }

    /* Hero — show image but smaller, stacked on portrait */
    .hero-slides {
        height: auto;
        min-height: 380px;
    }

    .hero-content {
        gap: 24px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
        padding: 32px 0;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-text h2 {
        font-size: 26px;
    }

    .hero-text p {
        font-size: 14px;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        display: none;
    }

    .hero-arrow {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    /* Section spacing */
    .section-padding {
        padding: 48px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtitle {
        font-size: 11px;
    }

    /* Header — mobile menu active, nav hidden */
    .header-top {
        display: none;
    }

    .main-menu {
        display: none;
    }

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

    .categories-dropdown {
        display: none;
    }

    .search-category {
        display: none;
    }

    .action-label {
        display: none;
    }

    /* Product grids — 3 columns on tablet */
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 16px;
    }

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

    /* Promo */
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promo-grid .promo-card:last-child {
        grid-column: span 2;
    }

    /* Deal */
    .deal-content {
        flex-direction: column;
        text-align: center;
    }

    .deal-countdown {
        justify-content: center;
    }

    .deal-price {
        justify-content: center;
    }

    .deal-image {
        flex: none;
    }

    .deal-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .deal-grid .deal-image {
        max-height: 360px;
    }

    /* Features — 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Footer — 2 columns */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Products sidebar hidden */
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        display: none;
    }

    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

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

    /* Brand story */
    .brand-story-grid {
        gap: 40px;
    }

    .brand-story-heading {
        font-size: 1.8rem;
    }

    /* Best sellers */
    .bs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Rooms grid */
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Look layout */
    .look-layout {
        grid-template-columns: 1fr;
    }

    /* Testimonials */
    .testimonial-layout {
        grid-template-columns: 1fr;
    }

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

    .shop-sidebar {
        display: none;
    }

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

    /* Section tabs — horizontal scroll */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        gap: 0;
        width: 100%;
        padding-bottom: 5px;
    }

    .section-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Category slider */
    .cat-mini-card {
        width: 155px;
    }

    /* Offer cards */
    .offer-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Wood customizer */
    .wc-layout {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   TIER 4: PHONE — 375–768px (iPhone, Galaxy, Pixel)
   =================================================================== */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }

    /* Hero */
    .hero-slides {
        height: auto;
        min-height: 300px;
        max-height: 65vh;
    }

    .hero-content {
        flex-direction: column;
        gap: 16px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
        padding: 24px 0 16px;
    }

    .hero-text h1 {
        font-size: 28px;
        line-height: 1.15;
    }

    .hero-text h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .hero-text h3 {
        font-size: 16px;
    }

    .hero-text p {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 11px;
        padding: 5px 14px;
        margin-bottom: 12px;
    }

    .hero-image {
        display: none;
    }

    .hero-arrow {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .hero-progress {
        bottom: 12px;
    }

    .hero-progress .bar {
        width: 28px;
        height: 3px;
    }

    /* CTA buttons */
    .btn-large,
    .hero-text .btn-primary {
        padding: 11px 22px;
        font-size: 13px;
    }

    /* Section spacing */
    .section-padding {
        padding: 40px 0;
    }

    .section-title {
        font-size: 22px;
    }

    .section-subtitle {
        font-size: 10px;
    }

    /* Header */
    .header-top {
        display: none;
    }

    .main-menu {
        display: none;
    }

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

    .categories-dropdown,
    .search-category,
    .action-label {
        display: none;
    }

    .header-actions {
        gap: 6px;
    }

    .header-actions .action-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-img {
        height: 48px !important;
    }

    /* Search */
    .search-bar {
        display: none;
    }

    .mobile-search-toggle {
        display: flex;
    }

    /* Navigation bar text */
    .main-nav {
        padding: 8px 0;
    }

    .main-nav::after {
        font-size: 12px;
    }

    /* Product grids — 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

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

    /* Product card tweaks */
    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
    }

    .current-price {
        font-size: 16px;
    }

    .old-price {
        font-size: 11px;
    }

    /* Promo grid — stack */
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .promo-grid .promo-card:last-child {
        grid-column: auto;
    }

    /* Deal section */
    .deal-content {
        flex-direction: column;
        text-align: center;
    }

    .deal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .deal-grid .deal-image {
        max-height: 280px;
        aspect-ratio: 3 / 2;
    }

    .deal-text h2 {
        font-size: 22px;
    }

    .deal-countdown {
        justify-content: center;
        gap: 8px;
    }

    .deal-price {
        justify-content: center;
    }

    .deal-cd-item {
        min-width: 52px;
        padding: 8px 10px;
    }

    .deal-cd-val {
        font-size: 22px;
    }

    /* Features — single column */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        flex-direction: row;
        text-align: left;
        gap: 16px;
        padding: 16px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-col .footer-social {
        justify-content: center;
    }

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

    /* Products layout */
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        display: none;
    }

    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

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

    .newsletter-form input {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
    }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Section tabs */
    .section-tabs,
    .look-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        gap: 0;
        width: 100%;
        padding-bottom: 5px;
    }

    .section-tabs::-webkit-scrollbar,
    .look-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Brand story */
    .brand-story-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .brand-story-img-frame {
        max-height: 300px;
        aspect-ratio: 16 / 10;
    }

    .brand-story-heading {
        font-size: 1.5rem;
    }

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

    .brand-stat {
        padding: 12px 8px;
    }

    .brand-stat .stat-number {
        font-size: 1.3rem;
    }

    .brand-stat .stat-label {
        font-size: 9px;
    }

    /* Best sellers */
    .bs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bs-hero {
        grid-column: span 1;
    }

    /* Rooms */
    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rooms-grid .room-large {
        grid-row: span 1;
    }

    .rooms-grid .room-card:not(.room-large) {
        aspect-ratio: 16 / 9;
    }

    /* Look layout */
    .look-layout {
        grid-template-columns: 1fr;
    }

    /* Testimonials */
    .testimonial-layout {
        grid-template-columns: 1fr;
    }

    /* Modals */
    .quick-view-modal,
    .lightbox-overlay {
        padding: 12px;
    }

    .quick-view-content {
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 12px;
    }

    /* Category slider */
    .cat-mini-card {
        width: 130px;
    }

    .cat-slider-track {
        gap: 12px;
    }

    /* Shop page */
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        display: none;
    }

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

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* Cart */
    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Offer cards */
    .offer-cards-grid {
        grid-template-columns: 1fr;
    }

    /* WhatsApp */
    .whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
    }

    .wa-tooltip {
        display: none;
    }

    /* Back to top */
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        right: 16px;
    }

    /* Announcement bar */
    .announcement-bar {
        font-size: 12px;
        padding: 8px 16px;
    }

    /* Wood customizer */
    .wc-layout {
        grid-template-columns: 1fr;
    }

    /* AI visualizer CTA */
    .ai-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    /* Page title */
    .page-title-section h1 {
        font-size: 24px;
    }
}

/* ===================================================================
   TIER 5: SMALL PHONE — 320–375px (iPhone SE, Galaxy A01, etc.)
   =================================================================== */
@media (max-width: 374px) {
    .container {
        padding: 0 12px;
    }

    /* Hero */
    .hero-slides {
        min-height: 260px;
    }

    .hero-text {
        padding: 20px 0 12px;
    }

    .hero-text h1 {
        font-size: 22px;
    }

    .hero-text h2 {
        font-size: 16px;
    }

    .hero-text h3 {
        font-size: 14px;
    }

    .hero-text p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 10px;
        padding: 4px 12px;
    }

    .btn-large,
    .hero-text .btn-primary {
        padding: 10px 18px;
        font-size: 12px;
    }

    .hero-arrow {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    /* Section spacing */
    .section-padding {
        padding: 32px 0;
    }

    .section-title {
        font-size: 19px;
    }

    .section-subtitle {
        font-size: 9px;
    }

    /* Header */
    .header-main-content {
        gap: 8px;
    }

    .logo-img {
        height: 40px !important;
    }

    .header-actions {
        gap: 4px;
    }

    /* Products — 2 col with tighter gap */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .trending-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 12px;
        max-height: 32px;
    }

    .current-price {
        font-size: 14px;
    }

    .old-price {
        font-size: 10px;
    }

    .badge-new,
    .badge-sale,
    .badge-pack {
        padding: 2px 6px;
        font-size: 7px;
    }

    .product-actions .action-icon {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .add-to-cart-btn {
        padding: 8px 10px;
        font-size: 9px;
        gap: 4px;
    }

    /* Deal section */
    .deal-text h2 {
        font-size: 18px;
    }

    .deal-grid .deal-image {
        max-height: 200px;
    }

    .deal-cd-item {
        min-width: 44px;
        padding: 6px 8px;
    }

    .deal-cd-val {
        font-size: 18px;
    }

    .deal-cd-label {
        font-size: 9px;
    }

    /* Features */
    .feature-card {
        padding: 14px;
        gap: 12px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    /* Category slider */
    .cat-mini-card {
        width: 110px;
    }

    .cat-slider-track {
        gap: 10px;
        animation-duration: 22s;
    }

    .cat-mini-info {
        padding: 6px 4px 8px;
    }

    .cat-mini-info i {
        font-size: 12px;
    }

    .cat-mini-info h3 {
        font-size: 10px;
    }

    .cat-mini-info span {
        font-size: 8px;
    }

    /* Best sellers */
    .bs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Brand story */
    .brand-story-heading {
        font-size: 1.3rem;
    }

    .brand-story-desc {
        font-size: 13px;
    }

    .brand-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .brand-stat .stat-number {
        font-size: 1.1rem;
    }

    .brand-stat .stat-label {
        font-size: 8px;
    }

    /* Footer */
    .footer-grid {
        gap: 24px;
    }

    /* Newsletter */
    .newsletter-section h2 {
        font-size: 20px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 8px;
    }

    /* Promo cards */
    .promo-card-content h3 {
        font-size: 15px;
    }

    .promo-card-content p {
        font-size: 12px;
    }

    /* Look tabs scroll */
    .look-tabs {
        gap: 6px;
    }

    .look-tab-btn,
    .look-tab {
        padding: 6px 14px;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Shop grid */
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Page title */
    .page-title-section {
        padding: 24px 0;
    }

    .page-title-section h1 {
        font-size: 20px;
    }

    /* WhatsApp smaller */
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 20px;
        bottom: 16px;
        right: 12px;
    }

    /* Countdown */
    .countdown-box,
    .countdown-unit {
        min-width: 44px;
        padding: 6px 4px;
    }

    /* Toasts */
    .store-toast {
        left: 12px;
        right: 12px;
        font-size: 13px;
    }
}

/* ===================================================================
   TABLET LANDSCAPE SPECIFIC — 1024px in landscape
   =================================================================== */
@media (min-width: 1024px) and (max-width: 1199px) {
    .deal-grid {
        gap: 32px;
    }

    .deal-grid .deal-image {
        max-height: 400px;
    }

    .promo-card-content h3 {
        font-size: 16px;
    }
}

/* ===================================================================
   LANDSCAPE MODE ON PHONES
   =================================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slides {
        min-height: 240px;
        max-height: 85vh;
    }

    .hero-text h1 {
        font-size: 24px;
    }

    .hero-text p {
        display: none;
    }

    .section-padding {
        padding: 28px 0;
    }

    /* Keep deal side-by-side in landscape */
    .deal-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px;
    }

    .deal-grid .deal-image {
        max-height: 220px;
    }
}

/* ===================================================================
   TOUCH DEVICE ENHANCEMENTS
   =================================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Show product actions without hover */
    .product-card .product-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .product-card .add-to-cart-btn {
        opacity: 1;
        transform: translateY(0);
    }

    /* Remove hover transforms */
    .product-card:hover,
    .cat-mini-card:hover,
    .bestseller-card:hover,
    .offer-card:hover,
    .room-card:hover img,
    .feature-card:hover {
        transform: none;
    }

    /* Active tap feedback */
    .product-card:active {
        transform: scale(0.98);
        transition-duration: 0.1s;
    }

    /* Minimum touch targets (WCAG 2.5.5 — 44x44) */
    .carousel-arrow,
    .hero-arrow {
        min-width: 44px;
        min-height: 44px;
    }

    .tab-btn,
    .filter-chip,
    .look-tab-btn,
    .look-tab {
        min-height: 44px;
        padding: 10px 16px;
    }

    .product-actions .btn-primary,
    .add-to-cart-btn {
        min-height: 44px;
    }

    .pagination button,
    .pagination a {
        min-width: 44px;
        min-height: 44px;
    }

    /* Smooth momentum scrolling */
    .carousel-scroll,
    .rv-carousel-scroll,
    .look-tabs,
    .section-tabs,
    .mobile-filter-chips {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .carousel-scroll > *,
    .rv-carousel-scroll > * {
        scroll-snap-align: start;
    }

    /* Fast taps */
    button,
    a,
    input,
    select,
    textarea,
    [role="button"] {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ===================================================================
   SAFE AREA SUPPORT (iPhone notch, Dynamic Island)
   =================================================================== */
@supports (padding: env(safe-area-inset-top)) {
    .header,
    .announcement-bar {
        padding-left: env(safe-area-inset-left, 0);
        padding-right: env(safe-area-inset-right, 0);
    }

    .footer {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-sticky-cart,
    .mobile-bottom-nav {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    }
}

/* ===================================================================
   HIGH DPI / RETINA
   =================================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-card,
    .cat-mini-card,
    .testimonial-card-wrap,
    .countdown-box {
        border: 0.5px solid rgba(0, 0, 0, 0.06);
    }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cat-slider-track {
        animation: none;
        overflow-x: auto;
    }

    .cat-slider-viewport {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

/* ===================================================================
   PRINT
   =================================================================== */
@media print {
    .hero-slider,
    .announcement-bar,
    .whatsapp-float,
    .back-to-top,
    .luxury-preloader,
    .luxury-cursor,
    .luxury-cursor-ring,
    .newsletter-section,
    .deal-countdown,
    .carousel-arrow,
    .mobile-menu,
    .product-actions,
    .cat-slider-viewport {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* ===================================================================
   INNER PAGES — COMMON RESPONSIVE PATTERNS
   =================================================================== */

/* Cart page */
@media (max-width: 767px) {
    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .quantity-controls {
        min-height: 44px;
    }

    .quantity-controls button {
        min-width: 36px;
        min-height: 36px;
    }

    .coupon-input-group {
        flex-direction: column;
        gap: 8px;
    }

    .coupon-input-group input,
    .coupon-input-group button {
        width: 100%;
    }

    .coupon-input-group button {
        min-height: 44px;
    }
}

/* Checkout page */
@media (max-width: 767px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .btn-place-order {
        min-height: 52px;
        font-size: 1rem;
        width: 100%;
    }

    .payment-methods {
        gap: 8px;
    }

    .payment-card {
        padding: 12px;
        min-height: 56px;
    }

    .trust-badges {
        flex-direction: column;
        gap: 8px;
    }
}

/* Product detail page */
@media (max-width: 767px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        max-height: 400px;
    }

    .product-thumbnails {
        gap: 8px;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-info {
        padding: 20px 16px;
    }

    .product-tabs .tab-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Account / Login / Register pages */
@media (max-width: 767px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .auth-form-container {
        padding: 24px 16px;
    }

    .form-row,
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Blog page */
@media (min-width: 768px) and (max-width: 1023px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Contact page */
@media (max-width: 767px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-map {
        height: 250px;
    }
}

/* FAQ page */
@media (max-width: 767px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-question {
        font-size: 14px;
        padding: 14px 16px;
        min-height: 44px;
    }
}

/* Compare page */
@media (max-width: 767px) {
    .compare-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compare-table {
        min-width: 600px;
    }
}

/* 404 page */
@media (max-width: 767px) {
    .error-section h1 {
        font-size: 64px;
    }

    .error-section h2 {
        font-size: 22px;
    }

    .error-section p {
        font-size: 14px;
    }
}

/* AI Visualizer page */
@media (min-width: 768px) and (max-width: 1023px) {
    .viz-step-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767px) {
    .viz-step-grid {
        grid-template-columns: 1fr;
    }

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

    .comparison-slider {
        height: 280px;
    }

    .reco-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 374px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

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

/* ===================================================================
   FORM INPUT ZOOM PREVENTION (iOS)
   =================================================================== */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px; /* Prevents iOS auto-zoom on focus */
        min-height: 48px;
        padding: 12px 16px;
    }
}

/* ===================================================================
   DESKTOP-ONLY ELEMENTS HIDDEN ON MOBILE
   =================================================================== */
@media (max-width: 767px) {
    .desktop-only,
    .luxury-cursor,
    .luxury-cursor-ring {
        display: none !important;
    }
}

/* ===================================================================
   SCROLLBAR STYLING (non-touch)
   =================================================================== */
@media (hover: hover) and (pointer: fine) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #f5f5f5;
    }

    ::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
}
