/* ════════════════════════════════════════════════════════════════════
   Pipe's BURGUESAS — menú del cliente
   Minimalista y siempre claro: fondo gris tipo hoja, tarjetas blancas
   que resaltan encima, bordes muy redondeados, azul marino para el texto
   y coral solo en lo que se toca para pedir.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --fondo: #EEEEEB;          /* gris tipo hoja */
  --vidrio: rgba(238, 238, 235, .88);
  --pista: #E1E1DC;          /* rieles y fondos hundidos sobre el gris */
  --borde-tarjeta: rgba(20, 27, 45, .06);
  --superficie: #FFFFFF;
  --superficie-2: #F3F4F6;
  --superficie-3: #ECEDF1;
  --tinta: #141B2D;          /* azul marino casi negro: títulos y precios */
  --tinta-2: #4B5266;        /* texto secundario */
  --tinta-3: #5F6578;        /* texto terciario (contraste AA sobre blanco y gris) */
  --marino: #1B2A4E;
  --marino-suave: #EEF1F7;
  --coral: #FF4D42;          /* botones "+" y contador */
  --coral-texto: #DA3126;    /* coral con texto blanco encima (contraste AA) */
  --coral-suave: #FFF0EE;
  --verde: #12924A;
  --verde-suave: #E8F6EE;
  --ambar: #9A5B00;
  --ambar-suave: #FFF5E3;

  --fuente: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Colores y letra del logo (sacados del logo oficial, no se cambian) */
  --logo-azul: #14368D;
  --logo-rojo: #D8202A;
  --fuente-logo: 'PT Sans', 'Myriad Pro', 'Segoe UI', system-ui, sans-serif;
  --fuente-logo-angosta: 'PT Sans Narrow', 'Myriad Pro Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --radio: 20px;
  --radio-m: 16px;
  --radio-s: 12px;
  --sombra-1: 0 1px 2px rgba(20, 27, 45, .04), 0 6px 20px -10px rgba(20, 27, 45, .12);
  --sombra-2: 0 2px 6px rgba(20, 27, 45, .04), 0 18px 40px -18px rgba(20, 27, 45, .22);
  --sombra-coral: 0 6px 16px -6px rgba(255, 77, 66, .55);
  --sombra-flotante: 0 20px 40px -16px rgba(20, 27, 45, .45);
  --abajo-seguro: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-rebote: cubic-bezier(.34, 1.5, .64, 1);
  color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation; /* sin zoom con doble toque */
  background: var(--fondo);
}
html.con-hoja { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: var(--marino); text-underline-offset: 3px; }
:focus-visible { outline: 2.5px solid var(--marino); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  padding: 10px 14px; border-radius: var(--radio-s);
  background: var(--tinta); color: #FFF;
}
.saltar:focus { top: 12px; }

/* ── Logo oficial (imagen: la letra no se toca) ───────────────────── */
.marca { display: block; flex: none; margin: 0; text-decoration: none; border-radius: 8px; }
.marca__logo { display: block; width: auto; height: 42px; }

/* ── Encabezado ────────────────────────────────────────────────────── */
.tope {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: max(10px, env(safe-area-inset-top)) max(20px, calc((100% - 1080px) / 2)) 10px;
  background: var(--vidrio);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  transition: box-shadow .3s var(--ease);
}
/* Cuando el logo grande ya subió, se marca el borde de la barra */
.logo-arriba .tope { box-shadow: 0 1px 0 var(--borde-tarjeta); }
/* El logo chico aparece solo cuando el grande llega a su lugar */
.logo-animado .tope .marca { opacity: 0; pointer-events: none; }
.logo-animado.logo-arriba .tope .marca { opacity: 1; pointer-events: auto; }
.logo-animado.logo-arriba .portada__logo { visibility: hidden; }
.estado {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--tinta-2);
}
.estado::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-3); }
.estado[data-estado="abierto"]::before { background: #22B35E; box-shadow: 0 0 0 4px rgba(34, 179, 94, .15); }
.estado[data-estado="cerrado"] { color: var(--coral-texto); }
.estado[data-estado="cerrado"]::before { background: var(--coral); }
@media (max-width: 359px) { .estado__mas { display: none; } }
.tope__tel {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  color: var(--tinta);
  transition: transform .2s var(--ease);
}
.tope__tel:active { transform: scale(.92); }
.tope__tel svg { width: 18px; height: 18px; fill: currentColor; }

.demo {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 10px 16px;
  border-radius: var(--radio-m);
  font-size: 13.5px;
  background: var(--ambar-suave);
  color: var(--ambar);
}
@media (max-width: 1119px) { .demo { margin: 8px 20px 0; } }

/* ── Portada ───────────────────────────────────────────────────────── */
.portada {
  display: grid;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 6px;
}
/* Logo grande centrado con el lema; al bajar, el logo viaja a la barra de arriba */
.portada { text-align: center; justify-items: center; }
.portada__marca { display: grid; justify-items: center; gap: 14px; margin: 6px 0 4px; font-weight: 400; }
.portada__logo-caja { display: block; width: min(68vw, 300px); aspect-ratio: 720 / 417; }
.portada__logo { display: block; width: 100%; height: auto; transform-origin: center center; will-change: transform; position: relative; z-index: 35; }
/* Mientras viaja a la barra va fijo en la pantalla (la caja guarda su lugar) */
.portada__logo--vuela { position: fixed; top: 0; left: 0; max-width: none; margin: 0; }
.portada__lema {
  font-family: var(--fuente-logo-angosta);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--tinta-3);
  padding-left: .34em; /* compensa el espaciado de la última letra para que quede centrado */
}
/* Ubicación + frase: dos piezas centradas, líneas parejas (sin palabras sueltas) */
.portada__texto { display: grid; justify-items: center; gap: 7px; margin: 6px auto 2px; color: var(--tinta-2); }
.portada__lugar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--tinta);
}
.portada__lugar svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--logo-rojo);
  stroke-width: 2;
  stroke-linejoin: round;
}
.portada__frase {
  display: block;
  font-size: 15.5px;
  line-height: 1.5;
}
.portada__frase > span { display: block; } /* siempre dos líneas parejas */
/* "en vivo" con un punto verde que late despacio, como una transmisión */
.vivo { white-space: nowrap; color: var(--tinta); font-weight: 600; }
.vivo::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 .36em 0 .08em;
  border-radius: 50%;
  vertical-align: .08em;
  background: #22B35E;
  animation: latido-vivo 2.6s ease-out infinite;
}
@keyframes latido-vivo {
  0% { box-shadow: 0 0 0 0 rgba(34, 179, 94, .42); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(34, 179, 94, 0); }
}
@media (prefers-reduced-motion: reduce) { .vivo::before { animation: none; } }
.datos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.datos li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  font-size: 13px;
  font-weight: 600;
  color: var(--tinta-2);
}
.portada__nota { min-height: 1.45em; margin: 0; font-size: 13.5px; color: var(--tinta-2); }
.portada__nota strong { color: var(--tinta); }

