/* ==========================================
   RESPONSIVE STYLES - Nova Panel Designs
   Premium Mobile Experience
   ========================================== */

/* --- Large Desktop (1400px+) — already good --- */

/* --- Desktop (1200px) --- */
@media (max-width: 1200px) {
    .hero-content h1 { font-size: 40px; }
    .why-us-layout { gap: 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .onestop-grid { gap: 40px; }
}

/* --- Tablet Landscape / Small Desktop (1024px) --- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .why-us-layout { grid-template-columns: 1fr; }
    .why-us-left { text-align: center; }
    .why-us-left h2 { font-size: 30px; }
    .product-single-layout { grid-template-columns: 1fr; }
    .blog-grid-home { grid-template-columns: 1fr 1fr; }
    .hero-content h1 { font-size: 36px; }
    .hero-stats { gap: 25px; }
    .onestop-grid { grid-template-columns: 1fr; gap: 40px; }
    .onestop-content { text-align: center; }
    .onestop-features { display: inline-block; text-align: left; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Tablet Portrait (768px) --- */
@media (max-width: 768px) {
    .section { padding: 55px 0; }
    .container { padding: 0 16px; }

    /* ===== TOP BAR ===== */
    .top-bar { padding: 6px 0; font-size: 12px; }
    .top-bar-left { display: none; }
    .top-bar-right { margin-left: auto; }
    .top-bar-right a { margin-left: 10px; font-size: 13px; }

    /* ===== HEADER ===== */
    .main-header { padding: 10px 0; }
    .header-inner { gap: 10px; }
    .logo img { max-height: 42px; }
    .main-header.scrolled .logo img { max-height: 38px; }

    /* ===== MOBILE NAV - Slide-in Drawer ===== */
    .main-nav {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 300px; height: 100vh;
        background: var(--bg);
        z-index: 2000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 5px 0 40px rgba(0,0,0,0.25);
        padding: 0;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                    visibility 0.35s;
    }
    .main-nav.active { transform: translateX(0); visibility: visible; }

    /* Mobile nav header */
    .main-nav::before {
        content: 'Menu';
        display: block;
        padding: 18px 20px;
        font-size: 18px;
        font-weight: 700;
        color: var(--secondary);
        border-bottom: 2px solid var(--primary);
        background: var(--bg-cream);
        letter-spacing: 0.5px;
    }

    .nav-menu { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0; }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border);
        font-size: 15px;
        font-weight: 500;
        color: var(--text);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-menu > li > a::after { display: none; }
    .nav-menu > li > a i { font-size: 12px; transition: transform 0.3s; color: var(--text-muted); }
    .has-dropdown.open > a i { transform: rotate(180deg); color: var(--primary); }

    .dropdown-menu {
        display: none !important;
        position: static;
        box-shadow: none;
        padding: 0;
        border: none;
        animation: none;
        min-width: auto;
        background: var(--bg-cream);
        border-radius: 0;
    }
    .has-dropdown:hover > .dropdown-menu { display: none !important; }
    .has-dropdown.open > .dropdown-menu { display: block !important; }

    .submenu { display: none !important; }
    .has-submenu:hover > .submenu { display: none !important; }
    .has-submenu.open > .submenu { display: block !important; }
    .dropdown-menu li a { padding: 12px 20px 12px 35px; font-size: 14px; border-bottom: 1px solid rgba(0,0,0,0.03); }

    .submenu { position: static; box-shadow: none; padding: 0; border: none; min-width: auto; background: rgba(0,0,0,0.02); border-radius: 0; }
    .submenu li a { padding-left: 50px !important; font-size: 13px; }

    .mobile-toggle { display: block; }
    .btn-quote { display: none; }

    /* Search in header */
    .search-form { border: 1px solid var(--border); }
    .search-form input { width: 110px; padding: 8px 12px; font-size: 12px; }
    .search-form button { padding: 8px 12px; }

    /* Mobile nav overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    .nav-overlay.active { display: block; }
    body.nav-open { overflow: hidden; }

    /* ===== HERO ===== */
    .hero-slide { min-height: 500px; padding: 70px 0 60px; }
    .hero-slide-1 .hero-overlay,
    .hero-slide-2 .hero-overlay,
    .hero-slide-3 .hero-overlay {
        background: linear-gradient(180deg, rgba(15,15,35,0.75) 0%, rgba(15,15,35,0.85) 50%, rgba(15,15,35,0.92) 100%);
    }
    .hero-content { max-width: 100%; text-align: center; }
    .hero-content h1 { font-size: 30px; line-height: 1.25; letter-spacing: -0.3px; }
    .hero-content p { font-size: 15px; max-width: 100%; margin-left: auto; margin-right: auto; }
    .hero-badge { font-size: 11px; padding: 6px 16px; }
    .hero-stats { flex-wrap: wrap; justify-content: center; gap: 20px; padding-top: 15px; }
    .hero-stat { min-width: 80px; }
    .hero-stat strong { font-size: 24px; }
    .hero-stat span { font-size: 11px; }
    .hero-buttons { flex-direction: column; align-items: center; gap: 10px; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; max-width: 320px; justify-content: center; padding: 13px 24px; font-size: 14px; }

    .hero-section .owl-dots { bottom: 15px; }
    .hero-section .owl-dot span { width: 10px; height: 10px; margin: 0 4px; }
    .hero-section .owl-dot.active span { width: 28px; }

    /* ===== TRUST BAR ===== */
    .trust-bar { padding: 10px 0; }
    .trust-item { font-size: 13px; gap: 8px; }
    .trust-item i { font-size: 14px; }

    /* ===== SECTION HEADER ===== */
    .section-header { margin-bottom: 35px; }
    .section-header h2 { font-size: 26px; line-height: 1.3; }
    .section-header p { font-size: 14px; padding: 0 10px; }
    .section-subtitle { font-size: 12px; letter-spacing: 1.5px; }
    .section-divider { width: 45px; height: 3px; margin-top: 14px; }

    /* ===== CATEGORY CARDS ===== */
    .category-card-image { height: 180px; }
    .category-card-info { padding: 12px; }
    .category-card-info h3 { font-size: 13px; }

    /* ===== PRODUCT CARDS ===== */
    .product-card-image { height: 240px; }
    .product-card-info { padding: 14px; }
    .product-card-info h3 { font-size: 14px; margin-bottom: 10px; }
    .product-card-badge { font-size: 10px; padding: 4px 10px; top: 8px; left: 8px; }
    .product-card-actions { top: 8px; right: 8px; opacity: 1; transform: none; }
    .action-btn { width: 34px; height: 34px; font-size: 13px; }
    .btn-enquiry-new { font-size: 12px; padding: 7px 14px; }

    /* ===== STATS ===== */
    .stats-section { padding: 50px 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px 14px; border-radius: 12px; }
    .stat-number { font-size: 34px; }
    .stat-number::after { font-size: 22px; }
    .stat-icon { width: 48px; height: 48px; font-size: 20px; margin-bottom: 10px; }
    .stat-label { font-size: 11px; letter-spacing: 1px; }

    /* ===== WHY CHOOSE US ===== */
    .why-us-section-new { padding: 60px 0; }
    .why-us-left h2 { font-size: 26px; }
    .why-us-left p { font-size: 14px; }
    .why-us-right { grid-template-columns: 1fr; gap: 10px; }
    .why-card-new { padding: 16px; gap: 12px; }
    .why-icon { width: 42px; height: 42px; min-width: 42px; font-size: 18px; border-radius: 10px; }
    .why-text h3 { font-size: 14px; }
    .why-text p { font-size: 12px; }

    /* ===== PROCESS ===== */
    .process-grid { flex-direction: column; gap: 15px; }
    .process-connector { transform: rotate(90deg); padding: 0; font-size: 20px; }
    .process-card { max-width: 100%; padding: 30px 20px; }
    .process-number { width: 32px; height: 32px; font-size: 13px; top: -12px; }
    .process-icon { width: 65px; height: 65px; font-size: 26px; }
    .process-card h3 { font-size: 18px; }
    .process-card p { font-size: 13px; }

    /* ===== ONE-STOP ===== */
    .onestop-section { padding: 60px 0; }
    .onestop-content h2 { font-size: 26px; }
    .onestop-content p { font-size: 14px; }
    .onestop-features li { font-size: 14px; padding: 6px 0; }
    .onestop-features li i { font-size: 16px; }
    .onestop-image-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .onestop-image-item span { font-size: 11px; padding: 8px; }

    /* ===== TESTIMONIALS ===== */
    .testimonial-card { padding: 22px 18px; margin: 8px 4px; }
    .testimonial-card > p { font-size: 14px; padding-left: 15px; margin-bottom: 15px; }
    .testimonial-stars { font-size: 14px; margin-bottom: 12px; }
    .author-avatar { width: 42px; height: 42px; font-size: 20px; }
    .author-info strong { font-size: 14px; }
    .author-info span { font-size: 12px; }

    /* ===== GALLERY ===== */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-overlay i { font-size: 22px; }
    .gallery-overlay span { font-size: 11px; }

    /* ===== BLOG ===== */
    .blog-grid-home { grid-template-columns: 1fr; gap: 20px; }
    .blog-card-image { height: 200px; }
    .blog-card-content { padding: 16px; }
    .blog-card-content h3 { font-size: 16px; }
    .blog-card-content > p { font-size: 13px; }
    .blog-card-date { padding: 6px 10px; }
    .blog-card-date .day { font-size: 18px; }
    .blog-card-date .month { font-size: 10px; }

    /* ===== CTA ===== */
    .cta-section-new { padding: 50px 0; }
    .cta-content-new h2 { font-size: 26px; }
    .cta-content-new p { font-size: 14px; margin-bottom: 20px; }
    .cta-icon { width: 60px; height: 60px; font-size: 24px; }
    .cta-buttons-new { flex-direction: column; align-items: center; }
    .btn-cta-primary, .btn-cta-secondary { width: 100%; max-width: 320px; justify-content: center; padding: 12px 24px; font-size: 14px; }

    /* ===== SHOP / PRODUCT PAGES ===== */
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }

    .product-single-layout { gap: 25px; }
    .product-details h1 { font-size: 22px; }
    .product-actions { flex-direction: column; }

    /* ===== BLOG PAGES ===== */
    .blog-layout { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }

    /* ===== MISC PAGES ===== */
    .contact-layout { grid-template-columns: 1fr; }
    .enquiry-layout { grid-template-columns: 1fr; }
    .contact-info-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-banner { padding: 35px 0; }
    .page-banner h1 { font-size: 24px; }

    /* ===== SLIDER NAV ===== */
    .categories-slider .owl-nav,
    .products-slider .owl-nav {
        position: static;
        justify-content: center;
        margin-top: 18px;
        gap: 10px;
    }
    .categories-slider .owl-prev, .categories-slider .owl-next,
    .products-slider .owl-prev, .products-slider .owl-next {
        width: 36px; height: 36px; font-size: 14px !important;
    }

    .products-slider .owl-dots,
    .testimonials-slider .owl-dots { margin-top: 18px; }

    /* ===== FOOTER ===== */
    .site-footer { padding-top: 50px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-col { text-align: center; }
    .footer-col h4 { font-size: 16px; }
    .footer-col h4::after { margin: 10px auto 0; }
    .footer-col ul li a { font-size: 13px; }
    .footer-social { justify-content: center; }
    .footer-contact p { justify-content: center; font-size: 13px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding-top: 20px; }
    .footer-links a { margin: 0 8px; font-size: 13px; }

    /* ===== VIEW ALL BUTTON ===== */
    .btn-view-all { padding: 10px 24px; font-size: 14px; }

    /* ===== WHATSAPP & BACK TO TOP ===== */
    .whatsapp-float { bottom: 20px; right: 16px; width: 50px; height: 50px; font-size: 26px; }
    .back-to-top { bottom: 80px; right: 16px; width: 42px; height: 42px; font-size: 16px; }
}

