/* =========================================================
   PLANTILLA #1 · GASTRONOMÍA · Menú QR + pedido por WhatsApp
   Estilo limpio de app de delivery: blanco, negro, grises y un
   solo color de acento (verde). Esquinas casi rectas.
   · Celular  → lista + barra de pedido abajo + hoja deslizante
   · Tablet   → cuadrícula de 2-3 columnas
   · PC       → 3 columnas: negocio y categorías | menú | carrito fijo
   Tema claro (por defecto) y oscuro.
   ========================================================= */

/* Fuentes locales (Inter, licencia OFL) → funcionan sin internet */
@font-face { font-family: "InterL"; font-weight: 500; font-display: swap; src: url("../assets/fonts/body-medium.woff2") format("woff2"); }
@font-face { font-family: "InterL"; font-weight: 700; font-display: swap; src: url("../assets/fonts/body-bold.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --line: #e2e2e2;
  --text: #000000;
  --muted: #545454;
  --tile: #f3f3f3;
  --ink: #000000;          /* botones principales */
  --on-ink: #ffffff;
  --green: #06c167;        /* acento (se cambia en CONFIG_NEGOCIO) */
  --green-ink: #0a8447;    /* verde para texto/etiquetas */
  --on-green: #ffffff;
  --red: #e11900;
  --banner: #141414;
  --glass: rgba(255, 255, 255, .94);
  --shadow: 0 4px 16px rgba(0, 0, 0, .12);
  --r: 8px;                /* radio de tarjetas e imágenes */
  --r-sm: 6px;             /* radio de botones y campos */
  --nav-h: 64px;
  --stick: 140px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --f: "InterL", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #141414;
  --surface-2: #1f1f1f;
  --line: #333333;
  --text: #ffffff;
  --muted: #a6a6a6;
  --tile: #262626;
  --ink: #ffffff;
  --on-ink: #000000;
  --green-ink: #06c167;
  --on-green: #000000;
  --red: #ff6a5c;
  --glass: rgba(0, 0, 0, .9);
  --shadow: 0 4px 16px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--f); font-weight: 500; font-size: 16px; line-height: 1.4; padding-bottom: calc(100px + var(--safe-b)); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.lock { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--on-ink); }