/* ── Selector deslizante de modalidad ──────────────────────────────── */
.modos {
  --i: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
  padding: 4px;
  border-radius: 18px;
  background: var(--pista);
}
.modos::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 14px;
  background: var(--superficie);
  box-shadow: 0 1px 2px rgba(20, 27, 45, .06), 0 6px 14px -6px rgba(20, 27, 45, .18);
  transform: translateX(calc(100% * var(--i)));
  transition: transform .35s var(--ease);
}
.modo {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 42px;
  padding: 6px 4px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--tinta-2);
  font-weight: 650;
  font-size: 14.5px;
  line-height: 1.15;
  transition: color .25s var(--ease);
}
.modo[aria-checked="true"] { color: var(--tinta); }
.modo:disabled { opacity: .4; cursor: not-allowed; }
.formulario .modos { max-width: none; }

/* ── Seguimiento del pedido activo ─────────────────────────────────── */
.seguimiento {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 40px);
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--radio);
  background: var(--tinta);
  color: #FFF;
  font-weight: 650;
  text-align: left;
  box-shadow: var(--sombra-2);
}
.seguimiento__punto { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #3BE08A; animation: respirar 1.6s ease-in-out infinite; }
.seguimiento__ver { margin-left: auto; font-size: 13.5px; opacity: .75; }

/* ── Búsqueda y categorías ─────────────────────────────────────────── */
.busqueda { max-width: 1120px; margin: 0 auto; padding: 18px 20px 2px; }
.buscar { position: relative; display: block; }
.buscar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--tinta-3);
  stroke-width: 2.2;
  stroke-linecap: round;
  pointer-events: none;
}
.buscar input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px 12px 46px;
  border: 0;
  border-radius: var(--radio-m);
  background: var(--superficie);
  box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1);
  font-size: 16px; /* 16 px o más: el iPhone no hace zoom al escribir */
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow .25s var(--ease);
}
.buscar input:focus { outline: none; box-shadow: var(--sombra-1), 0 0 0 2px var(--marino); }
.buscar input::placeholder { color: var(--tinta-3); }

.categorias {
  position: sticky;
  top: var(--alto-tope, 62px);
  z-index: 10;
  background: var(--vidrio);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}
.categorias__riel {
  display: flex;
  gap: 6px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  /* Que "Combos" (y el último) nunca queden pegados a la orilla al acomodarse */
  scroll-padding-inline: 20px;
}
.categorias__riel::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--borde-tarjeta);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--tinta-2);
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip[aria-current="true"] { background: var(--tinta); border-color: var(--tinta); color: #FFF; }

/* ── Secciones y tarjetas ──────────────────────────────────────────── */
.secciones { max-width: 1120px; margin: 0 auto; padding: 0 20px 150px; }
.secciones:focus { outline: none; }
.seccion { padding-top: 24px; scroll-margin-top: calc(var(--alto-tope, 62px) + 58px); }
.seccion__cabeza { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.seccion__titulo { margin: 0; font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.seccion__nota { margin: 2px 0 0; font-size: 13.5px; color: var(--tinta-3); }

.platos { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }

.plato {
  position: relative;
  border-radius: var(--radio);
  background: var(--superficie);
  box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1);
  transition: box-shadow .35s var(--ease);
  transform-origin: center;
}
.plato--abierto { box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-2); }
.plato__fila {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
}
.plato__nombre { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.plato__abrir { all: unset; cursor: pointer; }
.plato__abrir::after { content: ''; position: absolute; inset: 0; z-index: 0; border-radius: var(--radio); }
.plato__abrir:focus-visible::after { outline: 2.5px solid var(--marino); outline-offset: -2px; }
.plato__desc {
  display: -webkit-box;
  margin: 3px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tinta-3);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plato__pie { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.plato__precio { margin: 0; font-weight: 750; font-size: 15.5px; color: var(--tinta); font-variant-numeric: tabular-nums; }
.plato__opciones { padding: 2px 9px; border-radius: 999px; background: var(--marino-suave); color: var(--marino); font-size: 12px; font-weight: 650; }
.plato__lado { position: relative; z-index: 1; display: grid; justify-items: end; pointer-events: none; }
.plato__lado > * { pointer-events: auto; }
/* Las fotos vienen encuadradas en 4:3 (producto completo y centrado): no se recortan */
.plato__foto {
  width: 116px;
  height: 87px;
  border-radius: var(--radio-m);
  background: var(--superficie-2);
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transition: transform .45s var(--ease), filter .45s var(--ease);
}
@media (max-width: 374px) { .plato__foto { width: 100px; height: 75px; } }
.plato:active .plato__foto { transform: scale(.96); filter: brightness(.97); }
@media (hover: hover) { .plato:hover .plato__foto { transform: scale(1.03); } }
.plato--con-foto .plato__accion { position: absolute; right: 6px; bottom: 6px; }
.plato--agotado .plato__texto, .plato--agotado .plato__foto { opacity: .4; }
.plato__agotado {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--superficie-2);
  color: var(--tinta-3);
  font-size: 12.5px;
  font-weight: 700;
}

/* Botón "+" y contador */
.mas {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #FFF;
  box-shadow: var(--sombra-coral), 0 0 0 3px var(--superficie);
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.mas:active { transform: scale(.88); }
.mas svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.mas__cuenta {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tinta);
  color: #FFF;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--superficie);
  pointer-events: none;
}

/* ── Panel de personalización (dentro de la tarjeta) ───────────────── */
.plato__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-8px);
  transition: grid-template-rows .42s var(--ease), opacity .32s var(--ease), transform .42s var(--ease);
}
.plato--abierto .plato__panel { grid-template-rows: 1fr; opacity: 1; transform: none; }
.plato__panel > .pp { min-height: 0; overflow: hidden; }
.pp__dentro { margin: 0 16px; padding: 2px 0 16px; border-top: 1px solid var(--superficie-3); }
.pp__foto { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 3; margin: 14px 0 0; border-radius: var(--radio-m); background: var(--superficie-2); object-fit: cover; object-position: center; }

