/* Guachinche La Basílica — carta digital.
   Paleta tomada de la carta impresa: azul de los rótulos, naranja de las
   bandas y crema del papel. Móvil primero: el cliente llega por QR desde la mesa. */

:root {
  --azul: #1c4e8a;
  --azul-oscuro: #143761;
  --naranja: #e5872a;
  --naranja-claro: #f2b45c;
  --crema: #fdf9f2;
  --papel: #ffffff;
  --tinta: #23211f;
  --tinta-suave: #6b6560;
  --borde: #e7ddcd;
  --marron: #3a322d;
  --rosa: #e08d8d;

  --ancho: 46rem;
  --alto-nav: 3.25rem;

  --sombra: 0 1px 2px rgba(35, 33, 31, .06), 0 6px 18px rgba(35, 33, 31, .05);
  --radio: 12px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--crema);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }

.contenido {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: .875rem;
}

/* En un movil estrecho cada milimetro se lo lleva el nombre del plato. */
@media (min-width: 30rem) {
  .contenido { padding-inline: 1.125rem; }
}

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.saltar {
  position: absolute; left: -9999px;
  background: var(--azul); color: #fff;
  padding: .625rem 1rem; border-radius: 0 0 var(--radio) 0; z-index: 100;
}
.saltar:focus { left: 0; top: 0; }

:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }

/* ---------- Portada ---------- */

.portada {
  background: linear-gradient(170deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: #fff;
  padding-block: 2.25rem 2rem;
  padding-top: max(2.25rem, env(safe-area-inset-top));
  text-align: center;
}

.portada__rotulo {
  font-size: .6875rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--naranja-claro);
  margin-bottom: .5rem;
}

.portada__nombre {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 11vw, 3.25rem);
  font-weight: 400;
  letter-spacing: .01em;
}

.portada__reclamos {
  margin-top: .875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}

.portada__reclamos span {
  background: var(--naranja);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 999px;
}

.horario {
  margin-top: 1.25rem;
  display: grid;
  gap: .25rem;
  font-size: .9375rem;
}
.horario div { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.horario dt { color: rgba(255,255,255,.72); }
.horario dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }

