/* ============================================================
   Autovalv — Sitio público (rediseño Claude Design)
   Port del canvas de 6 artboards a HTML/CSS reales.
   Reemplaza a store.css en las páginas públicas.

   Diferencias deliberadas respecto del canvas:
   - El canvas es desktop fijo (1600px, alturas en px). Acá todo es
     fluido y con breakpoints en 1100 / 860 / 640.
   - Los estilos inline del canvas se agrupan en clases reutilizables.
   - Los colores oklch() están convertidos a los tokens --ink-* / --amber-*.
   ============================================================ */

/* --- Franja de acento superior ------------------------------ */
.topbar-accent { height: 4px; background: var(--accent); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--white);
  border-bottom: 1px solid var(--ink-150);
  backdrop-filter: none;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); height: var(--header-h);
  max-width: 1600px; padding-inline: var(--gutter);
}
.brand-logo { height: 52px; width: auto; object-fit: contain; }
.ocsa-logo  { height: 56px; width: auto; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav > a,
.main-nav > .has-mega > .navlink {
  font-size: 15.5px; font-weight: var(--fw-medium);
  color: var(--ink-700); padding: 0; border-radius: 0; background: none;
}
.main-nav > a:hover,
.main-nav > .has-mega > .navlink:hover { color: var(--accent); background: none; }
.main-nav > a.active,
.main-nav > .has-mega.active > .navlink { color: var(--accent); background: none; }

/* --- Mega menú de Productos --------------------------------- */
.has-mega { position: relative; }
.has-mega > .navlink {
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; border: none; font-family: inherit;
}
.has-mega > .navlink::after {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform var(--t-fast);
}
.has-mega[aria-expanded="true"] > .navlink::after { transform: rotate(225deg); margin-top: 2px; }

.megamenu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px);
  background: var(--white); border: 1px solid var(--ink-175);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
  padding: 22px 26px;
  display: grid; grid-template-columns: repeat(3, 220px); gap: 22px 30px;
  width: max-content;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t), visibility 0s linear var(--t-fast);
}
/* Puente invisible entre el enlace y el panel: evita que el hover se corte
   al atravesar los 8px de separación visual. */
@media (min-width: 981px) {
  .megamenu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px;
  }
}
.has-mega[aria-expanded="true"] .megamenu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0); transition-delay: 0s;
}
.megamenu .mm-col > a {
  display: block;
  font: var(--fw-bold) 12px/1.3 var(--font-display);
  color: var(--ink-900); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .01em;
}
.megamenu .mm-col > a:hover { color: var(--accent); }
.megamenu .mm-models { display: flex; flex-direction: column; gap: 4px; }
.megamenu .mm-models a { font-size: 12.5px; color: var(--ink-450); }
.megamenu .mm-models a:hover { color: var(--accent); }
.megamenu .mm-empty { font-size: 12.5px; color: var(--ink-350); font-style: italic; }

/* El panel va centrado sobre "Productos", que cae a ~2/3 del ancho: con 3
   columnas de 220px se sale por la derecha y deja la página con scroll
   horizontal hasta ~1200px. En ese rango pasa a 2 columnas (las 6 familias
   quedan en 3 filas) y vuelve a entrar sin moverlo del centro. */
@media (min-width: 981px) and (max-width: 1200px) {
  .megamenu { grid-template-columns: repeat(2, 220px); }
}

/* --- Toggle mobile ------------------------------------------ */
.nav-toggle { display: none; color: var(--ink-700); }

@media (max-width: 980px) {
  .site-header .container { padding-inline: var(--space-5); }
  .ocsa-logo { display: none; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--ink-150);
    box-shadow: var(--shadow-md); padding: var(--space-2);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
    transition: transform var(--t), opacity var(--t-fast), visibility 0s linear var(--t-fast);
  }
  .main-nav.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
  .main-nav > a, .main-nav > .has-mega > .navlink { padding: 0.8rem 0.75rem; }
  /* En mobile el mega menú se despliega en flujo, no flotante */
  .megamenu {
    position: static; transform: none; width: auto; grid-template-columns: 1fr;
    border: none; box-shadow: none; padding: 0 0 var(--space-3) var(--space-4);
    gap: var(--space-4);
    display: none; opacity: 1; visibility: visible; pointer-events: auto;
  }
  .has-mega[aria-expanded="true"] .megamenu { display: grid; transform: none; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink-950); color: var(--ink-300); margin-top: 0; }
.site-footer .container {
  max-width: 1600px; padding-inline: var(--gutter); padding-block: 44px;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px;
  font-size: 13px; line-height: 1.7;
}
.site-footer a { color: var(--ink-300); }
.site-footer a:hover { color: var(--white); }
/* Logo blanco real del cliente: ya no hace falta invertir el negro por CSS */
.footer-logo { height: 48px; width: auto; object-fit: contain; margin-bottom: 14px; }
.footer-tagline {
  font: var(--fw-semibold) 16px/1.5 var(--font-display); color: var(--ink-150);
  max-width: 320px; margin-top: 4px;
  border-left: 2px solid var(--accent); padding-left: 14px;
}
.footer-tagline span { color: var(--amber-400); }
.site-footer h5 {
  font: var(--fw-bold) 12px var(--font-display); color: var(--white);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px;
}