.pp__grupo { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.pp__titulo { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; padding: 0; font-weight: 700; font-size: 14px; color: var(--tinta); }
.pp__req { padding: 1px 8px; border-radius: 999px; background: var(--superficie-2); color: var(--tinta-3); font-size: 11.5px; font-weight: 650; }
.pp__grupo--falta .pp__req { background: var(--coral-texto); color: #FFF; }

.segmento { display: flex; flex-wrap: wrap; gap: 6px; }
.segmento label { position: relative; cursor: pointer; }
.segmento input { position: absolute; opacity: 0; pointer-events: none; }
.segmento span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--superficie-3);
  border-radius: 999px;
  background: var(--superficie);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tinta-2);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.segmento small { font-size: 12px; font-weight: 600; opacity: .75; }
.segmento input:checked + span { background: var(--tinta); border-color: var(--tinta); color: #FFF; }
.segmento input:focus-visible + span { outline: 2.5px solid var(--marino); outline-offset: 2px; }

.ingredientes { margin: 0; padding: 0; list-style: none; }
.ing { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 4px 0; }
.ing + .ing { border-top: 1px solid var(--superficie-2); }
.ing__texto { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.ing__nombre { font-weight: 600; font-size: 14.5px; }
.ing__estado { font-size: 12px; font-weight: 600; color: var(--tinta-3); transition: color .2s var(--ease); }
.ing[data-v="-1"] .ing__nombre { color: var(--tinta-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ing[data-v="-1"] .ing__estado { color: var(--coral-texto); }
.ing[data-v="1"] .ing__estado { color: var(--verde); }
.mini-paso { display: flex; gap: 6px; }
.mini-paso button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--superficie-3);
  border-radius: 50%;
  background: var(--superficie);
  color: var(--tinta);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease), opacity .2s;
}
.mini-paso button:active { transform: scale(.88); }
.mini-paso button:disabled { opacity: .3; cursor: default; }
.mini-paso svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.ing[data-v="-1"] [data-cambio="-1"] { background: var(--coral-suave); border-color: var(--coral-suave); color: var(--coral-texto); opacity: 1; }
.ing[data-v="1"] [data-cambio="1"] { background: var(--verde-suave); border-color: var(--verde-suave); color: var(--verde); opacity: 1; }

.pp__nota {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radio-s);
  background: var(--superficie-2);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}