.portada__acciones {
  margin-top: 1.5rem;
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.boton {
  display: inline-block;
  padding: .625rem 1.125rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
  transition: background-color .15s ease, border-color .15s ease;
}
.boton:hover { background: rgba(255,255,255,.12); }

.boton--principal {
  background: var(--naranja);
  border-color: var(--naranja);
}
.boton--principal:hover { background: #cf761d; border-color: #cf761d; }

/* ---------- Navegador de secciones ---------- */

.navegador {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--papel);
  border-bottom: 1px solid var(--borde);
  box-shadow: 0 2px 10px rgba(35,33,31,.05);
}

.navegador__pista {
  display: flex;
  gap: .375rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: .5rem 1.125rem;
  max-width: var(--ancho);
  margin-inline: auto;
  scroll-snap-type: x proximity;
}
.navegador__pista::-webkit-scrollbar { display: none; }

.navegador__enlace {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: .375rem .75rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--tinta-suave);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.navegador__enlace:hover { background: #f3ece1; color: var(--tinta); }
.navegador__enlace[aria-current="true"] { background: var(--azul); color: #fff; }

/* ---------- Buscador ---------- */

.buscador {
  display: flex;
  gap: .5rem;
  align-items: center;
  padding-block: .875rem;
}

.buscador__campo {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.buscador__lupa {
  position: absolute;
  left: .75rem;
  width: 1.0625rem; height: 1.0625rem;
  fill: none; stroke: var(--tinta-suave); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}

.buscador input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: .625rem .875rem .625rem 2.375rem;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--papel);
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador input:focus { border-color: var(--azul); outline-offset: 1px; }

.buscador__limpiar {
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--azul);
  background: none;
  border: 0;
  padding: .5rem .25rem;
  cursor: pointer;
}

.sin-resultados {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--tinta-suave);
}

/* ---------- Secciones de la carta ---------- */

.seccion { margin-bottom: 2rem; scroll-margin-top: calc(var(--alto-nav) + .5rem); }
.seccion[hidden] { display: none; }

.seccion__cabecera {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  background: var(--azul);
  color: #fff;
  padding: .5rem .625rem;
  border-radius: 6px;
}

.seccion__titulo {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.seccion__columnas {
  display: flex;
  gap: .5rem;
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  flex: 0 0 auto;
}
.seccion__columnas span:first-child { width: 3.125rem; text-align: right; }
.seccion__columnas span:last-child { width: 4.75rem; text-align: right; }

.seccion__nota {
  margin-top: .5rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--naranja);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.platos { margin-top: .25rem; }

/* El mismo desplazamiento lateral que la banda azul, para que las cifras
   caigan justo bajo los rotulos "½" y "Ración" de la cabecera. */
.plato {
  display: flex;
  gap: .625rem;
  align-items: flex-start;
  padding: .6875rem .625rem;
  border-bottom: 1px solid var(--borde);
}
.plato[hidden] { display: none; }
.plato:last-child { border-bottom: 0; }

.plato__cuerpo { flex: 1; min-width: 0; }

.plato__nombre {
  font-size: .9688rem;
  font-weight: 600;
  text-wrap: pretty;
}

.plato__numero {
  color: var(--tinta-suave);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: .8125rem;
}

.plato__desc {
  margin-top: .1875rem;
  font-size: .8438rem;
  color: var(--tinta-suave);
  line-height: 1.4;
}

.plato__distintivo {
  display: inline-block;
  margin-left: .375rem;
  vertical-align: .0625em;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .0625rem .375rem;
  border-radius: 4px;
  white-space: nowrap;
}
.plato__distintivo--canaria { background: #eaf1f9; color: var(--azul); }
.plato__distintivo--premium { background: #fbf0dd; color: #9c6412; }

.plato__alergenos {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .375rem;
}

.punto {
  width: .875rem; height: .875rem;
  border-radius: 50%;
  border: 1px solid rgba(35,33,31,.18);
  display: inline-block;
  flex: 0 0 auto;
}

.plato__precios {
  display: flex;
  gap: .5rem;
  flex: 0 0 auto;
  align-items: baseline;
  padding-top: .0625rem;
}

.precio {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* La columna de racion tiene que tragar el caso mas ancho, "62,00 €/kg",
   sin desbordar la caja y sin desalinearse del rotulo de la cabecera. */
.precio--media { width: 3.125rem; color: var(--tinta-suave); }
.precio--racion { width: 4.75rem; font-weight: 700; }

.precio__valor { font-size: .9375rem; }
.precio--racion .precio__valor { font-size: 1rem; }
.precio__unidad { font-size: .75rem; font-weight: 500; color: var(--tinta-suave); }

.seccion__avisos {
  margin-top: .75rem;
  background: #fbf3e7;
  border-left: 3px solid var(--naranja);
  border-radius: 0 6px 6px 0;
  padding: .625rem .875rem;
  font-size: .8438rem;
  color: #6d4c1c;
  display: grid;
  gap: .3125rem;
}

/* ---------- Avisos generales ---------- */

.avisos {
  margin: 1.5rem 0 2.5rem;
  padding: .875rem 1rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  font-size: .8438rem;
  color: var(--tinta-suave);
}
.avisos li + li { margin-top: .3125rem; }

/* ---------- Bloques (celebración / alérgenos) ---------- */

.bloque {
  margin-bottom: 2.5rem;
  scroll-margin-top: calc(var(--alto-nav) + .5rem);
}

.bloque__titulo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.625rem;
  font-weight: 400;
  margin-bottom: .25rem;
}

.bloque__entradilla {
  color: var(--tinta-suave);
  font-size: .9375rem;
  margin-bottom: 1.125rem;
}

.menus { display: grid; gap: 1rem; }

.menu {
  background: var(--marron);
  color: #f4efe9;
  border-radius: var(--radio);
  padding: 1.25rem 1.125rem 1.375rem;
  box-shadow: var(--sombra);
}

.menu__cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .875rem;
  margin-bottom: .875rem;
  border-bottom: 1px solid rgba(244,239,233,.18);
}

.menu__nombre {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
}
.menu__etiqueta {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rosa);
  margin-bottom: .1875rem;
}

.menu__precio {
  flex: 0 0 auto;
  background: var(--rosa);
  color: #402c2c;
  border-radius: 999px;
  width: 4.5rem; height: 4.5rem;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}
.menu__precio strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.menu__precio span { font-size: .625rem; display: block; margin-top: .125rem; }

.menu__grupo + .menu__grupo { margin-top: 1rem; }

.menu__grupo h4 {
  margin: 0;
  display: inline-block;
  background: var(--rosa);
  color: #402c2c;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .125rem .5rem;
  border-radius: 3px;
}

.menu__nota {
  font-size: .75rem;
  font-style: italic;
  color: rgba(244,239,233,.6);
  margin: .3125rem 0 .3125rem;
}

.menu__items { font-size: .9063rem; }
.menu__items li { padding-left: .875rem; position: relative; margin-top: .25rem; }
.menu__items li::before {
  content: "–";
  position: absolute; left: 0;
  color: var(--rosa);
}

.menu__incluye {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(244,239,233,.18);
  font-size: .8125rem;
  font-weight: 600;
  color: rgba(244,239,233,.8);
}

.reserva-eventos {
  margin-top: 1.25rem;
  background: var(--azul);
  border-radius: var(--radio);
  padding: 1.125rem;
  text-align: center;
  color: #fff;
}
.reserva-eventos p { font-weight: 600; margin-bottom: .75rem; }

.condiciones {
  margin-top: 1rem;
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: .875rem 1rem;
}
.condiciones summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .9375rem;
}
.condiciones ul { margin-top: .75rem; font-size: .8438rem; color: var(--tinta-suave); }
.condiciones li { padding-left: .875rem; position: relative; }
.condiciones li + li { margin-top: .5rem; }
.condiciones li::before { content: "·"; position: absolute; left: .25rem; font-weight: 700; }

/* ---------- Alérgenos ---------- */

.leyenda {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .5rem .875rem;
  margin-bottom: 1.125rem;
}
.leyenda li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
}