/* --- Filas de contacto del footer (ícono + dato) ------------- */
.footer-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 7px; }
.footer-row .fr-ico {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 16px; height: 20px; color: var(--accent);
}
.footer-row .fr-ico svg { width: 14px; height: 14px; }
.footer-row.fr-wa .fr-ico { color: #25D366; }
/* Instagram va sobre un chip blanco: el glifo es multicolor y sobre el
   fondo del footer pierde contraste */
.footer-row.fr-ig .fr-ico > svg {
  width: 16px; height: 16px; padding: 1px;
  background: var(--white); border-radius: 4px;
}
.footer-legal {
  grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: var(--space-4); margin-top: var(--space-2);
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between;
  font-size: var(--fs-xs); color: var(--ink-350);
}
.footer-legal .admin-link { display: inline-flex; margin-left: var(--space-2); color: var(--ink-350); opacity: .5; transition: opacity var(--t); }
.footer-legal .admin-link:hover { opacity: 1; color: var(--white); }
.footer-legal .admin-link svg { width: 14px; height: 14px; }
@media (max-width: 860px) {
  .site-footer .container { grid-template-columns: 1fr 1fr; padding-inline: var(--space-5); }
}
@media (max-width: 560px) { .site-footer .container { grid-template-columns: 1fr; } }

/* --- WhatsApp flotante -------------------------------------- */
/* El canvas lo pone abajo a la derecha; se respeta esa posición. */
.wa-float {
  position: fixed; right: 28px; bottom: 28px; left: auto;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); z-index: var(--z-drawer);
  transition: transform var(--t);
}
.wa-float:hover { transform: scale(1.06); color: var(--white); }
.wa-float svg { width: 30px; height: 30px; }
/* Mientras el banner de cookies está en pantalla, el botón sube para no
   quedar tapado. La clase la pone/saca js/ui.js. */
body.has-consent-banner .wa-float { bottom: 104px; }

/* reCAPTCHA v3 debe seguir visible. Se ubica sobre el acceso flotante a
   WhatsApp y también acompaña al banner de cookies. */
.grecaptcha-badge { bottom: 98px !important; }
body.has-consent-banner .grecaptcha-badge { bottom: 174px !important; }
@media (max-width: 640px) {
  .wa-float { right: 18px; bottom: 18px; width: 52px; height: 52px; }
  body.has-consent-banner .wa-float { bottom: 130px; }
  .grecaptcha-badge { bottom: 82px !important; }
  body.has-consent-banner .grecaptcha-badge { bottom: 194px !important; }
}

/* --- Banner de cookies -------------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-overlay);
  background: var(--ink-950); color: var(--white);
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .2);
}
.cookie-banner p { font-size: 13px; line-height: 1.5; max-width: 760px; }
.cookie-banner button {
  flex: none; padding: 11px 22px; background: var(--accent); color: var(--white);
  font: var(--fw-bold) 12.5px var(--font-sans); white-space: nowrap;
  transition: background var(--t-fast);
}
.cookie-banner button:hover { background: var(--accent-hover); }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px var(--space-5); }
  .cookie-banner button { width: 100%; }
}

/* ============================================================
   Primitivas del rediseño
   ============================================================ */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; }
.bleed { padding-inline: var(--gutter); }
@media (max-width: 860px) { .bleed { padding-inline: var(--space-5); } }

.eyebrow-mono {
  display: block;
  font: var(--fw-semibold) 11px var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
/* Variante con guión de acento a la izquierda (hero de "La Empresa") */
.eyebrow-mono.dashed { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; letter-spacing: .16em; }
.eyebrow-mono.dashed::before { content: ""; flex: none; width: 28px; height: 3px; background: var(--accent); }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: 0; }

/* Botón cuadrado industrial (el rediseño no usa radios en los CTA) */
.btn-square { border-radius: 0; padding: 14px 26px; font-size: 13px; font-weight: var(--fw-bold); }
.btn-ink { background: var(--ink-900); color: var(--white); border-radius: 0; }
.btn-ink:hover { background: var(--ink-850); color: var(--white); }

/* Breadcrumb */
.crumbs { font-size: 13px; color: var(--ink-400); padding-block: 10px; }
.crumbs a { color: var(--ink-400); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin-inline: 6px; }

/* Buscador con botón pegado */
.searchbox { display: flex; width: 100%; border: 1px solid var(--ink-250); background: var(--white); }
.searchbox input { flex: 1; min-width: 0; border: none; padding: 15px 18px; font-size: 13.5px; color: var(--ink-800); background: none; }
.searchbox input:focus { outline: none; }
.searchbox:focus-within { border-color: var(--steel-500); box-shadow: var(--focus-ring); }
.searchbox button {
  flex: none; padding: 15px 24px; background: var(--steel-500); color: var(--white);
  font-size: 12.5px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; gap: 8px; transition: background var(--t-fast);
}
.searchbox button:hover { background: var(--steel-600); }
.searchbox button svg { width: 14px; height: 14px; }