.pp__nota:focus { outline: none; box-shadow: 0 0 0 2px var(--marino); background: var(--superficie); }
.pp__nota::placeholder { color: var(--tinta-3); }
.pp__aviso { margin: 10px 0 0; color: var(--coral-texto); font-weight: 650; font-size: 13.5px; }
.pp__aviso:empty { display: none; }
.pp__pie { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pp__agregar { flex: 1; }

/* Selector de cantidad */
.paso {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  min-width: 118px;
  border-radius: 999px;
  background: var(--superficie-2);
}
.paso button {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--tinta);
  transition: transform .2s var(--ease), opacity .2s;
}
.paso button:active { transform: scale(.85); }
.paso button:disabled { opacity: .3; cursor: default; }
.paso svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.paso__n { min-width: 22px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Sin resultados ────────────────────────────────────────────────── */
.sin-resultados { max-width: 560px; margin: 40px auto; padding: 0 20px 120px; text-align: center; color: var(--tinta-3); }

/* ── Barra del carrito ─────────────────────────────────────────────── */
.barra-carrito {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 16px calc(14px + var(--abajo-seguro));
  pointer-events: none;
}
.barra-carrito__boton {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 20px 8px 8px;
  border: 0;
  border-radius: 22px;
  background: var(--tinta);
  color: #FFF;
  box-shadow: var(--sombra-flotante);
  font-weight: 700;
  font-size: 16px;
  will-change: transform;
  transition: transform .2s var(--ease);
}
.barra-carrito__boton:active { transform: scale(.98); }
.sin-gsap .barra-carrito:not([hidden]) .barra-carrito__boton { animation: subir-barra .5s var(--ease); }
.barra-carrito__cuenta {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--coral-texto);
  color: #FFF;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  will-change: transform;
}
.barra-carrito__total { margin-left: auto; padding: 2px 6px; border-radius: 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* Respaldo sin GSAP */
.rebote { animation: rebote .5s var(--ease-rebote); }
.destello { animation: destello .7s var(--ease); }

/* ── Hamburguesa que vuela al carrito ──────────────────────────────── */
/* El contenedor viaja en X con un easing suave y el ícono en Y con dos
   tramos (sube y cae): juntos dibujan una curva. --dx, --dy y --arco
   los calcula el JavaScript desde el botón hasta el contador. */
.vuelo {
  position: fixed;
  z-index: 90;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
  will-change: transform;
  animation: vuelo-x var(--duracion, .78s) cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.vuelo__icono {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--superficie);
  box-shadow: 0 10px 24px -8px rgba(20, 27, 45, .4);
  will-change: transform, opacity;
  animation: vuelo-y var(--duracion, .78s) linear forwards;
}
.vuelo__icono svg { width: 30px; height: 30px; }
@keyframes vuelo-x {
  from { transform: translateX(0); }
  to { transform: translateX(var(--dx)); }
}
@keyframes vuelo-y {
  0% { transform: translateY(0) scale(.5) rotate(0deg); opacity: 0; animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  12% { opacity: 1; }
  32% { transform: translateY(var(--arco)) scale(1.12) rotate(-14deg); animation-timing-function: cubic-bezier(.55, 0, .85, .45); }
  100% { transform: translateY(var(--dy)) scale(.42) rotate(10deg); opacity: .9; }
}

/* ── Hojas ─────────────────────────────────────────────────────────── */
.hoja {
  width: 100%;
  max-width: 560px;
  max-height: 94vh; max-height: 94dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--fondo);
  color: var(--tinta);
  box-shadow: 0 -20px 50px -24px rgba(20, 27, 45, .35);
  overscroll-behavior: contain;
}
.hoja--alta { height: 94vh; height: 94dvh; }
.hoja[open] { animation: subir-hoja .42s var(--ease); }
.hoja.saliendo { animation: bajar-hoja .26s var(--ease) forwards; }
.hoja::backdrop { background: rgba(20, 27, 45, .38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: aparecer .3s var(--ease); }
.hoja.saliendo::backdrop { animation: desaparecer .26s var(--ease) forwards; }
.hoja__cuerpo { position: relative; padding: 0 18px calc(22px + var(--abajo-seguro)); }
.hoja__agarre { display: block; width: 40px; height: 5px; margin: 8px auto 4px; border-radius: 3px; background: var(--superficie-3); }
.hoja__cabeza {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -18px;
  padding: 8px 18px 12px;
  background: var(--fondo);
  transition: box-shadow .3s var(--ease);
}
.hoja--desplazada .hoja__cabeza { box-shadow: 0 1px 0 var(--superficie-3); }
.hoja__cabeza h2 { margin: 0; font-weight: 800; font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.hoja__cerrar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--superficie-3);
  color: var(--tinta);
  transition: transform .2s var(--ease);
}
.hoja__cerrar:active { transform: scale(.9); }
.hoja__cerrar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

@media (min-width: 720px) {
  .hoja { margin: auto; border-radius: 28px; max-height: 88vh; max-height: 88dvh; }
  .hoja--alta { height: auto; }
  .hoja__agarre { visibility: hidden; }
  .hoja[open] { animation: aparecer-hoja .32s var(--ease); }
  .hoja.saliendo { animation: desaparecer .2s var(--ease) forwards; }
}

/* ── Campos ────────────────────────────────────────────────────────── */
.campo { position: relative; display: grid; gap: 6px; margin-top: 14px; }
.campo__etiqueta { font-weight: 650; font-size: 14px; color: var(--tinta-2); }
.campo__opcional { font-weight: 500; font-size: 12.5px; color: var(--tinta-3); }
.campo input, .campo select, .campo textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radio-m);
  background: var(--superficie);
  box-shadow: var(--sombra-1);
  font-size: 16px; /* evita el zoom en iPhone */
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow .25s var(--ease);
}
.campo textarea { min-height: 76px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; box-shadow: var(--sombra-1), 0 0 0 2px var(--marino); }
.campo input::placeholder, .campo textarea::placeholder { color: var(--tinta-3); }
.campo--error input, .campo--error select, .campo--error textarea { box-shadow: 0 0 0 2px var(--coral); }
.campo--ok input { padding-right: 42px; }
.campo--ok::after {
  content: '';
  position: absolute;
  right: 14px;
  bottom: 16px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  animation: pop .3s var(--ease-rebote);
}
.campo__error { margin: 0; font-size: 13px; font-weight: 650; color: var(--coral-texto); }

