/* Identidad de la web de MSN (misma paleta y tipografias que cerebro-web). */

:root {
  --tinta: #16211A;
  --tinta-2: #223127;
  --tinta-3: #0F1712;
  --crema: #F4F1E8;
  --papel: #FFFFFF;
  --hueso: #F2EEE2;
  --oro: #E9C46A;
  --coral: #E5654E;
  --verde: #7FB069;
  --gris: #6E6A5B;
  --gris-claro: #A8B0A0;
  --borde: #C9C3B2;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Space Grotesk', 'Trebuchet MS', system-ui, sans-serif;
  --alto-barra: 62px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--crema);
  color: var(--tinta);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 96px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.ancho { max-width: 1000px; margin: 0 auto; }

.rotulo { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); }

/* ---------- barra superior ---------- */

.barra-sup { position: sticky; top: 0; z-index: 30; background: var(--tinta); color: var(--hueso); }

.barra-sup .ancho { display: flex; align-items: center; gap: 10px; padding: 9px 14px; }

/* En el celular la marca larga se comia el buscador: ahi va el sello corto. */
.marca { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; font-family: var(--serif); font-size: 19px; line-height: 1.05; text-decoration: none; white-space: nowrap; }

.marca .largo { display: none; }

.marca .sub { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: 0.14em; color: var(--gris-claro); }

/* min-width:0 va tambien en el form: sin eso el input no achica y la barra
   medía 396px fijos, o sea que en un celular de 360/375/390 el boton "Mi lista"
   quedaba afuera de la pantalla y la pagina se corria de costado. */
.buscar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }

.buscar input {
  flex: 1;
  min-width: 0;
  height: 44px;
  font: inherit;
  font-size: 16px;
  padding: 0 12px;
  color: var(--tinta);
  background: var(--papel);
  border: 1.5px solid var(--tinta);
  border-radius: 6px;
}

.buscar input::placeholder { color: #A79E8A; }

.btn-lista {
  height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--oro);
  color: var(--tinta);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- tira de pasillos ---------- */

.tira {
  position: sticky;
  top: var(--alto-barra);
  z-index: 20;
  background: var(--crema);
  border-bottom: 1px solid var(--borde);
}

.tira .fila { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }

.tira .fila::-webkit-scrollbar { display: none; }

.pasillo-chip {
  flex-shrink: 0;
  height: 44px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--borde);
  background: var(--papel);
  border-radius: 22px;
  font-size: 14px;
  white-space: nowrap;
}

.pasillo-chip .punto { width: 9px; height: 9px; border-radius: 50%; }

.pasillo-chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--hueso); font-weight: 500; }

/* ---------- cabecera ---------- */

.cabecera { padding: 22px 14px 6px; }

.cabecera h1 { font-size: 34px; line-height: 1.05; font-style: italic; }

.cabecera p { margin: 6px 0 0; font-size: 14px; color: var(--gris); }

.aviso-precio {
  margin: 14px 14px 0;
  padding: 12px 14px;
  background: var(--oro);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.datos-duros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 14px 0;
  padding: 12px 14px;
  background: var(--tinta-3);
  border-radius: 6px;
  font-size: 13px;
  color: #C9CFC0;
}

.datos-duros b { color: var(--hueso); font-weight: 600; }

/* ---------- el plano del local (la portada) ---------- */

