/* Carta digital de Pollu's Food. Paleta del logo: rojo #DC1428, amarillo #FFC81E, blanco; fondo crema. */
:root {
  --rojo: #DC1428;
  --rojo-osc: #A90D1E;
  --amarillo: #FFC81E;
  --amarillo-claro: #FFE27A;
  --crema: #FFF6E6;
  --papel: #FFFFFF;
  --tinta: #2B1611;
  --tinta-suave: #6E554C;
  --linea: #F0DCC4;
  --wpp: #1FAA59;
  --radio: 20px;
  --sombra: 0 1px 2px rgba(80, 20, 10, .06), 0 8px 24px -12px rgba(120, 30, 10, .25);
  --sombra-alta: 0 20px 50px -18px rgba(120, 20, 10, .45);
  --titulo: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --texto: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --salir: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font: 500 16px/1.45 var(--texto);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.con-carrito { padding-bottom: 96px; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icono { width: 1.1em; height: 1.1em; flex: none; }
[hidden] { display: none !important; }

/* --- Portada ------------------------------------------------------------------------------------------------- */
.portada {
  position: relative;
  min-height: min(78vh, 620px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--rojo);
  isolation: isolate;
}
.portada__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.portada__velo {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 246, 230, .0) 0%, rgba(40, 6, 4, .25) 100%),
    linear-gradient(180deg, rgba(40, 6, 4, .15) 0%, rgba(40, 6, 4, .1) 45%, rgba(169, 13, 30, .85) 100%);
}
.portada__interior {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px 16px 64px; text-align: center;
}
.portada__logo {
  width: clamp(190px, 46vw, 290px); height: auto;
  filter: drop-shadow(0 14px 24px rgba(40, 6, 4, .45));
  animation: entra-logo .9s var(--salir) both;
}
.portada__slogan {
  margin: 0; color: #fff;
  font: 400 clamp(20px, 5.4vw, 28px)/1.15 var(--titulo); letter-spacing: .01em;
  text-shadow: 0 2px 12px rgba(40, 6, 4, .55);
  animation: entra .7s .15s var(--salir) both;
}
.portada__datos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: entra .7s .25s var(--salir) both; }
.portada__datos:empty { display: none; }
.portada__dato {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--tinta);
  font-weight: 800; font-size: 14px;
}
.cuadros {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: repeating-conic-gradient(var(--rojo) 0 25%, #fff 0 50%) 0 0 / 22px 22px;
}
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
@keyframes entra-logo { from { opacity: 0; transform: scale(.92) rotate(-3deg); } }

/* --- Categorías ---------------------------------------------------------------------------------------------- */
.categorias {
  position: sticky; top: 0; z-index: 20;
  background: var(--rojo);
  box-shadow: 0 6px 18px -10px rgba(120, 10, 10, .6);
}
.categorias__fila {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
}
.categorias__fila::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 16px; border-radius: 999px;
  color: #fff; text-decoration: none; white-space: nowrap;
  font: 400 16px/1.1 var(--titulo); letter-spacing: .02em;
  border: 2px solid rgba(255, 255, 255, .35);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip[aria-current="true"] { background: var(--amarillo); border-color: var(--amarillo); color: var(--rojo-osc); }
@media (hover: hover) { .chip:hover { border-color: #fff; } }

/* --- Carta --------------------------------------------------------------------------------------------------- */
.carta { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.buscador {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; height: 50px; border-radius: 999px;
  background: var(--papel); border: 2px solid var(--linea);
  color: var(--tinta-suave);
  transition: border-color .2s ease;
}
.buscador:focus-within { border-color: var(--rojo); }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 700 16px var(--texto); color: var(--tinta); }
.cargando, .vacio-busqueda { text-align: center; color: var(--tinta-suave); font-weight: 700; padding: 40px 0; }

.seccion { padding-top: 28px; }
.seccion__cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.seccion__titulo { margin: 0; font: 400 clamp(30px, 8vw, 42px)/1 var(--titulo); color: var(--rojo); }
/* El subrayado de brocha amarilla de la carta física. */
.seccion__titulo span {
  background: linear-gradient(transparent 58%, var(--amarillo) 58%, var(--amarillo) 92%, transparent 92%);
  padding: 0 4px; margin: 0 -4px;
}
.seccion__desc { margin: 8px 0 0; color: var(--tinta-suave); font-weight: 700; max-width: 42ch; }
.seccion__mascota { width: 84px; height: auto; flex: none; margin-bottom: -6px; }
.subgrupo { margin: 22px 0 10px; font: 400 21px/1.1 var(--titulo); color: var(--tinta); }

.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tarjeta {
  display: flex; flex-direction: column; text-align: left;
  padding: 0; border: 0; border-radius: var(--radio); overflow: hidden;
  background: var(--papel); box-shadow: var(--sombra); cursor: pointer;
  transition: transform .18s var(--salir), box-shadow .2s ease;
}
.tarjeta:active { transform: scale(.97); }
@media (hover: hover) { .tarjeta:hover { transform: translateY(-3px); box-shadow: var(--sombra-alta); } }
.tarjeta:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.tarjeta--agotada { cursor: default; opacity: .6; }
.tarjeta__foto { position: relative; aspect-ratio: 1; background: var(--linea); }
.foto { width: 100%; height: 100%; object-fit: cover; }
.foto--vacia {
  background:
    repeating-conic-gradient(rgba(220, 20, 40, .12) 0 25%, transparent 0 50%) 0 0 / 28px 28px,
    var(--crema);
}
.tarjeta__etiqueta {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--amarillo); color: var(--rojo-osc);
  font: 400 13px/1.2 var(--titulo); letter-spacing: .02em;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35);
}
.tarjeta__en-carrito {
  position: absolute; top: 10px; right: 10px;
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--rojo); color: #fff; font-weight: 900; font-size: 14px;
  box-shadow: 0 0 0 3px #fff;
}
.sello-agotado {
  position: absolute; inset: auto 10px 10px; text-align: center;
  padding: 4px; border-radius: 10px; background: var(--tinta); color: #fff; font-weight: 800; font-size: 13px;
}
.tarjeta__texto { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px; flex: 1; }
.tarjeta__nombre { font: 400 18px/1.1 var(--titulo); color: var(--rojo); }
.tarjeta__desc {
  font-size: 13px; line-height: 1.35; color: var(--tinta-suave); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tarjeta__pie { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tarjeta__precio {
  font-weight: 900; font-size: 16px; color: var(--tinta);
  background: var(--amarillo); padding: 2px 8px; border-radius: 8px; transform: rotate(-1.5deg);
}
.tarjeta__precio small { font-weight: 700; font-size: 11px; }
.tarjeta__mas {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--rojo); color: #fff; font-size: 22px; font-weight: 900; line-height: 1;
}
/* Adicionales y bebidas: tarjetas más bajas, foto más chica. */
.rejilla--chica .tarjeta__nombre { font-size: 16px; }
.rejilla--chica .tarjeta__desc { -webkit-line-clamp: 2; font-size: 12px; }

.carta__pie {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 40px; text-align: center; color: var(--tinta-suave); font-size: 13px; font-weight: 700;
}
.carta__pie p { margin: 0; }
.carta__pie-mascota { width: 96px; height: auto; }

/* --- Barra del carrito --------------------------------------------------------------------------------------- */
.barra-carrito {
  position: fixed; z-index: 30;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px; border: 0; border-radius: 999px;
  background: var(--rojo); color: #fff; cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(169, 13, 30, .7), inset 0 -3px 0 rgba(0, 0, 0, .15);
  animation: sube .35s var(--salir) both;
}
.barra-carrito:active { transform: scale(.98); }
.barra-carrito__cuenta {
  min-width: 38px; height: 38px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; background: var(--amarillo); color: var(--rojo-osc); font-weight: 900;
}
.barra-carrito__texto { flex: 1; text-align: left; font: 400 19px/1 var(--titulo); letter-spacing: .02em; }
.barra-carrito__total { font-weight: 900; font-size: 17px; }
.barra-carrito.salta { animation: salta .4s var(--salir); }
@keyframes sube { from { transform: translateY(120%); } }
@keyframes salta { 40% { transform: scale(1.05); } }

/* --- Hojas (dialog) ------------------------------------------------------------------------------------------ */
.hoja {
  width: 100%; max-width: 560px; max-height: 92dvh;
  margin: auto auto 0; padding: 0; border: 0;
  border-radius: 26px 26px 0 0; background: var(--papel); color: var(--tinta);
  overflow: hidden;
}
.hoja[open] { animation: hoja-sube .32s var(--salir); }
.hoja::backdrop { background: rgba(43, 22, 17, .55); }
.hoja[open]::backdrop { animation: aparece .25s ease; }
@media (min-width: 640px) { .hoja { margin: auto; border-radius: 26px; } }
@keyframes hoja-sube { from { transform: translateY(40px); opacity: 0; } }
@keyframes aparece { from { opacity: 0; } }
.hoja__cuerpo { display: flex; flex-direction: column; max-height: 92dvh; margin: 0; position: relative; }
.hoja__cerrar {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .95); color: var(--tinta); font-size: 16px; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35);
}
.hoja__foto { flex: none; aspect-ratio: 16 / 11; overflow: hidden; background: var(--linea); }
.hoja__foto .foto { width: 100%; height: 100%; object-fit: cover; }
.hoja__contenido { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 8px; }
.hoja__titulo { margin: 0 44px 6px 0; font: 400 27px/1.05 var(--titulo); color: var(--rojo); }
.hoja__desc { margin: 0 0 6px; color: var(--tinta-suave); font-weight: 600; }
.hoja__pie {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linea); background: var(--papel);
}
.hoja__pie--columna { flex-direction: column; align-items: stretch; gap: 8px; }

