/* =========================================================
   FIREWORLD FIBER GLASS — Complete Responsive CSS
   Single clean source. Fixes all mobile layout issues.
   ========================================================= */

/* ── 1200px ── */
@media (max-width: 1200px) {
    .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
}

/* ── 1024px: Tablet landscape ── */
@media (max-width: 1024px) {
    .why-grid            { grid-template-columns: repeat(2, 1fr); }
    .stats-grid          { grid-template-columns: repeat(2, 1fr); }
    .industries-grid     { grid-template-columns: repeat(3, 1fr); }
    .footer-grid         { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .about-preview       { grid-template-columns: 1fr; gap: 40px; }
    .product-detail-layout   { grid-template-columns: 1fr; gap: 40px; }
    .product-gallery         { position: static; }
    .product-content-grid    { grid-template-columns: 1fr; gap: 40px; }
    .product-specs-sidebar   { position: static; }
    .related-products-grid   { grid-template-columns: repeat(2, 1fr); }
    .hp-grid             { grid-template-columns: repeat(2, 1fr); }
    .ind-grid            { grid-template-columns: repeat(3, 1fr); }
    .hw-grid             { grid-template-columns: 1fr; gap: 40px; }
    .products-grid       { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   991px — MOBILE NAV
   Nav handled by inline style/script in HTML pages.
   Only basic layout fixes here.
   ========================================================= */
@media (max-width: 991px) {
    .hidden-mobile  { display: none !important; }
    .header-cta     { display: none !important; }
    .top-bar-right  { display: none !important; }
    .mobile-toggle  { display: flex !important; }

    /* Ensure old nav styles don't interfere */
    .mobile-overlay { display: none !important; }

    /* Desktop dropdown hidden on mobile */
    .nav-dropdown .dropdown-menu {
        display: none !important;
    }
}

/* =========================================================
   768px — MOBILE: All sections 1 column
   ========================================================= */
@media (max-width: 768px) {
    /* ── Base ── */
    * { box-sizing: border-box; }
    img { max-width: 100%; height: auto; }
    .container { padding: 0 16px !important; }
    .section-padding { padding: 52px 0 !important; }
    .hw-section { padding: 52px 0 !important; }

    /* ── Hero ── */
    .hero {
        height: 88vh !important;
        min-height: 500px !important;
        max-height: none !important;
    }
    .hero-slide-bg {
        background-size: cover !important;
        background-position: center center !important;
    }
    .hero-content.container { padding: 0 20px !important; }
    .hero-text { max-width: 100% !important; width: 100% !important; }
    .hero-title {
        font-size: clamp(1.7rem, 6vw, 2.4rem) !important;
        line-height: 1.12 !important;
        margin-bottom: 14px !important;
    }
    .hero-tag {
        font-size: 0.6rem !important;
        letter-spacing: 1.5px !important;
        white-space: normal !important;
        margin-bottom: 16px !important;
    }
    .hero-desc {
        font-size: 0.88rem !important;
        line-height: 1.65 !important;
        margin-bottom: 22px !important;
    }
    .hero-btns {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .hero-btns a,
    .hero-btns .btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
    }
    .hero-arrow        { display: none !important; }
    .hero-scroll-indicator { display: none !important; }

    /* ── Page headers / Breadcrumb ── */
    .page-header {
        padding: 105px 0 52px !important;
        background-size: cover !important;
        background-position: center center !important;
    }
    .product-detail-hero {
        padding: 110px 0 52px !important;
        background-size: cover !important;
        background-position: center center !important;
    }
    .page-header h1,
    .product-detail-hero h1 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
        line-height: 1.2 !important;
    }
    .page-header p,
    .product-detail-hero p { font-size: 0.9rem !important; }
    .breadcrumb { flex-wrap: wrap !important; font-size: 0.78rem !important; }

    /* ── ALL grids → 1 column ── */
    .hw-grid,
    .hp-grid,
    .why-grid,
    .ind-grid,
    .gp-grid,
    .why-grid,
    .products-grid,
    .gallery-grid,
    .related-products-grid,
    .product-content-grid,
    .product-detail-layout,
    .contact-grid,
    .about-full-section,
    .vmv-grid,
    .footer-grid,
    .advantages-grid,
    .industries-grid,
    .industries-dark-grid,
    .services-grid,
    .home-products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* ── Stats bar: 2 columns ── */
    .stats-bar-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .stats-bar-num  { font-size: 1.7rem !important; }
    .stats-bar-item { padding: 18px 10px !important; border-right: none !important; border-bottom: 1px solid #1e1e1e !important; }
    .stats-bar-item:nth-child(odd) { border-right: 1px solid #1e1e1e !important; }

    /* ── Home about section ── */
    .hw-img { position: static !important; }
    .hw-img img { height: 250px !important; object-fit: cover !important; width: 100% !important; }
    .hw-badge {
        position: static !important;
        display: inline-flex !important;
        gap: 10px !important;
        align-items: center !important;
        margin-top: 12px !important;
        border-radius: 8px !important;
    }
    .hw-features { grid-template-columns: 1fr !important; gap: 8px !important; }
    .hw-content { padding: 0 !important; }

    /* ── Product cards (hp-grid) ── */
    .hp-img   { height: 200px !important; }
    .hp-body  { padding: 16px !important; }
    .hp-body h3 { font-size: 0.97rem !important; }
    .hp-body p  { font-size: 0.85rem !important; }

    /* ── Why choose us ── */
    .why-card { padding: 24px 18px !important; }
    .why-num  { font-size: 2.5rem !important; }

    /* ── Industry cards ── */
    .ind-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .ind-card { padding: 20px 12px !important; }
    .ind-card i { font-size: 1.6rem !important; }
    .ind-card h4 { font-size: 0.85rem !important; }

    /* ── Gallery preview grid ── */
    .gp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 10px !important;
    }
    .gp-large { grid-column: span 2 !important; height: 200px !important; }
    .gp-item  { height: 150px !important; }
    .gp-item img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

    /* ── UAE coverage grid (inline style override) ── */
    div[style*="grid-template-columns:repeat(4,1fr)"],
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* ── Section header ── */
    .section-header h2 { font-size: clamp(1.4rem, 5vw, 1.9rem) !important; }
    .section-header p  { font-size: 0.9rem !important; }

    /* ── CTA buttons ── */
    .cta-section { text-align: center; }
    .cta-content h2 { font-size: clamp(1.5rem, 5vw, 2rem) !important; }
    .cta-content > div,
    [style*="display:flex;gap:16px;justify-content:center"] {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    .cta-content > div .btn { width: 100% !important; justify-content: center !important; }

    /* ── Footer ── */
    .footer-grid   { grid-template-columns: 1fr !important; gap: 28px !important; }
    .footer-bottom { flex-direction: column !important; text-align: center !important; gap: 10px !important; }
    .footer-bottom-links { justify-content: center !important; flex-wrap: wrap !important; }
    .footer-social-links { justify-content: center; }
    .footer-about p { font-size: 0.88rem !important; }

    /* ── Product detail pages ── */
    .product-detail-layout   { gap: 24px !important; }
    .product-gallery         { position: static !important; }
    .product-gallery-main    { height: 260px !important; }
    .product-gallery-main img { object-fit: contain !important; padding: 12px !important; }
    .product-highlights      { grid-template-columns: 1fr !important; gap: 8px !important; }
    .product-detail-cta-row  { flex-direction: column !important; gap: 10px !important; }
    .product-detail-cta-row .btn { width: 100% !important; justify-content: center !important; }
    .product-specs-sidebar   { position: static !important; }
    .product-content-text    { padding: 20px !important; }
    .product-img-wrapper     { height: 200px !important; }
    .related-products-grid   { grid-template-columns: 1fr !important; gap: 16px !important; }
    .specs-card { padding: 20px !important; }

    /* ── Products listing page ── */
    .products-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

    /* ── Gallery page ── */
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .gallery-card { height: 180px !important; }

    /* ── About page ── */
    .about-full-section { grid-template-columns: 1fr !important; gap: 24px !important; }
    .about-full-img img { height: 250px !important; object-fit: cover !important; }
    .vmv-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .vmv-card { padding: 24px 18px !important; }

    /* ── Contact page ── */
    .contact-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
    .contact-info-card { padding: 20px !important; }
    .contact-form-wrapper { padding: 24px 16px !important; }
    .map-section { height: 300px !important; }
    .form-row { grid-template-columns: 1fr !important; gap: 14px !important; }

    /* ── WhatsApp + Back to top ── */
    .whatsapp-widget { bottom: 16px !important; right: 16px !important; }
    .back-to-top     { bottom: 72px !important; right: 16px !important; }
    .whatsapp-btn    { width: 52px !important; height: 52px !important; }

    /* ── Top bar ── */
    .top-bar-left { gap: 12px !important; flex-wrap: wrap !important; }
    .top-bar-item span { font-size: 0.75rem !important; }
}

/* =========================================================
   480px — Small phones
   ========================================================= */
@media (max-width: 480px) {
    .container { padding: 0 14px !important; }
    .section-padding { padding: 44px 0 !important; }
    .hw-section { padding: 44px 0 !important; }

    /* Hero */
    .hero { height: 82vh !important; min-height: 460px !important; }
    .hero-title { font-size: clamp(1.5rem, 6.5vw, 1.9rem) !important; }
    .hero-desc  { font-size: 0.85rem !important; }
    .hero-tag   { font-size: 0.58rem !important; padding: 4px 10px !important; }
    .hero-btns .btn { font-size: 0.88rem !important; padding: 12px 18px !important; }

    /* Page headers */
    .page-header { padding: 92px 0 46px !important; }
    .product-detail-hero { padding: 96px 0 46px !important; }
    .page-header h1,
    .product-detail-hero h1 { font-size: 1.45rem !important; }

    /* Stats */
    .stats-bar-num  { font-size: 1.5rem !important; }
    .stats-bar-item { padding: 14px 6px !important; }
    .stats-bar-label { font-size: 0.65rem !important; }

    /* Home sections */
    .hw-img img { height: 210px !important; }
    .hp-img { height: 170px !important; }
    .hp-body h3 { font-size: 0.92rem !important; }

    /* Industry cards */
    .ind-card i { font-size: 1.4rem !important; }
    .ind-card h4 { font-size: 0.8rem !important; }

    /* Gallery */
    .gp-large { height: 170px !important; }
    .gp-item  { height: 130px !important; }
    .gallery-card { height: 150px !important; }

    /* Product detail */
    .product-gallery-main { height: 220px !important; }
    .product-img-wrapper  { height: 180px !important; }

    /* UAE grid */
    div[style*="grid-template-columns:repeat(4,1fr)"],
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Section header */
    .section-header h2 { font-size: clamp(1.3rem, 5.5vw, 1.7rem) !important; }

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

    /* Buttons */
    .btn    { padding: 11px 18px; font-size: 0.85rem; }
    .btn-sm { padding: 8px 14px;  font-size: 0.8rem; }

    /* Top bar */
    .top-bar { display: none !important; }

    /* Header */
    .logo img { max-height: 42px; width: auto; }

    /* Map */
    .map-section { height: 260px !important; }

    /* Preloader */
    .preloader-title    { font-size: 1.4rem !important; letter-spacing: 5px !important; }
    .preloader-subtitle { font-size: 0.7rem  !important; letter-spacing: 8px  !important; }

    /* Why cards */
    .why-card { padding: 20px 16px !important; }

    /* Contact */
    .contact-form-wrapper { padding: 20px 14px !important; }

    /* Scroll */
    .whatsapp-widget { bottom: 14px !important; right: 14px !important; }
    .back-to-top     { bottom: 68px !important; right: 14px !important; }
}

/* =========================================================
   360px — Very small phones
   ========================================================= */
@media (max-width: 360px) {
    .container   { padding: 0 12px !important; }
    .hero        { height: 78vh !important; min-height: 400px !important; }
    .hero-title  { font-size: 1.35rem !important; }
    .logo img    { max-height: 38px; }
    .hp-img      { height: 155px !important; }
    .gp-large    { height: 155px !important; }
    .gp-item     { height: 115px !important; }
    .section-header h2 { font-size: 1.25rem !important; }
}
