/* © 2026 El Rincón del Antojo y su desarrollador. Todos los derechos reservados. */
/* El Rincón del Antojo: página de pedidos por WhatsApp */

/* Fuentes locales. Bricolage Grotesque es variable (200 a 800), así que
   cubre 400, 600 y 700 sin pedir nada a Google Fonts. */
@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/3y9H6as8bTXq_nANBjzKo3IeZx8z6up5BeSl5jBNz_19PpbpMXuECpwUxJBOm_OJWiawA1XphjhQYg.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/3y9H6as8bTXq_nANBjzKo3IeZx8z6up5BeSl5jBNz_19PpbpMXuECpwUxJBOm_OJWiawDVXphjhQYrcK.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* Colores del logo oficial (marca-original/PALETA.md). No hay otros:
   lo demás son transparencias del café para líneas, sombras y velos. */
:root {
  --crema: #FFF8F0;
  --cafe: #3B210B;
  --turquesa: #13CAD9;
  --turquesa-oscuro: #519D9A;
  --amarillo: #EBC048;
  --amarillo-claro: #FBF0BB;
  --naranja: #E58A35;
  --terracota: #B24E34;
  --rosa: #F16D7F;
  --menta: #89E2C6;
  --wa: #25D366;

  /* Contraste medido: café sobre crema 14.2:1, café al 78 % 7.1:1,
     línea de campos (café al 50 %) 3.1:1, crema al 80 % sobre café 9.5:1 */
  --cafe-suave: rgb(59 33 11 / .78);
  --crema-suave: rgb(255 248 240 / .8);
  --linea: rgb(59 33 11 / .12);
  --linea-media: rgb(59 33 11 / .22);
  --linea-campo: rgb(59 33 11 / .5);
  --titulos: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --texto: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Sombras cortas y suaves */
  --sombra-1: 0 1px 2px rgb(59 33 11 / .06), 0 2px 8px rgb(59 33 11 / .06);
  --sombra-2: 0 2px 4px rgb(59 33 11 / .06), 0 8px 24px rgb(59 33 11 / .1);
  --sombra-boton: 0 1px 2px rgb(59 33 11 / .14), 0 2px 6px rgb(59 33 11 / .1);
  --sombra-boton-alta: 0 2px 4px rgb(59 33 11 / .14), 0 6px 14px rgb(59 33 11 / .14);
  --r-grande: 20px;
  --r: 16px;
  --r-pastilla: 999px;

  /* Alto fijo de la barra: con el aviso de dos líneas (Cerrado, abrimos a las 5:30 pm) ya no crece al cargar */
  --barra-alto: 72px;
  --sticky-alto: 104px;
  --alto-visible: 100vh;
  --ancho: 520px;
  --panel: 340px;
  --hueco: 64px;
  --escenario: calc(var(--ancho) + var(--hueco) + var(--panel));
  /* Hojas y barras flotantes no pasan de 560 px aunque la columna crezca en computadora */
  --ancho-flota: min(var(--ancho), 560px);
  --flota-izq: calc(50% - var(--escenario) / 2 + (var(--ancho) - var(--ancho-flota)) / 2);

  /* Curvas propias: entradas que frenan suave, salidas que aceleran,
     cambios de estado suaves en ambos extremos. */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-hoja: cubic-bezier(.32, .72, 0, 1);

  /* Escala tipográfica r10: el titular es letrero pintado, el cuerpo nunca baja de 500 (ClearType) */
  --t-hero: clamp(52px, 11vw + 18px, 128px);
  --t-seccion: clamp(32px, 5vw, 48px);
  --t-producto: 18px;
  --cuerpo: 1.0625rem;
  --sombra-cafe: 0 8px 24px rgb(59 33 11 / .16);
  --esquina-plato: 24px 8px 24px 8px;
  accent-color: var(--turquesa);
}
@media (min-width: 1024px) {
  :root { --cuerpo: 1.125rem; }
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }
dialog:not([open]) { display: none; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: rgb(59 33 11 / .4) transparent;
  overflow-x: clip;
}
/* Solo con ratón: en Windows la barra de scroll visible no empuja la página al abrir una hoja */
@media (pointer: fine) {
  html { scrollbar-gutter: stable; }
}
html:has(dialog[open]),
html.con-hoja { overflow: hidden; }

/* 100dvh solo donde existe (iOS 15.4+, Chrome 108+); antes, 100vh. Dentro de min() con var() un valor
   desconocido anula toda la regla y la hoja crecía más que la pantalla. */
@supports (height: 100dvh) {
  :root { --alto-visible: 100dvh; }
}

/* Toques: sin la espera de 300 ms del doble toque */
a, button, label, summary, input, select, textarea, [role="button"] { touch-action: manipulation; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--texto);
  font-weight: 500;
  font-size: var(--cuerpo);
  line-height: 1.5;
  color: var(--cafe);
  background-color: var(--crema);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
picture { display: contents; }
::selection { color: var(--cafe); background: var(--turquesa); }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
input { caret-color: var(--cafe); }
a { color: inherit; }

.oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.icono {
  width: 20px;
  height: 20px;
  flex: none;
}
.icono--grande { width: 24px; height: 24px; }

/* Foco: anillo turquesa pegado al control y contorno café afuera (14:1) */
:focus-visible {
  outline: 3px solid var(--cafe);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--turquesa);
}

/* Saltos para teclado: fuera de vista hasta que reciben el foco; "Ir al pedido" solo con productos */
.saltar {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
  color: var(--crema);
  background: var(--cafe);
  border-radius: var(--r);
  transform: translateY(-160%);
}
.saltar:focus-visible { transform: none; }
.saltar--pedido { display: none; }
.con-pedido .saltar--pedido { display: inline-flex; }

/* Columna de la página */

.pagina {
  position: relative;
  max-width: var(--ancho);
  margin: 0 auto;
  background: var(--crema);
}

/* Barra superior */
.barra {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--barra-alto);
  padding: 12px 16px;
  background: var(--crema);
  box-shadow: 0 1px 0 var(--linea);
}

.marca {
  /* El nombre no se encoge (siempre en dos líneas); el aviso de abierto o cerrado se acomoda */
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  border-radius: var(--r);
}

.marca__logo {
  width: 44px;
  height: 44px;
}

.marca__nombre {
  max-width: 5.8em;
  font-family: var(--titulos);
  font-size: 1.125rem;
  line-height: 1;
  text-wrap: balance;
}

.estado {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 12.5rem;
  min-height: 36px;
  padding: 6px 12px;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--cafe);
  background: var(--turquesa);
  border-radius: var(--r);
}

.estado__punto {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--menta);
  box-shadow: 0 0 0 2px var(--cafe);
}

.estado--cerrado {
  color: var(--crema);
  background: var(--cafe);
}
.estado--cerrado .estado__punto {
  background: var(--rosa);
  box-shadow: none;
}
.estado__corto { display: none; }
/* En el teléfono el estado es un punto y una línea corta, no una pastilla que compita con el titular */
@media (max-width: 1023px) {
  .estado--corto,
  .estado--corto.estado--cerrado {
    padding: 6px 0;
    font-size: .875rem;
    white-space: nowrap;
    color: var(--cafe);
    background: transparent;
  }
  .estado--corto .estado__corto { display: inline; }
  .estado--corto #estado-texto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .estado--corto.estado--cerrado .estado__punto { background: var(--terracota); }
}


/* Hero: el titular es el letrero; la foto del ramen entra girada y, al bajar, se acomoda en su tarjeta */
.hero {
  --plato: 128px;
  position: relative;
  padding: 20px 16px 32px;
  overflow-x: clip;
}

/* Grano de papel muy suave: el hero se siente impreso, no pantalla plana */
.hero__grano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .05;
  pointer-events: none;
}

/* Reserva el alto de la foto desde el inicio: el subtítulo no brinca cuando escena.js arranca */
.hero__escena {
  position: relative;
  min-height: calc(var(--t-hero) * .95 + var(--plato) / .62 + 12px);
}

.hero__titulo {
  position: relative;
  z-index: 2;
  font-family: var(--titulos);
  font-weight: 400;
  font-size: var(--t-hero);
  line-height: .9;
  letter-spacing: -.01em;
}
.palabra { display: inline-block; }
/* Cartel de cuatro renglones: "Tu antojo," arriba y la foto anidada bajo él, a la derecha */
.hero__titulo--cartel .palabra:nth-of-type(3),
.hero__titulo--cartel .palabra:nth-of-type(6) { display: block; }

/* Caja vacía donde vive la foto antes del scroll: 1 / .62 del plato de la tarjeta */
.hero__ancla {
  position: absolute;
  top: .95em;
  right: -6px;
  width: calc(var(--plato) / .62);
  aspect-ratio: 1;
  font-size: var(--t-hero);
  pointer-events: none;
}

.hero__sub {
  max-width: 26ch;
  margin-top: 20px;
  font-size: var(--cuerpo);
  line-height: 1.5;
  color: var(--cafe-suave);
}

/* Ancho justo y en columna en el teléfono: deja libre la orilla derecha por donde baja la foto */
.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px 16px;
  width: fit-content;
  max-width: 100%;
  margin-top: 20px;
}
.hero__cta .boton--primario { border-radius: var(--r-pastilla); padding-inline: 28px 22px; }

.hero__prueba {
  max-width: 13em;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cafe);
}

/* Tarjeta "Lo más pedido": el plato a la derecha, sobresale del borde superior */
.destacado {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--plato);
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding: 16px;
  background: var(--amarillo-claro);
  border-radius: var(--esquina-plato);
}
.destacado[hidden] { display: none; }
/* El hueco del plato no se dibuja: hasta que la foto llega, la tarjeta es solo texto */
.destacado__plato {
  grid-column: 2;
  grid-row: 1;
  width: var(--plato);
  aspect-ratio: 1;
  border-radius: var(--esquina-plato);
}

.plato {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}
.destacado__foto {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 60%;
  border-radius: var(--esquina-plato);
  box-shadow: var(--sombra-cafe);
}
/* Calcomanía del precio: solo existe mientras la foto está en el hero */
.plato__precio {
  position: absolute;
  right: -6px;

  bottom: 14px;
  padding: 6px 12px 4px;
  font-family: var(--titulos);
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgb(59 33 11 / .22);
  transform: rotate(-8deg);
  opacity: 0;
}
.destacado__cuerpo {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-top: 16px;
}
.destacado__etiqueta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.2;
}
.destacado__etiqueta .icono { width: 16px; height: 16px; color: var(--terracota); }
.destacado__nombre {
  margin-top: 4px;
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.625rem;
  line-height: 1;
  text-wrap: balance;
}
.destacado__pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 12px;
}

.minis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.mini {
  display: grid;
  gap: 6px;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--cafe);
}
.mini .icono { width: 22px; height: 22px; color: var(--terracota); }

.hero__lugar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--cafe-suave);
}
.hero__lugar .icono { width: 18px; height: 18px; color: var(--terracota); }

