/* Menú de ejemplo: pensado para el celular del comensal que escanea el QR en la mesa. */
.menu-ej { background: var(--crema); padding-bottom: 96px; max-width: 640px; margin: 0 auto; box-shadow: 0 0 0 1px var(--linea); min-height: 100vh; }
.oculto-v { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.aviso-ejemplo { margin: 0; padding: 8px 16px; background: var(--mostaza); color: var(--carbon); font-size: .82rem; font-weight: 700; text-align: center; }
.aviso-ejemplo a { color: var(--carbon); }

.rest-cab { position: relative; color: var(--crema); background: var(--carbon); overflow: hidden; }
.rest-fondo { position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 20%, rgba(242, 177, 52, .45) 0 12%, transparent 13%),
  radial-gradient(circle at 92% 70%, rgba(194, 65, 12, .55) 0 18%, transparent 19%),
  radial-gradient(circle at 70% 110%, rgba(47, 107, 69, .55) 0 22%, transparent 23%); }
.js .rest-fondo { animation: brasas 9s ease-in-out infinite alternate; }
@keyframes brasas { to { transform: translate(-12px, 8px) scale(1.06); } }
.rest-info { position: relative; padding: 26px 20px 22px; }
.rest-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--pimenton); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.rest-info h1 { margin: 0; font-size: 2.2rem; }
.rest-lema { margin: 2px 0 10px; color: #e9dcc8; }
.rest-datos { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: .9rem; color: #d9cbb6; }
.abierto { color: #9fe0b5; font-weight: 800; margin-right: 4px; }
.sonido-m { position: absolute; top: 22px; right: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: rgba(255,248,238,.1); border: 1.5px solid rgba(255,248,238,.3); color: var(--crema); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.sonido-m svg { width: 18px; height: 18px; }
.sonido-m .ondas { display: none; }
.sonido-m[aria-pressed='true'] { background: var(--mostaza); color: var(--carbon); border-color: var(--mostaza); }
.sonido-m[aria-pressed='true'] .ondas { display: block; }
.sonido-m[aria-pressed='true'] .mudo { display: none; }

.tabs { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 238, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.tabs-pista { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; scroll-behavior: smooth; }
.tabs-pista::-webkit-scrollbar { display: none; }
.tab { flex: none; position: relative; z-index: 1; padding: 10px 14px; border-radius: 99px; text-decoration: none; color: var(--cafe); font-weight: 800; font-size: .95rem; transition: color .25s; }
.tab.activa { color: #fff; }
.tab-linea { position: absolute; z-index: 0; top: 8px; height: calc(100% - 16px); left: 0; width: 0; border-radius: 99px; background: var(--pimenton); transition: transform .35s var(--curva), width .35s var(--curva); }
html:not(.js) .tab-linea { display: none; }

.buscar { position: relative; margin: 14px 16px 0; }
.buscar svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--cafe); }
.buscar input { width: 100%; min-height: 50px; padding: 12px 14px 12px 44px; border-radius: 14px; border: 1.5px solid var(--linea); background: #fff; font: inherit; color: var(--carbon); }
.buscar input:focus { outline: none; border-color: var(--pimenton); box-shadow: 0 0 0 3px rgba(194, 65, 12, .2); }
.sin-resultados { margin: 20px 16px; color: var(--cafe); text-align: center; }

.cat { padding: 18px 16px 4px; }
.cat h2 { margin: 6px 0 12px; font-family: 'Bricolage', 'Manrope', sans-serif; font-size: 1.5rem; letter-spacing: -0.02em; }
.cat.oculta { display: none; }
.lista-platos { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lista-platos li.oculto { display: none; }
.plato-m { width: 100%; display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--linea); border-radius: 18px; background: #fff; font: inherit; color: inherit; cursor: pointer; transition: transform .2s var(--curva), box-shadow .2s, border-color .2s; }
.plato-m:hover { border-color: #dbc4a1; box-shadow: 0 10px 24px -16px rgba(33, 26, 22, .4); }
.plato-m:active { transform: scale(.98); }
.plato-m.agotado { opacity: .62; }
.p-info { display: grid; gap: 2px; min-width: 0; }
.p-nombre { font-weight: 800; }
.p-desc { color: var(--cafe); font-size: .88rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--crema-2); color: var(--carbon); }
.t-recomendado { background: #fde7b0; }
.t-vegetariano { background: #dcefe2; color: #1f4a30; }
.t-picante { background: #fbd9c8; color: #8a2c07; }
.t-agotado { background: #e8e1d8; color: #4b4038; }
.p-precio { font-weight: 800; color: var(--pimenton); white-space: nowrap; align-self: start; padding-top: 4px; }
.js .plato-m.aparece { animation: aparece-plato .5s var(--curva) both; }
@keyframes aparece-plato { from { opacity: 0; transform: translateY(12px); } }

.pie-ej { text-align: center; padding: 40px 20px 20px; color: var(--cafe); }
.pie-ej .hecho { font-size: .88rem; margin-top: 18px; }

/* Pedido flotante */
.pedido-flotante { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border: 0; border-radius: 99px; background: var(--carbon); color: #fff; font: inherit; font-weight: 800; box-shadow: 0 18px 36px -14px rgba(33, 26, 22, .6); cursor: pointer; width: min(420px, calc(100% - 32px)); justify-content: space-between; }
.pedido-flotante b { color: var(--mostaza); }
.pf-cant { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 99px; background: var(--mostaza); color: var(--carbon); }
.pedido-flotante.salta { animation: salta .5s var(--curva); }
@keyframes salta { 30% { transform: translateX(-50%) scale(1.06); } 60% { transform: translateX(-50%) scale(.98); } }
.js .pedido-flotante.entra { animation: entra-pf .4s var(--curva) both; }
@keyframes entra-pf { from { opacity: 0; transform: translate(-50%, 20px); } }
.vuela { position: fixed; z-index: 60; width: 44px; height: 44px; pointer-events: none; transition: transform .6s cubic-bezier(.5,-.3,.7,1), opacity .6s; }

/* Hojas (detalle y pedido) */
.hoja-fondo { position: fixed; inset: 0; z-index: 40; background: rgba(33, 26, 22, .55); animation: fondo .25s ease-out; }
@keyframes fondo { from { opacity: 0; } }
.hoja-m { position: fixed; left: 50%; bottom: 0; z-index: 50; width: min(640px, 100%); max-height: 88vh; overflow-y: auto; transform: translateX(-50%); background: var(--crema); border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px -20px rgba(0,0,0,.4); animation: sube-hoja .38s var(--curva); }
@keyframes sube-hoja { from { transform: translate(-50%, 100%); } }
.hoja-m.cerrando { animation: baja-hoja .25s ease-in forwards; }
@keyframes baja-hoja { to { transform: translate(-50%, 100%); } }
.hoja-m::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: #d8c8b0; margin: -8px auto 12px; }
.hoja-cerrar { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--crema-2); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--carbon); }
.hp-ilu { display: grid; place-items: center; margin: 6px 0 10px; }
.hp-ilu svg { width: 150px; height: 150px; }
.js .hp-ilu svg { animation: gira-plato .6s var(--curva); }
@keyframes gira-plato { from { transform: rotate(-30deg) scale(.8); opacity: 0; } }
.hoja-m h2 { margin: 0 0 6px; font-size: 1.7rem; padding-right: 40px; }
#hp-desc { margin: 0 0 10px; color: var(--cafe); }
.hp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.hp-fila { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cantidad { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid var(--linea); border-radius: 99px; padding: 4px; }
.cantidad button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--crema-2); font-size: 1.4rem; font-weight: 800; cursor: pointer; color: var(--carbon); }
.cantidad output { min-width: 28px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.hp-agotado { margin: 12px 0 0; font-weight: 800; color: #8a2c07; }
.lista-pedido { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.lista-pedido li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; }
.lista-pedido li b { white-space: nowrap; }
.lista-pedido .quitar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--crema-2); cursor: pointer; font-weight: 800; }
.total-pedido { display: flex; justify-content: space-between; font-size: 1.15rem; margin: 14px 0; }
.total-pedido b { color: var(--pimenton); }
.ancho-m { width: 100%; }
.nota-pedido { margin: 12px 0 0; padding: 12px; border-radius: 12px; background: #fde7b0; font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
  .hoja-m, .hoja-m.cerrando { animation: none; }
}
