/* =========================================================
   MALVA BAR & COCINA
   Los colores principales se pueden cambiar desde js/config.js → theme
   ========================================================= */

:root {
  --night: #171314;
  --night-2: #221c1e;
  --paper: #f4efe7;
  --surface: #fffcf7;
  --ink: #171314;
  --muted: #675f5d;
  --muted-inv: rgba(244, 239, 231, 0.68);
  --line: rgba(23, 19, 20, 0.11);
  --line-strong: rgba(23, 19, 20, 0.24);
  --line-inv: rgba(244, 239, 231, 0.16);
  --accent: #a45b92;
  --accent-ink: #7c3b6c;
  --accent-soft: #f3e4ee;
  --wa: #1d8a4c;

  --f-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --f-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(1rem, 0.55rem + 2vw, 2.5rem);
  --max: 1200px;
  --top-h: 60px;
  --header-h: 60px;
  --r: 10px;
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 56px); }
html:focus-within { scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-sans); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; padding: 0.6rem 1rem; background: var(--ink); color: var(--paper); border-radius: 6px; }
.skip:focus { top: 1rem; }

.h2 { font-family: var(--f-display); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); font-weight: 800; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; }
.kicker { margin-bottom: 0.6rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 50px; padding: 0 1.3rem;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #3a3033; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #17753f; }
.btn--line { border-color: var(--line-strong); }
.btn--line:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Encabezado ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--night); color: var(--paper); }
.top__bar { height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: flex-start; gap: 3px; font-family: var(--f-display); font-size: 1.65rem; font-weight: 800; letter-spacing: 0.1em; line-height: 1; }
.brand i { width: 7px; height: 7px; margin-top: 2px; border-radius: 50%; background: var(--accent); }
.top__nav { display: none; }
.top__end { display: flex; align-items: center; gap: 0.25rem; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; height: 44px; padding: 0 0.75rem; border-radius: 999px; transition: background-color 0.2s; }
.cart-btn:hover { background: rgba(255, 255, 255, 0.08); }
.cart-btn__label { display: none; font-size: 0.9rem; font-weight: 500; }
.cart-btn__count { position: absolute; top: 4px; left: 26px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cart-btn__count.is-bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.menu-btn { display: grid; place-items: center; width: 44px; height: 44px; }
.menu-btn span { position: relative; width: 20px; height: 10px; }
.menu-btn i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.menu-btn i:first-child { top: 0; }
.menu-btn i:last-child { top: 8px; }
.menu-btn[aria-expanded='true'] i:first-child { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] i:last-child { top: 4px; transform: rotate(-45deg); }

.menu { position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - 100%); background: var(--night); border-top: 1px solid var(--line-inv); overflow-y: auto; }
.menu__inner { display: flex; flex-direction: column; padding-block: 0.5rem 2rem; }
.menu__inner a:not(.btn) { padding: 1rem 0; border-bottom: 1px solid var(--line-inv); font-family: var(--f-display); font-size: 1.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; }
.menu__wa { margin-top: 1.75rem; }

/* Barra de modo (mesa / pedido para llevar) */
.modebar { border-top: 1px solid var(--line-inv); background: var(--night-2); font-size: 0.85rem; }
.modebar__inner { display: flex; align-items: center; gap: 0.75rem; min-height: 44px; padding-block: 0.35rem; }
.modebar__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(164, 91, 146, 0.25); }
.modebar__text { flex: 1; min-width: 0; line-height: 1.3; }
.modebar__text b { font-weight: 600; }
.modebar__text span { color: var(--muted-inv); }
.modebar__wide { display: none; }
@media (min-width: 720px) { .modebar__wide { display: inline; } }
.modebar__actions { display: flex; gap: 0.25rem; flex: none; }
.modebar__btn { min-height: 34px; padding: 0 0.75rem; border: 1px solid var(--line-inv); border-radius: 999px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; transition: border-color 0.2s; }
.modebar__btn:hover { border-color: var(--paper); }

@media (min-width: 960px) {
  .top__bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .top__nav { display: flex; gap: 2rem; font-size: 0.92rem; }
  .top__nav a { color: var(--muted-inv); transition: color 0.2s; }
  .top__nav a:hover { color: var(--paper); }
  .top__end { justify-self: end; }
  .cart-btn { border: 1px solid var(--line-inv); padding: 0 1rem 0 0.8rem; }
  .cart-btn__label { display: inline; }
  .cart-btn__count { position: static; }
  .menu-btn, .menu { display: none !important; }
}