.wrap { max-width: 1680px; margin: 0 auto; padding: 0 clamp(14px, 2.4vw, 40px); }

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease), translate .6s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; translate: 0 0; }
.rip { position: absolute; border-radius: 50%; background: rgba(128, 128, 128, .4); transform: scale(0); animation: rip .6s ease-out forwards; pointer-events: none; }
@keyframes rip { to { transform: scale(4); opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes bump { 30% { transform: scale(1.1); } 60% { transform: scale(.97); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- NAV ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.nav__in { max-width: 1680px; margin: 0 auto; height: var(--nav-h); padding: 0 clamp(14px, 2.4vw, 40px); display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; border-radius: 6px; }
.brand strong { font-weight: 700; font-size: 1.15rem; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; text-decoration: none; transition: background .2s, transform .2s var(--ease); }
.icon-btn:hover { background: var(--line); }
.icon-btn:active { transform: scale(.92); }
#themeBtn .i-moon { display: none; }
[data-theme="dark"] #themeBtn .i-sun { display: none; }
[data-theme="dark"] #themeBtn .i-moon { display: block; }
.cartbtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: var(--r-sm); min-height: 40px; padding: 0 14px; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: .92rem; transition: opacity .2s, transform .2s var(--ease); }
.cartbtn:hover { opacity: .85; }
.cartbtn b { background: var(--on-ink); color: var(--ink); min-width: 22px; height: 22px; border-radius: 4px; display: inline-grid; place-items: center; font-size: .8rem; }
.cartbtn span { display: none; }
@media (min-width: 480px) { .cartbtn span { display: inline; } }
.cartbtn.bump, .cartbar.bump button, .sheet__n.bump { animation: bump .4s var(--ease); }

/* ---------- AVISO ---------- */
.promo { background: var(--ink); color: var(--on-ink); overflow: hidden; white-space: nowrap; font-weight: 500; font-size: .86rem; }
.promo__track { display: inline-flex; padding: 9px 0; animation: slide 36s linear infinite; }
.promo:hover .promo__track { animation-play-state: paused; }
.promo__track span { padding: 0 24px; }
.promo__track span::after { content: "·"; margin-left: 48px; opacity: .6; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- LAYOUT (móvil) ---------- */
.layout { display: flex; flex-direction: column; margin-top: 16px; }
.side { display: contents; }
.side__menu { display: none; }
.banner { order: 1; }
.store { order: 2; }
.fav { order: 3; }
.col { order: 4; min-width: 0; }

/* ---------- BANNER ---------- */
.banner { position: relative; height: clamp(150px, 46vw, 220px); background: var(--banner); border-radius: var(--r); overflow: hidden; }
.banner__art { position: absolute; inset: 0; }
.float { position: absolute; height: var(--h); aspect-ratio: 1; left: var(--l); top: var(--t); z-index: var(--z, 1); transform: translate(calc(var(--mx, 0) * var(--d) * 1px), calc(var(--my, 0) * var(--d) * 1px)); transition: transform .3s ease-out; }
.float__i { width: 100%; height: 100%; animation: bob var(--bt, 6s) ease-in-out var(--bd, 0s) infinite; }
.float__i svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .4)); }
.banner__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- FICHA DEL NEGOCIO ---------- */
.store { padding: 20px 0 14px; }
.store__top { display: flex; align-items: center; gap: 12px; }
.store__logo { width: 56px; height: 56px; border-radius: var(--r); flex: none; border: 1px solid var(--line); }
.store h1 { font-size: clamp(1.6rem, 5.4vw, 2.1rem); font-weight: 700; line-height: 1.1; letter-spacing: -.5px; }
.store__tag { color: var(--muted); font-size: .92rem; margin-top: 3px; }
.store__slogan { margin-top: 12px; color: var(--muted); font-size: .95rem; }
.store__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.store__list li { display: flex; gap: 10px; align-items: flex-start; }
.store__list svg { flex: none; margin-top: 2px; color: var(--muted); }
.store__list a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.st-open { color: var(--green-ink); font-weight: 700; }
.st-closed { color: var(--red); font-weight: 700; }
.store__btns { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-sm); font-weight: 700; font-size: .92rem; text-decoration: none; border: 0; transition: background .2s, transform .2s var(--ease); }
.btn--gray { background: var(--surface-2); color: var(--text); }
.btn--gray:hover { background: var(--line); }
.btn:active { transform: scale(.97); }
.modes { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; position: relative; }
.modes button { position: relative; z-index: 1; border: 0; background: transparent; padding: 0 16px; min-height: 38px; border-radius: 4px; font-weight: 700; font-size: .9rem; color: var(--muted); transition: color .25s; }
.modes button[aria-pressed="true"] { color: var(--text); }
.modes__ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 4px; background: var(--bg); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: transform .35s var(--ease); }
.modes[data-m="envio"] .modes__ind { transform: translateX(100%); }
[data-theme="dark"] .modes__ind { background: #3a3a3a; box-shadow: none; }

/* ---------- Títulos ---------- */
.h-sec { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -.3px; line-height: 1.1; }
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- MÁS PEDIDOS ---------- */
.fav { margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.arrows { display: none; gap: 8px; }
.arrows button { width: 40px; height: 40px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); font-size: 1.1rem; transition: background .2s; position: relative; overflow: hidden; }
.arrows button:hover { background: var(--line); }
.arrows button:disabled { opacity: .35; pointer-events: none; }
.fav__track { display: flex; gap: 14px; overflow-x: auto; margin: 0 calc(clamp(14px, 2.4vw, 40px) * -1); padding: 14px clamp(14px, 2.4vw, 40px) 6px; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(14px, 2.4vw, 40px); scrollbar-width: none; }
.fav__track::-webkit-scrollbar { display: none; }
.fcard { flex: 0 0 clamp(150px, 42vw, 230px); scroll-snap-align: start; position: relative; }
.fcard__m { position: relative; }
.fcard .media { aspect-ratio: 1; }
.fcard__rank { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--green-ink); color: var(--on-green); font-weight: 700; font-size: .7rem; padding: 3px 7px; border-radius: 4px; }
.fcard__b { padding-top: 10px; }
.fcard__b h3 { font-size: .95rem; font-weight: 700; line-height: 1.25; }
.fprice { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.fcard .qty-slot { position: absolute; right: 8px; bottom: 8px; z-index: 2; }
.fcard:hover .media > svg { transform: scale(1.06); }

/* ---------- MEDIA ---------- */
.media { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--tile); border-radius: var(--r); }
.media > svg, .media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.media > svg { padding: 6%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); }
.media .emoji { font-size: 3rem; }