/* Botones */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  font-family: var(--texto);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  color: var(--cafe);
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--sombra-boton);
  transition:
    transform .16s var(--ease-out),
    box-shadow .2s var(--ease-out),
    background-color .2s var(--ease-in-out);
  -webkit-tap-highlight-color: transparent;
}
.boton:active {
  transform: translateY(1px) scale(.97);
  box-shadow: 0 1px 2px rgb(59 33 11 / .16);
  transition-duration: 90ms;
}
/* El ícono acompaña la presión: la flecha de Ver el menú baja; el de Pedir avanza.
   Soltar tarda .16 s, bajar 90 ms. */
.boton .icono { transition: transform .16s var(--ease-out); }
.hero__cta .boton:active .icono { transform: translateY(3px); transition-duration: 90ms; }
.hoja__pie .boton:active .icono { transform: translateX(3px); transition-duration: 90ms; }

.boton--primario { background: var(--turquesa); }
.boton--wa { background: var(--wa); }
.boton--claro {
  min-height: 48px;
  background: var(--crema);
  box-shadow: inset 0 0 0 2px var(--linea-campo);
}
.boton--claro:active { box-shadow: inset 0 0 0 2px var(--cafe); }
.boton--ancho { width: 100%; }
.boton--grande { min-height: 56px; font-size: 1.125rem; }
.boton--chico { min-height: 44px; padding: 0 16px; font-size: 1rem; }

.boton--con-precio { justify-content: space-between; padding: 0 20px; }
.boton__precio { font-family: var(--titulos); font-weight: 400; font-size: 1.375rem; font-variant-numeric: tabular-nums; }

.boton-icono {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--cafe);
  background: var(--crema);
  border: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--linea-media), var(--sombra-1);
  transition: transform .16s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.boton-icono:active { transform: scale(.96); transition-duration: 90ms; }

/* Pasos: franja amarilla con orilla de toldo; cada paso es una calcomanía que se pega al entrar en vista */
.pasos {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 24px 16px 28px;
  background: var(--amarillo);
  counter-reset: paso;
}
.pasos::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background: radial-gradient(circle at 12px 0, var(--amarillo) 12px, transparent 12.5px) 0 0 / 24px 12px repeat-x;
}

.paso {
  --giro: -2deg;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 14px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  background: var(--crema);
  border-radius: 14px 6px 14px 6px;
  box-shadow: 0 1px 0 rgb(59 33 11 / .18), 0 6px 14px -6px rgb(59 33 11 / .35);
  transform: rotate(var(--giro));
  counter-increment: paso;
}
.paso:nth-child(2) { --giro: 1.5deg; }
.paso:nth-child(3) { --giro: -1deg; }
.paso::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--titulos);
  font-size: 1.375rem;
  line-height: 1;
  color: var(--crema);
  background: var(--cafe);
  border-radius: 50%;
}

/* Cinta de sabores: letrero que corre con el scroll entre el menú y las preguntas (decorativa) */
/* El giro va en la franja (del ancho de la página) y no en la pista de 4000 px: así la cinta no cae 70 px a la izquierda */
.cinta {
  margin: 24px -24px 28px;

  padding: 0;
  overflow-x: clip;
  transform: rotate(-2deg);
}

.cinta__pista {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  padding: 10px 0 8px;
  font-family: var(--titulos);
  font-size: 2.5rem;
  line-height: 1;
  white-space: nowrap;
  color: var(--cafe);
  background: var(--amarillo);
}
.cinta__pista .icono { width: 26px; height: 26px; color: var(--terracota); }

/* Secciones */
.seccion { padding: 40px 16px 0; }

.seccion__titulo {
  margin-bottom: 16px;
  text-wrap: balance;
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
}

.menu { padding-bottom: 24px; scroll-margin-top: calc(var(--barra-alto) + 8px); }
.apps { scroll-margin-top: calc(var(--barra-alto) + 8px); }

/* Barra pegajosa del menú: buscador + filtros (104 px en total) */
.barra-busqueda {
  position: sticky;
  top: calc(var(--barra-alto) - 1px);
  z-index: 20;
  display: grid;
  gap: 8px;
  height: var(--sticky-alto);
  margin: 0 -16px;
  padding: 4px 16px;
  background: var(--crema);
  box-shadow: 0 1px 0 var(--linea);
  transition: box-shadow .2s var(--ease-out);
}
/* El único vidrio de la página: el menú se adivina detrás mientras buscas */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .barra-busqueda {
    background: rgb(255 248 240 / .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.barra-busqueda--pegada { box-shadow: 0 1px 0 var(--linea), var(--sombra-cafe); }
.barra-centinela { height: 1px; margin-bottom: -1px; }

.buscador {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 0 0 6px;
  background: var(--crema);
  border-radius: var(--r-pastilla);
  box-shadow: inset 0 0 0 2px var(--linea-campo);
  transition: box-shadow .2s var(--ease-out);
}
.buscador:focus-within {
  box-shadow: inset 0 0 0 2px var(--cafe), 0 0 0 3px var(--turquesa);
}
.buscador__lupa {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--cafe);
  background: var(--turquesa);
  border-radius: 50%;
}
.buscador__lupa .icono { width: 18px; height: 18px; }
.buscador__campo {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  appearance: none;
}
.buscador__campo { text-overflow: ellipsis; }
.buscador__campo::placeholder { color: rgb(59 33 11 / .68); font-weight: 500; }
.buscador__campo::-webkit-search-cancel-button,
.buscador__campo::-webkit-search-decoration { appearance: none; display: none; }
.buscador__borrar {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--cafe);
  background: transparent;
  border: 0;
  border-radius: 50%;
  transition: transform .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.buscador__borrar .icono { width: 16px; height: 16px; }
.buscador__borrar:active { transform: scale(.92); }
.buscador__borrar:focus-visible { outline-offset: -4px; box-shadow: none; }

.filtros {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-padding-inline: 16px;
}
.filtros::-webkit-scrollbar { display: none; }

.filtro {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: var(--crema);
  border: 0;
  border-radius: var(--r-pastilla);
  box-shadow: inset 0 0 0 1px var(--linea-campo);
  transition:
    background-color .18s var(--ease-out),
    box-shadow .18s var(--ease-out),
    transform .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.filtro:active { transform: scale(.96); transition-duration: 90ms; }
.filtro--activo {
  padding-left: 12px;
  background: var(--turquesa);
  box-shadow: inset 0 0 0 2px var(--cafe), inset 0 2px 4px rgb(59 33 11 / .2);
}
.filtro__marca {
  display: grid;
  place-items: center;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: width .18s var(--ease-out), margin .18s var(--ease-out), opacity .15s var(--ease-out);
}
.filtro__marca .icono { width: 16px; height: 16px; }
.filtro--activo .filtro__marca { width: 16px; margin-right: 6px; opacity: 1; }
/* Al elegir un filtro con el dedo (escena.js pone la clase) la pastilla se asienta y la palomita se pega */
.filtro--asienta { animation: asienta .28s var(--ease-out); }
.filtro--asienta .filtro__marca .icono { animation: palomita-pega .3s var(--ease-out) .05s both; }
.filtro:focus-visible,
.chip:focus-visible {
  outline: 3px solid var(--cafe);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 5px var(--turquesa);
}

/* Zona que se atenúa 150 ms mientras cambian los resultados */
.zona-menu { transition: opacity .15s var(--ease-out); }
.zona-menu--cambia { opacity: 0; }

.resultados {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
  min-height: 44px;
  margin-top: 8px;
  font-size: .9375rem;
  font-weight: 800;
}
.resultados__limpiar {
  min-height: 44px;
  padding: 0 4px;
  font-weight: 700;
  color: var(--cafe);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--naranja);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Lo que más piden */
.destacados { padding-top: 20px; }
.destacados__titulo,
.ir__titulo {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
}
.carrusel {
  display: flex;
  gap: 12px;
  margin: 8px -16px 0;
  padding: 4px 16px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.estelar {
  display: flex;
  flex: none;
  flex-direction: column;
  width: 236px;
  scroll-snap-align: start;
  transition: transform 90ms var(--ease-out);
}
.estelar:active { transform: scale(.985); }
.estelar .foto { border-radius: var(--esquina-plato); }
.estelar__cuerpo { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 10px 2px 0; }
.estelar__nombre {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.1;
  text-wrap: balance;
}
.estelar__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.estelar .precio { font-size: 1.375rem; }

/* Ir a: chips de categorías, en el cuerpo del menú */
.ir { padding-top: 12px; }
.ir__titulo { font-size: 1.125rem; }
.chips {
  display: flex;
  gap: 8px;
  margin: 4px -16px 0;
  padding: 4px 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r-pastilla);
  box-shadow: inset 0 0 0 1px var(--linea-campo);
  transition: background-color .18s var(--ease-out), transform .15s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.chip:active { background: var(--amarillo-claro); transform: scale(.97); transition-duration: 90ms; }

/* Sin content-visibility: con él, un toque justo después de saltar a una categoría caía en la sección aún sin pintar */
.categoria {
  padding-top: 40px;
  scroll-margin-top: calc(var(--barra-alto) + var(--sticky-alto));
}

.categoria__cabeza { margin-bottom: 8px; }
.categoria__titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  text-wrap: balance;
  align-items: flex-start;
}
.categoria__nombre { flex: 0 1 auto; padding-top: 2px; }
.categoria__titulo .icono {
  width: 32px;
  height: 32px;
  padding: 4px;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: 10px 4px 10px 4px;
}
.categoria__n {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  font-family: var(--texto);
  font-size: .9375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--crema);
  background: var(--cafe);
  border-radius: var(--r-pastilla);
}
.categoria__desc {
  margin-top: 6px;
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--cafe-suave);
}

/* Sin resultados */
.vacio {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px 24px;
  text-align: center;
}
.vacio__icono {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--amarillo-claro);
  border-radius: 50%;
}
.vacio__icono .icono { width: 26px; height: 26px; }
.vacio__texto { max-width: 28ch; font-weight: 600; line-height: 1.4; text-wrap: balance; }

/* Insignias de la tarjeta */
.insignias { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.insignia {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 5px;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--cafe);
  border-radius: var(--r-pastilla);
}
.insignia .icono { width: 12px; height: 12px; }
.insignia--picoso { background: rgb(241 109 127 / .22); }
.insignia--picoso .icono { color: var(--terracota); }
.insignia--frio { background: rgb(19 202 217 / .22); }
.insignia--frio .icono { color: #2F7F82; }
.insignia--compartir { background: var(--amarillo-claro); }
.insignia--compartir .icono { color: var(--cafe); }

/* Renglones de menú impreso: foto de plato, nombre, precio con marcatexto y el + a la mano del pulgar */
.productos {
  display: grid;
  column-gap: 32px;
}

.producto {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--linea);
  transition: transform 90ms var(--ease-out);
}
.producto:active { transform: scale(.98); }
/* La tarjeta entera abre la hoja del producto (app.js, tocarParaAbrir) */
.producto,
.estelar,
.destacado { cursor: pointer; touch-action: manipulation; }


.foto {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  background: var(--amarillo-claro);
}
.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto .foto {
  align-self: start;
  aspect-ratio: 1;
  border-radius: var(--esquina-plato);
}