/* ── Botones ───────────────────────────────────────────────────────── */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radio-m);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .25s var(--ease), opacity .2s, box-shadow .25s var(--ease);
}
.boton:active { transform: scale(.97); }
.boton:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.boton--coral { justify-content: space-between; background: var(--coral-texto); color: #FFF; box-shadow: var(--sombra-coral); }
.boton--coral:hover:not(:disabled) { background: #CF2D24; }
.boton--claro { background: var(--superficie); color: var(--tinta); box-shadow: var(--sombra-1); }
.boton--grande { width: 100%; min-height: 58px; font-size: 17px; border-radius: 18px; }
.boton--ancho { width: 100%; }
.boton--chico { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: var(--radio-s); }

/* ── Carrito ───────────────────────────────────────────────────────── */
.grupo { margin: 0; padding: 0; list-style: none; border-radius: var(--radio); background: var(--superficie); box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1); overflow: hidden; }
.linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; }
.linea + .linea { border-top: 1px solid var(--superficie-2); }
/* Deslizar para eliminar: el frente se corre y deja ver el botón rojo */
.lineas .linea { position: relative; display: block; padding: 0; overflow: hidden; transition: height .22s var(--ease), opacity .22s var(--ease); }
.linea__frente {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: var(--superficie);
  touch-action: pan-y;
  transition: transform .28s var(--ease);
  will-change: transform;
}
.linea--arrastrando .linea__frente { transition: none; }
.linea__borrar {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  padding: 0 22px;
  border: 0;
  background: #E5352B;
  color: #FFF;
  font-weight: 750;
  font-size: 15px;
}
.linea__borrar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.linea--saliendo { opacity: 0; }
.cr-pista { margin: 8px 4px 0; font-size: 12.5px; color: var(--tinta-3); text-align: center; }
.cr-pista[hidden] { display: none; }
.linea__nombre { margin: 0; font-weight: 650; line-height: 1.25; }
.linea__extra { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--tinta-3); }
.linea__precio { margin: 4px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.linea .paso { height: 38px; min-width: 104px; }
.linea .paso button { width: 36px; height: 38px; }
.linea--agotada .linea__nombre { text-decoration: line-through; }
.linea__agotado { color: var(--coral-texto); font-weight: 700; }

.vacio { display: grid; justify-items: center; gap: 4px; padding: 40px 12px; text-align: center; color: var(--tinta-3); }
.vacio__titulo { margin: 0; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--tinta); }
.vacio p { margin: 0 0 10px; }

.bloque { margin: 26px 0 0; padding: 0; border: 0; min-width: 0; }
.bloque__titulo { padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.2; }

.ubicacion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radio-m);
  background: var(--marino-suave);
  transition: background-color .3s var(--ease);
}
.ubicacion__icono { width: 20px; height: 20px; margin-top: 1px; fill: var(--marino); }
.ubicacion__texto { margin: 0; font-size: 14px; color: var(--tinta); }
.ubicacion__texto strong { font-weight: 800; }
.ubicacion .boton { grid-column: 2; justify-self: start; }
.ubicacion[data-estado="buscando"] .ubicacion__icono { animation: latir 1s var(--ease) infinite; }
.ubicacion[data-estado="ok"] { background: var(--verde-suave); }
.ubicacion[data-estado="ok"] .ubicacion__icono { fill: var(--verde); }
.ubicacion[data-estado="ok"] .ubicacion__texto { color: #0B6B35; }
.ubicacion[data-estado="ok"] #btn-ubicacion { display: none; }
.ubicacion[data-estado="lejos"], .ubicacion[data-estado="error"] { background: var(--coral-suave); }
.ubicacion[data-estado="lejos"] .ubicacion__icono, .ubicacion[data-estado="error"] .ubicacion__icono { fill: var(--coral-texto); }
.ubicacion[data-estado="lejos"] .ubicacion__texto, .ubicacion[data-estado="error"] .ubicacion__texto { color: #B42318; font-weight: 600; }
.campo--error.ubicacion, .ubicacion.campo--error { box-shadow: 0 0 0 2px var(--coral); }

.pagos { display: grid; border-radius: var(--radio); background: var(--superficie); box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1); overflow: hidden; }
.pago { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
.pago + .pago { border-top: 1px solid var(--superficie-2); }
.pago input { position: absolute; opacity: 0; pointer-events: none; }
.pago__marca { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--superficie-3); transition: box-shadow .25s var(--ease); }
.pago input:checked ~ .pago__marca { box-shadow: inset 0 0 0 7px var(--tinta); }
.pago input:focus-visible ~ .pago__marca { outline: 2.5px solid var(--marino); outline-offset: 2px; }
.pago__titulo { font-weight: 700; }
.pago__detalle { font-size: 13px; color: var(--tinta-3); line-height: 1.3; }

.sinpe {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radio);
  background: var(--superficie);
  box-shadow: var(--sombra-1), inset 0 0 0 1.5px var(--marino);
  text-align: left;
}
.sinpe__titulo { margin: 0 0 6px; font-weight: 800; font-size: 16px; color: var(--marino); }
.sinpe__fila { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 5px 0; }
.sinpe__fila span { color: var(--tinta-3); font-size: 14px; }
.sinpe__fila strong { font-weight: 800; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.sinpe__nota { margin: 10px 0 0; font-size: 13.5px; color: var(--tinta-2); }
.sinpe__nota b { color: var(--tinta); }
.sinpe__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.totales { margin: 26px 0 0; padding: 14px 16px; border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra-1); }
.totales div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.totales dt { color: var(--tinta-3); }
.totales dt span { font-size: 13px; }
.totales dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.totales__total { margin-top: 6px; padding-top: 10px !important; border-top: 1px solid var(--superficie-2); }
.totales__total dt, .totales__total dd { color: var(--tinta); font-weight: 800; font-size: 19px; }

.formulario__error { margin: 14px 0 0; color: var(--coral-texto); font-weight: 650; }
.formulario__error:empty { display: none; }
.formulario .boton--grande { margin-top: 16px; }
.formulario__nota { margin: 10px 0 0; text-align: center; font-size: 13.5px; color: var(--tinta-3); }
.formulario__nota:empty { display: none; }

/* ── Pantalla de pedido enviado ────────────────────────────────────── */
.exito { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--fondo); animation: aparecer .3s var(--ease); }
.exito__marco { max-width: 520px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px calc(28px + var(--abajo-seguro)); text-align: center; }
.exito__carga, .exito__listo, .exito__error { display: grid; justify-items: center; gap: 14px; }