/* ---------- TOOLBAR ---------- */
.toolbar { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 30; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 10px clamp(14px, 2.4vw, 40px) 4px; margin: 14px calc(clamp(14px, 2.4vw, 40px) * -1) 0; border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-sm); padding: 0 12px; color: var(--muted); transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--text); background: var(--bg); color: var(--text); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 13px 0; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: var(--line); color: var(--text); width: 26px; height: 26px; border-radius: 4px; font-size: .7rem; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { position: relative; overflow: hidden; flex: none; border: 0; background: var(--surface-2); color: var(--text); padding: 0 16px; min-height: 40px; border-radius: var(--r-sm); font-weight: 700; font-size: .9rem; white-space: nowrap; transition: background .25s, color .25s; }
.cats button.is-active { background: var(--ink); color: var(--on-ink); }

/* ---------- MENÚ ---------- */
.sec { padding-top: 26px; scroll-margin-top: var(--stick); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.sec__head h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 700; letter-spacing: -.4px; line-height: 1.1; position: relative; padding-bottom: 10px; }
.sec__head h2::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--ink); transition: width .7s var(--ease) .15s; }
.sec.in .sec__head h2::after { width: 36px; }
.sec__head span { color: var(--muted); font-size: .82rem; }
.sec__grid { display: grid; grid-template-columns: minmax(0, 1fr); }