.grupo { border: 0; margin: 16px 0 0; padding: 0; border-radius: 14px; }
.grupo legend { padding: 0; margin-bottom: 10px; font-weight: 900; font-size: 16px; }
.grupo--falta { animation: falta .5s ease; }
@keyframes falta { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.obligatorio {
  margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--amarillo-claro); color: var(--rojo-osc); font-size: 11px; font-weight: 900; vertical-align: 2px;
}
.suave { color: var(--tinta-suave); font-weight: 600; }
.opciones { display: flex; flex-direction: column; gap: 8px; }
.opcion {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; border: 2px solid var(--linea); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.opcion:has(input:checked) { border-color: var(--rojo); background: #FFF1EE; }
.opcion input { accent-color: var(--rojo); width: 20px; height: 20px; margin: 0; }
.opcion__nombre { flex: 1; font-weight: 800; }
.opcion__precio { font-weight: 900; }
.fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha { cursor: pointer; }
.ficha input { position: absolute; opacity: 0; pointer-events: none; }
.ficha span {
  display: inline-block; padding: 9px 14px; border-radius: 999px;
  border: 2px solid var(--linea); font-weight: 800; font-size: 15px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ficha input:checked + span { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.ficha input:focus-visible + span { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.campo { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-weight: 800; font-size: 15px; }
.campo input {
  height: 48px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--linea);
  font: 700 16px var(--texto); color: var(--tinta); background: #fff; outline: 0;
  transition: border-color .15s ease;
}
.campo input:focus { border-color: var(--rojo); }
.campo input[aria-invalid] { border-color: var(--rojo); background: #FFF1EE; }

.cantidad { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--crema); flex: none; }
.cantidad__btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--rojo); font-size: 22px; font-weight: 900; line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.cantidad__btn:disabled { opacity: .35; cursor: default; }
.cantidad__valor { min-width: 26px; text-align: center; font-weight: 900; font-size: 17px; }
.cantidad--chica .cantidad__btn { width: 32px; height: 32px; font-size: 18px; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  font: 400 19px/1 var(--titulo); letter-spacing: .02em;
  transition: transform .12s ease, opacity .15s ease, background-color .15s ease;
}
.boton:active { transform: scale(.97); }
.boton:disabled { opacity: .4; cursor: default; }
.boton--ancho { flex: 1; width: 100%; }
.boton--rojo { background: var(--rojo); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.boton--apagado { background: #C9B8AE; }
.boton--linea { background: none; color: var(--rojo); border: 2px solid var(--rojo); }
.boton--wpp { background: var(--wpp); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.boton .icono { width: 22px; height: 22px; }

.selector { display: flex; gap: 8px; margin-top: 14px; }
.selector--columna { flex-direction: column; margin-top: 0; }
.selector__op { flex: 1; cursor: pointer; }
.selector__op input { position: absolute; opacity: 0; pointer-events: none; }
.selector__op span {
  display: block; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--linea);
  font-weight: 800; text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.selector--columna .selector__op span { text-align: left; }
.selector__op input:checked + span { border-color: var(--rojo); background: #FFF1EE; color: var(--rojo-osc); }
.selector__op input:focus-visible + span { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.lineas { list-style: none; margin: 12px 0 0; padding: 0; }
.linea {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 14px 0; border-bottom: 1px dashed var(--linea);
}
.linea__nombre { font-weight: 900; }
.linea__precio { font-weight: 900; }
.linea__extra { grid-column: 1 / -1; color: var(--tinta-suave); font-size: 14px; font-weight: 600; }
.linea__acciones { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.linea__quitar { border: 0; background: none; color: var(--rojo); font-weight: 800; cursor: pointer; padding: 8px 0; }
.carrito-vacio { padding: 20px 0; color: var(--tinta-suave); font-weight: 700; }
.totales { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--crema); }
.totales__fila { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-weight: 700; }
.totales__fila--total { font-size: 18px; font-weight: 900; }
.aviso { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #FFF1EE; color: var(--rojo-osc); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