/* ---------- Portada ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: calc(100svh - var(--header-h) - 20px); max-height: 860px; overflow: hidden; background: var(--night); color: var(--paper); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s var(--ease); }
.hero__img.is-loaded { opacity: 1; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23, 19, 20, 0.35) 0%, rgba(23, 19, 20, 0.2) 35%, rgba(23, 19, 20, 0.92) 78%); }
.hero__content { position: relative; padding-block: 3rem calc(1.75rem + env(safe-area-inset-bottom)); }
.hero__kicker { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; margin-bottom: 0.75rem; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted-inv); }
.hero__title { display: flex; flex-direction: column; }
.hero__name { font-family: var(--f-display); font-size: clamp(5rem, 3rem + 13vw, 10rem); font-weight: 800; line-height: 0.82; letter-spacing: 0.03em; margin-left: -0.02em; }
.hero__kind { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--paper); }
.hero__tagline { max-width: 26ch; margin-top: 1rem; font-size: 1.1rem; color: rgba(244, 239, 231, 0.85); }

.choices { display: grid; gap: 0.6rem; margin-top: 1.75rem; }
.choice {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 76px;
  padding: 0.75rem 1.1rem 0.75rem 0.75rem;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.choice:hover { background: #fff; }
.choice:active { transform: scale(0.985); }
.choice__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: var(--paper); }
.choice__text { display: grid; gap: 0.1rem; }
.choice__text b { font-family: var(--f-display); font-size: 1.45rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.choice__text em { font-style: normal; font-size: 0.88rem; color: var(--muted); }
.choice__arrow { font-size: 1.2rem; transition: transform 0.25s var(--ease); }
.choice:hover .choice__arrow { transform: translateX(3px); }
.choice--line { background: rgba(244, 239, 231, 0.06); border: 1px solid rgba(244, 239, 231, 0.35); color: var(--paper); backdrop-filter: blur(6px); }
.choice--line:hover { background: rgba(244, 239, 231, 0.12); }
.choice--line .choice__icon { background: var(--accent); color: #fff; }
.choice--line .choice__text em { color: var(--muted-inv); }

@media (min-width: 760px) {
  .choices { grid-template-columns: 1fr 1fr; max-width: 760px; }
  .hero__content { padding-bottom: 3.5rem; }
}

/* ---------- La carta ---------- */
.carta { padding-top: 2.5rem; }
.carta__head { display: grid; gap: 1rem; margin-bottom: 1rem; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 1rem 0 2.75rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 16px; transition: border-color 0.2s; }
.search input:focus { outline: none; border-color: var(--ink); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
@media (min-width: 760px) {
  .carta { padding-top: 4rem; }
  .carta__head { grid-template-columns: 1fr minmax(0, 340px); align-items: end; }
}

.tabs-bar { position: sticky; top: var(--header-h); z-index: 30; background: rgba(244, 239, 231, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 0.4rem; padding-block: 0.65rem; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 38px; padding: 0 0.95rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.88rem; font-weight: 500; white-space: nowrap; scroll-snap-align: start; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.group { padding-block: 2rem 0.5rem; scroll-margin-top: calc(var(--header-h) + 62px); }
.group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.25rem; }
.group__title { font-family: var(--f-display); font-size: 2rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
.group__note { font-size: 0.85rem; color: var(--muted); }
.items { display: grid; }
@media (min-width: 760px) {
  .items { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}

.item { position: relative; border-bottom: 1px solid var(--line); animation: fade-in 0.35s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.item__main { display: grid; grid-template-columns: 1fr 104px; gap: 1rem; width: 100%; padding: 1rem 0; text-align: left; }
.item__text { display: flex; flex-direction: column; min-width: 0; }
.item__name { font-size: 1.02rem; font-weight: 600; line-height: 1.25; }
.item__desc { margin-top: 0.25rem; font-size: 0.87rem; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-top: auto; padding-top: 0.6rem; }
.item__price { font-weight: 600; font-variant-numeric: tabular-nums; }
.item__price small { font-size: 0.75rem; font-weight: 500; color: var(--muted); margin-right: 0.2rem; }
.item__price small:last-child:not(:first-child) { margin: 0 0 0 0.25rem; }
.item__img { position: relative; width: 104px; height: 104px; overflow: hidden; border-radius: var(--r); background: #e7dfd4; }
.item__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
@media (hover: hover) { .item__main:hover .item__img img { transform: scale(1.05); } .item__main:hover .item__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; } }
.item__add {
  position: absolute; right: 6px; bottom: calc(1rem + 6px);
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 10px rgba(23, 19, 20, 0.25);
  transition: transform 0.15s, background-color 0.2s, color 0.2s;
}
.item__add:hover { background: var(--ink); color: var(--paper); }
.item__add:active { transform: scale(0.9); }
.item__add.is-done { background: var(--accent); color: #fff; }
.item--off .item__img img { filter: grayscale(1); opacity: 0.6; }
.item--off .item__name, .item--off .item__price { color: var(--muted); }

.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 0 0.45rem; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tag--off { background: #e9e3db; color: var(--muted); }

/* Tragos: bloque oscuro con fotos protagonistas */
.group--dark { margin-top: 2rem; padding-block: 2.5rem 2.75rem; background: var(--night); color: var(--paper); }
.group--dark .group__note { color: var(--muted-inv); }
.group--dark .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; margin-top: 1.25rem; }
@media (min-width: 760px) { .group--dark .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.25rem; } }
@media (min-width: 1100px) { .group--dark .items { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.group--dark .item { border: 0; }
.group--dark .item__main { display: flex; flex-direction: column-reverse; gap: 0.75rem; padding: 0; }
.group--dark .item__img { width: 100%; height: auto; aspect-ratio: 4 / 5; background: var(--night-2); }
.group--dark .item__desc { color: var(--muted-inv); -webkit-line-clamp: 2; }
.group--dark .item__foot { padding-top: 0.45rem; }
.group--dark .item__add { top: 8px; right: 8px; bottom: auto; }
.group--dark .tag { background: rgba(164, 91, 146, 0.25); color: #f1d7ea; }
.group--dark .tag--off { background: rgba(244, 239, 231, 0.12); color: var(--muted-inv); }
.group--dark .item__price small { color: var(--muted-inv); }

.notice { display: flex; gap: 0.75rem; align-items: flex-start; margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.notice b { color: var(--ink); font-weight: 600; }
.empty { padding: 3rem 0; text-align: center; color: var(--muted); }
.empty p + .btn { margin-top: 1rem; }
.carta__end { height: 3rem; }

/* ---------- Nosotros ---------- */
.about { padding-block: 4rem; background: var(--surface); border-top: 1px solid var(--line); }
.about__grid { display: grid; gap: 2rem; align-items: center; }
.about__img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); background: var(--night); }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__text .h2 { max-width: 16ch; }
.about__text p:not(.kicker) { margin-top: 1rem; max-width: 46ch; color: var(--muted); }
.about__text .btn { margin-top: 1.5rem; }
@media (min-width: 900px) {
  .about { padding-block: 6rem; }
  .about__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .about__img { aspect-ratio: 5 / 4; }
}

/* ---------- Contacto ---------- */
.contact { padding-block: 4rem; }
.contact__grid { display: grid; gap: 1rem; margin-top: 2rem; }
.info { display: grid; align-content: start; gap: 0.35rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.info h3 { margin-bottom: 0.35rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.info p { font-size: 0.98rem; }
.info a:not(.btn) { font-weight: 500; }
.info a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }
.info__muted { color: var(--muted); font-size: 0.9rem !important; }
.info .btn { justify-self: start; margin-top: 0.75rem; min-height: 44px; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.hours div:last-child { border-bottom: 0; }
.hours dt { color: var(--muted); }
@media (min-width: 900px) { .contact { padding-block: 5rem 6rem; } .contact__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.footer { padding-top: 2.5rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); background: var(--night); color: var(--paper); }
.footer__grid { display: grid; gap: 1.5rem; }
.brand--footer { font-size: 2.2rem; }
.footer__city { margin-top: 0.4rem; color: var(--muted-inv); font-size: 0.9rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.95rem; }
.footer__links a { color: var(--muted-inv); transition: color 0.2s; }
.footer__links a:hover { color: var(--paper); }
.footer__legal { display: grid; gap: 0.35rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line-inv); font-size: 0.78rem; color: var(--muted-inv); }
@media (min-width: 900px) {
  .footer { padding-bottom: 2rem; }
  .footer__grid { grid-template-columns: 1fr auto; align-items: end; }
  .footer__legal { grid-template-columns: 1fr auto; }
}

/* ---------- Barra de pedido (celular) ---------- */
.cartbar {
  position: fixed;
  left: 0.75rem; right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 35;
  display: flex; align-items: center; gap: 0.75rem;
  height: 58px; padding: 0 1.1rem 0 0.6rem;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 30px rgba(23, 19, 20, 0.35);
  animation: rise 0.35s var(--ease);
}
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.cartbar__count { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 0.5rem; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; }
.cartbar__label { flex: 1; text-align: left; font-weight: 600; }
.cartbar__total { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 960px) { .cartbar { display: none !important; } }

/* ---------- Paneles (hojas deslizables) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(23, 19, 20, 0.55); opacity: 0; transition: opacity 0.3s var(--ease); }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: calc(100dvh - 2.5rem);
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  transform: translateY(100%);
  transition: transform 0.38s var(--ease);
  outline: none;
  overflow: hidden;
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__panel--cart { height: calc(100dvh - 2.5rem); }
.sheet__grab { flex: none; align-self: center; width: 40px; height: 4px; margin: 8px 0 2px; border-radius: 2px; background: var(--line-strong); }
.sheet__body { padding: 1rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet__foot { flex: none; padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet__x { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 252, 247, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.sheet__x--inline { position: static; box-shadow: none; background: transparent; }
.sheet__x--inline:hover { background: var(--paper); }

@media (min-width: 760px) {
  .sheet__panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(520px, calc(100vw - 2rem)); max-height: min(820px, calc(100dvh - 3rem)); border-radius: 16px; transform: translate(-50%, -46%); opacity: 0; transition: transform 0.35s var(--ease), opacity 0.3s var(--ease); }
  .sheet.is-open .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grab { display: none; }
  .sheet--side .sheet__panel { left: auto; right: 0; top: 0; bottom: 0; width: 440px; height: 100%; max-height: none; border-radius: 0; transform: translateX(100%); opacity: 1; }
  .sheet--side.is-open .sheet__panel { transform: none; }
}

/* Modo: mesa / desde casa */
.mode__title { font-family: var(--f-display); font-size: 2rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.mode__text { margin-top: 0.5rem; color: var(--muted); }
.mode__form { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
.mode__skip { justify-self: center; min-height: 44px; font-size: 0.92rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.table-input { display: flex; align-items: center; gap: 0.75rem; height: 64px; padding: 0 1.1rem; border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; }
.table-input span { font-family: var(--f-display); font-size: 1.5rem; font-weight: 800; text-transform: uppercase; }
.table-input input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-family: var(--f-display); font-size: 2rem; font-weight: 800; outline: none; }
.mode-options { display: grid; gap: 0.6rem; margin-top: 1.25rem; }
.mode-options .choice { background: var(--paper); border: 1px solid var(--line); }
.mode-options .choice--line { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Ficha de producto */
.ps__img { aspect-ratio: 16 / 11; background: #e7dfd4; }
.ps__img img { width: 100%; height: 100%; object-fit: cover; }
.ps__body { padding: 1.25rem 1.25rem 1.5rem; }
.ps__cat { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.ps__name { margin-top: 0.3rem; font-family: var(--f-display); font-size: 2.3rem; font-weight: 800; line-height: 0.95; text-transform: uppercase; }
.ps__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.ps__desc { margin-top: 0.75rem; color: var(--muted); }
.ps__price { margin-top: 0.85rem; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ps__note { margin-top: 1rem; }
.opt-group { margin-top: 1.5rem; }
.opt-group legend { display: flex; justify-content: space-between; width: 100%; padding: 0; margin-bottom: 0.4rem; font-weight: 600; }
.opt-group legend span { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 0.75rem; min-height: 52px; padding: 0.5rem 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.opt__label { flex: 1; }
.opt__label small { display: block; font-size: 0.8rem; color: var(--muted); }
.opt__price { font-size: 0.92rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.opt.is-off { opacity: 0.5; cursor: not-allowed; }
.buy { display: flex; align-items: center; gap: 0.75rem; }
.buy .btn { flex: 1; min-width: 0; }
.buy .btn span { font-variant-numeric: tabular-nums; }

.qty { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; }
.qty button { display: grid; place-items: center; width: 44px; height: 48px; font-size: 1.3rem; line-height: 1; }
.qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty output { min-width: 1.6rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty--sm button { width: 36px; height: 36px; font-size: 1.1rem; }

/* Carrito */
.cart__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.4rem 0.75rem 0.4rem 1.25rem; border-bottom: 1px solid var(--line); }
.cart__title { font-family: var(--f-display); font-size: 1.7rem; font-weight: 800; text-transform: uppercase; }
.cart__mode { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 1rem 1.25rem 0; padding: 0.7rem 0.9rem; border-radius: var(--r); background: var(--paper); font-size: 0.88rem; }
.cart__mode b { font-weight: 600; }
.cart__mode button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.lines { padding: 0 1.25rem; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.85rem; align-items: start; padding: 1rem 0; border-bottom: 1px solid var(--line); animation: fade-in 0.25s var(--ease) both; }
.line__img { width: 56px; height: 56px; overflow: hidden; border-radius: 8px; background: #e7dfd4; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 600; line-height: 1.25; }
.line__detail { font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }
.line__unit { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }
.line__controls { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }
.line__remove { min-height: 36px; font-size: 0.82rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.line__total { font-weight: 600; font-variant-numeric: tabular-nums; }
.cart__clear { display: block; margin: 0.75rem 1.25rem 1.25rem auto; min-height: 40px; font-size: 0.85rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.summary span { color: var(--muted); font-size: 0.9rem; }
.summary strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.cart-empty { display: grid; justify-items: center; gap: 0.5rem; padding: 3.5rem 1.5rem; text-align: center; }
.cart-empty svg { color: var(--line-strong); }
.cart-empty p { font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; text-transform: uppercase; }
.cart-empty small { color: var(--muted); max-width: 30ch; }
.cart-empty .btn { margin-top: 1rem; }

/* Finalizar pedido */
.checkout { padding: 1rem 1.25rem 1.5rem; display: grid; gap: 1.1rem; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; font-weight: 600; font-size: 0.92rem; }
.checkout__title { font-family: var(--f-display); font-size: 1.9rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.segmented button { display: grid; gap: 0.15rem; min-height: 64px; padding: 0.6rem 0.9rem; border: 1.5px solid var(--line-strong); border-radius: 12px; text-align: left; transition: border-color 0.2s, background-color 0.2s; }
.segmented b { font-weight: 600; }
.segmented small { font-size: 0.78rem; color: var(--muted); }
.segmented button[aria-pressed='true'] { border-color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.field { display: grid; gap: 0.35rem; }
.field > span { font-size: 0.88rem; font-weight: 600; }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 0.75rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 16px; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(164, 91, 146, 0.18); }
.field [aria-invalid='true'] { border-color: #b3261e; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips button { min-height: 40px; padding: 0 0.9rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.9rem; }
.chips button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.recap { padding: 0.9rem 1rem; border-radius: var(--r); background: var(--paper); font-size: 0.9rem; }
.recap li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.recap li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.recap__total { margin-top: 0.4rem; padding-top: 0.5rem !important; border-top: 1px solid var(--line-strong); font-weight: 600; }
.form-error { padding: 0.65rem 0.85rem; border-radius: 8px; background: #fbe8e6; color: #8c1d18; font-size: 0.9rem; }
.hint { font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 0.6rem; }

.sent { display: grid; justify-items: center; gap: 0.6rem; padding: 3rem 1.5rem; text-align: center; }
.sent__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e2f3e8; color: var(--wa); }
.sent h3 { font-family: var(--f-display); font-size: 2rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.sent p { color: var(--muted); max-width: 32ch; }
.sent .btn { margin-top: 0.5rem; }

/* Aviso */
.toast {
  position: fixed; left: 50%; bottom: calc(5.25rem + env(safe-area-inset-bottom)); z-index: 70;
  display: flex; align-items: center; gap: 1rem;
  max-width: calc(100vw - 1.5rem); width: max-content;
  padding: 0.75rem 0.85rem 0.75rem 1.1rem;
  border-radius: 12px; background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-size: 0.92rem;
  transform: translate(-50%, 12px); opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast button { flex: none; padding: 0.3rem 0.4rem; font-weight: 600; color: #f1d7ea; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 960px) { .toast { bottom: 1.5rem; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  html:focus-within { scroll-behavior: auto; }
}

/* Ajustes finos */
@media (max-width: 479px) {
  .hero__kicker { flex-direction: column; gap: 0.2rem; }
  .hero__kicker [aria-hidden] { display: none; }
}
@media (max-width: 959px) {
  .has-cartbar .hero__content { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}
.buy .btn { white-space: nowrap; gap: 0.4rem; }
.buy .btn [data-total] { opacity: 0.8; font-weight: 500; }
@media (max-width: 374px) { .buy__label { font-size: 0.9em; } }
.ps__waiter { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--muted); }
.ps__waiter::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