/* ============================================================
   Landing — Hero
   ============================================================ */
.hero { position: relative; }
.hero-img { width: 100%; height: 560px; object-fit: cover; object-position: center; }
.hero-copy {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  max-width: 400px; pointer-events: none;
}
.hero-copy h1 {
  margin: 14px 0 18px;
  font: 800 34px/1.2 var(--font-display); color: var(--ink-900);
}
.hero-copy h1 .soft { color: var(--ink-450); font-weight: var(--fw-semibold); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; pointer-events: auto; }

@media (max-width: 1100px) { .hero-img { height: 460px; } .hero-copy h1 { font-size: 30px; } }
@media (max-width: 860px) {
  /* Debajo de 860 el texto sobre la foto pierde legibilidad: se apila */
  .hero { display: flex; flex-direction: column-reverse; }
  .hero-img { height: 280px; }
  .hero-copy {
    position: static; transform: none; max-width: none;
    padding: var(--space-6) var(--space-5) var(--space-5);
    background: var(--white);
  }
  .hero-copy h1 { font-size: 27px; }
}

/* Barra de búsqueda de la home */
.hero-search { padding: 28px var(--gutter); border-bottom: 1px solid var(--ink-125); display: flex; justify-content: center; }
.hero-search .searchbox { max-width: 620px; }
@media (max-width: 860px) { .hero-search { padding: var(--space-5); } }

/* ============================================================
   Landing — Franja de categorías
   ============================================================ */
.cat-strip { display: block; padding: 22px var(--gutter); background: var(--ink-900); }
.cat-strip:hover { background: var(--ink-850); }
.cat-strip:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cat-strip-inner {
  display: flex; flex-wrap: wrap; max-width: 1100px; margin-inline: auto;
  border-left: 1px solid var(--ink-700);
}
.cat-chip {
  flex: 1; min-width: 200px; padding: 14px 22px;
  border-right: 1px solid var(--ink-700);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 16px; font-weight: var(--fw-semibold); color: var(--white); text-align: center;
  transition: background var(--t-fast);
}
.cat-chip:hover { background: var(--ink-850); color: var(--white); }
.cat-chip::before { content: ""; width: 7px; height: 7px; background: var(--accent); flex: none; }
@media (max-width: 860px) {
  .cat-strip { padding: var(--space-4) var(--space-5); }
  .cat-strip-inner { border-left: none; }
  .cat-chip { min-width: 100%; border-right: none; border-bottom: 1px solid var(--ink-700); justify-content: flex-start; }
  .cat-chip:last-child { border-bottom: none; }
}

/* ============================================================
   Landing — Banners promocionales
   ============================================================ */
/* Son piezas de marketing con el texto compuesto dentro de la imagen: van
   con `contain` sobre blanco para no recortar la tipografía. */
.promo-section { padding: 56px var(--gutter) 24px; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1100px; margin-inline: auto; }
.promo-card { position: relative; display: block; background: var(--white); transition: box-shadow var(--t); }
.promo-card:hover { box-shadow: var(--shadow-md); }
.promo-card img { display: block; width: 100%; aspect-ratio: 1080 / 640; object-fit: contain; }
@media (max-width: 860px) {
  .promo-section { padding: var(--space-6) var(--space-5) var(--space-5); }
  .promo-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Landing — Productos destacados (máximo 3)
   ============================================================ */
.featured-section { padding: 48px var(--gutter) 56px; background: var(--ink-50); border-top: 1px solid var(--ink-125); }
.featured-section[hidden] { display: none; }
.featured-inner { max-width: 1100px; margin-inline: auto; }
.featured-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 24px;
}
.featured-head h2 { margin-top: 8px; font: 800 28px/1.15 var(--font-display); color: var(--ink-900); }
.featured-head > a { color: var(--accent); font-size: 13px; font-weight: var(--fw-bold); }
.featured-head > a:hover { color: var(--ink-900); }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 800px) {
  .featured-section { padding: var(--space-6) var(--space-5); }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .featured-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .featured-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Landing — Diferenciales
   ============================================================ */
.diffs { position: relative; background: var(--ink-50); border-top: 1px solid var(--ink-150); overflow: hidden; }
.diffs-inner { position: relative; padding: 56px var(--gutter); }
.diffs-deco { position: absolute; width: 220px; height: 220px; pointer-events: none; }
.diffs-deco.tl { top: 0; left: 0; }
.diffs-deco.br { bottom: 0; right: 0; }
.diffs-grid {
  position: relative; display: grid; align-items: start;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  max-width: 1200px; margin-inline: auto;
}
.diff { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
/* Los íconos son el artwork de marca del cliente (PNG con alfa), no
   pictogramas dibujados: van sueltos, sin cápsula ni recorte. */
.diff-ico { height: 78px; display: flex; align-items: center; justify-content: center; }
.diff-ico img { height: 78px; width: auto; max-width: 160px; object-fit: contain; }
.diff-rule { width: 26px; height: 3px; background: var(--accent); margin: 0 auto 10px; }
.diff b { display: block; font: var(--fw-bold) 15px var(--font-display); color: var(--ink-900); }
.diff-body > span { display: block; font-size: 14px; color: var(--ink-600); }
.diff-hr { width: 34px; height: 1px; background: var(--amber-300); margin: 14px auto 12px; }
.diff-body p { max-width: 220px; font-size: 12.5px; line-height: 1.55; color: var(--ink-500); text-wrap: pretty; }
.diff-sep {
  width: 1px; height: 70px; justify-self: center; align-self: center; margin-top: 20px;
  position: relative;
  background: repeating-linear-gradient(0deg, var(--ink-250) 0 4px, transparent 4px 8px);
}
.diff-sep::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--accent); background: var(--white);
}