/* --- Small Phone (480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .section { padding: 45px 0; }

    /* Hero - Compact */
    .hero-slide { min-height: 440px; padding: 55px 0 45px; }
    .hero-content h1 { font-size: 24px; line-height: 1.3; }
    .hero-content p { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
    .hero-badge { font-size: 10px; padding: 5px 12px; gap: 5px; }
    .hero-badge i { font-size: 10px; }
    .hero-stats { gap: 15px; }
    .hero-stat strong { font-size: 20px; }
    .hero-stat span { font-size: 10px; letter-spacing: 0.5px; }
    .hero-buttons { gap: 8px; }
    .btn-hero-primary, .btn-hero-secondary { padding: 11px 20px; font-size: 13px; }

    /* Section headers */
    .section-header h2 { font-size: 22px; }
    .section-header p { font-size: 13px; }
    .section-subtitle { font-size: 11px; }

    /* Categories */
    .category-card-image { height: 150px; }
    .category-card-info h3 { font-size: 12px; }
    .category-card-info { padding: 10px; }

    /* Products */
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-image { height: 180px; }
    .product-card-image { height: 200px; }
    .product-card-info { padding: 12px; }
    .product-card-info h3 { font-size: 13px; }
    .btn-enquiry-new { font-size: 11px; padding: 6px 12px; gap: 5px; }

    /* Stats - 2x2 compact */
    .stats-grid { gap: 8px; }
    .stat-card { padding: 16px 10px; }
    .stat-number { font-size: 28px; }
    .stat-number::after { font-size: 18px; }
    .stat-icon { width: 42px; height: 42px; font-size: 18px; }
    .stat-label { font-size: 10px; }

    /* Search */
    .search-form input { width: 90px; padding: 7px 10px; font-size: 11px; }
    .search-form button { padding: 7px 10px; font-size: 12px; }

    /* Process - Stack tight */
    .process-card { padding: 25px 16px; }
    .process-icon { width: 55px; height: 55px; font-size: 22px; }
    .process-card h3 { font-size: 16px; }
    .process-card p { font-size: 12px; }
    .process-connector { font-size: 16px; }

    /* One-stop */
    .onestop-content h2 { font-size: 22px; }
    .onestop-content p { font-size: 13px; }
    .onestop-features li { font-size: 13px; gap: 10px; }
    .onestop-image-grid { gap: 8px; }
    .onestop-image-item span { font-size: 10px; padding: 6px; }

    /* Testimonials */
    .testimonial-card { padding: 18px 14px; }
    .testimonial-card > p { font-size: 13px; padding-left: 12px; }
    .author-avatar { width: 38px; height: 38px; font-size: 18px; }

    /* Gallery */
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

    /* Blog */
    .blog-card-image { height: 180px; }
    .blog-card-content { padding: 14px; }
    .blog-card-content h3 { font-size: 15px; }

    /* CTA */
    .cta-content-new h2 { font-size: 22px; }
    .cta-content-new p { font-size: 13px; }
    .btn-cta-primary, .btn-cta-secondary { padding: 11px 20px; font-size: 13px; }

    /* Downloads & Enquiry */
    .downloads-grid { grid-template-columns: 1fr; }
    .catalogue-grid { grid-template-columns: 1fr; }
    .catalogue-intro h2 { font-size: 22px; }
    .catalogue-category-header h3 { font-size: 18px; }
    .catalogue-category-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .enquiry-item img { width: 50px; height: 50px; }
    .article-header h1 { font-size: 20px; }

    /* Why us */
    .why-card-new { padding: 14px; }
    .why-icon { width: 38px; height: 38px; min-width: 38px; font-size: 16px; }
    .why-text h3 { font-size: 13px; }
    .why-text p { font-size: 11px; }

    /* Footer */
    .footer-col h4 { font-size: 15px; }
    .footer-contact p { font-size: 12px; }
}