.declaracion {
  font-size: .75rem;
  line-height: 1.6;
  color: var(--tinta-suave);
  background: var(--papel);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: .875rem 1rem;
}

/* ---------- Pie ---------- */

.pie {
  background: var(--tinta);
  color: #ddd6cd;
  padding-block: 2.25rem;
  padding-bottom: max(2.25rem, env(safe-area-inset-bottom));
  text-align: center;
  margin-top: 1rem;
}

.pie__alergenos {
  background: var(--naranja);
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  border-radius: var(--radio);
  padding: .875rem 1rem;
  margin-bottom: 1.75rem;
  text-wrap: balance;
}

.pie__marca {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.375rem;
  color: #fff;
}
.pie__marca span {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .625rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--naranja-claro);
  margin-top: .25rem;
}

.pie__invitacion { margin-top: 1.25rem; font-size: .875rem; }

.pie__locales {
  margin-top: .75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .75rem;
  font-size: .875rem;
}
.pie__locales li { color: #fff; font-weight: 600; }
.pie__locales span { color: #9e968c; font-weight: 400; }

.pie__redes {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.pie__redes a {
  color: #ddd6cd;
  text-decoration: none;
  font-size: .8125rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .3125rem .75rem;
}
.pie__redes a:hover { background: rgba(255,255,255,.08); color: #fff; }

.pie__direccion { margin-top: 1.25rem; font-size: .75rem; color: #9e968c; }

/* ---------- Volver arriba ---------- */

.arriba {
  position: fixed;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: var(--azul);
  color: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(35,33,31,.28);
  z-index: 30;
}
.arriba svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.arriba[hidden] { display: none; }

/* ---------- Pantallas grandes ---------- */

@media (min-width: 40rem) {
  .plato__nombre { font-size: 1.0313rem; }
  .plato__desc { font-size: .875rem; }
  .menus { grid-template-columns: repeat(2, 1fr); }
  .menus .menu:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Con sitio de sobra las pildoras caben en dos filas: mejor verlas todas
   que dejarlas en una tira que se arrastra sin barra visible. */
@media (min-width: 48rem) {
  .navegador__pista {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}

/* ---------- Impresión ---------- */

@media print {
  .navegador, .buscador, .arriba, .saltar, .portada__acciones, .reserva-eventos { display: none !important; }
  body { background: #fff; }
  .portada { background: #fff; color: #000; }
  .portada__rotulo, .horario dt { color: #555; }
  .portada__reclamos span { background: #eee; color: #000; }
  .seccion { break-inside: avoid; }
  .seccion__cabecera { background: #eee; color: #000; }
  .menu { background: #fff; color: #000; border: 1px solid #ccc; }
  .pie { background: #fff; color: #000; }
  .pie__alergenos { background: #fff; color: #000; border: 2px solid #000; }
}
