/* Street Burger · menú del cliente
   Diseño limpio y claro: fondo blanco, textos en negro, acento amarillo, tarjetas con foto. */
:root {
  --bg: #ffffff;
  --tinta: #1b1b1b;
  --gris: #8b8b8b;
  --linea: #ececec;
  --crema: #f7f1e6;
  --suave: #f4f2ee;
  --amarillo: #f6b72c;
  --amarillo-osc: #d89a0a;
  --rojo: #d6432e;
  --verde: #3f9a4d;
  --sombra: 0 6px 20px rgba(0, 0, 0, .06);
  --gut: clamp(16px, 4.5vw, 32px);
  --alto-tab: 68px;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-script: "Caveat", "Segoe Script", cursive;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-texto); color: var(--tinta); background: var(--bg); line-height: 1.4; min-height: 100vh; overflow-x: hidden;
  padding-bottom: calc(var(--alto-tab) + 96px + env(safe-area-inset-bottom));
}
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Encabezado ---------- */
.cab { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px var(--gut); background: #fff; }
.logo-cab { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; }
@media (max-width: 380px) { .logo-cab { width: 64px; height: 64px; } }
.cab-der { display: flex; justify-content: flex-end; gap: 2px; }
.ib { position: relative; width: 46px; height: 46px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 50%; }
.ib svg { width: 28px; height: 28px; stroke-width: 2; }
.ib:active { background: var(--suave); }
.insignia { position: absolute; top: 3px; right: 2px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--amarillo); color: var(--tinta); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.buscador { padding: 0 var(--gut) 8px; background: var(--bg); position: sticky; top: 92px; z-index: 19; }
.buscador input { width: 100%; padding: 13px 16px; border-radius: 999px; border: 1px solid var(--linea); background: var(--suave); font: inherit; font-size: 16px; }
.buscador input:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; background: #fff; }

.contenedor { max-width: 1120px; margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Modo / ubicación ---------- */
.modos { display: flex; gap: 4px; margin: 8px 0 0; padding: 4px; background: var(--suave); border-radius: 999px; }
.modo { flex: 1; border: 0; background: transparent; padding: 10px 8px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--gris); }
.modo.activa { background: var(--amarillo); color: var(--tinta); box-shadow: 0 4px 10px rgba(246,183,44,.4); }
.ubic { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 2px 14px; }
.ubic-izq { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; min-width: 0; }
.ubic button { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 4px 0; font-size: .92rem; font-weight: 500; min-width: 0; }
.ubic svg { width: 22px; height: 22px; flex: none; }
.ubic .chev { width: 16px; height: 16px; }
.ubic-izq span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubic-izq.sin span { color: var(--rojo); font-weight: 700; }
.ubic-der { flex: none; }
.aviso { background: #fdeceb; border: 1px solid #f3c1bb; color: #8a2a1d; border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: .9rem; font-weight: 500; }

/* ---------- Banner ---------- */
.banner { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 26px rgba(0,0,0,.18); background: #111; max-width: 760px; margin: 0 auto; line-height: 0; }
.banner img { width: 100%; height: auto; display: block; }

/* ---------- Categorías ---------- */
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 22px var(--gut) 8px; margin: 0 calc(-1 * var(--gut)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: transparent; border: 0; padding: 0 0 8px; position: relative; }
.cat-icono { width: 62px; height: 62px; display: grid; place-items: center; font-size: 1.8rem; border-radius: 50%; background: var(--crema); border: 3px solid transparent; transition: border-color .15s, background .15s; }
.cat-nombre { font-size: .86rem; font-weight: 500; text-align: center; line-height: 1.15; }
.cat.activa .cat-icono { border-color: var(--amarillo); background: #fffaf0; }
.cat.activa .cat-nombre { font-weight: 800; }
.cat.activa::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 24px; height: 4px; margin-left: -12px; border-radius: 4px; background: var(--amarillo); }
/* centradas si entran; si no entran, se pueden desplazar desde el primero (los márgenes auto evitan que se corte a la izquierda) */
.cat:first-child { margin-left: auto; }
.cat:last-child { margin-right: auto; }

/* ---------- Productos ---------- */
.categoria { margin: 22px 0 8px; }
.cat-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.categoria h2 { font-size: clamp(1.3rem, 4.6vw, 1.6rem); font-weight: 800; letter-spacing: -.01em; }
.ver-todas { background: transparent; border: 0; color: var(--gris); font-size: .9rem; font-weight: 500; padding: 4px 0; }
.grilla { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grilla > * { min-width: 0; }
.prod { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--linea); border-radius: 18px; box-shadow: var(--sombra); }
.prod[hidden] { display: none !important; }
.prod-img { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--crema); align-self: flex-start; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-img.sin-foto { display: grid; place-items: center; font-size: 2.4rem; }
.prod-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 2px 0; }
.prod h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.prod-desc { font-size: .82rem; color: var(--gris); overflow-wrap: anywhere; } /* completa: con la carta real el cliente tiene que poder leer los ingredientes */
.prod-cat { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: #6d6d6d; }
.prod-cat i { font-style: normal; font-size: .95rem; }
.prod-lado { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.precio { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.btn-mas { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--tinta); color: #fff; font-size: 1.6rem; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.btn-mas:active { transform: scale(.94); }
.btn-mas.bloq { background: #cfcfcf; box-shadow: none; }
.stepper { display: inline-flex; align-items: center; background: var(--tinta); border-radius: 999px; color: #fff; }
.stepper button { width: 36px; height: 40px; border: 0; background: transparent; color: inherit; font-size: 1.25rem; font-weight: 700; }
.stepper span { min-width: 20px; text-align: center; font-weight: 700; font-size: .95rem; }

/* ---------- Barra del pedido y navegación inferior ---------- */
.barra-carrito {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(var(--alto-tab) + 14px + env(safe-area-inset-bottom));
  width: min(calc(100% - 28px), 520px); display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px;
  background: var(--tinta); color: #fff; border: 0; border-radius: 999px; font-weight: 700; box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.bc-cant { background: var(--amarillo); color: var(--tinta); min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.bc-txt { flex: 1; text-align: left; }
.bc-total { font-weight: 800; font-size: 1.05rem; }
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--alto-tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--linea); box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: transparent; border: 0; color: #333; font-size: .78rem; font-weight: 500; }
.nav-item svg { width: 27px; height: 27px; }
.nav-item.activa { color: var(--amarillo-osc); font-weight: 700; }
.nav-item.activa::after { content: ""; position: absolute; bottom: 6px; width: 26px; height: 4px; border-radius: 4px; background: var(--amarillo); }
@media (min-width: 900px) {
  .tabbar { left: 50%; right: auto; width: 460px; transform: translateX(-50%); bottom: 14px; border: 1px solid var(--linea); border-radius: 26px; height: var(--alto-tab); padding-bottom: 0; box-shadow: 0 12px 34px rgba(0,0,0,.14); }
  .barra-carrito { bottom: calc(var(--alto-tab) + 30px); }
}

/* ---------- Diálogos ---------- */
dialog { border: 0; padding: 20px; background: #fff; color: var(--tinta); border-radius: 26px; width: min(92vw, 460px); max-height: 88vh; max-height: 88dvh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
dialog.ancha { width: min(94vw, 560px); }
@media (max-width: 640px) {
  dialog.hoja { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 26px 26px 0 0; max-height: 90vh; max-height: 90dvh; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
.dlg-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dlg-cab h2 { font-weight: 800; font-size: 1.4rem; letter-spacing: -.01em; }
.cerrar { background: var(--suave); border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: .95rem; flex: none; }
.dlg-sub { color: var(--gris); margin: 0 0 14px; font-size: .9rem; }
.mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 10px; }
.mesa-btn { aspect-ratio: 1; border: 2px solid var(--linea); background: #fff; border-radius: 18px; font-weight: 800; font-size: 1.4rem; }
.mesa-btn:active, .mesa-btn.sel { background: var(--amarillo); border-color: var(--amarillo); }

.para-mesa { margin: 4px 0 10px; color: var(--gris); font-size: .9rem; }
.link { background: none; border: 0; color: var(--amarillo-osc); text-decoration: underline; padding: 0; font-weight: 700; }
.lista { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.fila { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px dashed var(--linea); }
.fila:last-child { border-bottom: 0; }
.fila > * { min-width: 0; }
.fila-nombre { font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.fila-precio { font-weight: 800; }
.fila-nota { grid-column: 1 / -1; }
.fila-nota input { width: 100%; border: 1px solid var(--linea); background: var(--suave); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--tinta); }
.fila-nota input:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; background: #fff; }
.fila .stepper { transform: scale(.88); transform-origin: right center; }
.fila small { color: var(--gris); }
.total-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 0; border-top: 2px solid var(--tinta); }
.total-fila strong { font-weight: 800; font-size: 1.6rem; }
.nota-peq { font-size: .76rem; color: var(--gris); margin: 0 0 12px; }
.error { color: var(--rojo); font-weight: 600; font-size: .88rem; margin: 0 0 10px; }
.btn-principal, .btn-sec { width: 100%; border-radius: 999px; padding: 15px; font-weight: 700; font-size: 1rem; border: 2px solid var(--tinta); }
.btn-principal { background: var(--tinta); color: #fff; }
.btn-sec { background: transparent; margin-top: 8px; }
.btn-principal:disabled { opacity: .45; }
.dos-botones { display: grid; }
.listo { text-align: center; padding: 8px 0 0; }
.listo-ok { width: 70px; height: 70px; margin: 0 auto 10px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 2.2rem; display: grid; place-items: center; }
.listo h2 { font-weight: 800; font-size: 1.7rem; }
.listo p { color: var(--gris); margin: 6px 0 18px; }
.tabs { display: flex; gap: 8px; margin: 10px 0 12px; }
.tab { flex: 1; padding: 10px; border-radius: 999px; border: 2px solid var(--linea); background: transparent; font-weight: 700; }
.tab.activa { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.horario-img { width: 100%; height: auto; border-radius: 16px; display: block; }
.vacio { text-align: center; color: var(--gris); padding: 40px 0; }
.pie { text-align: center; padding: 30px 0 6px; }
.script { font-family: var(--f-script); font-size: 1.6rem; color: var(--amarillo-osc); }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--alto-tab) + 90px); background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 90vw; }

/* Cuenta / opciones */
.op-tit { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); font-weight: 700; margin: 16px 0 8px; }
.modos-dlg { margin: 0; }
.op-fila { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 14px; margin-bottom: 8px; border: 1px solid var(--linea); border-radius: 14px; background: #fff; font-weight: 600; text-align: left; }
.op-fila:active { background: var(--suave); }

/* Datos del delivery */
.datos { border-top: 2px solid var(--tinta); padding-top: 14px; margin-bottom: 6px; }
.datos h3 { font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.campo { display: block; font-size: .78rem; font-weight: 700; margin: 0 0 12px; }
.campo > span { display: block; margin-bottom: 5px; }
.campo small { font-weight: 400; color: var(--gris); }
.campo input { width: 100%; padding: 13px; border-radius: 12px; border: 1px solid var(--linea); background: var(--suave); color: var(--tinta); font: inherit; font-size: 16px; /* 16px: evita el zoom automático en iPhone */ }
.campo input:focus { outline: 2px solid var(--amarillo); outline-offset: 1px; background: #fff; }
.campo input.mal { border-color: var(--rojo); background: #fdeeea; }
.pagos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pago { padding: 12px 4px; border-radius: 14px; border: 2px solid var(--linea); background: #fff; font-weight: 700; font-size: .8rem; }
.pago.activa { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.desglose { font-size: .88rem; color: var(--gris); margin-bottom: 4px; }
.desglose div { display: flex; justify-content: space-between; padding: 2px 0; }
.info-transf { background: var(--suave); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; font-size: .88rem; text-align: left; white-space: pre-line; color: var(--tinta); }

/* ---------- Tablet / PC ---------- */
@media (min-width: 700px) {
  .grilla { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .modos { max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1100px) { .grilla { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