/* Lema al pie de los diferenciales, entre dos grupos de barras rojas */
.diffs-motto {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  max-width: 1200px; margin: 44px auto 0;
  font-size: 13.5px; font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  color: var(--ink-600); text-align: center;
}
.diffs-motto .ticks { display: flex; gap: 3px; flex: none; }
.diffs-motto .ticks i { width: 2px; height: 13px; background: var(--accent); transform: skewX(-20deg); }

@media (max-width: 1100px) {
  .diffs-inner { padding: var(--space-7) var(--space-5); }
  .diffs-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-4); }
  .diff-sep { display: none; }
  .diffs-deco { display: none; }
}
@media (max-width: 620px) {
  .diffs-motto { font-size: 12px; gap: 12px; }
  .diffs-motto .ticks { display: none; }
}
@media (max-width: 480px) { .diffs-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Landing — Cotización online
   ============================================================ */
.cotizacion {
  position: relative; padding: 64px var(--gutter);
  display: flex; justify-content: center;
  background: var(--ink-850) url("/assets/design/cotizacion-bg.webp") center / cover no-repeat;
}
.cotizacion-inner { width: 100%; max-width: 640px; }
.cotizacion-head {
  padding: 20px 24px 26px; margin-bottom: 4px;
  background: linear-gradient(rgba(2, 3, 6, .55), rgba(2, 3, 6, 0));
  text-align: center;
}
.cotizacion-head h2 {
  margin-bottom: 8px; font: var(--fw-bold) 24px var(--font-display);
  color: var(--white); text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.cotizacion-head p {
  font-size: 14.5px; font-weight: var(--fw-bold);
  color: var(--white); text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
@media (max-width: 860px) { .cotizacion { padding: var(--space-7) var(--space-5); } }

/* --- Formulario de lead (compartido) ------------------------ */
.lead-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--white); border: 1px solid var(--ink-150); padding: 28px;
}
.lead-form.plain { border: none; padding: 0; background: none; }
.lead-form input, .lead-form textarea {
  width: 100%; border: 1px solid var(--ink-250); border-radius: 0;
  padding: 13px 14px; font-size: 13.5px; color: var(--ink-800); background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.lead-form input::placeholder, .lead-form textarea::placeholder { color: var(--ink-350); }
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--steel-500); box-shadow: var(--focus-ring); }
.lead-form textarea { grid-column: span 2; resize: vertical; min-height: 96px; line-height: 1.5; }
.lead-form .span-2 { grid-column: span 2; }
.lead-form button[type="submit"] {
  grid-column: span 2; padding: 15px 24px; border-radius: 0;
  background: var(--accent); color: var(--white);
  font-size: 13px; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  transition: background var(--t-fast);
}
.lead-form button[type="submit"]:hover:not(:disabled) { background: var(--accent-hover); }
.lead-form button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; }
.lead-form .input-invalid { border-color: var(--red-600); }
.lead-form .honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) {
  .lead-form { grid-template-columns: 1fr; padding: 20px; }
  .lead-form textarea, .lead-form .span-2, .lead-form button[type="submit"] { grid-column: span 1; }
}

.lead-done {
  padding: 28px 24px; border: 1px solid var(--ink-200); background: var(--white);
  text-align: center;
}
.lead-done .check {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green-100); color: var(--green-600);
  display: grid; place-items: center; margin: 0 auto var(--space-4);
}
.lead-done .check svg { width: 28px; height: 28px; }
.lead-done h3 { font: var(--fw-bold) 18px var(--font-display); color: var(--ink-900); margin-bottom: 6px; }
.lead-done p { font-size: 13.5px; color: var(--ink-500); }

/* --- Mapa embebido ------------------------------------------ */
.map-embed { position: relative; display: block; }
.map-embed iframe { width: 100%; height: 420px; border: 0; display: block; }
.map-embed .map-open {
  position: absolute; top: 16px; left: 16px;
  padding: 10px 18px; background: var(--white);
  font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--amber-700);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}