.esqueleto { display: block; border-radius: var(--radio-m); background: linear-gradient(90deg, var(--superficie-2) 25%, var(--superficie) 45%, var(--superficie-2) 65%) 0 0 / 300% 100%; animation: brillo 1.3s linear infinite; }
.esqueleto--circulo { width: 68px; height: 68px; margin-top: 20px; border-radius: 50%; }
.esqueleto--titulo { width: 70%; height: 34px; }
.esqueleto--numero { width: 100%; height: 140px; border-radius: 24px; }
.esqueleto--tarjeta { width: 100%; height: 170px; border-radius: 24px; }
.esqueleto--linea { width: 100%; height: 14px; }
.esqueleto--corta { width: 60%; }
.exito__cargando { margin: 4px 0 0; font-weight: 600; color: var(--tinta-3); }

.exito__check { width: 68px; height: 68px; margin-top: 20px; }
.exito__check circle { fill: var(--verde); transform-origin: center; animation: pop .5s var(--ease-rebote); }
.exito__check path { fill: none; stroke: #FFF; stroke-width: 42; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 270; stroke-dashoffset: 270; animation: trazo .4s .25s var(--ease) forwards; }
/* Escena animada (si hay WebGL y no se pidió menos movimiento): fondo blanco,
   hamburguesa al centro → líquido → check verde que sube a su lugar */
.escena { position: fixed; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; background: #FFF; }
.escena__flota { width: 300px; height: 300px; }
.escena__lienzo { display: block; width: 300px; height: 300px; opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.escena--lista .escena__lienzo { opacity: 1; }
.escena__texto { margin: -34px 0 0; font-weight: 700; font-size: 16px; color: var(--tinta-3); transition: opacity .35s var(--ease); }
.escena--transformando .escena__texto { opacity: 0; }
/* Mientras la escena está, el check de la página espera quieto (sin su propia animación) */
.exito--sello .exito__check { visibility: hidden; }
.exito--sello .exito__check circle, .exito--sello .exito__check path { animation: none; stroke-dashoffset: 0; }
.exito--entrando #exito-listo > :not(.exito__check) { opacity: 0; }
.exito__titulo { margin: 0; font-weight: 800; font-size: 32px; line-height: 1.1; letter-spacing: -.035em; }
.exito__numero-caja { width: 100%; padding: 18px 16px 12px; border-radius: 24px; background: var(--superficie); box-shadow: var(--sombra-2); }
.exito__etiqueta { margin: 0; font-weight: 600; font-size: 14px; color: var(--tinta-3); }
.exito__numero { margin: 0; font-weight: 800; font-size: 96px; line-height: 1.05; letter-spacing: -.05em; color: var(--coral-texto); font-variant-numeric: tabular-nums; }
.exito__mensaje { margin: 0; max-width: 34ch; font-size: 16px; font-weight: 600; color: var(--tinta-2); }
.exito__mensaje[data-tono="listo"] { color: var(--verde); }
.exito__mensaje[data-tono="cancelado"] { color: var(--coral-texto); }
.exito__detalle { width: 100%; text-align: left; }
.exito__detalle summary { padding: 6px 4px; cursor: pointer; font-weight: 700; color: var(--marino); }
.exito__detalle .lineas { border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra-1); }
.exito__total { margin: 10px 4px 0; text-align: right; font-weight: 800; font-size: 17px; }
.exito__acciones { display: grid; gap: 10px; width: 100%; }
.exito .sinpe { width: 100%; }

.linea-tiempo { width: 100%; margin: 0; padding: 4px 16px; list-style: none; text-align: left; border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra-1); }
.linea-tiempo li { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; color: var(--tinta-3); }
.linea-tiempo li:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: calc(50% + 14px); width: 2px; height: calc(100% - 28px); border-radius: 2px; background: var(--superficie-3); transition: background-color .4s var(--ease); }
.lt__punto { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--superficie-3); background: var(--superficie); transition: background-color .4s var(--ease), box-shadow .4s var(--ease); }
.lt__nombre { font-weight: 650; }
.lt__hora { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.linea-tiempo li.hecho { color: var(--tinta); }
.linea-tiempo li.hecho::after { background: var(--verde); }
.linea-tiempo li.hecho .lt__punto { background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: none; }
.linea-tiempo li.actual { color: var(--tinta); }
.linea-tiempo li.actual .lt__punto { background: var(--coral); box-shadow: none; animation: respirar-coral 1.6s ease-in-out infinite; }
.linea-tiempo[data-final="cancelado"] li { color: var(--tinta-3); }
.linea-tiempo[data-final="cancelado"] .lt__punto { background: var(--superficie); box-shadow: inset 0 0 0 2px var(--superficie-3); animation: none; }

/* ── Pie (sin recuadro: una línea de datos y la letra chica) ─────── */
.pie { display: grid; justify-items: center; gap: 10px; padding: 36px 20px calc(130px + var(--abajo-seguro)); text-align: center; }
.pie p { margin: 0; }
.pie__linea { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-size: 13.5px; font-weight: 600; color: var(--tinta-2); }
.pie__linea a { color: var(--marino); text-decoration: none; }
.pie__linea a:hover { text-decoration: underline; }
.pie__seo { max-width: 520px; font-size: 12.5px; line-height: 1.55; color: var(--tinta-3); }
.pie__legal { font-size: 12.5px; color: var(--tinta-3); }

/* ── Aviso flotante ────────────────────────────────────────────────── */
/* Una sola línea, centrada, en forma de pastilla. "Deshacer" es solo texto. */
.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--abajo-seguro));
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: max-content;
  max-width: min(calc(100vw - 32px), 420px);
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(20, 27, 45, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #FFF;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 12px 30px -12px rgba(20, 27, 45, .5);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.aviso > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.aviso--accion { padding: 12px 8px 12px 20px; }
.aviso--accion.visible { pointer-events: auto; }
.aviso__boton {
  flex: none;
  min-height: 0;
  padding: 2px 12px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .18);
  background: none;
  color: #FF8F87;
  font-weight: 750;
  font-size: 14.5px;
}
/* Dentro de la hoja del carrito no hay barra abajo: el aviso baja */
dialog .aviso { bottom: calc(22px + var(--abajo-seguro)); }