.item { display: grid; grid-template-columns: 1fr 112px; grid-template-areas: "text media"; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.item.is-out { filter: grayscale(1); }
.item__text { grid-area: text; min-width: 0; display: flex; flex-direction: column; }
.item__media { grid-area: media; position: relative; }
.item__media .media { width: 112px; height: 112px; }
.item__name { order: 1; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.item__price { order: 2; margin-top: 3px; font-size: .95rem; }
.item__desc { order: 3; color: var(--muted); font-size: .88rem; margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__qty { position: absolute; right: 6px; bottom: 6px; z-index: 2; }
.item:hover .media > svg, .item:hover .media > img { transform: scale(1.06); }
.badge { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 6px; border-radius: 4px; background: var(--green-ink); color: var(--on-green); }
.badge--out { background: var(--muted); color: var(--bg); }

/* Botón agregar / selector de cantidad */
.add, .qty { background: #fff; color: #000; border-radius: var(--r-sm); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.add { position: relative; overflow: hidden; border: 0; font-weight: 700; min-height: 36px; padding: 0 12px; font-size: .88rem; white-space: nowrap; transition: transform .2s var(--ease), background .2s; }
.add:hover { background: #eee; }
.add:active { transform: scale(.92); }
.add:disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.add--c { width: 36px; padding: 0; font-size: 1.4rem; line-height: 1; display: grid; place-items: center; }
.qty { display: inline-flex; align-items: center; }
.qty.new { animation: pop .3s var(--ease); }
.qty button { width: 34px; height: 36px; border: 0; background: transparent; color: #000; font-size: 1.35rem; font-weight: 700; line-height: 1; display: grid; place-items: center; padding: 0; border-radius: var(--r-sm); transition: background .15s, transform .15s; }
.qty button:hover { background: #eee; }
.qty button:active { transform: scale(.85); }
.qty__n { min-width: 22px; text-align: center; font-weight: 700; font-size: .95rem; }
.qty__n.tick { animation: bump .3s var(--ease); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty svg { width: 96px; height: 96px; margin: 0 auto 8px; animation: bob 5s ease-in-out infinite; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 40px 20px 8px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 40px; }
.footer img { width: 48px; height: 48px; border-radius: 6px; margin: 0 auto 10px; }
.footer__name { font-weight: 700; color: var(--text); font-size: 1.1rem; }
.footer__small { font-size: .74rem; margin-top: 14px; opacity: .8; }

/* ---------- CARTBAR (móvil) ---------- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 14px calc(10px + var(--safe-b)); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); animation: up .4s var(--ease); }
@keyframes up { from { transform: translateY(100%); } }
.cartbar button { width: 100%; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; border: 0; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink); padding: 0 16px; min-height: 52px; font-weight: 700; font-size: 1rem; }
.cartbar__count { background: var(--on-ink); color: var(--ink); min-width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center; font-size: .85rem; }
.cartbar__label { flex: 1; text-align: left; }

/* ---------- PANEL DEL PEDIDO (hoja en móvil) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; flex-direction: column; max-height: 94vh; max-height: 94dvh; background: var(--surface); border-radius: 12px 12px 0 0; transform: translateY(105%); transition: transform .35s var(--ease), visibility .35s; max-width: 640px; margin: 0 auto; visibility: hidden; }
.sheet.is-open { transform: translateY(0); visibility: visible; }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.sheet__head h2 { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 10px; letter-spacing: -.3px; }
.sheet__n { font-size: .8rem; background: var(--ink); color: var(--on-ink); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 4px; display: inline-grid; place-items: center; }
.sheet__close { border: 0; background: var(--surface-2); color: var(--text); width: 36px; height: 36px; border-radius: var(--r-sm); }
.sheet__body { overflow-y: auto; padding: 0 18px 14px; flex: 1; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet__foot { padding: 14px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }

.cartlist { list-style: none; margin: 0; padding: 0; }
.cartlist li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cartlist li.new { animation: liIn .4s var(--ease); }
@keyframes liIn { from { opacity: 0; transform: translateX(24px); } }
.cartlist .media { width: 52px; height: 52px; flex: none; }
.cartlist .media .emoji { font-size: 1.5rem; }
.ci__info { flex: 1; min-width: 0; }
.ci__name { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.ci__sub { color: var(--muted); font-size: .8rem; }
.ci__line { font-weight: 700; min-width: 54px; text-align: right; font-size: .95rem; }
.cartlist .qty { background: var(--surface-2); box-shadow: none; color: var(--text); }
.cartlist .qty button { color: var(--text); }
.cartlist .qty button:hover { background: var(--line); }

form { margin-top: 18px; }
.field { margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; padding: 0; }
.field small { color: var(--muted); font-weight: 500; }
.field input[type="text"], .field select, .field textarea { width: 100%; border: 2px solid transparent; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); padding: 13px 12px; font-size: 16px; outline: 0; appearance: none; -webkit-appearance: none; transition: border-color .2s, background .2s; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); background-color: var(--bg); }
.field .invalid { border-color: var(--red) !important; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span { display: block; text-align: center; padding: 12px 8px; border-radius: var(--r-sm); border: 2px solid var(--line); line-height: 1.25; height: 100%; transition: border-color .2s, background .2s; }
.seg__opt b { display: block; font-size: .92rem; }
.seg__opt small { color: var(--muted); font-size: .74rem; }
.seg__opt input:checked + span { border-color: var(--text); background: var(--surface-2); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.error { color: var(--red); font-weight: 700; font-size: .88rem; margin-bottom: 8px; }

.ship { margin-bottom: 12px; }
.ship p { font-size: .85rem; color: var(--muted); margin-bottom: 7px; }
.ship p b { color: var(--green-ink); }
.ship__bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.ship__bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .5s var(--ease); }
.totals { margin: 0 0 12px; }
.totals > div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); font-size: .92rem; }
.totals dt, .totals dd { margin: 0; }
.totals__final { color: var(--text) !important; font-size: 1.2rem !important; padding-top: 8px !important; font-weight: 700; }
.hint { font-size: .84rem; background: var(--surface-2); border-left: 3px solid var(--ink); border-radius: 4px; padding: 9px 12px; margin-bottom: 12px; }
.btn-wa { position: relative; overflow: hidden; width: 100%; border: 0; border-radius: var(--r-sm); background: var(--green); color: #000; min-height: 54px; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 10px; transition: filter .2s, transform .2s var(--ease); }
.btn-wa:hover { filter: brightness(.94); }
.btn-wa:active { transform: scale(.98); }
.btn-wa:disabled { opacity: .45; }
.btn-ghost { width: 100%; background: transparent; border: 0; color: var(--muted); padding: 12px 0 0; font-size: .86rem; text-decoration: underline; }

/* ---------- Extras ---------- */
.fly { position: fixed; z-index: 120; pointer-events: none; border-radius: var(--r); overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.fly svg, .fly img { width: 100%; height: 100%; object-fit: cover; }
.confetti { position: fixed; z-index: 130; width: 8px; height: 12px; border-radius: 1px; pointer-events: none; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 16px); background: var(--ink); color: var(--on-ink); font-weight: 700; padding: 11px 16px; border-radius: var(--r-sm); font-size: .88rem; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 140; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   ≥ 560px
   ========================================================= */

/* =========================================================
   TABLET ≥ 760px → tarjetas en cuadrícula
   ========================================================= */
@media (min-width: 760px) {
  .banner { height: 260px; }
  .store { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  .store__top, .store__slogan { grid-column: 1; }
  .store__list { grid-column: 2; grid-row: 1 / span 3; margin: 0; align-self: center; }
  .store__btns { grid-column: 1 / -1; }
  .arrows { display: flex; }
  .fcard { flex-basis: clamp(180px, 22vw, 230px); }

  .sec__grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px 16px; padding-top: 14px; }
  .item { grid-template-columns: 1fr; grid-template-areas: "media" "text"; gap: 10px; padding: 0; border: 0; align-content: start; }
  .item__media .media { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .item__qty { right: 10px; bottom: 10px; }
  .item__name { font-size: 1.02rem; }
  .fcard .qty-slot { right: 10px; bottom: 10px; }

  .sheet { left: 50%; right: auto; width: 540px; transform: translate(-50%, 105%); border-radius: var(--r); bottom: 24px; max-height: 88vh; }
  .sheet.is-open { transform: translate(-50%, 0); }
}

/* =========================================================
   PC ≥ 1100px → 3 columnas: negocio | menú | carrito fijo
   ========================================================= */
@media (min-width: 1100px) {
  .layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 380px; grid-template-areas: "side banner sheet" "side fav sheet" "side col sheet"; column-gap: 32px; align-items: start; margin-top: 24px; }
  .banner { grid-area: banner; order: 0; height: 280px; }
  .side { grid-area: side; display: block; position: sticky; top: calc(var(--nav-h) + 20px); max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .fav { grid-area: fav; order: 0; }
  .col { grid-area: col; order: 0; }
  .store { order: 0; display: block; padding: 0 0 20px; }
  .store__list { margin-top: 14px; }
  .store__btns { margin-top: 14px; }
  .side__menu { display: block; border-top: 1px solid var(--line); padding-top: 18px; }
  .side__menu h3 { font-size: 1.1rem; font-weight: 700; }
  .side__hor { color: var(--muted); font-size: .82rem; margin: 2px 0 12px; }
  .side__nav { position: relative; display: flex; flex-direction: column; }
  .side__nav a { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s, padding .3s var(--ease); }
  .side__nav a small { font-size: .78rem; opacity: .8; }
  .side__nav a:hover { color: var(--text); padding-left: 20px; }
  .side__nav a.is-active { color: var(--text); font-weight: 700; }
  .side__ind { position: absolute; left: 0; top: 0; width: 100%; height: 46px; background: var(--surface-2); border-left: 4px solid var(--ink); transition: transform .4s var(--ease), height .25s; }

  .cats { display: none; }
  .toolbar { margin: 14px 0 0; padding: 10px 0; border-bottom: 0; }
  .search { max-width: 100%; }
  .sec__grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .fcard { flex-basis: clamp(180px, 15vw, 220px); }
  .fav__track { margin: 0; padding-inline: 0; scroll-padding-inline: 0; }
  .store__top { flex-direction: column; align-items: flex-start; }
  .store__logo { width: 64px; height: 64px; }

  /* El carrito se vuelve una columna fija siempre visible */
  .sheet { grid-area: sheet; position: sticky; top: calc(var(--nav-h) + 20px); left: auto; right: auto; bottom: auto; width: auto; max-width: none; margin: 0; transform: none !important; visibility: visible; z-index: 20; border-radius: var(--r); border: 1px solid var(--line); max-height: calc(100vh - var(--nav-h) - 40px); }
  .sheet__grip, .sheet__close { display: none; }
  .overlay, .cartbar, .cartbtn { display: none !important; }
  body { padding-bottom: 40px; }
}
@media (min-width: 1700px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr) 420px; }
  .sec__grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; translate: none; }
}
