/* ================================================
   MOBILE.CSS - OMNIFOAM RESPONSIVE
   Fully rewritten for mobile-first experience.
   Tested breakpoints: 1024px | 768px | 480px
   ================================================ */


/* ================================================
   TABLET (max-width: 1024px)
   ================================================ */
@media (max-width: 1024px) {

    /* HAMBURGER */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1100;
        padding: 6px;
        flex-shrink: 0;
    }
    .hamburger span {
        width: 24px;
        height: 2px;
        background: white;
        display: block;
        border-radius: 2px;
        transition: all 0.3s;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* NAV DROPDOWN */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10,12,18,0.98);
        backdrop-filter: blur(12px);
        padding: 1rem 5%;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    }
    nav.open { display: block; }
    nav ul { flex-direction: column; gap: 0; }
    nav ul li { border-bottom: 1px solid rgba(255,255,255,0.07); }
    nav ul li:last-child { border-bottom: none; }
    nav a { display: block; padding: 0.9rem 0; font-size: 0.82rem; }

    /* HIDE secondary elements */
    .contact-header { display: none; }
    .camper-top-bar { display: none !important; }

    /* SERVICES grid */
    .services-grid { grid-template-columns: 1fr 1fr !important; }
    .service-card { height: 300px !important; }

    /* CART */
    .cart-container { grid-template-columns: 1fr !important; }

    /* Global prevent overflow */
    body { overflow-x: hidden; }
    * { box-sizing: border-box; }
    img { max-width: 100%; height: auto; }
}


/* ================================================
   MOBILE (max-width: 768px)
   ================================================ */