@media (max-width: 860px) { .map-embed iframe { height: 300px; } }

/* Mapa al pie de la home. Sólo mobile: js/home.js lo inyecta y le saca el
   [hidden] cuando el viewport es angosto, así el iframe no se pide en
   desktop (donde el mapa ya está en /contacto). */
.map-mobile[hidden] { display: none; }
.map-mobile iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ============================================================
   Catálogo — grilla de familias
   ============================================================ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 26px;
}
.page-head h1 { font: 800 30px var(--font-display); color: var(--ink-900); }
.page-head p { margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-500); max-width: 640px; }
.page-head .searchbox { max-width: 340px; }
.page-head .searchbox input { padding: 12px 14px; font-size: 13px; }
.page-head .searchbox button { padding: 0 16px; }
@media (max-width: 560px) { .page-head .searchbox { max-width: none; } }

.fam-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
/* Las categorias presentes comparten una fila y aprovechan el ancho disponible.
   El limite de altura mantiene las tarjetas completas en escritorio. */
@media (min-width: 981px) {
  body[data-page="catalogo"] .fam-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: clamp(10px, 1.1vw, 18px);
  }
  body[data-page="catalogo"] #main:has(.fam-grid) .wrap {
    max-width: 1440px;
  }
  body[data-page="catalogo"] .fam-grid .thumb-box {
    aspect-ratio: auto;
    height: clamp(180px, 24vw, min(320px, 45vh));
  }
  body[data-page="catalogo"] .fam-grid .thumb.fill {
    object-fit: contain;
  }
}
@media (max-width: 900px) { .fam-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .fam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.fam-card { border: 1px solid var(--ink-150); display: flex; flex-direction: column; background: var(--white); }
.fam-card .thumb-box { width: 100%; aspect-ratio: 1 / 1; background: var(--white); }
/* Las portadas del rediseño vienen recortadas al cuadrado; el fallback
   (foto de producto sobre blanco) va con contain para no cortar la pieza. */
.fam-card .thumb { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.fam-card .thumb.fill { object-fit: cover; padding: 0; }
.fam-card .body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 12px 16px; text-align: center;
}
.fam-card .name {
  font: var(--fw-bold) 13px/1.35 var(--font-display); color: var(--ink-800);
  text-transform: uppercase; letter-spacing: .02em; text-wrap: balance;
}

/* ============================================================
   Familia — sidebar + grilla de productos
   ============================================================ */
.fam-page { padding: 44px var(--gutter) 64px; background: var(--ink-50); }
@media (max-width: 860px) { .fam-page { padding: var(--space-6) var(--space-5); } }

.fam-layout { display: grid; grid-template-columns: 230px 1fr; gap: 36px; align-items: start; }
@media (max-width: 980px) { .fam-layout { grid-template-columns: 1fr; gap: var(--space-5); } }

.fam-side { position: sticky; top: calc(var(--header-h) + 16px); border: 1px solid var(--ink-150); background: var(--white); }
.fam-side .fam-item { border-bottom: 1px solid var(--ink-150); }
.fam-side .fam-item:last-child { border-bottom: none; }
.fam-side .fam-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px;
  font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--ink-600);
}
.fam-side .fam-link:hover { background: var(--ink-100); color: var(--ink-900); }
.fam-side .fam-link::after { content: ""; width: 6px; height: 6px; flex: none; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 240ms ease; }
.fam-side .is-open > .fam-link::after { transform: rotate(225deg); }
.fam-models-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms ease; }
.fam-item.is-open > .fam-models-panel { grid-template-rows: 1fr; }
.fam-models-clip { min-height: 0; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .fam-models-panel, .fam-side .fam-link::after { transition: none; } }
.fam-side .fam-item.active > .fam-link { background: var(--ink-850); color: var(--white); font-weight: var(--fw-bold); }
.fam-side .fam-item.active > .fam-link:hover { background: var(--ink-850); color: var(--white); }
.fam-side .fam-models { display: flex; flex-direction: column; padding: 6px 0; background: var(--white); border-top: 1px solid var(--ink-125); }
.fam-side .fam-models a {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 16px 6px 24px; font-size: 12px; color: var(--ink-500);
}
/* El rediseño marca cada modelo con una viñeta de acento */
.fam-side .fam-models a::before {
  content: "·"; width: 9px; flex: none;
  font-weight: var(--fw-bold); font-size: 20px; line-height: 1; color: var(--accent);
}
.fam-side .fam-models a:hover { background: var(--ink-100); color: var(--ink-900); }
.fam-side .fam-models a.current { color: var(--ink-900); font-weight: var(--fw-bold); }
.fam-side .fam-models a.current::before { content: "\203A"; font-size: 14px; }
@media (max-width: 980px) { .fam-side { position: static; } }

.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .prod-grid { grid-template-columns: 1fr; } }