/* Si una foto falta, queda un bloque de marca con el nombre */
.foto--vacia {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--turquesa);
}
.foto--vacia span {
  font-family: var(--titulos);
  font-size: 1.75rem;
  line-height: 1.05;
  text-align: center;
  color: var(--cafe);
}
.producto .foto--vacia { padding: 8px; }
.producto .foto--vacia span { font-size: 1rem; }

.foto[data-id="ramen-buldak-elote"] img { object-position: 50% 40%; }
.foto[data-id="tostimaruchan"] img { object-position: 50% 55%; }
.foto[data-id="fresas-clasicas"] img { object-position: 22% 50%; }
.foto[data-id="tostielotes-flamin-hot"] img { object-position: 62% 85%; }
.foto[data-id="vaso-chorreado"] img { object-position: 50% 46%; }
.foto[data-id="elote-crema-queso"] img,
.foto[data-id="elote-sal-limon"] img { object-position: 50% 58%; }

/* Etiqueta tipo calcomanía, ligeramente girada */
.calcomania {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-bottom: 4px;
  padding: 4px 10px 4px 6px;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: var(--r-pastilla);
  box-shadow: var(--sombra-boton);
  transform: rotate(-2deg);
}
.calcomania .icono { width: 14px; height: 14px; color: var(--terracota); }

.producto__cuerpo {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.producto__nombre {
  font-family: var(--texto);
  font-weight: 800;
  font-size: var(--t-producto);
  line-height: 1.2;
  text-wrap: balance;
}

.producto__desc {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  font-size: .9375rem;
  line-height: 1.4;
  color: var(--cafe-suave);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.producto__pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

/* Precio: Lilita café sobre un trazo amarillo de marcatexto */
.precio {
  position: relative;
  isolation: isolate;
  width: fit-content;
  padding: 0 2px;
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--cafe);
}
.precio::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: .02em;
  z-index: -1;
  height: .44em;
  border-radius: 4px;
  background: var(--amarillo);
}
.precio__desde {
  font-family: var(--texto);
  font-size: .85rem;
  font-weight: 700;
}
.producto .precio { font-size: 1.375rem; }

.boton--agregar {
  min-height: 44px;
  padding: 0 14px 0 10px;
  font-size: .9375rem;
  background: var(--turquesa);
}
.boton--agregar .icono { width: 18px; height: 18px; }
/* En el teléfono el + de la tarjeta es un círculo de 44 px; su nombre viene del aria-label */
.producto .boton--agregar {
  width: 44px;
  padding: 0;
  border-radius: 50%;
}
.producto .boton--agregar span { display: none; }
.producto .boton--agregar .icono { width: 20px; height: 20px; }
/* El círculo se hunde más que un botón largo; al confirmar rebota, la palomita se pega y un anillo café destella
   DENTRO del botón (de .6 a 1 con 3 px de margen): el + va pegado a la orilla de la tarjeta y nada debe salirse */
.boton--agregar { position: relative; }
.producto .boton--agregar:active { transform: scale(.92); }
.boton--agregar::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid var(--cafe);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}
.boton--hecho { animation: boton-rebota .32s var(--ease-out); }
.boton--hecho .icono { animation: palomita-pega .3s var(--ease-out) both; }
.boton--hecho::after { animation: anillo-destella .44s var(--ease-out) both; }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .boton--agregar:active { background: color-mix(in srgb, var(--turquesa) 82%, var(--cafe)); }
}

/* Apps de entrega */
.apps__texto {
  margin: -4px 0 16px;
  line-height: 1.45;
  color: var(--cafe-suave);
}
.apps__lista { display: grid; gap: 8px; }
.app {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 14px 16px 14px 14px;
  text-decoration: none;
  border-radius: var(--esquina-plato);
  box-shadow: inset 0 0 0 1.5px var(--linea-campo);
  transition: transform 90ms var(--ease-out), box-shadow .2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.app:active { transform: scale(.98); }
.app > .icono { transition: transform .16s var(--ease-out); }
.app:active > .icono { transform: translateX(3px); transition-duration: 90ms; }
.app__icono { width: 48px; height: 48px; flex: none; }
.app__letra { font-family: var(--titulos); }
.app__texto { display: grid; flex: 1; gap: 2px; min-width: 0; }
.app__nombre { font-family: var(--titulos); font-size: 1.25rem; line-height: 1.1; }
.app__nota { font-size: .875rem; color: var(--cafe-suave); }

/* Preguntas */
.faq__lista { display: grid; gap: 8px; }

.pregunta {
  background: var(--crema);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
}

.pregunta summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 12px 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  border-radius: var(--r);
}
.pregunta summary::-webkit-details-marker { display: none; }

.pregunta__signo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  background: var(--amarillo);
  border-radius: 50%;
  transition: transform .2s var(--ease-in-out);
}
.pregunta__signo .icono { width: 16px; height: 16px; }
.pregunta[open] .pregunta__signo { transform: rotate(180deg); }
/* El cuerpo de la respuesta se abre en 220 ms donde el navegador sabe animar hasta "auto" */
@supports (interpolate-size: allow-keywords) {
  .pregunta { interpolate-size: allow-keywords; }
  .pregunta::details-content {
    block-size: 0;
    overflow-y: clip;
    transition: block-size .22s var(--ease-out), content-visibility .22s allow-discrete;
  }
  .pregunta[open]::details-content { block-size: auto; }
}

.pregunta__respuesta {
  padding: 0 16px 16px;
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--cafe-suave);
}

/* Para el negocio: tablero del dueño, separado del menú */
.negocio { padding: 56px 16px 0; }

.negocio__plegable {
  background: var(--amarillo-claro);
  border-radius: var(--r-grande);
}

.negocio__resumen {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  padding: 20px;
  list-style: none;
  cursor: pointer;
  border-radius: var(--r-grande);
}
.negocio__resumen::-webkit-details-marker { display: none; }
.negocio__resumen:focus-visible { outline-offset: -4px; box-shadow: none; }

.negocio__sello {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 8px;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1;
  color: var(--crema);
  background: var(--cafe);
  border-radius: var(--r-pastilla);
}
.negocio__sello .icono { width: 16px; height: 16px; color: var(--amarillo); }

.negocio__titulo {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
}

.negocio__flecha {
  width: 40px;
  height: 40px;
  padding: 8px;
  color: var(--cafe);
  background: var(--crema);
  border-radius: 50%;
  transition: transform .24s var(--ease-in-out);
}
.negocio__plegable[open] .negocio__flecha { transform: rotate(180deg); }

.negocio__cuerpo {
  display: grid;
  gap: 12px;
  padding: 0 16px 20px;
}

.plantillas { display: grid; gap: 8px; }

.plantilla {
  padding: 16px;
  background: var(--crema);
  border-radius: var(--r);
  box-shadow: var(--sombra-1);
}

.plantilla__cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plantilla__titulo {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.1;
}

.plantilla__texto {
  margin-top: 8px;
  font-size: .9375rem;
  line-height: 1.5;
}

.boton--copiar {
  min-height: 44px;
  min-width: 112px;
  padding: 0 16px;
  font-size: .9375rem;
  background: var(--amarillo);
}
.boton--copiar .icono { width: 18px; height: 18px; }
.boton.copiado { background: var(--menta); }

/* Pie */
.pie {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 64px;
  padding: 40px 16px;
  text-align: center;
  color: var(--crema);
  background: var(--cafe);
}
.con-pedido .pie { padding-bottom: 120px; }

.pie__logo {
  width: 72px;
  height: 72px;
  margin-bottom: 4px;
}

.pie__nombre {
  font-family: var(--titulos);
  font-size: 1.5rem;
  line-height: 1.1;
}

.pie__direccion {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--crema-suave);
}
.pie__direccion .icono { width: 18px; height: 18px; color: var(--naranja); }

.pie__redes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}
.pie__red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: var(--r-pastilla);
  transition: transform .16s var(--ease-out);
}
.pie__red:active { transform: translateY(1px) scale(.98); }
.pie .boton--chico { margin-top: 4px; }

.pie__nota {
  max-width: 38ch;
  font-size: .875rem;
  line-height: 1.5;
  color: rgb(255 248 240 / .92);
}

/* Pie de la página de pedidos: alineado a la izquierda y con la marca de letrero recortada abajo */
.pie--inicio {
  justify-items: start;
  gap: 10px;
  padding: 48px 16px 0;
  overflow: hidden;
  overflow: clip;
  text-align: left;
}
/* Con pedido la marca queda bajo la barra flotante (es decorativa); lo legal sigue arriba de ella */
.con-pedido .pie--inicio .pie__marca { margin-top: 64px; }
.con-pedido .pie--inicio { padding-bottom: 0; }
.pie--inicio .pie__nombre { font-size: 2rem; }
.pie--inicio .pie__redes { justify-content: flex-start; }
.pie--inicio details.legal { max-width: 56ch; }
.pie--inicio .legal__lista { justify-items: start; }
.pie--inicio details.legal > summary { padding: 0; }
.pie__marca {
  width: 100%;
  margin: 28px 0 -.5em;
  font-family: var(--titulos);
  font-size: min(14vw, calc(var(--ancho) * .16));
  line-height: .86;
  letter-spacing: -.01em;
  text-wrap: balance;
  color: var(--amarillo);
  pointer-events: none;
  user-select: none;
}
.pie--inicio .pie__red {
  color: var(--crema);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgb(255 248 240 / .45);
}

.pie :focus-visible { outline-color: var(--crema); }
/* En la barra café el foco es amarillo y separado: un aro crema pegado al botón se leía como borde roto */
.barra-pedido :focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; box-shadow: none; }

/* Barra flotante del pedido */
.barra-pedido {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--ancho-flota) - 24px);
  margin-inline: auto;
  padding: 8px 8px 8px 20px;
  color: var(--crema);
  background: var(--cafe);
  border-radius: var(--r-grande);
  box-shadow: inset 0 0 0 1px rgb(255 248 240 / .22), 0 2px 6px rgb(59 33 11 / .2), 0 8px 24px rgb(59 33 11 / .24);
}
/* Aparece subiendo 12 px; al agregar más, un latido corto de 250 ms */
.barra-pedido.entra { animation: barra-entra .26s var(--ease-out); }
.barra-pedido.rebote { animation: rebote .25s var(--ease-in-out); }

.barra-pedido .boton { box-shadow: none; }

/* Sin pedidos en línea: la franja va arriba del resumen, a todo el ancho de la barra */
.barra-pedido:has(.barra-pedido__aviso:not([hidden])) { flex-wrap: wrap; row-gap: 4px; }
.barra-pedido__aviso {
  flex: 1 0 100%;
  order: -1;
  margin: 0;
  padding: 4px 12px 0 0;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--amarillo);
}

