/* ================================================
   321SPEED – RESPONSIVE FIX PATCH
   Add this <link> AFTER style.css, or paste at
   the bottom of style.css
   ================================================ */

/* ── Global width helpers for NFS section children ── */
.nfs-dots,
.nfs-info,
.nfs-meters,
.nfs-cta,
.nfs-counter {
    width: 100%;
    max-width: 1100px;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ── NFS section horizontal padding on small screens ── */
.nfs-stage {
    padding: 0 0;          /* arrows handle their own spacing */
}

/* ── Hero ── */
@media (max-width: 1100px) {
    .speed-hero-title { font-size: 3.8rem; }
}

@media (max-width: 900px) {
    .speed-hero-title { font-size: 3rem; }
    .speed-hero-subtitle { font-size: 1rem; }
    .speed-hero-stats { gap: 24px; }
    .speed-hero-stat-value { font-size: 2rem; }
}

@media (max-width: 600px) {
    .speed-hero-title { font-size: 2.1rem; }
    .speed-hero-subtitle { font-size: 0.95rem; }
    .speed-hero-ctas { flex-direction: column; gap: 10px; }
    .speed-hero-btn { text-align: center; padding: 14px 24px; }
    .speed-hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .speed-hero-stat-value { font-size: 1.7rem; }
}

/* ── NFS info panel ── */
@media (max-width: 820px) {
    .nfs-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .nfs-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
    .nfs-stat { padding: 14px 16px; }
    .nfs-stat-val { font-size: 1.4rem; }
}

@media (max-width: 600px) {
    .nfs-car-name { font-size: 1.4rem; }
    .nfs-car-tagline { font-size: 0.85rem; }
    .nfs-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .nfs-meters {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .nfs-cta { flex-direction: column; }
    .nfs-btn-reserve,
    .nfs-btn-detail { text-align: center; padding: 13px 20px; }
    .nfs-title { font-size: 1.6rem; }
    .nfs-subtitle { font-size: 0.9rem; padding: 0 8px; }
    .nfs-viewport { height: 200px; }
    .nfs-car-img { width: 90%; }
    .nfs-section { padding: 70px 0 40px; }
    .nfs-header { padding: 0 16px; margin-bottom: 28px; }
}

@media (max-width: 400px) {
    .nfs-stats { grid-template-columns: 1fr 1fr; }
    .nfs-stat { padding: 10px 10px; }
    .nfs-stat-val { font-size: 1.1rem; }
    .nfs-dots { gap: 6px; }
    .nfs-dot { width: 20px; }
    .nfs-dot.active { width: 36px; }
}

/* ── About section ── */
@media (max-width: 900px) {
    .speed-about__container { gap: 40px; }
    .speed-about__title { font-size: 2.2rem; }
}

@media (max-width: 600px) {
    .speed-about { padding: 70px 0; }
    .speed-about__title { font-size: 1.8rem; }
    .speed-about__stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .speed-about__stats-card { padding: 28px 20px; }
    .speed-about__stat-value { font-size: 1.7rem; }
}

/* ── Contact section ── */
@media (max-width: 900px) {
    .speed-contact__title { font-size: 2.4rem; }
    .speed-contact__phone { font-size: 2.8rem; }
}

@media (max-width: 600px) {
    .speed-contact { padding: 70px 0; }
    .speed-contact__title { font-size: 1.8rem; }
    .speed-contact__phone { font-size: 2.2rem; }
    .speed-contact__card { padding: 32px 20px; }
    .speed-contact__buttons { flex-direction: column; gap: 12px; }
    .speed-contact__btn { text-align: center; padding: 14px 24px; }
    .speed-contact__info-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .speed-contact__info-card { padding: 20px 14px; }
}

@media (max-width: 400px) {
    .speed-contact__info-grid { grid-template-columns: 1fr; }
}

/* ── Footer ── */
@media (max-width: 600px) {
    .speed-footer { padding: 50px 0 20px; }
    .speed-footer-main { gap: 32px; }
}

/* ── Product detail page ── */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr !important;
    }
    .product-title { font-size: 1.6rem; }
    .product-price { font-size: 1.2rem; }
}

/* ── Navbar logo on very small screens ── */
@media (max-width: 380px) {
    .logo img { height: 30px; }
    .header-inner { height: 64px; }
    .main-nav { top: 64px; }
}

/* ── Force grid view on mobile, hide toggle ── */
@media (max-width: 768px) {
    .nfs-view-toggle { display: none; }

    /* Hide selector elements */
    .nfs-stage,
    .nfs-dots,
    .nfs-info,
    .nfs-meters,
    .nfs-cta,
    .nfs-counter { display: none !important; }

    /* Force grid visible */
    .nfs-grid-view { display: grid !important; }
}

/* ================================================
   GLOBAL MOBILE FIXES (apply to all pages)
   ================================================ */

/* Prevent horizontal scroll caused by overflowing children */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100vw; }
    img, video, iframe { max-width: 100%; height: auto; }
    .container { padding-left: 16px; padding-right: 16px; }

    /* Form inputs sized to avoid iOS zoom */
    input, select, textarea { font-size: 16px; }
}

/* Mobile nav: lock scroll & better spacing when open */
@media (max-width: 768px) {
    .main-nav { gap: 0; padding: 18px 16px 24px; }
    .main-nav a { padding: 12px 8px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
    .main-nav a:last-child { border-bottom: none; }
    .nav-dropdown > a { width: 100%; justify-content: space-between; }
}

/* Modal usability on small screens */
@media (max-width: 560px) {
    .res-modal-overlay { padding: 10px; align-items: flex-end; }
    .res-modal { padding: 26px 18px 22px; max-height: 92vh; border-radius: 10px 10px 0 0; }
    .res-field-grid { grid-template-columns: 1fr; }
    .res-modal-title { font-size: 1.15rem; }
}

/* Availability calendar on small screens */
@media (max-width: 480px) {
    .avail-cal-grid { padding: 8px; gap: 1px; }
    .cal-cell { font-size: 0.7rem; }
    .cal-head { font-size: 0.55rem; }
    .avail-legend { padding: 8px 12px 12px; gap: 12px; flex-wrap: wrap; }
}

/* Bazar gallery thumbs scroll on mobile */
@media (max-width: 600px) {
    .bazar-gallery-thumbs,
    .gallery-thumbs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Car detail product layout */
@media (max-width: 900px) {
    .car-hero-title { font-size: 2.2rem !important; }
    .car-detail-grid,
    .car-info-grid { grid-template-columns: 1fr !important; }
}

/* Footer columns center-align on mobile */
@media (max-width: 600px) {
    .speed-footer-main { text-align: center; }
    .speed-footer-tagline { margin: 16px auto 0; }
    .speed-footer-bottom p { font-size: 0.78rem; line-height: 1.6; }
}

/* Generic safety: any "section" with huge horizontal padding */
@media (max-width: 600px) {
    section[class*="-section"],
    section[class*="-hero"] { padding-left: 16px; padding-right: 16px; }
}