.prod-card { border: 1px solid var(--ink-150); background: var(--white); display: block; }
.prod-card .thumb-box { width: 100%; aspect-ratio: 7 / 9; background: var(--white); }
.prod-card .thumb { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.prod-card .body { padding: 14px 16px 16px; }
.prod-card .name { font: var(--fw-bold) 15px var(--font-display); color: var(--ink-800); }
.prod-card .desc { margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--ink-450); }

/* ============================================================
   Hover compartido de las cards de catálogo (familias y modelos)
   ------------------------------------------------------------
   El rediseño marca la card entera al pasar por encima: borde y título
   en rojo, leve elevación, fondo apenas teñido y una barra que se dibuja
   en la base. El "cue" (Ver productos / Ver ficha técnica) solo aparece
   con el hover, así que en reposo la grilla queda limpia.
   ============================================================ */
.fam-card, .prod-card {
  position: relative;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t), background-color var(--t);
}
.fam-card::after, .prod-card::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 3px; width: 0; background: var(--accent); transition: width var(--t-slow);
}
.fam-card:hover, .prod-card:hover,
.fam-card:focus-visible, .prod-card:focus-visible {
  border-color: var(--accent); background-color: var(--amber-50);
  box-shadow: 0 6px 18px rgba(220, 32, 19, .14); transform: translateY(-3px);
}
.fam-card:hover::after, .prod-card:hover::after,
.fam-card:focus-visible::after, .prod-card:focus-visible::after { width: 100%; }
.fam-card:hover .name, .prod-card:hover .name,
.fam-card:focus-visible .name, .prod-card:focus-visible .name { color: var(--amber-600); }
.fam-card .name, .prod-card .name { transition: color var(--t); }

.fam-card .cue, .prod-card .cue {
  display: block; margin-top: 8px;
  font-size: 11px; font-weight: var(--fw-semibold); color: var(--amber-600);
  letter-spacing: var(--tracking-wide);
  opacity: 0; transform: translateX(-4px);
  transition: opacity var(--t), transform var(--t);
}
.fam-card .cue { margin-top: 0; }
.fam-card:hover .cue, .prod-card:hover .cue,
.fam-card:focus-visible .cue, .prod-card:focus-visible .cue { opacity: 1; transform: translateX(0); }

