/* TuMenú — menú público. Los colores, la tipografía y la forma vienen en variables (--fondo, --acento, --f-t…). */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-700-normal.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("../fonts/dm-serif-display-latin-400-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-latin-700-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: var(--f-x); line-height: 1.5; -webkit-font-smoothing: antialiased;
  max-width: 720px; margin-inline: auto; padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3 { font-family: var(--f-t); margin: 0; line-height: 1.1; font-weight: 800; }
p { margin: 0; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- portada */
.portada { position: relative; min-height: 270px; display: flex; align-items: flex-end; overflow: hidden; border-radius: 0 0 var(--radio) var(--radio); }
.portada-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portada::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.72)); }
.portada-txt { position: relative; z-index: 1; padding: 20px 18px 22px; color: #fff; width: 100%; }
.sin-portada { min-height: 0; background: var(--acento); }
.sin-portada::after { display: none; }
.logo { width: 68px; height: 68px; border-radius: calc(var(--radio) * .8); object-fit: cover; background: #fff; border: 3px solid #fff; margin-bottom: 10px; }
.portada h1 { font-size: clamp(2rem, 1.4rem + 3vw, 2.8rem); }
.desc { opacity: .92; margin-top: 6px; max-width: 46ch; }
.datos { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; opacity: .95; }
.datos li { display: inline-flex; gap: 6px; align-items: center; }

.acciones { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 4px; scrollbar-width: none; }
.acciones::-webkit-scrollbar { display: none; }
.acc { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; background: var(--sup); color: var(--texto);
  text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; border: 1.5px solid var(--suave); }
.saludo { margin: 10px 16px 0; padding: 12px 14px; border-radius: var(--radio); background: var(--suave); font-weight: 600; }

/* ---------------------------------------------------------------- categorías */
.cats { position: sticky; top: 0; z-index: 10; background: var(--fondo); padding: 10px 0 8px; box-shadow: 0 10px 18px -16px rgba(0,0,0,.4); }
.cats-in { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; align-items: center; }
.cats-in::-webkit-scrollbar { display: none; }
.cats a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--texto); font-weight: 700; white-space: nowrap; font-size: .92rem; transition: background .2s, color .2s; }
.cats a.activa { background: var(--acento); color: var(--fondo); }
.buscar-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--suave); flex: none; }
.buscador { padding: 8px 16px 0; }
.buscador input { width: 100%; padding: 11px 14px; border-radius: 999px; border: 2px solid var(--suave); background: var(--sup); color: var(--texto); font: inherit; }
.buscador input:focus { outline: none; border-color: var(--acento); }

/* ---------------------------------------------------------------- carta */
.carta { padding: 4px 16px 20px; }
.categoria { padding-top: 22px; }
.categoria h2 { font-size: 1.65rem; }
.cat-desc { opacity: .7; margin-top: 4px; font-size: .95rem; }
.platos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.plato-btn { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radio);
  background: var(--sup); transition: transform .15s; }
.plato-btn:active { transform: scale(.985); }
.con-foto .plato-btn { grid-template-columns: 92px minmax(0, 1fr) auto; }
.foto { width: 92px; height: 92px; border-radius: calc(var(--radio) * .75); object-fit: cover; background: var(--suave); }
.info { display: grid; gap: 3px; min-width: 0; }
.nombre { font-weight: 800; font-size: 1.04rem; }
.pdesc { font-size: .88rem; opacity: .72; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.precio { font-weight: 800; color: var(--acento); white-space: nowrap; text-align: right; display: grid; justify-items: end; gap: 2px; }
.precio s { color: var(--texto); opacity: .45; font-weight: 600; font-size: .85rem; }
.etqs { display: flex; flex-wrap: wrap; gap: 4px; }
.etq { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.e-nuevo, .e-recomendado { background: var(--acento); color: var(--fondo); }
.e-vegano, .e-vegetariano { background: #D7F0DD; color: #1F6B36; }
.e-picante { background: #FFD9CF; color: #A3260E; }
.agotado .plato-btn { opacity: .55; }
.agot { font-size: .7rem; background: var(--texto); color: var(--fondo); padding: 2px 8px; border-radius: 999px; }
.sin-resultados { text-align: center; padding: 30px 0; opacity: .7; }

/* plantilla: lista clásica (sin fotos, con línea de puntos al precio) */
.pl-lista .plato-btn, .pl-lista .con-foto .plato-btn { grid-template-columns: minmax(0, 1fr) auto; background: transparent; padding: 10px 2px; border-radius: 0;
  border-bottom: 1.5px dashed var(--suave); }
.pl-lista .foto { display: none; }
.pl-lista .platos { gap: 0; }
.pl-lista .categoria h2 { text-align: center; font-size: 1.9rem; }
.pl-lista .categoria h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--acento); margin: 10px auto 0; }
.pl-lista .cat-desc { text-align: center; }

/* plantilla: grilla de fotos */
.pl-grilla .platos { grid-template-columns: 1fr 1fr; }
.pl-grilla .con-foto .plato-btn, .pl-grilla .plato-btn { grid-template-columns: 1fr; align-content: start; padding: 8px 8px 12px; gap: 8px; height: 100%; }
.pl-grilla .foto { width: 100%; height: auto; aspect-ratio: 1; }
.pl-grilla .precio { justify-items: start; text-align: left; }
.pl-grilla .pdesc { -webkit-line-clamp: 2; }

/* plantilla: pizarra */
.pl-pizarra { --f-t: "Caveat", cursive; }
.pl-pizarra .plato-btn { background: transparent; border: 2px solid var(--suave); }
.pl-pizarra .categoria h2 { font-size: 2.3rem; }
.pl-pizarra .nombre { font-family: var(--f-t); font-size: 1.5rem; font-weight: 700; }
.pl-pizarra .precio { font-family: var(--f-t); font-size: 1.5rem; }

.sin-fotos .foto { display: none; }
.sin-fotos .con-foto .plato-btn { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------------------------------------------------------------- pie y hoja */
.pie-menu { text-align: center; padding: 18px 16px 34px; display: grid; gap: 8px; justify-items: center; font-size: .9rem; }
.precios-nota { opacity: .55; font-size: .8rem; }
.hecho { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--texto); opacity: .75; padding: 8px 14px; border-radius: 999px; background: var(--suave); font-size: .85rem; }
.vista .hecho { pointer-events: none; }
.hoja { border: 0; padding: 0; width: min(100%, 560px); max-height: 92vh; border-radius: 28px 28px 0 0; margin: auto auto 0; background: var(--sup); color: var(--texto); }
.hoja::backdrop { background: rgba(0, 0, 0, .55); }
.hoja-in { position: relative; }
.hoja img { width: 100%; max-height: 52vh; object-fit: cover; display: block; }
.hoja-txt { padding: 18px 20px 26px; display: grid; gap: 8px; }
.hoja-txt h3 { font-size: 1.6rem; }
.hoja-precio { font-weight: 800; color: var(--acento); font-size: 1.3rem; }
.cerrar { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; display: grid; place-items: center; }
@media (min-width: 721px) { body { box-shadow: 0 0 0 1px var(--suave); min-height: 100vh; } .hoja { border-radius: 28px; margin: auto; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