/* Arriba de "Tu pedido" cuando no hay pago en línea: se sabe antes de armar nada */
.aviso-sucursal {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 0 0 16px;
  padding: 14px 16px;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: var(--r-grande);
}
.aviso-sucursal[hidden] { display: none; }
.aviso-sucursal__titulo { margin: 0; font-family: var(--titulos); font-size: 1.25rem; line-height: 1.15; }
.aviso-sucursal__texto { margin: 0; font-weight: 600; line-height: 1.35; }
.aviso-sucursal .boton { margin-top: 4px; }

.barra-pedido__resumen {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}
.barra-pedido__total {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  color: var(--naranja);
}

/* Hojas inferiores */
.hoja {
  width: 100%;
  max-width: var(--ancho-flota);
  max-height: min(var(--alto-visible), 900px);
  margin: auto auto 0;
  padding: 0;
  color: var(--cafe);
  background: var(--crema);
  border: 0;
  border-radius: var(--r-grande) var(--r-grande) 0 0;
  box-shadow: 0 -4px 24px rgb(59 33 11 / .16);
  overflow: hidden;
  transition: transform .24s var(--ease-out);
}
/* Entra en 320 ms con frenado suave; sale en 200 ms acelerando */
.hoja[open] {
  display: flex;
  flex-direction: column;
  animation: hoja-entra .32s var(--ease-hoja);
}
.hoja.cerrando { animation: hoja-sale .2s var(--ease-in) forwards; }
.hoja.arrastrando { transition: none; }
.hoja::backdrop { background: rgb(59 33 11 / .5); }
.hoja[open]::backdrop { animation: velo-entra .32s var(--ease-out); }
.hoja.cerrando::backdrop { animation: velo-sale .2s var(--ease-in) forwards; }

.hoja__caja {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.hoja__cabeza {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 16px 8px;
}
.hoja__cabeza--titulo { justify-content: space-between; }
.hoja__cabeza--fija {
  z-index: 2;
  flex: none;
  padding: 20px 16px 8px;
  background: var(--crema);
  box-shadow: 0 1px 0 var(--linea);
}
.hoja__cabeza .boton-icono { position: relative; z-index: 1; }

/* Asa: franja superior que se arrastra hacia abajo para cerrar */
.hoja__asa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
}
.hoja__asa::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 48px;
  height: 5px;
  margin-left: -24px;
  border-radius: 3px;
  background: rgb(59 33 11 / .38);
}
[data-arrastre] {
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.hoja.arrastrando [data-arrastre] { cursor: grabbing; }

.hoja__titulo {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
}

.hoja__titulo:focus, .hoja__titulo:focus-visible,
.hp__nombre:focus, .hp__nombre:focus-visible { outline: 0; box-shadow: none; }

.hoja__cuerpo {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 24px;
}

.hoja__pie {
  display: grid;
  gap: 8px;
  flex: none;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--crema);
  box-shadow: 0 -1px 0 var(--linea);
}

/* Hoja del producto: foto grande arriba */
.hp { display: block; margin: -4px -16px 0; }
/* La foto del producto lleva la misma esquina de plato que las tarjetas */
.hp__foto {
  aspect-ratio: auto;
  height: 200px;
  border-radius: 0 0 32px 10px;
}
.hp__foto.foto--vacia span { font-size: 1.75rem; }
.hp__info { padding: 16px 16px 0; }
.hp__nombre {
  font-family: var(--titulos);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  text-wrap: balance;
}
.hp__desc {
  margin-top: 4px;
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--cafe-suave);
}
.hp__precio { margin-top: 12px; font-size: 1.5rem; }

.etiqueta {
  display: block;
  padding: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.fila-cantidad {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
}

.contador {
  display: flex;
  align-items: center;
  gap: 4px;
}
.contador__boton {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--cafe);
  background: var(--turquesa);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--sombra-boton);
  transition: transform .16s var(--ease-out), background-color .2s var(--ease-in-out);
  -webkit-tap-highlight-color: transparent;
}
.contador__boton:active { transform: scale(.9); transition-duration: 90ms; }
.contador__boton:disabled {
  cursor: default;
  color: var(--linea-campo);
  background: var(--crema);
  box-shadow: inset 0 0 0 1px var(--linea-media);
  transform: none;
}
.contador__boton .icono { width: 18px; height: 18px; }
.contador__valor {
  min-width: 2ch;
  font-family: var(--titulos);
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
/* El número salta hacia donde fue (escena.js pone la clase al tocar + o -) */
.contador__valor--sube { animation: numero-sube .24s var(--ease-out); }
.contador__valor--baja { animation: numero-baja .24s var(--ease-out); }

.grupo {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
.grupo > .etiqueta { margin-bottom: 12px; }

.extras { display: grid; gap: 8px; }

.extra {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px 8px 12px;
  font-weight: 600;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
  cursor: pointer;
  transition: background-color .2s var(--ease-in-out), box-shadow .2s var(--ease-in-out);
}
.extra--marcada,
.extra:has(input:checked) {
  background: var(--amarillo-claro);
  box-shadow: inset 0 0 0 2px var(--cafe);
}
.extra input:focus-visible + .extra__caja { outline: 3px solid var(--cafe); outline-offset: 2px; }
.extra:has(input:focus-visible) {
  outline: 3px solid var(--cafe);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--turquesa);
}
.extra input { position: absolute; opacity: 0; pointer-events: none; }

.extra__caja {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  color: transparent;
  background: var(--crema);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--linea-campo);
  transition: background-color .2s var(--ease-in-out), transform .2s var(--ease-out);
}
.extra__caja .icono { width: 16px; height: 16px; }
.extra input:checked + .extra__caja {
  color: var(--cafe);
  background: var(--turquesa);
  box-shadow: inset 0 0 0 2px var(--cafe);
  transform: scale(1.06);
}
.extra__nombre { flex: 1; line-height: 1.2; }
.extra__precio { font-weight: 800; font-variant-numeric: tabular-nums; }

.campo { margin-top: 24px; }
.campo > .etiqueta { margin-bottom: 8px; }
.campo__cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.campo__cuenta { font-size: .8125rem; font-weight: 600; color: var(--cafe-suave); font-variant-numeric: tabular-nums; }

.entrada {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cafe);
  background: var(--crema);
  border: 2px solid var(--linea-campo);
  border-radius: var(--r);
  appearance: none;
  transition: border-color .2s var(--ease-in-out);
}
.entrada:focus-visible { outline-offset: 2px; border-color: var(--cafe); }
.entrada[aria-invalid="true"] { border-color: var(--terracota); }

.campo__error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--terracota);
}
.campo__error::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  font-size: .8125rem;
  font-weight: 800;
  color: var(--crema);
  background: var(--terracota);
  border-radius: 50%;
}

.campo--hora { margin-top: 12px; }

.sacudir { animation: sacudir .3s var(--ease-in-out); }

/* Opciones tipo pastilla */
.opciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.opcion { position: relative; display: block; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  height: 100%;
  padding: 8px 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
  transition: background-color .2s var(--ease-in-out), box-shadow .2s var(--ease-in-out);
}
.opcion input:checked + span {
  background: var(--turquesa);
  box-shadow: inset 0 0 0 2px var(--cafe);
}
.opcion input:focus-visible + span {
  outline: 3px solid var(--cafe);
  outline-offset: 3px;
}

.opcion__nombre { display: block; }
.opcion__precio { display: block; margin-top: 2px; font-family: var(--titulos); font-size: 1.125rem; font-weight: 400; }
.opcion > .opcion__caja { flex-direction: column; }

/* Elecciones: pastillas que se acomodan en filas */
.eleccion__leyenda {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  width: 100%;
  margin-bottom: 12px;
}
.eleccion__marca {
  padding: 3px 8px;
  font-size: .8125rem;
  font-weight: 800;
  background: var(--amarillo);
  border-radius: var(--r-pastilla);
}
.eleccion__cuenta {
  margin-left: auto;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--cafe-suave);
}
.pildoras { display: flex; flex-wrap: wrap; gap: 8px; }
.pildoras .opcion > span { min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
.pildoras .opcion input:disabled + span { opacity: .45; cursor: default; }
.grupo--error .pildoras .opcion > span { box-shadow: inset 0 0 0 2px var(--terracota); }

/* Confirmación al agregar */
.aviso-agregado {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  font-size: .9375rem;
  font-weight: 700;
  text-align: center;
  color: var(--cafe);
  background: var(--menta);
  border-radius: var(--r-pastilla);
  box-shadow: var(--sombra-2);
  transform: translateX(-50%);
  pointer-events: none;
}
.aviso-agregado.entra { animation: aviso-entra .25s var(--ease-out); }
/* Con la franja de la sucursal la barra crece unos 48 px: el aviso de Agregado y el pie suben lo mismo */
.con-sucursal .aviso-agregado { bottom: calc(136px + env(safe-area-inset-bottom)); }
.con-pedido.con-sucursal .pie:not(.pie--inicio) { padding-bottom: 168px; }
@keyframes aviso-entra {
  from { opacity: 0; transform: translate(-50%, 8px); }
}

/* Líneas del pedido */
.lineas { display: grid; gap: 8px; }

.linea {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 4px 12px;
  align-items: start;
  padding: 12px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
}
.linea .foto {
  width: 64px;
  height: 64px;
  aspect-ratio: auto;
  border-radius: 12px;
}
.linea .foto--vacia { padding: 4px; }
.linea .foto--vacia span { font-size: .8125rem; }
.linea__nombre { font-weight: 800; line-height: 1.2; }
.linea__detalle { margin-top: 4px; font-size: .875rem; line-height: 1.35; color: var(--cafe-suave); overflow-wrap: anywhere; }
.linea__precio {
  font-family: var(--titulos);
  font-size: 1.25rem;
  line-height: 1.1;
}
.linea__acciones {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.linea .contador__valor { font-size: 1.25rem; }

.boton-texto {
  min-height: 44px;
  padding: 0 8px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--terracota);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  background: none;
  border: 0;
  border-radius: 8px;
}

.resumen__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Bloques de la hoja "Tu pedido": título chico, separador suave */
.bloque { min-width: 0; padding: 0; border: 0; }
.bloque { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--linea); }
.bloque--ultimo { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.bloque__titulo {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  font-family: var(--titulos);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--cafe);
}
/* "Tu pedido" ya es el título de la hoja: el primer bloque lo conserva solo para lectores de pantalla */
.bloque__titulo.oculto { width: 1px; margin: 0; }
.bloque.grupo, .bloque .grupo { margin-top: 0; }
.bloque > .campo { margin-top: 0; }
.bloque > .local { margin-top: 12px; }
.bloque > .bloque__titulo + .local { margin-top: 0; }
.bloque > .aviso-entrega { margin-top: 12px; }
.bloque > .domicilio { margin-top: 12px; }