.local {
  --fila: 25px;
  display: grid;
  grid-template-columns: repeat(var(--columnas), 1fr);
  grid-template-rows: repeat(var(--filas), var(--fila));
  gap: 4px;
  margin: 14px;
  padding: 12px;
  background-color: #EBE7DA;
  background-image:
    linear-gradient(rgba(22, 33, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 33, 26, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  border: 1px solid var(--borde);
  border-radius: 10px;
  box-shadow: inset 0 2px 10px rgba(22, 33, 26, 0.08);
}

/* Cada góndola del plano es un mueble visto desde arriba: el color es el del
   pasillo, el mismo que después se ve en los envases. */
.pieza {
  grid-column: calc(var(--x) + 1) / span var(--w);
  grid-row: calc(var(--y) + 1) / span var(--h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  /* Sin esto el nombre largo estira la celda, la grilla se pasa de los 375px y
     la pagina entera se corre de costado. */
  min-width: 0;
  overflow: hidden;
  min-height: 44px;
  padding: 4px 7px;
  background: var(--tono);
  border-radius: 3px;
  color: #FFF;
  text-align: left;
  box-shadow: 0 2px 0 rgba(15, 23, 18, 0.3), 0 5px 9px -4px rgba(15, 23, 18, 0.45);
}

.pieza .nombre {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(15, 23, 18, 0.45);
  overflow-wrap: anywhere;
}

.pieza .cuantos { font-size: 10px; color: rgba(255, 255, 255, 0.82); }

.pieza:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(15, 23, 18, 0.3); }

.decor {
  grid-column: calc(var(--x) + 1) / span var(--w);
  grid-row: calc(var(--y) + 1) / span var(--h);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed var(--borde);
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris);
}

.decor.entrada { border: 1.5px solid var(--verde); color: #4A7239; }

.pie-plano { margin: 0 14px 8px; font-size: 12px; color: var(--gris); }

/* ---------- parado frente a la góndola ---------- */

/* El mueble entero tiene que entrar en la pantalla del celular: si no, se camina
   la góndola scrolleando para los dos lados a la vez y se pierde el hilo. */
.salon-gondola, .resultados { --slot: 140px; --alto-escena: clamp(410px, calc(100vh - 264px), 640px); }

.cartel-gondola {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 14px 0;
  padding: 8px 6px 8px 0;
  background: var(--tinta);
  color: var(--hueso);
  border-radius: 8px;
  box-shadow: 0 9px 16px -11px rgba(22, 33, 26, 0.9);
  overflow: hidden;
}

.cartel-gondola .tono { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }

.cartel-gondola .chapa { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 14px; }

.cartel-gondola .numero { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris-claro); }

.cartel-gondola h1 { font-size: 26px; line-height: 1.05; font-style: italic; overflow-wrap: anywhere; }

.cartel-gondola .cuantos { font-size: 12px; color: var(--gris-claro); }

/* Caminar el pasillo: la góndola de al lado. */
.caminar {
  flex-shrink: 0;
  width: 48px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(242, 238, 226, 0.1);
  font-size: 30px;
  line-height: 1;
  color: var(--hueso);
}

.aviso-busqueda {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 14px 0;
  padding: 8px 12px;
  background: var(--oro);
  border-radius: 6px;
  font-size: 13px;
}

.aviso-busqueda button { min-height: 44px; font-size: 13px; font-weight: 700; text-decoration: underline; white-space: nowrap; }

.escena {
  position: relative;
  height: var(--alto-escena);
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  background: #23261F;
  scrollbar-width: thin;
}

.mueble { position: relative; height: 100%; width: calc(var(--columnas) * var(--slot)); min-width: 100%; }

/* Capa de fondo del mueble. Cuando existan las fotos de góndola vacía
   (img/gondolas/*.jpg, ver DISEÑO_GONDOLA.md) entran acá por data/plano.json y
   se repiten de costado; hasta entonces manda el dibujo CSS de abajo. */
.mueble .fondo { position: absolute; inset: 0; background-repeat: repeat-x; background-size: auto 100%; }

.escena[data-mueble] .fondo {
  background-color: #D5CFBE;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 20%, rgba(15, 23, 18, 0.28)),
    repeating-linear-gradient(90deg, rgba(15, 23, 18, 0.055) 0 1px, transparent 1px 28px);
}

.escena[data-mueble="heladera"] .fondo,
.escena[data-mueble="freezer"] .fondo {
  background-color: #BFD0D8;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 26%, rgba(20, 40, 52, 0.4)),
    repeating-linear-gradient(102deg, rgba(255, 255, 255, 0.2) 0 3px, rgba(255, 255, 255, 0) 3px 96px);
}

.escena[data-mueble="cajones"] .fondo {
  background-color: #B98F5F;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 22%, rgba(58, 33, 12, 0.42)),
    repeating-linear-gradient(90deg, rgba(58, 33, 12, 0.16) 0 2px, transparent 2px 34px);
}

.escena[data-mueble="vitrina"] .fondo,
.escena[data-mueble="mostrador"] .fondo {
  background-color: #5D5344;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06) 24%, rgba(15, 23, 18, 0.5)),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.14) 0 2px, rgba(255, 255, 255, 0) 2px 120px);
}

.mueble .piso { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(180deg, rgba(15, 23, 18, 0.35), rgba(15, 23, 18, 0.75)); }

/* Los carteles de tramo: cada familia del pasillo ocupa su pedazo de góndola. */
.tramos { position: absolute; left: 0; top: 0; width: 100%; height: 24px; z-index: 4; pointer-events: none; }

.tramo {
  position: absolute;
  top: 0;
  left: calc(var(--desde) * var(--slot));
  width: calc(var(--cols) * var(--slot));
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

/* El cartel del tramo queda pegado al borde mientras uno camina ese pedazo de
   góndola: si no, "Yerba y té" quedaba centrado en 1.500px de mueble, o sea
   fuera de la pantalla, y nadie sabía en qué sector estaba parado. */
.tramo span {
  position: sticky;
  left: 8px;
  max-width: calc(100vw - 24px);
  padding: 3px 10px;
  border-radius: 11px;
  background: rgba(15, 23, 18, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- las repisas ---------- */

.repisa { position: absolute; left: 0; top: var(--y); width: 100%; height: var(--alto); padding-bottom: 15px; }

/* La tabla vista de canto: de las repisas altas se ve el fondo, de las bajas la
   cara de arriba. Eso es lo que da la sensación de estar parado adelante. */
.repisa::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  height: calc(1px + var(--vista) * 7px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
}

.repisa::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13px;
  background: linear-gradient(180deg, #E9E3D1 0%, #B4AC97 55%, #8B8469 100%);
  box-shadow: 0 7px 13px -5px rgba(15, 23, 18, 0.6);
}

.hueco { display: flex; align-items: flex-end; height: 100%; }

/* ---------- el producto apoyado en la repisa ---------- */

.slot {
  position: relative;
  flex: 0 0 var(--slot);
  width: var(--slot);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.slot .toque { display: flex; align-items: flex-end; justify-content: center; width: 100%; flex: 1; min-height: 0; padding: 0 6px; }

.envase {
  position: relative;
  width: var(--ancho-envase, 92%);
  height: var(--alto-envase, 84%);
  min-height: 46px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 3px 3px 2px 2px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.1;
  color: rgba(244, 241, 232, 0.97);
  text-shadow: 0 1px 3px rgba(15, 23, 18, 0.55);
  text-align: left;
  user-select: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(168deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 46%, rgba(0, 0, 0, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 8px -5px rgba(15, 23, 18, 0.85);
}

/* La sombra de contacto: sin esto el envase flota en vez de estar apoyado. */
.envase::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -4px;
  height: 7px;
  background: radial-gradient(50% 62% at 50% 0%, rgba(15, 23, 18, 0.55), rgba(15, 23, 18, 0) 72%);
}

.envase .titulo { display: block; max-height: 3.4em; overflow: hidden; }

.envase .resto { display: block; font-family: var(--sans); font-size: 10px; line-height: 1.2; color: rgba(244, 241, 232, 0.82); max-height: 2.5em; overflow: hidden; }

/* Con foto el envase es el packshot repetido: los facings de la góndola real. */
.envase.con-foto { background-color: transparent; background-image: none; box-shadow: none; padding: 0; }

.facings { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; }

.facings .facing { min-width: 0; flex: 1 1 0; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 5px 5px rgba(15, 23, 18, 0.5)); }

.slot:not(.puesto) .toque:active .envase { transform: translateY(3px) scale(0.96); }

.slot.puesto .envase { box-shadow: inset 0 0 0 2px var(--oro), inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 8px -5px rgba(15, 23, 18, 0.85); }

.slot.cae .envase { animation: tomado 0.32s ease-out; }

@keyframes tomado {
  0% { transform: scale(1); }
  35% { transform: translateY(-5px) scale(0.94); }
  100% { transform: scale(1); }
}

/* La búsqueda te deja parado enfrente: el producto se marca unos segundos. */
.slot.resaltado .envase {
  box-shadow: 0 0 0 3px var(--oro), 0 0 26px 8px rgba(233, 196, 106, 0.5);
  animation: senalado 1s ease-in-out 3;
}

@keyframes senalado {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Cantidad puesta: −/+ encima del envase, sin tapar el precio. */
.slot .control {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 38px;
  z-index: 3;
  height: 44px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  background: rgba(11, 18, 14, 0.9);
  color: var(--hueso);
  box-shadow: 0 4px 9px rgba(15, 23, 18, 0.5);
}

.slot .control[hidden] { display: none; }

.slot .control button { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; color: var(--hueso); }

.slot .control .cuanto { flex: 1; min-width: 0; text-align: center; font-family: var(--sans); font-size: 12px; font-weight: 700; overflow: hidden; }

/* El precio va en el canto de la repisa, como el porta-precio del local: los
   carteles se tocan entre sí y forman una tira blanca a lo largo del estante,
   no una etiqueta suelta por producto (eso los volvía tarjetas otra vez). */
.slot .tag {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  height: 32px;
  margin-bottom: 3px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  background: var(--papel);
  border-right: 1px solid rgba(15, 23, 18, 0.16);
  box-shadow: 0 1px 3px rgba(15, 23, 18, 0.45);
  font-family: var(--sans);
}

.slot.hueco-vacio .tag, .hueco > .slot:last-child .tag { border-right: 0; }

.slot.puesto .tag { background: var(--oro); }

.slot .tag .plata { font-size: 15px; font-weight: 700; color: var(--tinta); }

.slot .tag .unidad { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gris); }

/* El hueco vacío igual lleva su pedazo de porta-precio: así la tira blanca del
   estante no se corta y el vacío se lee como un hueco, no como un error. */
.slot.hueco-vacio { pointer-events: none; justify-content: flex-end; }

.slot.hueco-vacio::after { content: ''; width: 100%; height: 32px; margin-bottom: 3px; background: rgba(255, 255, 255, 0.32); }

.pie-gondola { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 4px; }

.volver { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--tinta); border-radius: 6px; font-size: 14px; font-weight: 500; }

.pista { font-size: 12px; color: var(--gris); }

.pista-lista { padding: 0 14px; margin: 8px 0 0; }

/* ---------- resultados de la búsqueda ---------- */

.resultados .cartel-gondola { padding-left: 0; }

.hallazgos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }

.hallazgo { display: flex; flex-direction: column; background: var(--papel); border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; }

.hallazgo .slot { width: 100%; flex: none; height: 178px; padding: 10px 10px 0; }

.hallazgo .slot .control { left: 10px; right: 10px; }

.hallazgo .donde { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px; }

.hallazgo .nombre-largo { font-size: 13px; font-weight: 500; line-height: 1.25; }

.hallazgo .ir { display: flex; align-items: center; min-height: 44px; font-size: 12px; font-weight: 700; color: var(--tinta); text-align: left; text-decoration: underline; }

.resultados .volver { margin: 0 14px 10px; }

/* ---------- el producto que cae al changuito ---------- */

.vuela {
  position: fixed;
  z-index: 60;
  border-radius: 4px;
  opacity: 0.95;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.45, 0.03, 0.75, 0.5), opacity 0.3s ease-in;
}

.rebota { display: inline-block; animation: rebote 0.36s ease-out; }

@keyframes rebote {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .vuela, .rebota, .slot.cae .envase, .slot.resaltado .envase, .chg-bulto.nuevo,
  .changuito-fisico { animation: none; transition: none; }
}

/* ---------- el changuito dibujado, el que se ve llenarse ---------- */

/* Un carrito de verdad, no un ícono: lo que cae adentro queda apilado y se ve.
   Va parado sobre la barra del changuito, del lado del botón que abre la hoja. */
.changuito-fisico {
  position: fixed;
  right: 8px;
  bottom: 58px;
  z-index: 39;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.changuito-fisico[hidden] { display: none; }

/* Tapa la esquina de abajo a la derecha de la góndola: mientras el dedo anda por
   ahí se hace transparente y se ve lo que está atrás. */
.changuito-fisico.esquivando { opacity: 0.35; }

.chg-toque { display: block; padding: 0; pointer-events: auto; filter: drop-shadow(0 8px 14px rgba(15, 23, 18, 0.32)); }

.chg-caja { position: relative; display: block; width: 112px; height: 97px; }

.chg-dibujo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.chg-frente { pointer-events: none; }

.chg-hondo { fill: #FFFFFF; }

.chg-linea { fill: none; stroke: var(--tinta); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* La malla del canasto va ADELANTE de los envases: en un changuito de verdad la
   mercadería se ve a través de los hierros, no encima. */
.chg-malla { fill: none; stroke: rgba(22, 33, 26, 0.3); stroke-width: 1.6; }

.chg-rueda { fill: var(--tinta); }

/* La boca del canasto. El recorte sigue las paredes: lo que sobresale del borde
   de arriba se ve (un changuito lleno rebalsa), lo que se sale de costado no. */
.chg-bultos {
  position: absolute;
  display: block;
  left: 23.4%;
  right: 5%;
  top: 28.8%;
  height: 44.3%;
  clip-path: polygon(-20% -90%, 112% -90%, 91% 100%, 18% 100%);
}

.chg-bulto {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: var(--w);
  height: var(--h);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1px 1px 2px;
  border-radius: 2px;
  overflow: hidden;
  transform: rotate(var(--giro));
  /* Cada envase un poco mas claro o mas oscuro que el de al lado: si no, ocho
     productos del mismo pasillo son una mancha verde y no una pila de cosas. */
  filter: brightness(var(--luz, 1));
  background-image: linear-gradient(168deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.25));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 3px -1px rgba(15, 23, 18, 0.6);
}

.chg-bulto.con-foto { background-image: none; box-shadow: none; padding: 0; }

/* A este porte no se lee una marca: se lee "algo verde de almacén". El rótulo
   está para distinguir un envase del de al lado, por eso entra una palabra. */
.chg-rotulo {
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(244, 241, 232, 0.97);
  text-shadow: 0 1px 2px rgba(15, 23, 18, 0.6);
  white-space: nowrap;
  overflow: hidden;
}

.chg-foto { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }

/* El envase entra cuando el clon que vuela ya llegó: por eso el retraso. */
.chg-bulto.nuevo { animation: chg-entra 0.4s cubic-bezier(0.3, 0.8, 0.4, 1) 0.26s both; }

@keyframes chg-entra {
  0% { opacity: 0; transform: translateY(-46px) rotate(var(--giro)) scale(1.2); }
  55% { opacity: 1; transform: translateY(3px) rotate(var(--giro)) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--giro)) scale(1); }
}

/* Más de los que entran en el dibujo: el resto se cuenta, no se amontona. */
.chg-mas {
  position: absolute;
  top: -6px;
  right: -4px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--oro);
  color: var(--tinta);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(15, 23, 18, 0.35);
}

/* Sin esto, .rebota (display:inline-block) le gana al [hidden] y el cartelito
   aparece con el changuito casi vacío diciendo "y 0 más". */
.chg-mas[hidden] { display: none; }

.precio { font-size: 18px; font-weight: 700; white-space: nowrap; }

.precio .unidad { display: block; font-size: 11px; font-weight: 400; color: var(--gris); }

.vacio { padding: 40px 18px; text-align: center; color: var(--gris); }

.vacio h2 { font-size: 24px; color: var(--tinta); margin-bottom: 8px; }

/* ---------- barra del changuito ---------- */

.changuito-barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--tinta);
  color: var(--hueso);
  box-shadow: 0 -6px 18px rgba(22, 33, 26, 0.18);
}