/* ── Estructura: celular (una columna) ─────────────────────────────── */
/* En el HTML las partes vienen agrupadas para la computadora; en el
   celular los grupos "desaparecen" y se ordenan en una sola columna. */
.principal { display: flex; flex-direction: column; }
.centro, .lado { display: contents; }
.portada { order: 1; }
.seguimiento { order: 2; }
.busqueda { order: 3; }
.categorias { order: 4; }
.secciones { order: 5; }
.sin-resultados { order: 6; }
.principal .portada, .principal .busqueda, .principal .secciones { width: 100%; }
.qr-lado, .resumen-pc { display: none; }

/* ── Tablet ────────────────────────────────────────────────────────── */
@media (min-width: 760px) {
  .platos { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
  .portada { padding-top: 34px; }
}

/* ── Computadora: categorías | menú | pedido ───────────────────────── */
@media (min-width: 1100px) {
  .tope { min-height: 72px; padding: 14px max(32px, calc((100% - 1416px) / 2)) 14px; }
  .marca__logo { height: 44px; }
  .portada__logo-caja { width: 330px; }
  .demo { max-width: 1416px; margin: 8px auto 0; }
  .principal {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 340px;
    gap: 0 44px;
    align-items: start;
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 32px;
  }
  .centro { display: block; grid-column: 2; grid-row: 1; min-width: 0; }
  .lado {
    display: flex;
    flex-direction: column;
    gap: 22px;
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: var(--alto-tope, 72px);
    max-height: calc(100vh - var(--alto-tope, 72px));
    padding: 30px 0 24px;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .lado::-webkit-scrollbar { display: none; }
  .resumen-pc { display: block; grid-column: 3; grid-row: 1; position: sticky; top: var(--alto-tope, 72px); padding: 30px 0 24px; }
  .pie { padding-top: 24px; padding-bottom: 56px; }
  .barra-carrito { display: none !important; }

  .portada { max-width: none; padding: 30px 0 4px; gap: 14px; }
  .portada__frase { font-size: 16.5px; }
  .seguimiento { width: 100%; margin-top: 18px; }
  .busqueda { max-width: none; padding: 26px 0 0; }
  .secciones { max-width: none; padding: 0 0 40px; }
  .seccion { padding-top: 34px; scroll-margin-top: calc(var(--alto-tope, 72px) + 20px); }
  .seccion__titulo { font-size: 26px; }

  /* Categorías en lista vertical */
  .categorias { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .categorias::before {
    content: 'Menú';
    display: block;
    margin: 0 14px 10px;
    font-family: var(--fuente-logo-angosta);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--tinta-3);
  }
  .categorias__riel { flex-direction: column; gap: 2px; max-width: none; padding: 0; overflow: visible; scroll-snap-type: none; }
  .chip {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--tinta-2);
    font-size: 15px;
    text-align: left;
  }
  .chip:hover { background: rgba(20, 27, 45, .05); color: var(--tinta); }
  .chip[aria-current="true"] { background: var(--superficie); border: 0; color: var(--tinta); font-weight: 750; box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1); }

  .qr-lado {
    order: 10;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: var(--superficie);
    box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1);
    color: var(--tinta);
    text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  }
  .qr-lado:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-2); }
  .qr-lado img { width: 64px; height: 64px; border-radius: 8px; image-rendering: pixelated; }
  .qr-lado span { display: grid; gap: 2px; font-size: 12.5px; line-height: 1.35; color: var(--tinta-3); }
  .qr-lado strong { font-size: 14px; color: var(--tinta); }

  /* Tarjetas con la foto arriba */
  .platos { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 18px; }
  .plato--con-foto .plato__fila { grid-template-columns: 1fr; align-items: start; gap: 14px; min-height: 0; padding: 10px 10px 18px; }
  .plato--con-foto .plato__lado { order: -1; justify-items: stretch; }
  .plato--con-foto .plato__foto { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 16px; }
  .plato--con-foto .plato__texto { padding: 0 8px; }
  .plato--con-foto .plato__accion { right: 10px; bottom: 10px; }
  .plato--con-foto .mas { width: 44px; height: 44px; }
  .plato__desc { -webkit-line-clamp: 2; min-height: 2.9em; }
  .pp__foto { display: none; }
  @media (hover: hover) {
    .plato { transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
    .plato:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-2); }
    .plato--abierto:hover { transform: none; }
  }

}
@media (min-width: 1440px) {
  .principal { grid-template-columns: 240px minmax(0, 1fr) 360px; gap: 0 56px; }
}