/* Total pegado arriba del botón: una línea que se expande al tocar */
#caja-pedido .hoja__pie { gap: 6px; padding-top: 8px; }
.total-pie__detalle {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
  padding: 10px 16px;
  background: var(--amarillo-claro);
  border-radius: var(--r);
  animation: despliega .2s var(--ease-out);
}
.total-pie__boton {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 4px;
  color: var(--cafe);
  background: none;
  border: 0;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.total-pie__total { display: flex; align-items: baseline; gap: 10px; font-size: 1.0625rem; font-weight: 800; }
.total-pie__total .precio { padding: 0 2px; font-size: 2rem; }

.total-pie__ver { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; font-weight: 700; color: var(--cafe-suave); }
.total-pie__ver .icono { width: 18px; height: 18px; transition: transform .2s var(--ease-out); }
.total-pie__boton[aria-expanded="true"] .total-pie__ver .icono { transform: rotate(180deg); }
@keyframes despliega {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.local {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  font-weight: 600;
  line-height: 1.35;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
}
.local .icono { color: var(--naranja); }
.local strong { display: block; font-weight: 600; }
.local__titulo { display: block; font-weight: 800; }
.local__enlace { display: inline-flex; align-items: center; min-height: 44px; margin-top: 0; font-weight: 800; color: var(--cafe); text-decoration: underline; text-decoration-color: var(--naranja); text-decoration-thickness: 2px; text-underline-offset: 3px; }


.aviso-cerrado {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--crema);
  background: var(--cafe);
  border-radius: var(--r);
}
.aviso-cerrado .icono { color: var(--amarillo); }

/* Animaciones */
@keyframes pegar {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
/* Sin "from" en hoja-sale: parte de donde quedó el arrastre */
@keyframes hoja-entra {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hoja-sale {
  to { transform: translateY(100%); }
}
@keyframes velo-entra {
  from { opacity: 0; }
}
@keyframes velo-sale {
  to { opacity: 0; }
}
@keyframes barra-entra {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rebote {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes sacudir {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
/* Toques (90 a 150 ms de presión; confirmaciones de 240 a 440 ms), solo transform y opacity */
@keyframes boton-rebota {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); }
  70% { transform: scale(.97); }
  100% { transform: scale(1); }
}
@keyframes palomita-pega {
  0% { opacity: .5; transform: scale(.7) rotate(-24deg); }
  55% { opacity: 1; transform: scale(1.18) rotate(5deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes anillo-destella {
  0% { opacity: .9; transform: scale(.6); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes asienta {
  0% { transform: scale(.96); }
  50% { transform: scale(1.03); }
  100% { transform: none; }
}
@keyframes numero-sube {
  40% { transform: translateY(-5px) scale(1.14); }
  100% { transform: none; }
}
@keyframes numero-baja {
  40% { transform: translateY(5px) scale(.9); }
  100% { transform: none; }
}

/* Carga del hero: la única de la página. Las clases las pone escena.js, así sin script nada queda invisible. */
@keyframes palabra-entra {
  from { opacity: 0; transform: translateY(.3em); }
}
@keyframes foto-entra {
  from { opacity: 0; transform: translateX(32%) rotate(5deg); }
}
/* Con both y no backwards a propósito: al terminar, backwards tira la capa compositada y Chrome repinta la foto
   del hero a los ~840 ms, y ese repintado se vuelve el LCP (medido: 2.4 s a 2.9 s simulado, 98 a 95 en Lighthouse).
   Las 8 animaciones quedan terminadas en getAnimations(), ninguna corriendo. */
.hero--entra .palabra { animation: palabra-entra .42s var(--ease-out) calc(var(--i) * 60ms) both; }
.hero--entra .destacado__foto { animation: foto-entra .5s var(--ease-out) .1s both; }
.hero--entra .plato__precio > span { display: block; animation: pegar .32s var(--ease-out) .5s both; }

/* Scroll del hero en tres tramos: la foto se encoge y se hace a un lado (--xl, a la derecha del subtítulo),
   baja por la orilla y entra a su tarjeta. Nunca pasa por encima del texto ni del botón. escena.js mide los valores. */
@keyframes plato-acomoda {
  0% { transform: translate(var(--dx), var(--dy)) rotate(6deg) scale(var(--s)); }
  25% { transform: translate(var(--xl), var(--dy)) rotate(2deg) scale(1); }
  65% { transform: translate(var(--xl), 0px) rotate(0deg) scale(1); }
}
/* Sin lugar a la derecha del texto (teléfono vertical) la foto no huye cortada: se apaga en su sitio
   y reaparece ya dentro de su tarjeta. steps(1) hace el salto mientras es invisible. */
@keyframes plato-funde {
  0% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(6deg) scale(var(--s)); }
  12% { opacity: 1; }
  20% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(3deg) scale(calc(var(--s) * .9)); animation-timing-function: steps(1, end); }
  60%, 100% { opacity: 1; transform: none; }
}
/* Fundido cruzado en el mismo tramo (12 a 20 %): una foto sube mientras la otra baja, así nunca se ven
   dos platos enteros a la vez ni la tarjeta sin ninguno */
@keyframes plato-fantasma {
  0%, 12% { opacity: 0; }
  20% { opacity: 1; animation-timing-function: steps(1, end); }
  60%, 100% { opacity: 0; }
}
.escena-funde .destacado__plato { position: relative; }
.escena-lista.escena-funde .destacado__plato::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--foto) 54% 60% / cover no-repeat;
  border-radius: var(--esquina-plato);
  box-shadow: var(--sombra-cafe);
}
@keyframes titulo-sube {
  to { opacity: 0; transform: translateY(-40px); }
}
@keyframes precio-se-va {
  0% { opacity: 1; transform: rotate(-8deg); }
  12%, 100% { opacity: 0; transform: rotate(-8deg) scale(.8); }
}
@supports (animation-timeline: scroll()) {
  .escena-lista .plato {
    animation: plato-acomoda linear both;
    animation-timeline: scroll(root);
    animation-range: 0 var(--rango);
  }
  .escena-lista.escena-funde .plato { animation-name: plato-funde; }
  .escena-lista.escena-funde .destacado__plato::before {
    animation: plato-fantasma linear both;
    animation-timeline: scroll(root);
    animation-range: 0 var(--rango);
  }
  .escena-lista .hero__titulo {
    animation: titulo-sube linear both;
    animation-timeline: scroll(root);
    animation-range: 0 calc(var(--rango) * .75);
  }
  .escena-lista .plato__precio {
    animation: precio-se-va linear both;
    animation-timeline: scroll(root);
    animation-range: 0 var(--rango);
  }
}
/* Cabeza de cada categoría: solo el ícono gira y se asienta con un leve rebasamiento; la cuenta y el resto del
   menú quedan quietos. La línea de tiempo es la de la cabeza entera: medida sobre el ícono solo (32 px) el giro
   cabía en 26 px de scroll. Las tarjetas de producto no se animan. */
.categoria__cabeza { view-timeline: --cabeza block; }
@keyframes icono-gira {
  0% { transform: rotate(-120deg) scale(.7); }
  72% { transform: rotate(7deg) scale(1.06); }
  100% { transform: none; }
}
@supports (animation-timeline: view()) {
  .categoria__titulo .icono {
    animation: icono-gira linear both;
    animation-timeline: --cabeza;
    animation-range: cover 0% cover 22%;
  }
}
.sin-view-timeline .categoria__titulo .icono {
  transform: rotate(-120deg) scale(.7);
  transition: transform .42s var(--ease-out);
}
.sin-view-timeline .visto .icono { transform: none; }

/* Las calcomanías de los pasos se pegan una tras otra; la cinta corre 30 % mientras cruza la pantalla */
@keyframes paso-pega {
  from { transform: rotate(4deg) scale(.9); }
}
@keyframes cinta-corre {
  from { transform: translateX(0); }
  to { transform: translateX(-30%); }
}
.cinta { view-timeline: --cinta block; }
@supports (animation-timeline: view()) {
  .paso {
    animation: paso-pega linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 70%;
  }
  .paso:nth-child(2) { animation-range: entry 25% entry 85%; }
  .paso:nth-child(3) { animation-range: entry 40% entry 100%; }
  .cinta__pista {
    animation: cinta-corre linear both;
    animation-timeline: --cinta;
  }
}
.sin-view-timeline .paso {
  transform: rotate(4deg) scale(.9);
  transition: transform .42s var(--ease-out);
}
.sin-view-timeline .paso:nth-child(2) { transition-delay: 90ms; }
.sin-view-timeline .paso:nth-child(3) { transition-delay: 180ms; }
.sin-view-timeline .paso.visto { transform: rotate(var(--giro)); }
.sin-view-timeline .cinta__pista { transform: translateX(calc(-30% * var(--p, 0))); }


/* El letrero del pie sube desde la orilla recortada al llegar al final. Al final de la página solo asoma
   ~70 % de su alto (a 412 px: 71 de 99), por eso el tramo termina en entry 68 %. El pie recorta con clip
   (hidden lo haría contenedor de scroll y rompería view()). */
@keyframes marca-sube {
  from { transform: translateY(40%); }
}
@supports (animation-timeline: view()) {
  .pie__marca {
    animation: marca-sube linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 68%;
  }
}
.sin-view-timeline .pie__marca {
  transform: translateY(40%);
  transition: transform .42s var(--ease-out);
}
.sin-view-timeline .pie__marca.visto { transform: none; }

/* Respaldo (Chrome viejo, Safari 16 a 17): las mismas curvas con --p de 0 a 1 que escribe escena.js */
.sin-scroll-timeline .escena-lista {
  --a1: clamp(0, var(--p, 0) / .25, 1);
  --a2: clamp(0, (var(--p, 0) - .25) / .4, 1);
  --a3: clamp(0, (var(--p, 0) - .65) / .35, 1);
  --qt: calc(1 - min(1, var(--p, 0) / .75));
}
.sin-scroll-timeline .escena-lista .plato,
.sin-scroll-timeline .escena-lista .hero__titulo,
.sin-scroll-timeline .escena-lista .plato__precio { animation: none; }
.sin-scroll-timeline .escena-lista .plato {
  transform:
    translate(calc(var(--dx) + (var(--xl) - var(--dx)) * var(--a1) - var(--xl) * var(--a3)), calc(var(--dy) * (1 - var(--a2))))
    rotate(calc(6deg - 4deg * var(--a1) - 2deg * var(--a2)))
    scale(calc(var(--s) + (1 - var(--s)) * var(--a1)));
}
.sin-scroll-timeline .escena-funde {
  --b1: clamp(0, var(--p, 0) / .2, 1);
  --o1: clamp(0, (var(--p, 0) - .12) / .08, 1);
  --salto: clamp(0, (var(--p, 0) - .6) * 1000, 1);
}
.sin-scroll-timeline .escena-lista.escena-funde .plato {
  opacity: calc((1 - var(--salto)) * (1 - var(--o1)) + var(--salto));
  transform:
    translate(calc(var(--dx) * (1 - var(--salto))), calc(var(--dy) * (1 - var(--salto))))
    rotate(calc((6deg - 3deg * var(--b1)) * (1 - var(--salto))))
    scale(calc((1 - var(--salto)) * var(--s) * (1 - .1 * var(--b1)) + var(--salto)));
}
.sin-scroll-timeline .escena-lista.escena-funde .destacado__plato::before { opacity: calc(var(--o1) * (1 - var(--salto))); }



.sin-scroll-timeline .escena-lista .hero__titulo {
  opacity: var(--qt);

  transform: translateY(calc(-40px * (1 - var(--qt))));
}
.sin-scroll-timeline .escena-lista .plato__precio {
  opacity: max(0, 1 - var(--p, 0) / .12);
  transform: rotate(-8deg) scale(calc(1 - .2 * min(1, var(--p, 0) / .12)));
}

@media (hover: hover) {
  .boton:hover { box-shadow: var(--sombra-boton-alta); }
  .boton--claro:hover { box-shadow: inset 0 0 0 2px var(--cafe); }
  .boton:active { box-shadow: 0 1px 2px rgb(59 33 11 / .16); }
  .opcion:hover > span { background: var(--amarillo-claro); }
  .opcion:hover input:checked + span { background: var(--turquesa); }
  .extra:hover { background: var(--amarillo-claro); }
  .pregunta summary:hover .pregunta__signo { transform: rotate(90deg); }
  .pregunta[open] summary:hover .pregunta__signo { transform: rotate(45deg); }
  .pie__red:hover,
  .contador__boton:not(:disabled):hover { box-shadow: var(--sombra-boton-alta); }
}

@media (min-width: 480px) {
  .hero { padding-inline: 24px; }
}

@media (max-width: 359px) {
  .pasos { grid-template-columns: 1fr; }
  /* 320 px: el aviso de cerrado ocupa tres líneas; la barra lo aguanta sin crecer */
  :root { --barra-alto: 76px; }
  .barra { gap: 8px; padding-block: 8px; padding-inline: 12px; }
  .marca__nombre { font-size: 1rem; }
}

@media (min-width: 600px) {
  .cinta { margin-inline: 0; }
}

/* Panel de marca con el QR: solo en computadora */
.panel-qr { display: none; }

@media (min-width: 900px) {
  :root { --panel: 300px; --hueco: 40px; }

  /* El turquesa oscuro vive solo aquí, detrás del panel del QR (anotado en DESIGN-r10.md) */
  body { background-color: var(--turquesa-oscuro); }
  .pagina { box-shadow: 0 8px 40px rgb(59 33 11 / .18); }
  .escenario {
    display: grid;
    grid-template-columns: var(--ancho) var(--panel);

    column-gap: var(--hueco);
    justify-content: center;
    align-items: start;
  }
  .pagina { margin: 0; }

  .panel-qr {
    position: sticky;
    top: 48px;
    display: grid;
    justify-items: center;
    gap: 20px;
    margin-top: 48px;
    padding: 32px 24px 24px;
    text-align: center;
    color: var(--cafe);
    background: var(--crema);
    border-radius: var(--r-grande);
    box-shadow: 0 8px 40px rgb(59 33 11 / .18);
  }

  .panel-qr__titulo {
    font-family: var(--titulos);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.05;
    text-wrap: balance;
  }

  .panel-qr__codigo {
    padding: 16px;
    background: var(--crema);
    border-radius: var(--r);
    box-shadow: inset 0 0 0 3px var(--turquesa);
  }
  .panel-qr__codigo img { width: 200px; height: 200px; }

  .panel-qr__url {
    display: inline-block;
    min-height: 44px;
    padding: 4px 8px;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 8px;
  }
  .panel-qr__url span {
    display: inline-block;
    text-decoration-line: underline;
    text-decoration-color: var(--naranja);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  .panel-qr__firma {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    border-top: 1px solid var(--linea);
  }
  .panel-qr__firma img {
    width: 44px;
    height: 44px;
  }

  /* La barra y las hojas se alinean con la columna, no con la pantalla */
  .barra-pedido {
    left: calc(var(--flota-izq) + 12px);
    right: auto;
    width: calc(var(--ancho-flota) - 24px);
    margin: 0;
  }
  .hoja { margin: auto auto 0 var(--flota-izq); }
  .aviso-agregado { left: calc(var(--flota-izq) + var(--ancho-flota) / 2); }

}

@media (min-width: 1100px) {
  :root { --panel: 340px; --hueco: 72px; }
  .panel-qr__codigo img { width: 220px; height: 220px; }
  .panel-qr__titulo { font-size: 2.25rem; }
}

/* Teléfono en horizontal: titular corto y la foto a la derecha, para que "Ver el menú" quepa en 390 px de alto */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --t-hero: clamp(40px, 11vh + 6px, 64px); }
  .hero { --plato: 96px; padding-top: 12px; }
  .hero__escena { min-height: 0; }
  .hero__titulo { max-width: 60%; }
  .hero__titulo--cartel .palabra:nth-of-type(3),
  .hero__titulo--cartel .palabra:nth-of-type(6) { display: inline-block; }
  .hero__ancla { top: 0; right: 0; }
  .hero__sub { max-width: 58%; margin-top: 12px; font-size: .9375rem; }
  .hero__cta { flex-direction: row; align-items: center; margin-top: 14px; }
}

/* Zoom grande de Android (260 a 320 px): sin foto en el hero (queda en su tarjeta) y la barra sin el nombre visible */
@media (max-width: 320px) {
  .hero__ancla { display: none; }
  .hero__escena { min-height: 0; }
  .marca__nombre {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .estado { max-width: none; }
}

/* Computadora: la columna crema crece y el hero se abre en dos; la foto ocupa 46 % y se sale por la derecha.
   El titular se mide también por el alto para que en 1366 x 768 el botón quede en la primera pantalla. */
@media (min-width: 1024px) {
  :root {
    --ancho: min(980px, calc(100vw - var(--panel) - var(--hueco) - 80px));
    --t-hero: clamp(64px, min(7.4vw, 13vh), 120px);
  }
  .hero {
    --plato: calc(var(--ancho) * .46 * .62);
    padding: 40px 40px 48px;
  }
  .hero__escena { min-height: 0; }

  .hero__titulo { max-width: 58%; }

  .hero__ancla { top: 0; right: 0; width: calc(var(--plato) / .62); }
  /* La caja del subtítulo termina antes que la foto girada (a 1280 x 720 se cruzaban sus esquinas) */
  .hero__sub { max-width: min(34ch, calc(100% - var(--plato) / .62 - 48px)); margin-top: 24px; }


  .hero__cta { flex-direction: row; align-items: center; margin-top: 28px; }

  .destacado { margin-top: 56px; padding: 24px 24px 24px 32px; }

  .destacado__nombre { font-size: 2.5rem; }
  .minis { max-width: 640px; }
  .productos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .producto { grid-template-columns: 128px minmax(0, 1fr); gap: 18px; }
  .producto .boton--agregar { width: auto; padding: 0 16px 0 12px; border-radius: var(--r-pastilla); }
  .producto .boton--agregar span { display: inline; }
  .apps__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* Pasos en una línea: número de letrero grande y el texto a su lado, sin caja medio vacía */
  /* Mismo borde que la tarjeta destacada (el padding de 40 px del hero) */
  .pasos { gap: 20px; margin-inline: 40px; padding: 28px 32px 32px; border-radius: 16px 16px 0 0; }

  .paso {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    font-size: 1.25rem;
  }
  .paso::before {
    width: auto;
    height: auto;
    font-size: 3.5rem;
    color: var(--cafe);
    background: none;
  }
}
/* Tableta y Windows al 125 % (600 a 1279 px de ancho con poca altura): el titular también se mide por el alto
   y la foto toma 40 %, así "Ver el menú" entra en la primera pantalla (1024 x 690, 1180 x 740, 1093 x 615) */
@media (min-width: 600px) and (max-width: 1023px) {
  :root { --t-hero: clamp(52px, min(11vw + 18px, 13vh), 96px); }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --t-hero: clamp(48px, min(6.4vw, 10vh), 96px); }
  .hero {
    --plato: calc(var(--ancho) * .40 * .62);
    padding-top: 24px;
  }
  .hero__sub { margin-top: 16px; }
  .hero__cta { margin-top: 20px; }
}

/* Desde 1280 la página usa todo el ancho
: crema hasta el borde y el turquesa solo detrás del QR.
   Hojas y barra flotante se centran en la parte crema (--flota-izq en % del ancho de la ventana). */
@media (min-width: 1280px) {
  :root {
    --panel: 280px;
    --hueco: 0px;
    --ancho: min(1180px, calc(100vw - var(--panel) - 96px));
    --flota-izq: calc((100% - var(--panel) - 64px - var(--ancho-flota)) / 2);
  }
  .escenario {
    grid-template-columns: minmax(0, 1fr) calc(var(--panel) + 64px);
    column-gap: 0;
    justify-content: stretch;
  }
  .pagina { max-width: none; box-shadow: none; }
  .pagina > main { max-width: var(--ancho); margin-inline: auto; }
  /* El grano dejaba una costura en la orilla del hero cuando la página ya no termina ahí */
  .hero__grano { display: none; }

  .panel-qr { margin: 48px 32px 0; }
  .panel-qr__codigo img { width: 200px; height: 200px; }
}

/* Teléfono en horizontal: sin marco ni panel del QR, crema de borde a borde */
@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --ancho: 100vw;
    --flota-izq: calc((100% - var(--ancho-flota)) / 2);
  }
  body { background-color: var(--crema); }
  .escenario { display: block; }
  .pagina { max-width: none; box-shadow: none; }
  .panel-qr { display: none; }
}



/* Foco de los controles que ya tienen sombra propia: el anillo turquesa
   va al final para ganarle a esa sombra y a la del hover */
.boton:focus-visible,
.contador__boton:focus-visible { box-shadow: 0 0 0 3px var(--turquesa); }
.boton--claro:focus-visible { box-shadow: inset 0 0 0 2px var(--cafe), 0 0 0 3px var(--turquesa); }
.boton-icono:focus-visible { box-shadow: inset 0 0 0 1px var(--linea-media), 0 0 0 3px var(--turquesa); }

/* Imagen ilustrativa */
.foto__ilustrativa {
  position: absolute;
  left: 6px;
  bottom: 4px;
  white-space: nowrap;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cafe);
  text-shadow: 0 0 2px var(--crema), 0 0 8px var(--crema);
  pointer-events: none;
}

.hp__foto .foto__ilustrativa { left: 10px; bottom: 8px; }
/* En las miniaturas de 64 px la etiqueta no cabe: se queda en las tarjetas y en la hoja del producto */
.linea .foto__ilustrativa { display: none; }

/* Ayuda bajo el nombre de un extra */
.extra__ayuda {
  display: block;
  margin-top: 2px;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.25;
  color: #6B5A4A;
}

/* Pedido muy largo y nota de privacidad */
.aviso-largo {
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--cafe);
}
.boton--apagado, .boton--apagado:active {
  background: #CFC6BB;
  color: #6B5E52;
  cursor: not-allowed;
  box-shadow: none;
}
.boton--resaltado { box-shadow: inset 0 0 0 3px var(--cafe); background: var(--amarillo); }
.hoja__cuerpo .aviso-cerrado { margin-top: 16px; }
.hoja__cuerpo .privacidad { margin-top: 12px; }
.privacidad {
  font-size: .875rem;
  line-height: 1.45;
  text-align: left;
  color: var(--cafe-suave);
}
.privacidad strong { font-weight: 800; color: var(--cafe); }