/* --- Extra Small (360px) --- */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .hero-slide { min-height: 400px; padding: 50px 0 40px; }
    .hero-content h1 { font-size: 21px; }
    .hero-content p { font-size: 13px; }
    .hero-stats { gap: 12px; }
    .hero-stat strong { font-size: 18px; }
    .section-header h2 { font-size: 20px; }
    .stat-number { font-size: 24px; }
    .product-card-image { height: 170px; }
    .logo img { max-height: 36px; }
    .search-form input { width: 75px; }
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */
@media (hover: none) and (pointer: coarse) {
    /* Show actions by default on touch (no hover) */
    .product-card-actions { opacity: 1; transform: none; }
    .category-card-overlay { opacity: 1; }
    .gallery-overlay { opacity: 1; }

    /* Remove hover transforms on touch - prevents sticky hover states */
    .product-card-new:hover,
    .category-card-new:hover,
    .testimonial-card:hover,
    .stat-card:hover,
    .why-card-new:hover,
    .process-card:hover,
    .blog-card-new:hover,
    .app-card:hover,
    .de-stat:hover,
    .de-problem-card:hover,
    .de-solution-card:hover,
    .district-card:hover {
        transform: none;
    }

    /* Larger tap targets */
    .nav-menu > li > a { padding: 16px 20px; min-height: 48px; }
    .dropdown-menu li a { padding: 14px 20px 14px 35px; min-height: 44px; }
    .action-btn { width: 40px; height: 40px; }
    .btn-enquiry-new { min-height: 44px; }
}

/* ==========================================
   LANDSCAPE PHONE
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide { min-height: 360px; padding: 40px 0; }
    .hero-content h1 { font-size: 24px; }
    .hero-stats { display: none; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================
   SAFE AREA (Notched phones)
   ========================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .site-footer { padding-bottom: env(safe-area-inset-bottom); }
    .whatsapp-float { bottom: calc(20px + env(safe-area-inset-bottom)); }
    .back-to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
    .main-nav {
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
    }
}

/* ==========================================
   SMOOTH ANIMATIONS - Respect user preference
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .trust-bar-inner { animation: none; }
    .hero-slider .owl-carousel { transition: none; }
}
