/* ═══════════════════════════════════════════
   BATERÍAS ARANA — responsive.css
   Ajustes responsive de la web pública (index.php).
   Se carga DESPUÉS de style.css y del <style> de index.php.
════════════════════════════════════════════ */

/* ─── GENERAL ────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

/* El header fijo no tapa los títulos al navegar */
#about, #services, #products, #offers, #contact { scroll-margin-top: 70px; }

/* Las columnas pueden achicarse sin desbordar */
#about .grid > *,
.products-grid > *,
.contact-grid > *,
.services-grid > *,
.about-stats > *,
.footer-grid > * { min-width: 0; }

/* Tarjetas de ofertas: nunca más anchas que la pantalla */
.offers-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }

/* Menú móvil: siempre pegado debajo del header */
#mobile-menu {
  position: absolute;
  top: 100%;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* ─── NOTEBOOK / TABLET APAISADA ─────────── */
@media (max-width: 1100px) {
  #topbar { font-size: 1rem; }
  #about .grid  { gap: 40px; }
  .products-grid, .contact-grid { gap: 40px; }
  #main-nav ul li a { padding: 7px 10px; }
}

/* ─── TABLET ─────────────────────────────── */
@media (max-width: 900px) {
  .section { padding: 68px 0; }
  .section-header { margin-bottom: 44px; }

  .about-img-wrap .since-badge { right: 8px; }
  .products-img-wrap .floating-badge { left: 12px; }
  .products-img-wrap { max-width: 500px; margin: 0 auto; }

  /* La tercera tarjeta ocupa todo el ancho en lugar de quedar suelta */
  .services-grid > .service-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .services-grid > .service-card:last-child:nth-child(odd) .service-card-img { height: 260px; }
}

/* ─── CELULAR ────────────────────────────── */
@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .section-header { margin-bottom: 34px; }
  .container { padding: 0 16px; }

  #hero .hero-scroll { display: none; }
  #hero .hero-eyebrow { font-size: .75rem; letter-spacing: .18em; }
  #hero .hero-sub { font-size: 1.05rem; margin-bottom: 24px; }

  .services-grid > .service-card:last-child:nth-child(odd) .service-card-img,
  .service-card-img { height: auto; aspect-ratio: 600 / 404; }

  .about-stats { gap: 8px; }
  .stat-num   { font-size: clamp(1rem, 4.6vw, 1.5rem); }
  .stat-label { font-size: .68rem; letter-spacing: .03em; }

  .brands-ticker { gap: 44px; }
  .brands-ticker img { height: 44px; }

  .contact-info-text a, .contact-info-text p { overflow-wrap: anywhere; }

  /* 16px evita el zoom automático de iPhone al tocar un campo */
  .form-group input, .form-group textarea, .form-group select { font-size: 16px; }

  .modal-box { width: calc(100% - 32px); max-height: 92vh; overflow-y: auto; }

  #back-to-top { right: 16px; bottom: 16px; }
}

/* ─── CELULAR CHICO ──────────────────────── */
@media (max-width: 360px) {
  .contact-form-wrap { padding: 24px 16px; }
  .products-list { font-size: .92rem; }
}