/* Botón de envío: texto y total en una sola línea */
#enviar { gap: 8px; padding-left: 12px; padding-right: 12px; font-size: 1rem; }
#enviar-texto { white-space: nowrap; }
#copiar-pedido { min-height: 40px; font-size: .875rem; }
.opciones--una { grid-template-columns: 1fr; }

/* Borrar datos del teléfono */
.borrar { margin-top: 8px; text-align: center; }
.borrar__enlace {
  min-height: 44px;
  padding: 0 8px;
  font: inherit;
  font-size: .8125rem;
  color: var(--cafe-suave);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.borrar__enlace:focus-visible { outline: 3px solid var(--turquesa); outline-offset: 2px; border-radius: 4px; }
.borrar__confirma { margin-top: 4px; font-size: .875rem; color: var(--cafe); scroll-margin-bottom: 16px; }
.legal__lista .borrar__enlace { padding: 0; color: inherit; text-underline-offset: 3px; }

.borrar__botones { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.borrar__botones .boton { flex: 1; }
/* Borrar mis datos desde el pie: la hoja solo lleva la pregunta, sin el pedido ni el pie de pagar */
.hoja--solo-borrar .bloque,
.hoja--solo-borrar .aviso-cerrado,
.hoja--solo-borrar .privacidad,
.hoja--solo-borrar .hoja__pie { display: none; }
.hoja--solo-borrar .borrar { margin-top: 0; }
.hoja--solo-borrar .borrar__confirma { font-size: 1rem; line-height: 1.4; }
.hoja--solo-borrar .hoja__cuerpo { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Pago: una tarjeta grande por forma de pago en línea (Transferencia y Tarjeta con Mercado Pago) */
.pagos { display: grid; gap: 8px; }
.pago-opcion { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pago-opcion input { position: absolute; opacity: 0; pointer-events: none; }
.pago-opcion__cara {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 12px 14px;
  border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--linea-media);
  transition: background-color .2s var(--ease-in-out), box-shadow .2s var(--ease-in-out), transform .16s var(--ease-out);
}
.pago-opcion:active .pago-opcion__cara { transform: scale(.985); }
.pago-opcion__icono {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--amarillo-claro);
  transition: background-color .2s var(--ease-in-out);
}
.pago-opcion__icono .icono { width: 26px; height: 26px; }
.pago-opcion__textos { display: grid; gap: 2px; flex: 1; min-width: 0; }
.pago-opcion__nombre { font-family: var(--titulos); font-size: 1.25rem; line-height: 1.1; }
.pago-opcion__texto { font-size: .875rem; font-weight: 600; line-height: 1.3; color: var(--cafe-suave); }
.pago-opcion__marca {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  color: transparent;
  box-shadow: inset 0 0 0 2px var(--linea-campo);
  transition: background-color .2s var(--ease-in-out), color .2s var(--ease-in-out);
}
.pago-opcion__marca .icono { width: 16px; height: 16px; }
.pago-opcion input:checked + .pago-opcion__cara {
  background: rgb(19 202 217 / .14);
  box-shadow: inset 0 0 0 2px var(--cafe);
}
.pago-opcion input:checked + .pago-opcion__cara .pago-opcion__icono { background: var(--turquesa); }
.pago-opcion input:checked + .pago-opcion__cara .pago-opcion__marca { color: var(--crema); background: var(--cafe); box-shadow: none; }
.pago-opcion input:focus-visible + .pago-opcion__cara { outline: 3px solid var(--cafe); outline-offset: 3px; }

/* Efectivo: aviso de la sucursal dentro del bloque Pago. Es amable, no un error, y no crea pedido. */
.sucursal { margin-top: 12px; }
.pagos:empty + .sucursal { margin-top: 0; }
.sucursal__abrir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 2px;
  font: inherit;
  font-weight: 800;
  color: var(--cafe);
  background: none;
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--naranja);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sucursal__abrir .icono { width: 18px; height: 18px; transition: transform .2s var(--ease-out); }
.sucursal__abrir[aria-expanded="true"] .icono { transform: rotate(180deg); }
.sucursal__abrir:focus-visible { outline: 3px solid var(--cafe); outline-offset: 2px; border-radius: 6px; }
.sucursal__aviso {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 16px;
  background: var(--amarillo-claro);
  border-radius: var(--esquina-plato);
  box-shadow: inset 0 0 0 2px var(--cafe);
  animation: despliega .22s var(--ease-out);
}
.sucursal__titulo { font-family: var(--titulos); font-weight: 400; font-size: 1.5rem; line-height: 1.05; text-wrap: balance; }
.sucursal__texto { font-weight: 700; line-height: 1.4; }
.sucursal__dato { display: flex; align-items: flex-start; gap: 8px; font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.sucursal__dato .icono { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--terracota); }

/* Botón principal: el texto largo puede ir en dos líneas */
#enviar { min-height: 56px; }
#enviar-texto { white-space: normal; text-align: center; text-wrap: balance; }
#enviar:disabled { cursor: progress; opacity: .85; }
/* A domicilio sin tarjeta: la frase va sobre el botón, que queda apagado */
.solo-tarjeta { margin: 0 0 10px; font-size: .875rem; font-weight: 700; line-height: 1.35; text-align: center; color: var(--cafe); }
#enviar:disabled:not([aria-busy="true"]) { cursor: not-allowed; opacity: .55; }
.error-envio {
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--terracota);
}