/* Sin hover (touch) el cue nunca se mostraría: ahí queda fijo */
@media (hover: none) {
  .fam-card .cue, .prod-card .cue { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fam-card, .prod-card, .fam-card::after, .prod-card::after,
  .fam-card .cue, .prod-card .cue { transition: none; }
  .fam-card:hover, .prod-card:hover { transform: none; }
}

/* ============================================================
   Ficha de producto
   ============================================================ */
.pdp-page { padding: 24px var(--gutter) 36px; background: var(--ink-50); }
@media (max-width: 860px) { .pdp-page { padding: var(--space-5) var(--space-5) var(--space-6); } }

.pdp-layout { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
@media (max-width: 980px) { .pdp-layout { grid-template-columns: 1fr; } }

.pdp { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; } }

.pdp-main { width: 100%; max-width: 340px; padding: 14px; background: var(--white); border: 1px solid var(--ink-175); }
.pdp-main img { width: 100%; height: 392px; object-fit: contain; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 8px; max-width: 340px; flex-wrap: wrap; }
.pdp-thumbs button {
  width: 72px; height: 72px; border: 1px solid var(--ink-175); background: var(--white);
  padding: 0; overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.pdp-thumbs button:hover {
  border-color: var(--accent); box-shadow: 0 3px 10px rgba(220, 32, 19, .18); transform: translateY(-2px);
}
.pdp-thumbs button.active { border-color: var(--accent); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.pdp-thumbs button:hover img { transform: scale(1.08); }
@media (max-width: 400px) { .pdp-main img { height: 300px; } }
@media (prefers-reduced-motion: reduce) {
  .pdp-thumbs button, .pdp-thumbs img { transition: none; }
  .pdp-thumbs button:hover { transform: none; }
  .pdp-thumbs button:hover img { transform: none; }
}

.pdp-info h1 { margin-bottom: 10px; font: 800 24px var(--font-display); color: var(--ink-900); }
.pdp-family {
  display: block; margin-bottom: 5px;
  font: var(--fw-bold) 11px var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.pdp-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-400); }

.pdp-block { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin-bottom: 14px; }
.pdp-block h2, .pdp-card h2 {
  font: var(--fw-bold) 12px var(--font-display); color: var(--ink-900);
  text-transform: uppercase; letter-spacing: .02em; margin-bottom: 5px;
}
.pdp-block p { font-size: 13px; line-height: 1.45; color: var(--ink-550); }

.pdp-card { background: var(--white); border: 1px solid var(--ink-150); padding: 12px 16px; margin-bottom: 14px; }
.pdp-specs { width: 100%; border-collapse: collapse; }
.pdp-specs tr { border-bottom: 1px solid var(--ink-125); }
.pdp-specs tr:nth-child(even) { background: var(--ink-50); }
.pdp-specs tr:last-child { border-bottom: none; }
.pdp-specs th {
  text-align: left; padding: 6px 8px; width: 170px; vertical-align: top;
  font-size: 12px; font-weight: var(--fw-semibold); color: var(--ink-600);
}
.pdp-specs td { padding: 6px 8px; font-size: 12px; color: var(--ink-700); }
@media (max-width: 520px) {
  .pdp-specs th, .pdp-specs td { display: block; width: auto; }
  .pdp-specs th { padding-bottom: 0; }
}

.pdp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pdp-actions .btn-consultar {
  padding: 11px 22px; background: var(--accent); color: var(--white);
  font-size: 12.5px; font-weight: var(--fw-bold); border-radius: 0;
  transition: background var(--t-fast);
}
.pdp-actions .btn-consultar:hover { background: var(--accent-hover); }
.pdp-actions .btn-ficha {
  padding: 11px 18px; border: 1px solid var(--ink-250); background: var(--white);
  color: var(--ink-700); font-size: 12.5px; font-weight: var(--fw-semibold);
  display: flex; align-items: center; gap: 8px; border-radius: 0;
}
.pdp-actions .btn-ficha:hover { border-color: var(--ink-400); color: var(--ink-900); }
.pdp-actions svg { width: 14px; height: 14px; }

/* --- Modal de consulta -------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in var(--t-fast) both;
}
@keyframes fade-in { from { opacity: 0; } }
.modal { background: var(--white); width: 100%; max-width: 480px; padding: 26px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: 14px; }
.modal-head h2 { font: var(--fw-bold) 19px var(--font-display); color: var(--ink-900); margin-bottom: 4px; }
.modal-head p { font-size: 12.5px; color: var(--ink-450); }
.modal-close { font-size: 22px; line-height: 1; color: var(--ink-400); padding: 0 4px; }
.modal-close:hover { color: var(--ink-900); }
.modal .lead-form { border: none; padding: 0; gap: 12px; }
.modal .lead-form input, .modal .lead-form textarea { padding: 12px 13px; font-size: 13px; }

/* ============================================================
   La Empresa
   ============================================================ */
.empresa-hero { padding: 34px var(--gutter) 8px; }
.empresa-hero .inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
.empresa-hero h1 {
  font: 800 clamp(30px, 3.4vw, 46px)/1.12 var(--font-display);
  color: var(--ink-900); letter-spacing: -0.01em;
}
.empresa-hero h1 .grad {
  background: linear-gradient(100deg, var(--amber-600), #C95D00);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.empresa-hero .copy > p {
  margin-top: 22px; max-width: 520px;
  font-size: 15.5px; line-height: 1.65; color: var(--ink-450); text-wrap: pretty;
}
/* Marco de esquina: dos filos rojos asomando por detrás de la foto */
.empresa-shot { position: relative; }
.empresa-shot::after {
  content: ""; position: absolute; right: -14px; bottom: -14px;
  width: 60%; height: 60%;
  border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
}
.empresa-shot img {
  position: relative; width: 100%; aspect-ratio: 1 / 0.66;
  object-fit: cover; background: var(--ink-50);
}
@media (max-width: 860px) {
  .empresa-hero { padding: var(--space-5) var(--space-5) 0; }
  .empresa-hero .inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .empresa-shot::after { display: none; }
}

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  padding: 24px 0; border-bottom: 1px solid var(--ink-150);
}
.stat { text-align: center; }
.stat:nth-child(2) { border-inline: 1px solid var(--ink-150); }
.stat b {
  height: 64px; display: flex; align-items: center; justify-content: center;
  font: 800 40px var(--font-display); color: var(--accent);
}
/* Dos de las tres cifras son artwork de marca, no números */
.stat b img { height: 64px; width: auto; object-fit: contain; }
.stat b img.ocsa { height: 56px; }
.stat span { display: block; margin-top: 6px; font-size: 12.5px; font-weight: var(--fw-medium); color: var(--ink-500); }
@media (max-width: 560px) {
  .stats-row { grid-template-columns: 1fr; gap: var(--space-4); }
  .stat:nth-child(2) { border-inline: none; border-block: 1px solid var(--ink-150); padding-block: var(--space-4); }
}

.empresa-body { padding: 32px var(--gutter) 0; }
.empresa-lead { margin-bottom: 32px; font-size: 15px; line-height: 1.7; color: var(--ink-600); max-width: 820px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 44px; margin-bottom: 20px; }
.pillars h2 {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  font: var(--fw-bold) 15px var(--font-display); color: var(--ink-900);
}
.pillars h2 img { flex: none; height: 64px; width: auto; max-width: 80px; object-fit: contain; }
.pillars p { font-size: 13.5px; line-height: 1.7; color: var(--ink-500); }
.empresa-kicker {
  padding: 20px 0 36px; margin-top: 8px; border-top: 1px solid var(--ink-150);
  font: 800 17px/1.4 var(--font-display); color: var(--ink-900);
}
@media (max-width: 860px) {
  .empresa-body { padding: var(--space-6) var(--space-5) 0; }
  .pillars { grid-template-columns: 1fr; gap: var(--space-6); }
}

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--ink-50); border: 1px solid var(--ink-150); padding: 26px 32px;
  margin-bottom: 48px;
}
.cta-band b { display: block; font: var(--fw-bold) 16px var(--font-display); color: var(--ink-900); margin-bottom: 4px; }
.cta-band span { font-size: 13.5px; color: var(--ink-450); }
.cta-band .btn-square { flex: none; }
@media (max-width: 560px) { .cta-band { padding: var(--space-5); } .cta-band .btn-square { width: 100%; text-align: center; justify-content: center; } }