@media (max-width: 768px) {

    /* ---- GLOBAL ---- */
    html { scroll-behavior: smooth; }
    body { overflow-x: hidden; font-size: 15px; }

    section { padding: 2.5rem 5% !important; }

    /* Prevent iOS input zoom */
    input, select, textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        border-radius: 4px !important;
    }

    /* Touch feedback */
    button, a, .shape-card, .comfort-card, .fabric-card {
        -webkit-tap-highlight-color: transparent;
    }

    /* ---- HEADER ---- */
    header {
        padding: 0.75rem 4% !important;
        min-height: 60px;
    }
    .logo-text { font-size: 1.3rem !important; }
    .logo-subtext { display: none !important; }
    .header-actions { gap: 0.8rem !important; }

    /* ---- HOME HERO (style.css .hero) ---- */
    .hero {
        /* Remove fixed height, use padding instead */
        height: auto !important;
        min-height: 100svh !important;
        padding: 100px 5% 3rem !important; /* 100px top = header height + safe gap */
        display: flex !important;
        align-items: flex-start !important;
        margin-top: 0 !important;
    }
    .hero-content {
        max-width: 100% !important;
        width: 100%;
    }
    .hero-content h1 {
        font-size: 2.4rem !important;
        line-height: 1.05 !important;
        letter-spacing: -1px !important;
        margin-bottom: 0.6rem !important;
    }
    .hero-subtitle { font-size: 0.75rem !important; }
    .hero-highlight {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.3 !important;
    }
    .hero-features { font-size: 0.78rem !important; margin-bottom: 1rem !important; }
    .hero-content p {
        font-size: 0.88rem !important;
        margin-bottom: 1.8rem !important;
        max-width: 100% !important;
    }

    /* Hero buttons — stack vertically */
    .btn-group {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
    }
    .btn-group .btn,
    .btn-group .btn-primary,
    .btn-group .btn-outline,
    .btn-group a {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0.95rem 1rem !important;
        font-size: 0.82rem !important;
    }

    /* ---- SERVICES GRID ---- */
    .services-grid { grid-template-columns: 1fr !important; }
    .service-card {
        height: 260px !important;
        padding: 2rem 1.5rem !important;
    }
    .service-content h3 { font-size: 1.1rem !important; }
    .service-content p { font-size: 0.78rem !important; }

    /* ---- INTRO / SPLIT SECTIONS ---- */
    .intro-section { grid-template-columns: 1fr !important; gap: 2rem !important; }

    /* ---- CAMPER PAGE HERO (camper-styles.css) ---- */
    .camper-hero {
        height: auto !important;
        min-height: 100svh !important;
        padding: 100px 5% 3rem !important;
        align-items: flex-start !important;
    }
    .camper-hero h1 {
        font-size: 2rem !important;
        line-height: 1.05 !important;
    }
    .camper-hero p { font-size: 0.88rem !important; margin-bottom: 1.5rem !important; }
    .hero-btns {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
    }
    .hero-btns .btn-config,
    .hero-btns .btn-search {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0.95rem 1rem !important;
        font-size: 0.82rem !important;
    }
    .hero-badges {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    .hero-badges .badge { font-size: 0.78rem !important; }

    /* ---- CAMPER CONFIGURATOR ---- */
    .configurador-camper { padding: 2rem 4% !important; }

    /* Stepper — minimal on mobile */
    .stepper-camper {
        margin-bottom: 1.5rem !important;
        gap: 0 !important;
    }
    .stepper-camper .step { padding: 0 2px !important; }
    .stepper-camper .step span { display: none !important; }
    .step-num {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.65rem !important;
    }
    .stepper-camper::after { top: 12px; }

    /* Config 2-col → 1-col */
    .config-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    /* Summary shows ABOVE the steps */
    .config-summary {
        position: static !important;
        order: -1;
    }
    .main-config { padding: 1.2rem !important; }

    /* Shape cards 2-col */
    .shapes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.7rem !important;
        margin: 1rem 0 !important;
    }
    .shape-box { height: 65px !important; padding: 6px !important; }
    .shape-card span { font-size: 0.55rem !important; }

    /* Options stacked */
    .options-row { grid-template-columns: 1fr !important; gap: 1.2rem !important; }
    .opt-block h4 { font-size: 0.8rem !important; margin-bottom: 0.8rem !important; }
    .btn-grid button { padding: 0.5rem 0.75rem !important; font-size: 0.73rem !important; }

    /* Comfort */
    .comfort-card { padding: 0.65rem !important; }
    .comfort-card strong { font-size: 0.78rem !important; }
    .comfort-card span { font-size: 0.65rem !important; }

    /* Fabric 3-col */
    .fabric-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .fabric-card span { font-size: 0.55rem !important; }

    /* Extras list */
    .extras-list li { font-size: 0.75rem !important; padding: 0.5rem 0 !important; }

    /* Step nav */
    .step-nav { margin-top: 1.5rem !important; padding-top: 1.5rem !important; }
    .btn-next, .btn-back {
        padding: 0.75rem 1rem !important;
        font-size: 0.7rem !important;
    }

    /* Summary sidebar */
    .config-summary h4 { font-size: 0.82rem !important; margin-bottom: 1rem !important; }
    .s-row { padding: 0.5rem 0 !important; font-size: 0.75rem !important; }
    .p-value { font-size: 1.6rem !important; margin-bottom: 1rem !important; }
    .btn-add-cart {
        padding: 1rem !important;
        font-size: 0.88rem !important;
    }

    /* Final summary */
    .final-summary-box { padding: 1.5rem !important; }

    /* Camper footer badges */
    .footer-badges {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.2rem !important;
        padding: 2rem 5% !important;
    }

    /* Trust grid */
    .trust-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1.5rem !important; }

    /* Vehicle selection */
    .selection-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .select-group select { font-size: 16px !important; padding: 0.9rem !important; }
    .btn-primary-camper { padding: 1rem !important; font-size: 0.9rem !important; }
    .quick-selection { grid-template-columns: repeat(2, 1fr) !important; }

    /* ---- ESPUMA A MEDIDA ---- */
    /* Hero on this page has inline styles, fix padding via override */
    section.hero[style] {
        padding: 100px 5% 3rem !important;
        min-height: 100svh !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    section.hero[style] h1 { font-size: 2rem !important; }
    section.hero[style] h2 { font-size: 1rem !important; margin-bottom: 1rem !important; }
    section.hero[style] p { font-size: 0.85rem !important; max-width: 100% !important; margin-bottom: 1.5rem !important; }

    /* Hide the calculator card overlay in hero on mobile (it covers content) */
    section.hero[style] > div[style*="flex: 1; display: flex; justify-content: flex-end"] {
        display: none !important;
    }

    /* Espuma page sections */
    .densities-strip {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 2rem 5% !important;
    }
    .density-box {
        min-width: unset !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .grid-5 { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }

    /* WHY section */
    section[style*="justify-content: space-between; align-items: center; border-bottom"] {
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: flex-start !important;
    }
    section[style*="justify-content: space-between; align-items: center; border-bottom"] > div {
        flex-wrap: wrap !important;
    }

    /* Features strip */
    .features-strip {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 2rem 5% !important;
    }
    .feature-item { min-width: unset !important; }

    /* ---- ACÚSTICA PAGE ---- */
    .acustica-hero {
        padding: 100px 5% 3rem !important;
        min-height: 100svh !important;
        align-items: flex-start !important;
    }
    .acustica-hero h1 { font-size: 1.9rem !important; }
    .acustica-hero h2 { font-size: 1rem !important; line-height: 1.3 !important; }
    .acustica-hero p { font-size: 0.85rem !important; max-width: 100% !important; }
    .hero-badges-row { gap: 1rem !important; flex-wrap: wrap !important; }
    .hero-badge { max-width: 80px !important; }
    .hero-badge i { font-size: 1.4rem !important; }

    .categories-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
    .cat-thumb { width: 55px !important; height: 55px !important; }
    .cat-item h5 { font-size: 0.68rem !important; }

    .content-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
    .solutions-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
    .sol-card-img img { height: 140px !important; }

    .projects-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.8rem !important; }
    .project-img { height: 160px !important; }

    .calc-box { margin-top: 0 !important; }
    .calc-dims { gap: 0.4rem !important; }

    /* ---- CART ---- */
    .cart-container { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
}


/* ================================================
   SMALL MOBILE (max-width: 480px)
   ================================================ */
@media (max-width: 480px) {

    section { padding: 2rem 4% !important; }

    /* Header */
    header { padding: 0.6rem 4% !important; }
    .logo-text { font-size: 1.15rem !important; }

    /* Headings */
    .hero-content h1 { font-size: 2rem !important; }
    .camper-hero h1 { font-size: 1.75rem !important; }
    .acustica-hero h1 { font-size: 1.65rem !important; }

    /* Single column everything */
    .solutions-grid { grid-template-columns: 1fr !important; }
    .categories-grid { grid-template-columns: 1fr !important; }
    .projects-grid { grid-template-columns: 1fr !important; }
    .grid-5 { grid-template-columns: 1fr !important; }
    .trust-grid { grid-template-columns: 1fr !important; }
    .footer-badges { grid-template-columns: 1fr !important; }
    .fabric-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Nav links */
    nav a { padding: 1rem 0 !important; font-size: 0.88rem !important; }

    /* Stepper no connector line */
    .stepper-camper::after { display: none; }

    /* Main config */
    .main-config { padding: 1rem !important; }
    .final-summary-box { padding: 1.2rem !important; }

    /* Service cards */
    .service-card { height: 230px !important; }

    /* Ideal cards */
    .ideal-card-content { padding: 0.8rem 1rem !important; }
    .ideal-card-content h4 { font-size: 0.82rem !important; }
}
