/* Palermo Teatro Bar · Carta digital */
:root {
  --bg: #15110d;
  --surface: #211a14;
  --surface-2: #2b221a;
  --line: rgba(255, 214, 160, .12);
  --text: #f6ecdd;
  --muted: #b8a68c;
  --gold: #f3b55c;
  --gold-2: #ffd28f;
  --red: #a8231b;
  --wsp: #1fbf5a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-c: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --nav-h: 108px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.modal-abierto { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center; padding: 28px 20px 26px; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: url('../img/fondo.webp') center / cover no-repeat; filter: blur(3px) brightness(.35) saturate(1.2); transform: scale(1.08); }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 60px; background: linear-gradient(transparent, var(--bg)); z-index: -1; }
.hero__logo { width: min(260px, 66vw); height: auto; margin: 0 auto; border-radius: 12px; box-shadow: 0 0 40px rgba(243, 181, 92, .18); mix-blend-mode: screen; }
.hero__lema { margin: 10px 0 0; font: 600 15px/1.2 var(--font-c); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); }
.mesa-chip { display: inline-flex; gap: 6px; align-items: center; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: rgba(243, 181, 92, .14); border: 1px solid rgba(243, 181, 92, .45); color: var(--gold-2); font: 600 15px var(--font-c); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(21, 17, 13, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav__row { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; max-width: 1200px; margin: 0 auto; }
.grupos { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.grupos::-webkit-scrollbar, .chips::-webkit-scrollbar, .carrusel::-webkit-scrollbar { display: none; }
.grupo-tab { flex: none; border: 0; background: none; padding: 8px 12px 10px; font: 700 16px var(--font-c); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.grupo-tab[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.buscador { padding: 8px 12px 0; max-width: 1200px; margin: 0 auto; }
.buscador input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.buscador input:focus { border-color: var(--gold); }
.chips { position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 12px 12px; max-width: 1200px; margin: 0 auto; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: .2s; }
.chip.activo { background: var(--gold); border-color: var(--gold); color: #1a130b; font-weight: 600; }

/* ---------- Layout ---------- */
.layout { max-width: 1200px; margin: 0 auto; padding: 0 14px 120px; }
.side { display: none; }
.sec-title { font: 700 24px/1.1 var(--font-c); letter-spacing: .04em; text-transform: uppercase; margin: 28px 0 4px; display: flex; gap: 8px; align-items: center; }
.sec-desc { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.grupo-title { font: 600 13px var(--font-c); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 34px 0 -12px; display: flex; align-items: center; gap: 12px; }
.grupo-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(243,181,92,.5), transparent); }
.cargando, .vacio { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Destacados ---------- */
.carrusel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 4px; margin: 6px -14px 0; padding-inline: 14px; }
.dest { flex: none; width: 210px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; text-align: left; padding: 0; }
.dest__txt { display: block; padding: 10px 12px 12px; }
.dest__txt strong { display: block; font: 600 17px/1.15 var(--font-c); letter-spacing: .02em; }
.dest__txt span { color: var(--gold); font-weight: 600; font-size: 15px; }

/* ---------- Productos ---------- */
.grid { display: grid; gap: 10px; }
.card { position: relative; display: flex; gap: 12px; align-items: stretch; width: 100%; text-align: left; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s; }
@media (hover: hover) { .card:hover { border-color: rgba(243, 181, 92, .35); } }
.card:active { transform: scale(.99); }
.card__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card__nombre { display: block; font: 600 18px/1.15 var(--font-c); letter-spacing: .02em; margin: 0; }
.card__desc { margin: 4px 0 8px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__pie { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.precio { color: var(--gold); font-weight: 700; font-size: 16px; }
.precio small { color: var(--muted); font-weight: 500; font-size: 12px; margin-right: 3px; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.card__media { position: relative; flex: none; width: 104px; height: 104px; }
/* Fotos: rellenan el espacio, o se muestran completas sobre fondo difuminado si son altas */
.media { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.media__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(.5) saturate(1.2); transform: scale(1.25); display: none; }
.media__img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.media.contener .media__bg { display: block; }
.media.contener .media__img { object-fit: contain; }
.media--ph { display: grid; place-items: center; font-size: 34px; }
.media--card { width: 100%; height: 100%; border-radius: 10px; }
.media--dest { width: 100%; aspect-ratio: 4 / 3; }
@supports not (aspect-ratio: 1) { .media--dest { height: 158px; } }
.media--det { width: calc(100% + 36px); margin: 0 -18px; height: min(58vh, 460px); }
.add { position: absolute; right: -6px; bottom: -6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gold); color: #1a130b; font-size: 24px; font-weight: 600; line-height: 1; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.card--sin-foto .add { position: static; margin-left: auto; }
.qty-badge { position: absolute; top: -6px; left: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.agotado { opacity: .5; }
.agotado .add { display: none; }
.badge-agotado { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffb4ab; border: 1px solid rgba(255,180,171,.4); padding: 2px 7px; border-radius: 6px; }

/* ---------- Footer ---------- */
.pie { text-align: center; padding: 30px 20px 140px; color: var(--muted); border-top: 1px solid var(--line); font-size: 14px; }
.pie img { margin: 0 auto 10px; border-radius: 8px; opacity: .8; mix-blend-mode: screen; }
.pie a { color: var(--gold); }
.pie__nota { font-size: 12px; opacity: .7; }

/* ---------- Botón carrito ---------- */
.carrito-btn { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 0; border-radius: 16px; background: var(--gold); color: #1a130b; font-weight: 600; font-size: 16px; box-shadow: var(--shadow); animation: subir .3s ease-out; }
.carrito-btn strong { margin-left: auto; font-size: 17px; }
.carrito-btn__count { min-width: 28px; height: 28px; border-radius: 8px; background: #1a130b; color: var(--gold); display: grid; place-items: center; font-size: 14px; }
.carrito-btn.pulso { animation: pulso .35s ease-out; }
@keyframes subir { from { transform: translate(-50%, 120%); } }
@keyframes pulso { 50% { transform: translateX(-50%) scale(1.04); } }

/* ---------- Sheets (dialog) ---------- */
dialog { border: 0; padding: 0; color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(2px); }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overscroll-behavior: contain; margin: auto auto 0; border-radius: 20px 20px 0 0; background: var(--surface); box-shadow: var(--shadow); overflow: auto; }
.sheet[open] { animation: sheet .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet { from { transform: translateY(40%); opacity: 0; } }
.sheet__close { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 10px 0; z-index: 2; height: 0; }
.sheet__close button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); font-size: 16px; }
.sheet__body { padding: 0 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet__title { font: 700 26px var(--font-c); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 12px; }
.det__nombre { font: 700 28px/1.05 var(--font-c); letter-spacing: .02em; margin: 16px 0 6px; }
.det__desc { color: var(--muted); margin: 0 0 12px; }
.det__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.variantes { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.variantes legend { font: 600 14px var(--font-c); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.var { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.var.sel { border-color: var(--gold); }
.var input { accent-color: var(--gold); width: 18px; height: 18px; }
.var__precio { margin-left: auto; color: var(--gold); font-weight: 600; }
.det__acciones { display: flex; gap: 10px; align-items: center; position: sticky; bottom: 0; padding: 12px 0 4px; background: var(--surface); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; }
.stepper button { width: 42px; height: 46px; border: 0; background: none; font-size: 22px; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; font-weight: 700; font-size: 16px; background: var(--gold); color: #1a130b; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn--wsp { background: var(--wsp); color: #fff; margin-top: 16px; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--text); margin-top: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-btn { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; }

.lineas { list-style: none; margin: 0; padding: 0; }
.linea { display: grid; grid-template-columns: minmax(0, 1fr) 110px; grid-template-areas: "info borrar" "stepper sub"; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.linea__info { grid-area: info; min-width: 0; }
.linea__nombre { font-weight: 600; }
.linea__var, .linea__unit { color: var(--muted); font-size: 13px; }
.linea__borrar { grid-area: borrar; align-self: start; justify-self: end; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); color: #ff6b6b; display: grid; place-items: center; }
.linea__borrar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .linea__borrar:hover { background: rgba(255, 107, 107, .18); } }
.linea .stepper { grid-area: stepper; width: max-content; }
.linea .stepper button { height: 36px; width: 38px; }
.linea__sub { grid-area: sub; color: var(--gold); font-weight: 700; align-self: center; justify-self: end; }
.stepper button[disabled] { opacity: .3; cursor: default; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 18px; }
.total-row strong { color: var(--gold); font-size: 22px; }
.campo { display: block; margin-top: 12px; }
.campo span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.campo input, .campo textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); outline: none; resize: vertical; }
.campo input:focus, .campo textarea:focus { border-color: var(--gold); }
.campo input[readonly] { color: var(--gold-2); font-weight: 600; }

/* ---------- Vista garzón ---------- */
.garzon { width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #fff8ec; color: #1a130b; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.garzon__body h2 { font: 700 34px var(--font-c); text-transform: uppercase; margin: 0 0 4px; }
.garzon__body .g-mesa { font-size: 22px; font-weight: 700; color: var(--red); margin: 0 0 16px; }
.garzon__body ul { list-style: none; padding: 0; margin: 0; font-size: 20px; }
.garzon__body li { padding: 10px 0; border-bottom: 1px dashed #c9b79c; }
.garzon__body li b { display: inline-block; min-width: 44px; }
.garzon__body .g-total { font-size: 24px; font-weight: 700; margin-top: 14px; }
.garzon__body .g-nota { margin-top: 12px; padding: 10px 12px; background: #f3e3c6; border-radius: 10px; }
.garzon .btn--ghost { color: #1a130b; border-color: #c9b79c; margin-top: 24px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -150%); z-index: 50; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); transition: transform .25s; font-size: 14px; }
.toast.ver { transform: translate(-50%, 0); }

/* ---------- Escritorio ---------- */
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card__media { width: 120px; height: 120px; }
  .sheet { margin: auto; border-radius: 20px; }
  .hero { padding: 40px 20px 36px; }
}
@media (min-width: 1080px) {
  .chips { display: none; }
  .layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .carta { min-width: 0; }
  .carrusel { margin-inline: 0; padding-inline: 2px; }
  .side { display: block; }
  .side ul { position: sticky; top: calc(var(--nav-h) + 16px); list-style: none; margin: 28px 0 0; padding: 0; max-height: calc(100vh - var(--nav-h) - 40px); overflow: auto; }
  .side a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 15px; }
  .side a:hover { color: var(--text); background: var(--surface); }
  .side a.activo { color: #1a130b; background: var(--gold); font-weight: 600; }
  .side .side__grupo { font: 600 12px var(--font-c); letter-spacing: .25em; text-transform: uppercase; color: var(--gold); padding: 14px 12px 4px; }
}

/* ---------- Pedido: mesa, confirmación, búsqueda ---------- */
.sheet__title small { font: 500 14px var(--font); letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 6px; }
.mesa-fija { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: rgba(243, 181, 92, .1); border: 1px solid rgba(243, 181, 92, .4); color: var(--gold-2); margin-bottom: 6px; }
.mesa-fija small { margin-left: auto; color: var(--muted); font-size: 12px; }
.det__precio { color: var(--gold); font-weight: 700; font-size: 20px; margin: 0 0 8px; }
.btn--danger { background: #c0392b; color: #fff; }
.confirmar { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid rgba(255, 107, 107, .45); background: rgba(192, 57, 43, .12); }
.confirmar p { margin: 0 0 12px; }
.confirmar__acc { display: flex; gap: 10px; }
.confirmar__acc .btn { margin: 0; flex: 1; padding: 12px 10px; font-size: 15px; }
.resultados { margin: 20px 0 -8px; color: var(--muted); font-size: 14px; }