/* "Ver mi último ticket" abajo cuando no hay pedido en curso */
.barra-ticket {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 39;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--ancho-flota) - 24px);
  margin-inline: auto;
  padding: 8px 8px 8px 16px;
  background: var(--crema);
  border-radius: var(--r-grande);
  box-shadow: inset 0 0 0 2px var(--cafe), var(--sombra-2);
  animation: barra-entra .26s var(--ease-out);
}
.barra-ticket__texto { display: flex; align-items: center; gap: 8px; font-weight: 700; line-height: 1.2; }
.barra-ticket__texto .icono { color: var(--naranja); }
.barra-ticket__texto strong { font-family: var(--titulos); font-weight: 400; font-size: 1.25rem; letter-spacing: .02em; }
.barra-ticket .boton { flex: none; padding: 0 14px; white-space: nowrap; box-shadow: none; }
.barra-ticket__texto span { white-space: nowrap; }
.con-ticket .pie { padding-bottom: 120px; }
/* En pantallas bajas la barra caería sobre la prueba social del inicio: con ticket guardado se deja el hueco sin texto */
@media (max-width: 899px) and (max-height: 740px) {
  .con-ticket .hero__prueba { visibility: hidden; }
}

/* Vista del ticket: hoja a pantalla completa */
.hoja--ticket {
  height: min(var(--alto-visible), 900px);
}
.ticket {
  position: relative;
  margin-top: 4px;
  padding: 20px 16px 16px;
  background: var(--amarillo-claro);
  border-radius: var(--r-grande);
  box-shadow: var(--sombra-1);
}
/* Rótulo de prueba: pastilla amarilla, discreta */
.pastilla-prueba {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--cafe);
  background: var(--amarillo);
  border-radius: var(--r-pastilla);
}
.ticket__demo { display: flex; width: fit-content; margin: -4px auto 12px; }
.ticket__cabeza { display: grid; justify-items: center; text-align: center; }
.ticket__etiqueta {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--cafe-suave);
}
.ticket__numero {
  margin-top: 6px;
  font-family: var(--titulos);
  font-size: clamp(3rem, 15.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: .07em;
  padding-left: .07em;
  font-variant-numeric: tabular-nums;
}
.ticket__numero--nuevo { animation: numero-entra .26s var(--ease-out) both; }
@keyframes numero-entra {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
.ticket__estado {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 14px;
  padding: 8px 16px;
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.2;
  background: var(--linea);
  border-radius: var(--r-pastilla);
  transition: background-color .25s var(--ease-in-out), color .25s var(--ease-in-out);
}
.ticket__punto {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--cafe);
}
.ticket__estado[data-estado="pagado"] { background: var(--menta); }
.ticket__estado[data-estado="pendiente_pago"] { background: var(--amarillo); }
.ticket__estado[data-estado="transferencia"] { background: var(--naranja); }
.ticket__estado[data-estado="pendiente_pago"] .ticket__punto,
.ticket__estado[data-estado="transferencia"] .ticket__punto,
.ticket__estado[data-estado="cargando"] .ticket__punto { animation: latido 1.2s var(--ease-in-out) infinite; }
.ticket__estado[data-estado="pagado"] .ticket__punto { background: var(--cafe); }
.ticket__estado[data-estado="expirado"],
.ticket__estado[data-estado="cancelado"],
.ticket__estado[data-estado="reembolsado"] { color: var(--crema); background: var(--terracota); }
.ticket__estado[data-estado="expirado"] .ticket__punto,
.ticket__estado[data-estado="cancelado"] .ticket__punto,
.ticket__estado[data-estado="reembolsado"] .ticket__punto { background: var(--crema); }
.ticket__estado[data-estado="entregado"] { color: var(--crema); background: var(--cafe); }
.ticket__estado[data-estado="entregado"] .ticket__punto { background: var(--menta); }
.ticket__ayuda {
  max-width: 32ch;
  margin-top: 10px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cafe-suave);
}
.ticket__ayuda:empty { display: none; }

/* Corte del ticket: línea punteada con dos muescas del color de la hoja */
.ticket__corte {
  position: relative;
  height: 2px;
  margin: 20px -16px 16px;
  background: repeating-linear-gradient(90deg, var(--linea-media) 0 8px, transparent 8px 14px);
  background-clip: content-box;
  padding: 0 18px;
}
.ticket__corte::before,
.ticket__corte::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--crema);
}
.ticket__corte::before { left: -12px; }
.ticket__corte::after { right: -12px; }

.ticket__datos { display: grid; gap: 6px; margin: 0; }
.ticket__datos div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ticket__datos dt { font-size: .875rem; font-weight: 600; color: var(--cafe-suave); }
.ticket__datos dd { margin: 0; font-weight: 800; text-align: right; }
.ticket__lineas { display: grid; margin-top: 12px; }
.ticket__linea {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--linea);
}
.ticket__cant { font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket__nombre { font-weight: 700; line-height: 1.3; }
.ticket__nombre small { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 500; color: var(--cafe-suave); }
.ticket__precio { font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 10px;
  font-weight: 800;
  border-top: 2px dashed var(--linea-media);
}
.ticket__total .precio { padding: 0; }
.ticket__total .precio::before { content: none; }
.ticket__guardar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 34ch;
  margin: 14px auto 0;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
}
.ticket__guardar .icono { flex: none; color: var(--naranja); }