.changuito-barra[hidden] { display: none; }

.changuito-barra .ancho { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }

.changuito-barra .cuenta { font-size: 12px; color: var(--gris-claro); }

.changuito-barra .total { font-size: 18px; font-weight: 700; }

.changuito-barra button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 18px;
  background: var(--oro);
  color: var(--tinta);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- hojas (changuito y lista) ---------- */

.hoja { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }

.hoja[hidden] { display: none; }

.hoja .fondo { position: absolute; inset: 0; background: rgba(15, 23, 18, 0.55); }

.hoja .panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--crema);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}

.hoja .panel-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--borde);
}

.hoja .panel-cabeza h2 { font-size: 24px; }

.hoja .cerrar { width: 44px; height: 44px; margin-right: -10px; font-size: 22px; color: var(--gris); }

.hoja .panel-cuerpo { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }

.hoja .panel-pie { padding: 12px 16px 18px; border-top: 1px solid var(--borde); background: var(--crema); }

.hoja .panel-pie > * + * { margin-top: 8px; }

/* El total vivia al fondo del panel, abajo de todo lo que hay que scrollear:
   con cuatro productos ya no se veia y se podia mandar el pedido sin mirarlo. */
.pie-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 2px 6px; }

.pie-total[hidden] { display: none; }