/* ============================================================
   Contacto
   ============================================================ */
.contacto-page { padding: 22px var(--gutter) 0; }
@media (max-width: 860px) { .contacto-page { padding: var(--space-5) var(--space-5) 0; } }

.contacto-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 28px; }
.contacto-head h1 { margin: 6px 0 8px; font: 800 28px/1.15 var(--font-display); color: var(--ink-900); }
.contacto-head p { font-size: 14px; line-height: 1.5; color: var(--ink-500); max-width: 560px; }
.pill-live {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 8px 14px; background: #E4F8E7; border-radius: 20px;
  font-size: 12.5px; font-weight: var(--fw-semibold); color: #1A3520;
}
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #25D366; }

.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-bottom: 28px; }
@media (max-width: 900px) { .contacto-grid { grid-template-columns: 1fr; gap: var(--space-6); } }

.contact-rows { display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-row .ico {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink-100);
  display: grid; place-items: center; flex: none;
}
.contact-row .ico svg { width: 18px; height: 18px; color: var(--steel-600); }
.contact-row .ico.wa { background: #E4F8E7; }
.contact-row .ico.wa svg { width: 19px; height: 19px; color: #25D366; }
.contact-row b { display: block; font: var(--fw-bold) 13.5px var(--font-display); color: var(--ink-900); }
.contact-row a, .contact-row span { font-size: 13.5px; color: var(--ink-550); }
.contact-row a:hover { color: var(--accent); }

.trust-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--ink-150);
}
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.trust-item .ico { height: 64px; display: flex; align-items: center; justify-content: center; }
.trust-item .ico img { height: 64px; width: auto; max-width: 130px; object-fit: contain; }
.trust-item span { font-size: 11px; font-weight: var(--fw-semibold); color: var(--ink-700); }
@media (max-width: 480px) { .trust-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); } }

.form-card { border: 1px solid var(--ink-150); background: var(--ink-50); padding: 22px; align-self: start; }
.form-card h2 { font: var(--fw-bold) 19px var(--font-display); color: var(--ink-900); margin-bottom: 4px; }

/* Celulares: inicio compacto y navegación por familias. Tablet y PC conservan
   sus tarjetas, descripciones y listado de modelos. */
@media (max-width: 767px) {
  .hero-img { object-position: right center; }

  .featured-head { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .featured-head h2 { font-size: 22px; margin-top: 0; }
  .featured-grid { grid-template-columns: 1fr; gap: 12px; }
  .featured-grid .prod-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .featured-grid .thumb-box { aspect-ratio: 7 / 9; }
  .featured-grid .thumb { padding: 6px; }
  .featured-grid .body { min-width: 0; padding: 12px; }
  .featured-grid .name { font-size: 14px; }
  .featured-grid .desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; }
  .featured-grid .cue { opacity: 1; transform: none; }

  .diffs-inner { padding-block: 32px; }
  .diffs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .diff { gap: 12px; }
  .diff-ico, .diff-ico img { height: 64px; }
  .diff-ico img { max-width: 120px; }
  .diff b { font-size: 14px; }
  .diff-body > span { font-size: 13px; }
  .diff-body p, .diff-rule, .diff-hr { display: none; }

  .megamenu { gap: 0; padding: 0 12px 8px; }
  .megamenu .mm-models { display: none; }
  .megamenu .mm-col > a {
    display: flex; align-items: center; min-height: 44px; margin: 0; padding: 10px 8px;
    border-bottom: 1px solid var(--ink-125); font-size: 12px;
  }
  .megamenu .mm-col:last-child > a { border-bottom: none; }
}
.form-card > p { margin-bottom: 18px; font-size: 13px; color: var(--ink-450); }
.form-card .lead-form { background: none; border: none; padding: 0; }

/* ============================================================
   Estados de carga y vacío
   ============================================================ */
.sk-card { border: 1px solid var(--ink-150); background: var(--white); }
/* El alto lo marca la grilla en la que cae, para que el esqueleto no salte
   cuando entran las cards reales. */
.sk-thumb { aspect-ratio: 1 / 1; }
.prod-grid .sk-thumb { aspect-ratio: 7 / 9; }
.sk-lines { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 11px; }

.state-msg { grid-column: 1 / -1; padding: var(--space-6); text-align: center; color: var(--ink-450); font-size: 14px; }
.state-msg.error { color: var(--red-600); }