/* Datos para transferir: la cuenta del negocio, como un talón dentro del ticket */
.cuenta {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--crema);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 2px var(--cafe);
}
.cuenta__titulo { font-family: var(--titulos); font-weight: 400; font-size: 1.375rem; line-height: 1.05; }
.cuenta__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 800; }
.cuenta__total .precio { font-size: 2rem; }
.cuenta__datos { display: grid; gap: 6px; margin: 0; padding-top: 12px; border-top: 2px dashed var(--linea-media); }
.cuenta__datos div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cuenta__datos dt { flex: none; font-size: .875rem; font-weight: 600; color: var(--cafe-suave); }
.cuenta__datos dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.cuenta__clabe { display: grid; gap: 6px; padding-top: 12px; border-top: 2px dashed var(--linea-media); }
.cuenta__etiqueta { font-size: .875rem; font-weight: 600; color: var(--cafe-suave); }
.cuenta__numero {
  margin-bottom: 4px;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
.cuenta .boton--copiar { width: 100%; }
.cuenta__frase {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 12px;
  border-top: 2px dashed var(--linea-media);
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.35;
}
.cuenta__frase .icono { flex: none; width: 20px; height: 20px; color: var(--terracota); }

@keyframes latido {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}

@media (min-width: 900px) {
  .barra-ticket {
    left: calc(var(--flota-izq) + 12px);
    right: auto;
    width: calc(var(--ancho-flota) - 24px);
    margin: 0;
  }
}
.ticket__adjunta { margin: -4px 0 0; font-size: .875rem; font-weight: 700; line-height: 1.3; text-align: center; color: var(--cafe); }
.ticket__respaldo { font-size: .875rem; font-weight: 700; line-height: 1.3; text-align: center; color: var(--cafe-suave); }

/* Entrega a domicilio con Uber: selector, dirección, cotización y repartidor en el ticket */
#grupo-entrega .pagos { gap: 8px; }
.aviso-entrega {
  margin-top: 12px;
  padding: 12px 16px;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--crema);
  background: var(--terracota);
  border-radius: var(--r);
}
.domicilio { margin-top: 8px; }
.campo-fila { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: end; gap: 10px; }
.campo-fila .campo { min-width: 0; margin-top: 16px; }
.domicilio > .campo { margin-top: 16px; }
.campo__ayuda { margin-top: 6px; font-size: .8125rem; font-weight: 600; line-height: 1.3; color: var(--cafe-suave); }
.cotizacion { display: grid; gap: 8px; margin-top: 16px; }
.cotizacion__resultado {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 14px;
  font-weight: 800;
  line-height: 1.3;
  background: rgb(137 226 198 / .45);
  border-radius: var(--r);
  box-shadow: inset 0 0 0 2px var(--cafe);
}
.cotizacion__resultado .icono { flex: none; width: 24px; height: 24px; }
#cotizar[aria-busy="true"] { cursor: progress; opacity: .8; }

.ticket__envio {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.repartidor { display: grid; justify-items: center; gap: 6px; margin-top: 14px; text-align: center; }
.repartidor__estado {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.2;
  background: var(--linea);
  border-radius: var(--r-pastilla);
  transition: background-color .25s var(--ease-in-out), color .25s var(--ease-in-out);
}
.repartidor__estado .icono { flex: none; width: 22px; height: 22px; }
.repartidor__estado[data-estado="espera"],
.repartidor__estado[data-estado="creando"],
.repartidor__estado[data-estado="incierto"],
.repartidor__estado[data-estado="pending"] { background: var(--amarillo); }
.repartidor__estado[data-estado="pickup"],
.repartidor__estado[data-estado="pickup_complete"],
.repartidor__estado[data-estado="dropoff"] { background: var(--turquesa); }
.repartidor__estado[data-estado="delivered"] { background: var(--menta); }
.repartidor__estado[data-estado="error"],
.repartidor__estado[data-estado="canceled"],
.repartidor__estado[data-estado="returned"] { color: var(--crema); background: var(--terracota); }
.repartidor__quien { font-size: .875rem; font-weight: 700; color: var(--cafe-suave); }

/* Línea de tiempo del ticket */
.tiempo {
  display: flex;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tiempo__paso {
  position: relative;
  display: grid;
  flex: 1 1 0;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
}
.tiempo__paso + .tiempo__paso::before {
  content: "";
  position: absolute;
  top: 13px;
  right: calc(50% + 18px);
  left: calc(-50% + 18px);
  height: 3px;
  border-radius: 2px;
  background: var(--linea-media);
  transition: background-color .25s var(--ease-in-out);
}
.tiempo__paso[data-estado="hecho"]::before,
.tiempo__paso[data-estado="actual"]::before { background: var(--cafe); }
.tiempo__punto {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: transparent;
  background: var(--crema);
  box-shadow: inset 0 0 0 2px var(--linea-campo);
  transition: background-color .25s var(--ease-in-out), color .25s var(--ease-in-out), box-shadow .25s var(--ease-in-out);
}
.tiempo__punto .icono { width: 16px; height: 16px; }
.tiempo__paso[data-estado="hecho"] .tiempo__punto { color: var(--crema); background: var(--cafe); box-shadow: none; }
.tiempo__paso[data-estado="actual"] .tiempo__punto { background: var(--turquesa); box-shadow: inset 0 0 0 3px var(--cafe); }
.tiempo__paso--espera[data-estado="actual"] .tiempo__punto { background: var(--naranja); }
.tiempo__texto { font-size: .875rem; font-weight: 700; line-height: 1.2; color: var(--cafe-suave); text-wrap: balance; }
.tiempo__paso[data-estado="hecho"] .tiempo__texto,
.tiempo__paso[data-estado="actual"] .tiempo__texto { color: var(--cafe); font-weight: 800; }
.tiempo--tres .tiempo__texto { font-size: .8125rem; }

/* Pie de la vista del ticket: WhatsApp grande, y debajo Rastrear y Copiar lado a lado */
.pie-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.pie-fila .boton { gap: 6px; padding: 0 8px; font-size: .875rem; text-align: center; white-space: nowrap; }
.pie-fila .icono { width: 18px; height: 18px; }
.pie-fila #copiar-pedido { min-height: 44px; }
.hoja--ticket .hoja__pie { gap: 8px; }

/* Respaldo sin <dialog> (iOS < 15.4 y visores viejos): la hoja es un bloque fijo abajo con velo */
.hoja--respaldo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  display: none;
}
.hoja--respaldo[open] { display: flex; }
.velo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(59, 33, 11, .5);
}

/* Franja de error de guardia.js: arriba, discreta, todo el ancho es el botón */
.franja-error {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: env(safe-area-inset-top) 0 0;
  background: var(--cafe);
}
.franja-error__boton {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  font: 700 .9375rem/1.3 var(--texto);
  color: var(--crema);
  text-align: center;
  background: none;
  border: 0;
  cursor: pointer;
}
.franja-error__boton:focus-visible { outline: 3px solid var(--turquesa); outline-offset: -3px; }

/* Pie: bloque plegado de información legal (discreto) */
details.legal {
  width: 100%;
  max-width: 44ch;
  margin-top: 16px;
  padding: 8px 0 0;
  border-top: 1px solid rgb(255 248 240 / .2);
  font-size: .8125rem;
  line-height: 1.5;
  color: rgb(255 248 240 / .7);
}
details.legal > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 8px;
  font-size: .8125rem;
  cursor: pointer;
  list-style: none;
}
details.legal > summary::-webkit-details-marker { display: none; }
details.legal > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform .2s var(--ease-out);
}
details.legal[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.legal__lista { display: grid; justify-items: center; gap: 2px; padding-bottom: 8px; }
/* Enlaces del pie de 44 px de alto aunque vayan dentro del texto */
.legal__lista a { display: inline-block; padding: 12px 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Pie de terminos.html y privacidad.html: derechos, enlaces y marcas */
.pie__legal {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: 44ch;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 248 240 / .2);
}
.pie__copy { font-size: .875rem; font-weight: 700; }
.pie__enlaces { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 16px; }
.pie__enlaces a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--crema);
  text-underline-offset: 3px;
  border-radius: 8px;
}
.pie__enlaces a[aria-current="page"] { text-decoration-thickness: 2px; color: var(--amarillo); }
.pie__marcas { font-size: .8125rem; line-height: 1.5; color: rgb(255 248 240 / .86); }

.legal__volver { margin-bottom: 16px; font-size: .9375rem; }
.legal__volver a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--cafe); text-underline-offset: 3px; }
.legal__volver:last-child { margin: 32px 0 0; }

/* "Al pedir aceptas..." debajo del botón de pagar o generar */
.acepta { font-size: .75rem; line-height: 1.4; text-align: center; color: rgb(59 33 11 / .66); }
.acepta a { display: inline-block; padding: 4px 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Páginas legales (terminos.html y privacidad.html): misma columna crema */
.pagina--legal { max-width: 760px; }
.legal { padding: 28px 16px 8px; }
.legal__titulo { font-family: var(--titulos); font-weight: 400; font-size: 2.25rem; line-height: 1.05; text-wrap: balance; }
.legal__fecha { margin-top: 8px; font-size: .9375rem; font-weight: 600; color: var(--cafe-suave); }
.legal__intro { margin-top: 16px; font-size: 1.0625rem; line-height: 1.55; }
.legal__indice {
  margin-top: 24px;
  padding: 16px 16px 12px;
  background: var(--amarillo-claro);
  border-radius: var(--r);
}
.legal__indice-titulo { font-family: var(--titulos); font-size: 1.125rem; font-weight: 400; }
.legal__indice ol { margin-top: 4px; padding-left: 1.4em; list-style: decimal; columns: 2 14rem; column-gap: 24px; }
.legal__indice li { break-inside: avoid; }
.legal__indice a { display: inline-block; padding: 6px 0; min-height: 32px; font-weight: 700; color: var(--cafe); text-underline-offset: 3px; }
.legal section { margin-top: 32px; scroll-margin-top: calc(var(--barra-alto) + 16px); }
.legal h2 { font-family: var(--titulos); font-weight: 400; font-size: 1.5rem; line-height: 1.15; }
.legal section p, .legal section li { margin-top: 8px; line-height: 1.6; }
.legal section ul { padding-left: 1.25em; list-style: disc; }
.legal section li::marker { color: var(--naranja); }
.legal section a { font-weight: 700; color: var(--cafe); text-underline-offset: 3px; overflow-wrap: anywhere; }
.pie--legal { margin-top: 48px; }
@media (min-width: 900px) {
  .pagina.pagina--legal { margin: 0 auto; box-shadow: 0 8px 40px rgb(59 33 11 / .18); }
  .legal { padding: 40px 48px 8px; }
  .legal__titulo { font-size: 3rem; }
}

/* Contraste forzado de Windows: los controles conservan su orilla (el color de fondo desaparece) */
@media (forced-colors: active) {
  .boton,
  .boton-icono,
  .filtro,
  .chip,
  .buscador,
  .contador__boton,
  .pie__red { border: 2px solid ButtonText; }
  .filtro--activo { border-color: Highlight; }
}

/* Movimiento reducido: nada se anima, los estados cambian al instante */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .categoria__titulo .icono,
  .paso,
  .cinta__pista,
  .pie__marca { animation: none; }
  /* La foto vive en su tarjeta: el hero no guarda su lugar */
  .hero__ancla { display: none; }
  .hero__escena { min-height: 0; }
  .hero__sub { margin-top: 20px; }

  details.legal > summary::after { transition: none; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