.pie-total .plata { font-size: 20px; font-weight: 700; }

.pie-total .rotulo-total { font-size: 13px; color: var(--gris); }

.boton-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 54px;
  border-radius: 6px;
  background: var(--verde);
  color: #10230F;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.boton-borde {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--tinta);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

/* ---------- renglones del changuito ---------- */

.lineas { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }

.linea { display: flex; flex-direction: column; gap: 10px; background: var(--papel); border: 1px solid var(--borde); border-radius: 8px; padding: 12px 14px; }

.linea .arriba { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.linea .nombre { font-size: 15px; font-weight: 600; }

.linea .detalle { font-size: 12px; color: var(--gris); margin-top: 2px; }

.linea .quitar { flex-shrink: 0; width: 44px; height: 44px; margin: -12px -12px -12px 0; display: flex; align-items: center; justify-content: center; color: var(--gris); font-size: 19px; }

.linea .abajo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.paso-cant { display: flex; align-items: center; border: 1.5px solid var(--tinta); border-radius: 6px; overflow: hidden; }

.paso-cant button { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; }

.paso-cant .cant { min-width: 74px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; border-left: 1.5px solid var(--tinta); border-right: 1.5px solid var(--tinta); padding: 0 6px; }

.resumen { margin: 4px 16px 16px; padding: 16px; background: var(--tinta); color: var(--hueso); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }

.resumen .fila { display: flex; justify-content: space-between; font-size: 14px; }

.resumen .fila span { color: var(--gris-claro); }

.resumen .fila.fuerte { border-top: 1px solid rgba(242, 238, 226, 0.2); padding-top: 10px; font-size: 17px; font-weight: 700; }

.resumen .fila.fuerte span { color: var(--hueso); }

.resumen .chica { font-size: 12px; color: var(--gris-claro); line-height: 1.5; }

.via { height: 8px; background: #E4DECE; border-radius: 4px; overflow: hidden; margin: 0 16px; }

.via .lleno { height: 8px; background: var(--verde); border-radius: 4px; }

.falta { padding: 12px 16px 0; font-size: 13px; color: var(--gris); }

.falta b { color: var(--coral); }

/* ---------- lo que no está en la góndola y viaja igual en el pedido ---------- */

.pendientes { margin: 0 16px 4px; padding: 12px 14px; background: var(--hueso); border: 1px dashed var(--borde); border-radius: 8px; }

.pendientes .rotulo { margin-bottom: 4px; }

.pendiente { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }

.pendiente .quitar { width: 44px; height: 44px; margin-right: -12px; display: flex; align-items: center; justify-content: center; color: var(--gris); font-size: 17px; }

/* ---------- lista-paseo ---------- */

.lista-intro { padding: 14px 16px 0; font-size: 14px; color: var(--gris); }

.lista-caja { padding: 12px 16px; }

.lista-caja textarea {
  width: 100%;
  min-height: 132px;
  font: inherit;
  font-size: 16px;
  padding: 12px;
  border: 1.5px solid var(--tinta);
  border-radius: 8px;
  background: var(--papel);
  resize: vertical;
}

.renglon { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--papel); border: 1px solid var(--borde); border-radius: 8px; }

.renglon.sin-match { border-style: dashed; border-color: var(--coral); }

.renglon .pedido { font-size: 12px; color: var(--gris); }

.renglon .hallado { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.renglon .hallado .nombre { font-size: 15px; font-weight: 600; }

/* Lo que se va a sumar, en criollo y con la plata: "6 huevos" puede terminar
   siendo 6 cajas de 25. Que se vea antes de confirmar, no despues. */
.renglon .suma { font-size: 13px; font-weight: 500; color: var(--tinta); background: var(--hueso); border-radius: 5px; padding: 6px 9px; }

.renglon select { width: 100%; height: 44px; font: inherit; font-size: 14px; padding: 0 8px; border: 1px solid var(--borde); border-radius: 6px; background: var(--papel); }

.renglon .no-esta { font-size: 14px; color: var(--coral); font-weight: 500; }

/* ---------- pie de la pagina ---------- */

/* Ojo: el renglon de precio de cada producto tambien se llama .pie. Estas reglas
   van atadas a <footer> a proposito: sueltas le pintaban el fondo oscuro del pie
   a las 1.180 cajas de producto y dejaban el boton "+" invisible (tinta sobre tinta). */

footer.pie { margin-top: 24px; padding: 24px 16px 30px; background: var(--tinta); color: var(--hueso); }

footer.pie .marca-pie { font-family: var(--serif); font-size: 18px; margin-bottom: 8px; }

footer.pie p { margin: 0 0 6px; font-size: 13px; color: var(--gris-claro); line-height: 1.6; }

footer.pie a { color: var(--oro); display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- escritorio ---------- */

@media (min-width: 760px) {
  .marca .corto { display: none; }
  .marca .largo { display: inline; }
  .cabecera { padding: 30px 14px 6px; }
  .cabecera h1 { font-size: 48px; }

  /* En escritorio el mueble entero entra en pantalla sin scrollear la página. */
  .salon-gondola, .resultados { --slot: 152px; --alto-escena: clamp(420px, calc(100vh - 285px), 620px); }

  .local { --fila: 30px; }
  .pieza { padding: 6px 10px; }
  .pieza .nombre { font-size: 14px; }
  .pieza .cuantos { font-size: 11px; }
  .decor { font-size: 11px; }

  /* En escritorio el changuito se corre al costado, fuera de la góndola: no tapa
     nada, así que tampoco tiene por qué desvanecerse. */
  .changuito-fisico { right: 12px; bottom: 92px; }
  .changuito-fisico.esquivando { opacity: 1; }
  .chg-caja { width: 156px; height: 135px; }
  .chg-rotulo { font-size: 9px; }
  .chg-mas { font-size: 11px; }

  .cartel-gondola h1 { font-size: 32px; }
  .envase { font-size: 17px; }
  .slot .tag { height: 34px; }
  .slot .tag .plata { font-size: 16px; }
  .hallazgos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
