/* ==========================================================================
   Sitio público — landing, mapa, productos, footer
   El color de marca llega desde el panel como --brand (ver index.php).
   ========================================================================== */

:root {
  /* Estos siete los pisa el panel; el resto se deriva de ellos. */
  --brand: #0f766e;
  --titulo: var(--brand);
  --tinta: #16202b;
  --fondo: #fff;
  --fondo-2: #f6f8fa;
  --pie-fondo: #10202a;
  --wa: #25d366;

  --brand-oscuro: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-suave: color-mix(in srgb, var(--brand) 10%, #fff);
  --tinta-2: color-mix(in srgb, var(--tinta) 68%, #fff);
  --linea: color-mix(in srgb, var(--tinta) 12%, #fff);
  --pie-texto: color-mix(in srgb, var(--pie-fondo) 22%, #fff);
  --pie-suave: color-mix(in srgb, var(--pie-fondo) 42%, #fff);
  --r: 14px;
  --sombra: 0 1px 2px rgba(16, 32, 43, .06), 0 8px 28px rgba(16, 32, 43, .08);
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 78px; }

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.02em; }
a { color: var(--brand); }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* Oculta visualmente pero lo deja para lectores de pantalla y buscadores. */
.solo-lectores {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --- Botones -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 999px;
  background: var(--brand); color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.btn:hover { background: var(--brand-oscuro); transform: translateY(-1px); }
.btn--grande { padding: 13px 26px; font-size: 16px; box-shadow: var(--sombra); }
/* Todo lo de adentro en blanco, incluido el icono (hereda currentColor). */
.btn--wa { background: var(--wa); color: #fff; padding-inline: 14px; }
.btn--wa:hover { background: color-mix(in srgb, var(--wa) 86%, #000); color: #fff; }
.btn--wa svg { color: #fff; }
.btn--wa.btn--grande { padding: 13px 18px; }
/* Secundario sobre fondo claro (btn--sec-oscuro es solo para fondos oscuros). */
.btn--sec { background: #fff; color: var(--tinta); border: 1px solid var(--linea); }
.btn--sec:hover { background: #fff; border-color: var(--brand); color: var(--brand); }

.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font: inherit; font-size: 14px; font-weight: 600;
}
.link:hover { text-decoration: underline; }

/* --- Nav ------------------------------------------------------------------ */

.nav {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--linea);
}
.nav__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav__marca {
  display: flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.15;
  color: var(--tinta); text-decoration: none; margin-right: auto;
}
.nav__marca img { width: 44px; height: 44px; object-fit: contain; border-radius: 9px; }
.nav__marca small {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0;
  color: var(--tinta-2); text-transform: lowercase;
}
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  color: var(--tinta-2); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.nav__burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__burger span {
  display: block; width: 22px; height: 2px; background: var(--tinta); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav__burger span + span { margin-top: 5px; }

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  /* Deliberadamente bajo: la idea es que el mapa entre en la primera pantalla. */
  padding: clamp(30px, 5vw, 56px) 0;
  background: linear-gradient(150deg, var(--brand-suave), #fff 62%);
  border-bottom: 1px solid var(--linea);
  text-align: center;
}
.hero--img {
  background-image: linear-gradient(rgba(10, 22, 30, .62), rgba(10, 22, 30, .72)), var(--hero);
  background-size: cover;
  background-position: center;
  color: #fff;
  border-bottom: 0;
}
.hero--img .hero__texto, .hero--img .hero__dato { color: rgba(255, 255, 255, .9); }
.hero__in { max-width: 780px; }
.hero__titulo { font-size: clamp(26px, 3.8vw, 40px); font-weight: 800; color: var(--titulo); }
.hero__texto { font-size: clamp(15px, 1.6vw, 17.5px); color: var(--tinta-2); margin: 0 0 20px; }
.hero__dato { margin: 16px 0 0; font-size: 14.5px; color: var(--tinta-2); }
.hero__dato strong { color: inherit; font-size: 17px; }

/* --- Secciones ------------------------------------------------------------ */

.seccion { padding: clamp(38px, 5.5vw, 68px) 0; }
.seccion--mapa { padding-top: clamp(10px, 2vw, 20px); }
.seccion--gris { background: var(--fondo-2); border-block: 1px solid var(--linea); }
.seccion__head { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.seccion__head h2 { font-size: clamp(23px, 3.2vw, 33px); font-weight: 800; color: var(--titulo); }
.seccion__head p { color: var(--tinta-2); margin: 0; font-size: 17px; }
.vacio {
  text-align: center; color: var(--tinta-2);
  border: 1px dashed var(--linea); border-radius: var(--r); padding: 42px;
}

/* ── Página "Quiénes somos" ─────────────────────────────────────────── */
.quienes__in { max-width: 760px; margin: 0 auto; }
.quienes__img {
  display: block; width: 100%; max-height: 440px; object-fit: cover;
  border-radius: var(--r); margin-bottom: 30px;
}
.quienes__titulo {
  font-size: clamp(26px, 3.8vw, 38px); font-weight: 800; color: var(--titulo);
  margin: 0 0 20px; text-align: center;
}
.quienes__historia { color: var(--tinta); font-size: 17px; line-height: 1.75; }

/* Tira de productos: las mismas tarjetas ".prod" de la grilla real (mismas
   clases, mismos datos), a un 70% de tamaño, en una caja del mismo ancho que
   la historia de arriba (va dentro de ".wrap.quienes__in"). La lista viene
   repetida data-copias veces (calculado en PHP según cuántos productos haya,
   para que siempre sea más ancha que la caja) y marquesina.js mueve el
   scroll solo, reiniciando el recorrido exactamente al llegar al ancho de
   una vuelta completa: el reinicio no se nota (1, 2, 3, 1, 2, 3... sin
   corte). Las flechas mueven a mano; el JS respeta "menos animaciones". */
.marquesina { position: relative; margin-top: 36px; }
.marquesina__ventana {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.marquesina__ventana::-webkit-scrollbar { display: none; }
.marquesina__pista {
  display: flex; gap: 22px; margin: 0; padding: 4px 2px; list-style: none;
  width: max-content; zoom: .7;
}
.marquesina__item { width: 214px; flex: none; cursor: default; }
.marquesina__item:hover { transform: none; box-shadow: none; }  /* sin el hover de la grilla real */
.marquesina__flecha {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--linea);
  background: #fff; color: var(--tinta); font: 20px/1 inherit; cursor: pointer;
  box-shadow: var(--sombra);
}
.marquesina__flecha:hover { border-color: var(--brand); color: var(--brand); }
.marquesina__flecha--izq { left: -14px; }
.marquesina__flecha--der { right: -14px; }
/* Margen propio (no solo el que dejaba la marquesina): si el botón de
   productos está apagado y no hay marquesina, esto sigue separando el botón
   de puntos de venta del texto de arriba. */
.quienes__boton-wrap {
  text-align: center; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px;
}
@media (max-width: 700px) {
  .marquesina__flecha { width: 32px; height: 32px; font-size: 17px; }
  .marquesina__flecha--izq { left: -4px; }
  .marquesina__flecha--der { right: -4px; }
}

/* --- Mapa + panel lateral ------------------------------------------------- */

.mapa {
  display: grid;
  grid-template-columns: 372px 1fr;
  gap: 20px;
  height: 640px;
}
.panel {
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid var(--linea); border-radius: var(--r);
  background: #fff; overflow: hidden;
}

.buscador { position: relative; padding: 14px 14px 10px; }
.buscador svg { position: absolute; left: 27px; top: 27px; color: var(--tinta-2); }
.buscador input {
  width: 100%; padding: 12px 38px 12px 42px;
  border: 1px solid var(--linea); border-radius: 10px;
  font: inherit; font-size: 15px; background: var(--fondo-2);
}
.buscador input:focus {
  outline: none; background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
#q-clear {
  position: absolute; right: 22px; top: 22px;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #e8edf1; color: var(--tinta-2); font-size: 17px; line-height: 1; cursor: pointer;
}

.buscador__ayuda {
  margin: 2px 14px 6px; font-size: 13.5px; line-height: 1.5; color: var(--tinta-2);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 12px; }
.chip {
  --c: var(--brand);
  border: 1px solid var(--linea); background: #fff; color: var(--tinta-2);
  padding: 6px 12px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--c); color: var(--c); }
.chip.is-on { background: var(--c); border-color: var(--c); color: #fff; }

.panel__meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-block: 1px solid var(--linea);
  background: var(--fondo-2); font-size: 13px; color: var(--tinta-2);
}

.lista { flex: 1; overflow-y: auto; margin: 0; padding: 6px; list-style: none; overscroll-behavior: contain; }
.lista__vacio { padding: 34px 20px; text-align: center; color: var(--tinta-2); font-size: 15px; }

.item {
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start;
  width: 100%; text-align: left;
  padding: 12px; border: 1px solid transparent; border-radius: 10px;
  background: none; font: inherit; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.item:hover { background: var(--fondo-2); }
.item.is-on { background: var(--brand-suave); border-color: color-mix(in srgb, var(--brand) 35%, #fff); }
.item__logo {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--linea); background: #fff;
}
.item__ini {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 10px;
  color: #fff; font-weight: 800; font-size: 18px;
}
.item__nom { display: block; font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.item__dir { display: block; font-size: 13.5px; color: var(--tinta-2); margin: 0; }
.item__ben {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-suave); color: var(--brand-oscuro); font-size: 12px; font-weight: 700;
}

.mapa__lienzo { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--linea); }
#map { height: 100%; width: 100%; background: #e8eef2; }
.mapa__reset {
  position: absolute; right: 12px; top: 12px; z-index: 500;
  padding: 8px 14px; border: 1px solid var(--linea); border-radius: 999px;
  background: rgba(255, 255, 255, .96); box-shadow: var(--sombra);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mapa__reset:hover { background: #fff; color: var(--brand); }

/* Marcadores y popup de Leaflet */
.pin { display: grid; place-items: center; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .28)); }
.pin svg { display: block; }
.pin--on { animation: brinca .45s ease; z-index: 1000 !important; }
@keyframes brinca {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-11px); }
}
.marker-cluster {
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 24%, #fff);
  border-radius: 50%;
}
.marker-cluster div {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font: 700 13px system-ui; box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
/* Leaflet.markercluster trae sus propios colores por tamaño de grupo
   (".marker-cluster-small/medium/large", verde/amarillo/naranja) con la
   misma especificidad que las reglas genéricas de arriba: sin esto, esas
   ganan porque están definidas después en su propia hoja de estilos. */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
  background: color-mix(in srgb, var(--brand) 24%, #fff);
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: var(--cluster-color, var(--brand)); color: #fff;
}

.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--sombra); padding: 0; }
.leaflet-popup-content { margin: 0; width: 268px !important; line-height: 1.5; }
.leaflet-popup-tip { box-shadow: var(--sombra); }
.pop { padding: 14px 16px 16px; }
.pop__top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.pop__logo { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid var(--linea); }
.pop__cat { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pop__nom { font-size: 16px; font-weight: 800; margin: 0; }
.pop__dir { font-size: 13.5px; color: var(--tinta-2); margin: 0 0 4px; }
.pop__ben {
  display: inline-block; margin: 6px 0 0; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-suave); color: var(--brand-oscuro); font-size: 12px; font-weight: 700;
}
.pop__acciones { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.pop__acciones a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: 9px; text-decoration: none;
  font-size: 13px; font-weight: 700;
}
/* Leaflet trae su propia regla ".leaflet-container a { color: #0078A8; }"
   (un azul) que es más específica que ".pop__ir" sola y le gana el color,
   sin importar el orden de las hojas de estilo. Se ancla bajo ".pop" para
   igualar esa especificidad y que gane el blanco que corresponde. */
.pop .pop__ir { background: var(--brand); color: #fff; }
.pop .pop__ir:hover { background: var(--brand-oscuro); color: #fff; }
.pop .pop__sec { background: var(--fondo-2); color: var(--tinta); border: 1px solid var(--linea); }
.pop .pop__sec:hover { border-color: var(--brand); color: var(--brand); }

/* --- Productos ------------------------------------------------------------ */

.grid {
  display: grid; gap: 22px; margin: 0; padding: 0; list-style: none;
  /* --prod-cols y --prod-align los define el panel (Sección de productos).
     Las columnas son de ancho fijo (no 1fr) a propósito: si se estiraran para
     llenar la fila nunca sobraría espacio, y la alineación no tendría nada
     que hacer. Con "Automático" (auto-fit), las columnas sin producto se
     colapsan solas, así que la alineación también se nota con pocos
     productos en una pantalla ancha. Tablet y celular ignoran esto: sus
     media queries de más abajo pisan ambos valores a propósito. */
  grid-template-columns: repeat(var(--prod-cols, auto-fit), minmax(214px, 214px));
  justify-content: var(--prod-align, center);
}
.prod {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.prod:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
/* El cuadro de la foto manda: siempre cuadrado, no importa qué imagen se suba.
   min-height:0 evita que una imagen alta estire la caja pese al aspect-ratio,
   y contain muestra el envase entero en vez de recortarlo. */
.prod__foto {
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--linea);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.prod__foto img { width: 100%; height: 100%; object-fit: contain; }
.prod__sinfoto { font-size: 46px; font-weight: 800; color: #c8d2da; }
.prod__body { padding: 15px 16px 18px; }
.prod__nombre { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.prod__gramaje {
  margin: 0; font-size: 13px; font-weight: 700; color: var(--brand);
  text-transform: uppercase; letter-spacing: .03em;
}
.prod__desc { margin: 8px 0 0; font-size: 14px; color: var(--tinta-2); }

/* --- Footer --------------------------------------------------------------- */

.pie { background: var(--pie-fondo); color: var(--pie-texto); padding: 60px 0 26px; }
.pie a { color: var(--pie-texto); text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie__in { display: grid; gap: 36px; grid-template-columns: 1.6fr 1fr 1fr; }
.pie__logo { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; margin-bottom: 14px; }
.pie__marca { font-size: 21px; color: #fff; margin: 0 0 4px; }
.pie__tagline { margin: 0 0 10px; font-size: 14px; color: var(--pie-suave); }
.pie__texto { margin: 0; font-size: 15px; max-width: 42ch; color: var(--pie-suave); }
.pie h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--pie-suave); margin: 0 0 14px; }
.pie__datos, .pie__redes { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.pie__redes a { display: inline-flex; align-items: center; gap: 9px; }
.pie__legal {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13.5px; color: var(--pie-suave);
  /* Deja libre la esquina donde flota el botón de WhatsApp. */
  padding-right: 76px;
}
.pie__legal a { color: var(--pie-suave); }

.wa-flota {
  position: fixed; right: 20px; bottom: 20px; z-index: 950;
  display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 50%; background: var(--wa); color: #fff;
  box-shadow: 0 6px 22px rgba(37, 211, 102, .45);
  transition: transform .18s;
}
.wa-flota:hover { transform: scale(1.07); }
.wa-flota svg { width: 28px; height: 28px; }

/* --- Galería de producto: tarjeta ampliable ------------------------------- */

.prod__abrir {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; position: relative; font: inherit; text-align: inherit;
}
.prod__abrir:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.prod__lupa {
  position: absolute; right: 10px; bottom: 10px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(22, 32, 43, .74); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  opacity: 0; transform: translateY(4px);
  transition: opacity .18s, transform .18s;
}
.prod:hover .prod__lupa, .prod__abrir:focus-visible .prod__lupa { opacity: 1; transform: translateY(0); }


/* --- Visor a pantalla completa -------------------------------------------- */

.visor {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; grid-template-columns: 64px 1fr 64px;
  grid-template-areas: "prev caja next" "tiras tiras tiras";
  align-items: center; gap: 10px; padding: 20px;
  background: rgba(12, 18, 24, .93);
  backdrop-filter: blur(3px);
}
.visor[hidden] { display: none; }

.visor__caja {
  grid-area: caja;
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px;
  min-height: 0;
}
.visor__caja img {
  max-width: min(100%, 760px); max-height: 62vh;
  object-fit: contain; border-radius: 12px; background: #fff;
}
.visor__pie { color: #fff; text-align: center; max-width: 60ch; }
.visor__pie strong { display: block; font-size: 19px; }
.visor__pie span { color: color-mix(in srgb, var(--brand) 55%, #fff); font-weight: 700; font-size: 14px; }
.visor__pie p { margin: 6px 0 0; color: #c6d1da; font-size: 14.5px; }
.visor__contador { display: block; margin-top: 8px; color: #8ea0ad !important; font-weight: 500 !important; }

.visor__cerrar {
  position: absolute; top: 16px; right: 18px; z-index: 1;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.visor__cerrar:hover { background: rgba(255, 255, 255, .22); }

.visor__nav {
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 32px; line-height: 1; cursor: pointer;
}
.visor__nav:hover { background: rgba(255, 255, 255, .22); }
.visor__nav--prev { grid-area: prev; justify-self: start; }
.visor__nav--next { grid-area: next; justify-self: end; }
.visor__nav[hidden] { visibility: hidden; display: block; }   /* conserva el espacio */

.visor__tiras {
  grid-area: tiras; justify-self: center;
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  list-style: none; margin: 0; padding: 4px 0 0;
}
.visor__tiras button {
  width: 62px; height: 62px; padding: 0;
  border: 2px solid transparent; border-radius: 9px; overflow: hidden;
  background: #fff; cursor: pointer;
}
.visor__tiras button img { width: 100%; height: 100%; object-fit: contain; }
.visor__tiras button.is-on { border-color: #fff; }
.visor__tiras[hidden] { display: none; }

body.visor-abierto { overflow: hidden; }


/* --- Directorio de puntos de venta (el listado que leen los buscadores) ---- */

.directorio { margin-top: 26px; }
.directorio h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; color: var(--titulo); }
.directorio__intro { color: var(--tinta-2); margin: 0 0 18px; font-size: 15.5px; }

.deptos {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);   /* 4 por fila; con 12 deptos son 3 filas */
}

.depto {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  padding: 11px 13px;
  border: 1px solid var(--linea); border-radius: 10px;
  background: #fff; cursor: pointer; font: inherit; text-align: left;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.depto:hover {
  border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sombra);
}
.depto:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.depto__nombre { font-weight: 700; font-size: 14px; color: var(--tinta); }
.depto__cant {
  font-size: 20px; font-weight: 800; line-height: 1.25; color: var(--brand);
}
.depto__pie { font-size: 11.5px; color: var(--tinta-2); }

.deptos__datos[hidden] { display: none; }

/* Lista de comercios. Se ve dentro del lightbox; en el HTML está siempre
   presente (oculta) para que la lean los buscadores. */
.directorio__lista { list-style: none; margin: 0; padding: 0; }
.directorio__lista li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "nombre ir" "direccion ir" "tel ir";
  align-items: center;
  gap: 0 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--linea);
}
.directorio__lista li:last-child { border-bottom: 0; }
.directorio__lista strong { grid-area: nombre; font-size: 15px; }
.directorio__lista span {
  grid-area: direccion; font-size: 13.5px; color: var(--tinta-2); line-height: 1.45;
}
.directorio__lista li > a[href^="tel:"] {
  grid-area: tel; font-size: 13.5px; text-decoration: none; width: fit-content;
}
.directorio__lista li > a[href^="tel:"]:hover { text-decoration: underline; }
.directorio__ir {
  grid-area: ir;
  padding: 8px 14px; border-radius: 8px;
  background: var(--brand-suave); color: var(--brand-oscuro);
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.directorio__ir:hover { background: var(--brand); color: #fff; }

/* --- Lightbox de departamento --------------------------------------------- */

.deptobox {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(12, 18, 24, .82); backdrop-filter: blur(3px);
}
.deptobox[hidden] { display: none; }

.deptobox__caja {
  width: min(100%, 860px); max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.deptobox__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--linea);
  background: #fff;
}
.deptobox__head h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--titulo); }
.deptobox__cerrar {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 0; border-radius: 50%; background: var(--fondo-2); color: var(--tinta);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.deptobox__cerrar:hover { background: #e6ebef; }

/* Acá está el scroll que pediste. */
.deptobox__cuerpo {
  overflow-y: auto; padding: 6px 20px 20px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.deptobox__cuerpo .directorio__lista { padding: 0; }

/* --- Llamado a distribuidores --------------------------------------------- */

.cta {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: center;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--brand), var(--brand-oscuro));
  color: #fff;
}
.cta h2 { font-size: clamp(23px, 3vw, 31px); font-weight: 800; color: #fff; }
.cta__texto p { margin: 0 0 16px; font-size: 16.5px; color: rgba(255, 255, 255, .88); }
.cta__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cta__lista li {
  position: relative; padding-left: 26px;
  font-size: 15px; color: rgba(255, 255, 255, .92);
}
.cta__lista li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  font-weight: 800; color: #fff;
}
.cta__acciones { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cta__acciones .btn { justify-content: center; width: fit-content; }
.btn--sec-oscuro {
  background: rgba(255, 255, 255, .14); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
}
.btn--sec-oscuro:hover { background: rgba(255, 255, 255, .24); }

/* --- Preguntas frecuentes -------------------------------------------------- */

.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 8px; }
.faq__item {
  background: #fff; border: 1px solid var(--linea); border-radius: 10px;
}
.faq__item summary {
  padding: 15px 18px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "＋"; color: var(--tinta-2); font-weight: 400; }
.faq__item[open] summary::after { content: "－"; }
.faq__item summary:hover { color: var(--brand); }
.faq__item p {
  margin: 0; padding: 0 18px 17px;
  color: var(--tinta-2); font-size: 15.5px;
}

/* ==========================================================================
   Responsive
   Un solo lugar para todos los quiebres, de mayor a menor.
   ========================================================================== */

/* En pantallas táctiles no hay hover: lo que aparece al pasar el mouse
   tiene que estar visible siempre. */
@media (hover: none) {
  .prod__lupa { opacity: 1; transform: none; }
}

/* --- Notebooks chicas ----------------------------------------------------- */
@media (max-width: 1100px) {
  .deptos { grid-template-columns: repeat(3, 1fr); }
  .mapa { grid-template-columns: 320px 1fr; }
}

/* --- Tablet: el mapa pasa arriba y la lista abajo -------------------------- */
@media (max-width: 1000px) {
  .mapa { grid-template-columns: 1fr; height: auto; gap: 14px; }
  .mapa__lienzo { height: 340px; order: -1; }
  .panel { height: 460px; }
  .pie__in { grid-template-columns: 1fr 1fr; }
  .cta { grid-template-columns: 1fr; gap: 22px; }
}

/* --- Tablet angosta ------------------------------------------------------- */
@media (max-width: 860px) {
  .deptos { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .deptobox__caja { max-height: 90vh; }

  /* El menú pasa a desplegable acá y no recién en el corte de celular:
     con 5 links ("Quiénes somos" sumado) ya no entran cómodos en una fila. */
  .nav__links {
    position: absolute; inset: 68px 0 auto; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--linea);
    padding: 6px 20px 14px; box-shadow: var(--sombra);
    display: none; z-index: 10;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 13px 0; border-bottom: 1px solid var(--linea); }
  .nav__burger { display: block; margin-left: auto; }
  .nav__cta { display: none; }
}

/* --- Celular -------------------------------------------------------------- */
@media (max-width: 700px) {
  html { scroll-padding-top: 66px; }
  .wrap { width: min(100% - 28px, var(--wrap)); }

  /* Menú desplegable */
  .nav__in { height: 60px; gap: 12px; }
  .nav__marca { font-size: 16px; gap: 9px; }
  .nav__marca img { width: 36px; height: 36px; }
  .nav__marca small { font-size: 11px; }
  .nav__links {
    position: absolute; inset: 60px 0 auto; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--linea);
    padding: 6px 20px 14px; box-shadow: var(--sombra);
    display: none; z-index: 10;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 13px 0; border-bottom: 1px solid var(--linea); }
  .nav__burger { display: block; margin-left: auto; }
  .nav__cta { display: none; }

  .hero { padding: 26px 0 30px; }
  .hero__titulo { font-size: 25px; }
  .hero__texto { font-size: 15px; margin-bottom: 18px; }
  .btn--grande { padding: 12px 22px; font-size: 15px; }

  .seccion { padding: 34px 0; }
  .seccion__head { margin-bottom: 22px; }
  .seccion__head p { font-size: 15px; }

  /* Párrafos con más aire a los costados que el resto del contenido: se
     agrupan en más líneas (crecen en alto) pero se leen más cómodos en
     una pantalla angosta. (.faq__item p ya tiene su propio padding más abajo.) */
  .hero__texto, .seccion__head p, .buscador__ayuda, .directorio__intro,
  .prod__desc, .cta__texto p, .pie__texto {
    padding-inline: 14px;
  }

  /* "Quiénes somos": la imagen y el texto se angostan un poco más que el
     margen general del sitio, para que no queden pegados a los bordes. */
  .quienes__in { padding-inline: 14px; }

  /* Mapa y buscador */
  .mapa__lienzo { height: 480px; }
  .panel { height: 420px; }
  .buscador input { font-size: 16px; }   /* 16px evita el zoom automático en iOS */

  /* Productos */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .prod__body { padding: 12px 13px 15px; }
  .prod__nombre { font-size: 14.5px; }
  .prod__desc { font-size: 13px; }

  /* Departamentos */
  .deptos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .depto { padding: 10px 12px; }
  .depto__cant { font-size: 19px; }
  .directorio__lista li {
    grid-template-columns: 1fr;
    grid-template-areas: "nombre" "direccion" "tel" "ir";
    gap: 4px;
  }
  .directorio__ir { justify-self: start; margin-top: 6px; }

  /* Lightbox de departamento a pantalla casi completa */
  .deptobox { padding: 0; }
  .deptobox__caja { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .deptobox__head { padding: 14px 16px; }
  .deptobox__head h3 { font-size: 18px; }
  .deptobox__cuerpo { padding: 4px 16px 20px; }

  /* Visor de fotos */
  .visor { grid-template-columns: 40px 1fr 40px; padding: 10px; gap: 5px; }
  .visor__nav { width: 38px; height: 38px; font-size: 24px; }
  .visor__caja img { max-height: 48vh; }
  .visor__pie strong { font-size: 17px; }
  .visor__tiras button { width: 46px; height: 46px; }
  .visor__cerrar { top: 10px; right: 12px; width: 40px; height: 40px; }

  /* Distribuidores y footer */
  .cta { padding: 24px 20px; }
  .cta h2 { font-size: 22px; }
  .cta__texto p { font-size: 15px; }
  .pie { padding: 40px 0 20px; }
  .pie__in { grid-template-columns: 1fr; gap: 28px; }
  .pie__legal { margin-top: 30px; padding-right: 66px; }

  .wa-flota { width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .wa-flota svg { width: 25px; height: 25px; }

  .faq__item summary { font-size: 15px; padding: 13px 15px; }
  .faq__item p { font-size: 14.5px; padding: 0 15px 15px; }
}

/* --- Celular angosto ------------------------------------------------------ */
/* Los departamentos siguen de a dos: son tarjetas cortas y a una columna
   la lista se vuelve larguísima. */
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
  .hero__titulo { font-size: 23px; }
  .depto { padding: 12px; }
  .depto__nombre { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