/* ── Pedido a la vista (computadora) ───────────────────────────────── */
.rp { display: grid; gap: 14px; padding: 22px 20px 20px; border-radius: 26px; background: var(--superficie); box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-1); }
.rp__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp__cabeza h2 { margin: 0; font-weight: 800; font-size: 22px; letter-spacing: -.025em; }
.rp__cuenta { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; background: var(--superficie-2); color: var(--tinta-2); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; transition: background-color .3s var(--ease), color .3s var(--ease); }
.rp--lleno .rp__cuenta { background: var(--coral-texto); color: #FFF; }
.rp__modo { margin: -10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--tinta-3); }
.rp__lineas { display: grid; max-height: 48vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.rp__lineas:empty { display: none; }
.rp__linea { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 28px; gap: 8px; align-items: center; padding: 11px 0; border-top: 1px solid var(--superficie-2); }
.rp__cant { font-weight: 800; font-size: 14px; color: var(--coral-texto); font-variant-numeric: tabular-nums; }
.rp__nombre { font-weight: 650; font-size: 14.5px; line-height: 1.3; }
.rp__nombre small { display: block; font-weight: 500; font-size: 12.5px; color: var(--tinta-3); }
.rp__precio { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.rp__quitar { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--tinta-3); transition: background-color .2s var(--ease), color .2s var(--ease); }
.rp__quitar:hover { background: var(--coral-suave); color: var(--coral-texto); }
.rp__quitar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.rp__vacio { display: grid; justify-items: center; gap: 4px; padding: 26px 10px 18px; text-align: center; color: var(--tinta-3); font-size: 13.5px; }
.rp__vacio svg { width: 48px; height: 48px; margin-bottom: 6px; fill: none; stroke: var(--tinta-3); stroke-width: 2; stroke-linejoin: round; }
.rp__vacio p { margin: 0; font-weight: 750; font-size: 15px; color: var(--tinta); }
.rp__vacio b { color: var(--coral-texto); }
.rp__fila { display: flex; justify-content: space-between; margin: 0 0 12px; padding-top: 12px; border-top: 1px solid var(--superficie-2); font-weight: 650; color: var(--tinta-2); }
.rp__pie .boton--grande { margin: 0; }

/* ── Aviso con QR (computadora) ────────────────────────────────────── */
.hoja--qr { max-width: 780px; }
.qr { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; padding: 44px 48px 40px; }
.qr__cerrar { position: absolute; top: 18px; right: 18px; }
.qr__codigo { display: grid; justify-items: center; gap: 10px; padding: 18px 18px 14px; border-radius: 26px; background: #FFF; box-shadow: 0 0 0 1px var(--borde-tarjeta), var(--sombra-2); }
.qr__codigo img { width: 232px; height: 232px; image-rendering: pixelated; }
.qr__dominio { font-family: var(--fuente-logo-angosta); font-weight: 700; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--tinta-3); }
.qr__eyebrow { margin: 0; font-family: var(--fuente-logo-angosta); font-weight: 700; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--coral-texto); }
.qr__texto h2 { margin: 8px 0 12px; font-family: var(--fuente-logo); font-weight: 700; font-size: 40px; line-height: 1; letter-spacing: -.03em; color: var(--logo-azul); }
.qr__texto p { margin: 0; line-height: 1.55; color: var(--tinta-2); }
.qr__pasos { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; padding: 0; list-style: none; counter-reset: paso; }
.qr__pasos li { counter-increment: paso; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px; background: var(--superficie); box-shadow: 0 0 0 1px var(--borde-tarjeta); font-size: 13.5px; font-weight: 650; }
.qr__pasos li::before { content: counter(paso); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tinta); color: #FFF; font-size: 12px; font-weight: 800; }
@media (max-width: 719px) {
  .qr { grid-template-columns: 1fr; justify-items: center; gap: 22px; padding: 30px 20px calc(24px + var(--abajo-seguro)); text-align: center; }
  .qr__pasos { justify-content: center; }
}

/* ── Entrada animada (logo → remolino → hamburguesa → logo) ─────────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--fondo);
  /* Por si el JavaScript falla: igual se quita sola */
  animation: intro-respaldo .4s var(--ease) 3.6s forwards;
}
.sin-intro .intro { display: none; }
html.con-intro { overflow: hidden; }
.intro__escena { position: relative; width: min(100vw, 560px); aspect-ratio: 1; }
.intro__logo, .intro__lienzo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.intro__logo { width: 74%; height: auto; }
.intro__lienzo { width: 100%; height: 100%; }
.intro--animando .intro__logo { visibility: hidden; }
.intro--saliendo { animation: intro-salir .42s var(--ease) forwards; pointer-events: none; }
.intro--saliendo .intro__escena { animation: intro-acercar .42s var(--ease) forwards; }
@keyframes intro-salir { to { opacity: 0; visibility: hidden; } }
@keyframes intro-respaldo { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes intro-acercar { to { transform: scale(1.08); } }

/* ── Animaciones ───────────────────────────────────────────────────── */
@keyframes subir-barra { from { transform: translateY(140%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes subir-hoja { from { transform: translateY(100%); } to { transform: none; } }
@keyframes bajar-hoja { to { transform: translateY(100%); } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes desaparecer { to { opacity: 0; } }
@keyframes aparecer-hoja { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rebote { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 65% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes destello { 0% { background: var(--coral); color: #FFF; } 100% { background: transparent; } }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: -50% 0; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes latir { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes respirar { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 224, 138, .45); } 50% { box-shadow: 0 0 0 7px rgba(59, 224, 138, 0); } }
@keyframes respirar-coral { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 66, .4); } 50% { box-shadow: 0 0 0 7px rgba(255, 77, 66, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ── Aviso para navegadores muy viejos (Safari < 15.4) ──────────────── */
.viejo { display: none; }
.sin-js,
.navegador-viejo .viejo {
  display: block;
  margin: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #FFF4DE;
  color: #6B4100;
  font-size: 15px;
  line-height: 1.45;
}
.navegador-viejo .viejo strong { display: block; margin-bottom: 2px; }
.navegador-viejo .viejo a, .sin-js a { color: inherit; font-weight: 700; }
