/* Estructura y comportamiento que comparten todas las vidrieras.
   Colores, letras, radios y sombras los pone el estilo.css de cada rubro con estas variables:
   --fondo --superficie --superficie-2 --texto --suave --linea --acento --acento-texto --ok --alerta
   --radio --radio-chico --sombra --letra --titulos */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; min-height: 100svh; background: var(--fondo); color: var(--texto); font-family: var(--letra); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

/* clip y no hidden: hidden rompe las barras pegajosas (sticky). Nada empuja la página hacia el costado. */
#app { overflow-x: clip; max-width: 560px; margin: 0 auto; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.vd-modo-dueno #app { max-width: 1180px; }
.vd-entra { animation: vd-entra .42s cubic-bezier(.16, 1, .3, 1); }
@keyframes vd-entra { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Interruptor Cliente | Dueño ---------- */
.vd-interruptor {
  position: fixed; z-index: 50; top: calc(10px + env(safe-area-inset-top)); right: 10px;
  display: flex; padding: 3px; border-radius: 999px; background: rgb(20 20 22 / .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.vd-interruptor-btn { padding: .45rem .8rem; border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .01em; transition: background .25s, color .25s; }
.vd-interruptor-btn[aria-pressed="true"] { background: #fff; color: #111; }

/* Botón de la luna: un sol que se vuelve luna con la sombra que lo tapa */
.vd-interruptor-btn.vd-tema { position: relative; width: 34px; padding: 0; margin-left: 2px; }
.vd-interruptor-btn.vd-tema[aria-pressed] { background: none; }
.vd-tema::before { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 3px rgb(255 210 63 / .25); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), background .3s, box-shadow .3s; }
.vd-tema::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: rgb(20 20 22); transform: translate(6px, -12px) scale(0); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.vd-tema[aria-pressed="true"]::before { background: #e9e6ff; box-shadow: none; transform: rotate(-30deg); }
.vd-tema[aria-pressed="true"]::after { transform: translate(-2px, -10px) scale(1); }
.vd-cambiando-tema, .vd-cambiando-tema * { transition: background-color .4s, color .4s, border-color .4s, box-shadow .4s !important; }

/* Instalar como app: botón en el interruptor y, en el iPhone, la hoja con los pasos */
.vd-instalar { background: var(--acento); color: var(--acento-texto); margin-right: 4px; }
.vd-hoja-fondo { position: fixed; z-index: 80; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: rgb(0 0 0 / .45); animation: vd-entra .3s; }
.vd-hoja { width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radio); background: var(--superficie); color: var(--texto); box-shadow: 0 20px 50px rgb(0 0 0 / .35); }
.vd-hoja strong { font-family: var(--titulos); font-size: 1.25rem; }
.vd-hoja ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }

/* ---------- Botón flotante del pedido ---------- */
.vd-pedido-btn {
  position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(536px, calc(100% - 24px)); min-height: 58px; display: flex; align-items: center; gap: .8rem; padding: 0 18px;
  border-radius: var(--radio); background: var(--acento); color: var(--acento-texto); font-weight: 700; box-shadow: var(--sombra);
  animation: vd-sube .4s cubic-bezier(.16, 1, .3, 1);
}
@keyframes vd-sube { from { transform: translate(-50%, 120%); } }
.vd-pedido-cant { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 999px; background: rgb(0 0 0 / .18); font-variant-numeric: tabular-nums; }
.vd-pedido-txt { flex: 1; text-align: left; }
.vd-pedido-total { font-variant-numeric: tabular-nums; }
.vd-vuela { position: fixed; z-index: 60; pointer-events: none; border-radius: 50%; object-fit: cover; }

/* ---------- Inicio ---------- */
.vd-cabecera { position: relative; }
.vd-estado { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: .85rem; font-weight: 700; }
.vd-estado-punto { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: vd-late 2s infinite; }
.vd-estado--cerrado .vd-estado-punto { background: var(--alerta); animation: none; }
.vd-estado--sin-delivery .vd-estado-punto { background: #e7a400; }
@keyframes vd-late { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.vd-datos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.vd-aviso-local { margin: 12px 16px 0; padding: 14px 16px; border-radius: var(--radio-chico); background: color-mix(in srgb, var(--alerta) 14%, var(--superficie)); display: flex; flex-direction: column; }

.vd-buscador { display: flex; align-items: center; gap: .6rem; margin: 16px 16px 0; padding: 0 14px; min-height: 50px; border-radius: var(--radio-chico); background: var(--superficie); border: 1px solid var(--linea); }
.vd-buscador-lupa { font-size: 1.3rem; color: var(--suave); line-height: 1; }
.vd-buscador input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; min-height: 48px; }

.vd-promo { position: relative; display: flex; align-items: stretch; width: calc(100% - 32px); margin: 16px 16px 0; min-height: 150px; border-radius: var(--radio); overflow: hidden; text-align: left; background: var(--acento); color: var(--acento-texto); }
.vd-promo-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .2rem; padding: 18px; max-width: 62%; }
.vd-promo-etiqueta { align-self: flex-start; padding: .2rem .55rem; border-radius: 999px; background: rgb(0 0 0 / .2); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.vd-promo-titulo { font-size: 1.6rem; line-height: 1.05; margin-top: .3rem; }
.vd-promo-bajada { font-size: .9rem; opacity: .9; }
.vd-promo-cta { margin-top: auto; align-self: flex-start; padding: .5rem .9rem; border-radius: 999px; background: var(--acento-texto); color: var(--acento); font-weight: 800; font-size: .85rem; }
.vd-promo-foto { position: absolute; right: -40px; top: 50%; width: 210px; height: 210px; transform: translateY(-50%) rotate(-12deg); border-radius: 50%; object-fit: cover; transition: transform .8s cubic-bezier(.33, 1, .68, 1); }
.vd-promo:hover .vd-promo-foto, .vd-promo:active .vd-promo-foto { transform: translateY(-50%) rotate(20deg); }

.vd-repetir { display: flex; align-items: center; gap: .8rem; width: calc(100% - 32px); margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--radio-chico); border: 1px dashed var(--linea); text-align: left; }
.vd-repetir-icono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--superficie-2); font-size: 1.2rem; }
.vd-repetir-txt { display: flex; flex-direction: column; min-width: 0; }
.vd-repetir-txt small { color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vd-cats { position: sticky; top: 0; z-index: 10; display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: 12px 16px; margin-top: 8px; background: var(--fondo); }
.vd-cats::-webkit-scrollbar { display: none; }
.vd-cat { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: 999px; text-decoration: none; white-space: nowrap; font-weight: 700; font-size: .92rem; background: var(--superficie); border: 1px solid var(--linea); transition: background .25s, color .25s, border-color .25s; }
.vd-cat[aria-current] { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }

.vd-titulo-bloque { margin: 0 16px 10px; font-family: var(--titulos); font-size: 1.25rem; }
.vd-destacados { margin-top: 22px; }
.vd-destacados-fila { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px; scrollbar-width: none; }
.vd-destacados-fila::-webkit-scrollbar { display: none; }
.vd-destacado { position: relative; flex: none; width: 176px; scroll-snap-align: start; border-radius: var(--radio); background: var(--superficie); text-align: left; overflow: hidden; box-shadow: var(--sombra-chica, none); transition: transform .3s cubic-bezier(.33, 1, .68, 1); }
.vd-destacado:active { transform: scale(.97); }
.vd-destacado-foto { width: 100%; aspect-ratio: 1; object-fit: cover; }
.vd-destacado-txt { display: flex; flex-direction: column; padding: 10px 12px 14px; }
.vd-destacado-precio { color: var(--suave); font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-destacado-mas { position: absolute; right: 10px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--acento); color: var(--acento-texto); font-weight: 800; font-size: 1.2rem; }

.vd-seccion { padding: 18px 16px 0; }
.vd-seccion-cab { margin-bottom: 8px; }
.vd-seccion-titulo { margin: 0; font-family: var(--titulos); }
.vd-seccion-nota { margin: .2rem 0 0; color: var(--suave); font-size: .9rem; }
.vd-platos { display: grid; gap: 10px; }
.vd-plato { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: var(--radio); background: var(--superficie); }
.vd-plato:not(:has(.vd-plato-foto)) { grid-template-columns: 1fr; }
.vd-plato-foto { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radio-chico); cursor: pointer; }
.vd-plato-nombre { font-weight: 800; font-size: 1.02rem; text-align: left; }
.vd-plato-etiqueta { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; background: var(--superficie-2); font-size: .72rem; font-weight: 800; vertical-align: middle; }
.vd-plato-desc { margin: .15rem 0 .4rem; color: var(--suave); font-size: .88rem; line-height: 1.35; }
.vd-plato-pie { display: flex; align-items: center; justify-content: space-between; }
.vd-plato-precio { font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-plato-mas { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--acento); color: var(--acento-texto); font-size: 1.3rem; font-weight: 700; transition: transform .2s; }
.vd-plato-mas:active { transform: scale(.88); }
.vd-sin-stock { opacity: .5; }
.vd-sin-stock .vd-plato-mas { background: var(--superficie-2); color: var(--suave); }

/* ---------- Producto ---------- */
.vd-producto { position: relative; padding-bottom: 96px; }
.vd-volver { position: absolute; z-index: 5; top: 12px; left: 12px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--superficie); box-shadow: var(--sombra-chica, none); font-size: 1.2rem; }
.vd-escena { position: relative; display: grid; place-items: center; padding: 64px 0 18px; }
.vd-disco { position: relative; width: min(78vw, 360px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; transform: scale(var(--escala, 1)) rotate(var(--giro, 0deg)); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); box-shadow: 0 24px 50px -18px rgb(0 0 0 / .45); }
.vd-disco img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vd-disco-b { clip-path: inset(0 0 0 100%); transition: clip-path .7s cubic-bezier(.16, 1, .3, 1); }
.vd-disco--mitad .vd-disco-b { clip-path: inset(0 0 0 50%); }
.vd-disco--mitad::after { content: ""; position: absolute; left: calc(50% - 1.5px); top: 0; bottom: 0; width: 3px; background: rgb(255 255 255 / .85); }
.vd-producto-info { padding: 0 18px; }
.vd-producto-nombre { margin: 0; font-family: var(--titulos); font-size: 1.8rem; line-height: 1.1; }
.vd-producto-desc { margin: .4rem 0 1rem; color: var(--suave); }
.vd-producto-nota { color: var(--suave); font-size: .9rem; }
.vd-grupo { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.vd-grupo-titulo { padding: 0; margin-bottom: .55rem; font-weight: 800; }
.vd-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; min-height: 52px; padding: .4rem .9rem; border-radius: var(--radio-chico); background: var(--superficie); border: 1.5px solid var(--linea); transition: background .2s, border-color .2s, color .2s, transform .2s; }
.vd-pill small { color: var(--suave); font-size: .75rem; }
.vd-pill[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); }
.vd-pill[aria-pressed="true"] small { color: inherit; opacity: .85; }
.vd-pill:active { transform: scale(.95); }
.vd-mitad-cab { display: flex; align-items: center; justify-content: space-between; }
.vd-switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--superficie-2); transition: background .25s; }
.vd-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.vd-switch[aria-checked="true"] { background: var(--ok); }
.vd-switch[aria-checked="true"]::after { transform: translateX(22px); }
.vd-gustos { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.vd-gustos::-webkit-scrollbar { display: none; }
.vd-gusto { flex: none; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 78px; font-size: .78rem; font-weight: 700; text-align: center; }
.vd-gusto img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid transparent; transition: border-color .2s, transform .3s; }
.vd-gusto[aria-pressed="true"] img { border-color: var(--acento); transform: scale(1.06); }
.vd-extra { display: flex; align-items: center; gap: .7rem; min-height: 48px; border-bottom: 1px solid var(--linea); cursor: pointer; }
.vd-extra span { flex: 1; }
.vd-extra small { color: var(--suave); font-weight: 700; }
.vd-extra input { width: 22px; height: 22px; accent-color: var(--acento); }
.vd-producto-barra { position: fixed; z-index: 31; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(536px, calc(100% - 24px)); display: flex; gap: 10px; }
.vd-producto .vd-producto-barra ~ * { display: none; }
body:has(.vd-producto) .vd-pedido-btn { display: none; }
.vd-stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra-chica, none); }
.vd-stepper-btn { display: grid; place-items: center; width: 44px; height: 46px; border-radius: var(--radio-chico); font-size: 1.3rem; font-weight: 700; }
.vd-stepper-btn:active { background: var(--superficie-2); }
.vd-stepper-n { min-width: 2ch; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-stepper--chico { padding: 2px; box-shadow: none; background: var(--superficie-2); }
.vd-stepper--chico .vd-stepper-btn { width: 34px; height: 34px; }
.vd-agregar { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 16px; white-space: nowrap; min-height: 58px; border-radius: var(--radio); background: var(--acento); color: var(--acento-texto); font-weight: 800; font-size: 1.02rem; box-shadow: var(--sombra); }
.vd-agregar strong { font-variant-numeric: tabular-nums; }

/* ---------- Pedido ---------- */
.vd-checkout { padding: 0 16px; }
.vd-checkout-cab, .vd-seguimiento-cab { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.vd-checkout-cab .vd-volver, .vd-seguimiento-cab .vd-volver { position: static; }
.vd-checkout-titulo { margin: 0; font-family: var(--titulos); font-size: 1.6rem; }
.vd-lineas { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.vd-linea { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radio); background: var(--superficie); }
.vd-linea-foto { width: 58px; height: 58px; border-radius: var(--radio-chico); object-fit: cover; }
.vd-linea-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vd-linea-txt small { color: var(--suave); font-size: .8rem; }
.vd-linea-precio { font-weight: 800; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.vd-form { display: flex; flex-direction: column; gap: 14px; }
.vd-segmentos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vd-segmento { display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px; border-radius: var(--radio-chico); border: 1.5px solid var(--linea); background: var(--superficie); text-align: left; transition: border-color .2s, background .2s; }
.vd-segmento small { color: var(--suave); font-size: .8rem; }
.vd-segmento[aria-checked="true"] { border-color: var(--acento); background: color-mix(in srgb, var(--acento) 10%, var(--superficie)); }
.vd-segmento:disabled { opacity: .5; }
.vd-campo { display: flex; flex-direction: column; gap: .35rem; }
.vd-campo > span { font-weight: 700; font-size: .9rem; }
.vd-campo input, .vd-campo select, .vd-campo textarea { width: 100%; min-height: 50px; padding: .75rem .9rem; border-radius: var(--radio-chico); border: 1.5px solid var(--linea); background: var(--superficie); font-size: 16px; outline: none; transition: border-color .2s; }
.vd-campo input:focus, .vd-campo select:focus, .vd-campo textarea:focus { border-color: var(--acento); }
.vd-totales { margin: 4px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--linea); }
.vd-total-fila { display: flex; justify-content: space-between; padding: .2rem 0; }
.vd-total-fila dt { color: var(--suave); }
.vd-total-fila dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.vd-total-fila:last-child dt, .vd-total-fila:last-child dd { color: var(--texto); font-weight: 800; font-size: 1.15rem; }
.vd-error { margin: 0; color: var(--alerta); font-weight: 700; }
.vd-error:empty { display: none; }
.vd-confirmar { position: relative; min-height: 58px; border-radius: var(--radio); background: var(--acento); color: var(--acento-texto); font-weight: 800; font-size: 1.05rem; overflow: hidden; box-shadow: var(--sombra); }
.vd-confirmar:disabled:not(.vd-confirmar--yendo) { background: var(--superficie-2); color: var(--suave); box-shadow: none; }
.vd-confirmar--yendo { color: transparent; }
.vd-confirmar--yendo::after { content: ""; position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--acento-texto); border-right-color: transparent; animation: vd-gira .7s linear infinite; }
@keyframes vd-gira { to { transform: rotate(360deg); } }
.vd-letra-chica { margin: 0; text-align: center; color: var(--suave); font-size: .82rem; }
.vd-vacio { padding: 30px 0; text-align: center; color: var(--suave); }
.vd-boton { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.4rem; border-radius: var(--radio-chico); background: var(--acento); color: var(--acento-texto); font-weight: 800; text-decoration: none; }
.vd-boton--suave { background: var(--superficie); color: var(--texto); border: 1.5px solid var(--linea); }

/* ---------- Seguimiento ---------- */
.vd-seguimiento { padding: 0 18px; text-align: center; }
.vd-seguimiento-n { margin: 0; font-weight: 800; }
.vd-anillo { position: relative; width: 230px; aspect-ratio: 1; margin: 6px auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--acento) calc(var(--progreso) * 360deg), var(--superficie-2) 0); transition: background 1s; }
.vd-anillo::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--fondo); }
.vd-anillo-centro { position: relative; width: 168px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.vd-anillo-foto { width: 100%; height: 100%; object-fit: cover; animation: vd-gira 24s linear infinite; }
.vd-anillo-foto--horno { filter: saturate(1.3) brightness(1.05); }
.vd-anillo-eta { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .35rem .8rem; border-radius: 999px; background: var(--texto); color: var(--fondo); font-weight: 800; font-size: .88rem; }
.vd-seguimiento-titulo { margin: 0; font-family: var(--titulos); font-size: 1.7rem; line-height: 1.1; }
.vd-seguimiento-bajada { margin: .4rem auto 1.2rem; max-width: 32ch; color: var(--suave); }
.vd-pasos { list-style: none; margin: 0 auto 18px; padding: 0; display: grid; grid-template-columns: repeat(var(--pasos, 4), 1fr); max-width: 420px; }
.vd-paso { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .78rem; color: var(--suave); }
.vd-paso::before { content: ""; position: absolute; top: 7px; left: -50%; right: 50%; height: 2px; background: var(--linea); }
.vd-paso:first-child::before { display: none; }
.vd-paso--hecho::before, .vd-paso--ahora::before { background: var(--acento); }
.vd-paso-punto { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--superficie-2); }
.vd-paso--hecho .vd-paso-punto, .vd-paso--ahora .vd-paso-punto { background: var(--acento); }
.vd-paso--ahora .vd-paso-punto { box-shadow: 0 0 0 5px color-mix(in srgb, var(--acento) 25%, transparent); animation: vd-late-acento 1.6s infinite; }
@keyframes vd-late-acento { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--acento) 10%, transparent); } }
.vd-paso--ahora { color: var(--texto); font-weight: 800; }
.vd-paso-hora { font-size: .72rem; font-variant-numeric: tabular-nums; }
.vd-resumen { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radio-chico); background: var(--superficie); text-align: left; }
.vd-resumen summary { font-weight: 800; cursor: pointer; }
.vd-resumen ul { padding-left: 1.1rem; }
.vd-pista { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radio-chico); border: 1px dashed var(--linea); color: var(--suave); font-size: .85rem; }

/* ---------- Panel del dueño ---------- */
.vd-dueno { padding: 0 16px; }
.vd-dueno-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 58px 0 10px; }
.vd-dueno-quien { margin: 0; color: var(--suave); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.vd-dueno-nombre { margin: 0; font-family: var(--titulos); font-size: 1.5rem; line-height: 1.1; }
.vd-dueno-estado { flex: none; padding: .55rem .9rem; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #fff; }
.vd-dueno-estado--abierto { background: var(--ok); }
.vd-dueno-estado--cerrado { background: var(--alerta); }
.vd-pestanas { position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 8px 16px; background: var(--fondo); border-bottom: 1px solid var(--linea); }
.vd-pestanas::-webkit-scrollbar { display: none; }
/* La barra de pestañas se pega debajo del interruptor de la demo, tapando lo que pasa por detrás. */
.vd-modo-dueno .vd-pestanas { top: calc(52px + env(safe-area-inset-top)); }
body.vd-modo-dueno::before { content: ""; position: fixed; z-index: 9; top: 0; left: 0; right: 0; height: calc(52px + env(safe-area-inset-top)); background: var(--fondo); }
.vd-pestana { flex: none; position: relative; padding: .55rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .92rem; color: var(--suave); }
.vd-pestana[aria-current] { background: var(--texto); color: var(--fondo); }
.vd-pestana-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: .35rem; border-radius: 999px; background: var(--alerta); color: #fff; font-size: .72rem; }
.vd-ayuda { margin: 0 0 12px; color: var(--suave); font-size: .88rem; }
.vd-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.vd-kpis--4 { grid-template-columns: repeat(2, 1fr); }
.vd-kpi { display: flex; flex-direction: column; padding: 12px; border-radius: var(--radio-chico); background: var(--superficie); }
.vd-kpi strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.vd-kpi span { color: var(--suave); font-size: .78rem; }
.vd-tablero { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(82%, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; scrollbar-width: none; }
.vd-tablero::-webkit-scrollbar { display: none; }
.vd-columna { scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vd-columna-titulo { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .95rem; }
.vd-columna-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--superficie-2); font-size: .75rem; }
.vd-columna-vacia { margin: 0; padding: 20px; border-radius: var(--radio-chico); border: 1px dashed var(--linea); text-align: center; color: var(--suave); }
.vd-comanda { padding: 14px; border-radius: var(--radio-chico); background: var(--superficie); border: 1.5px solid var(--linea); }
.vd-comanda--nueva { border-color: var(--acento); animation: vd-entra .5s cubic-bezier(.16, 1, .3, 1); }
.vd-comanda--tarde { border-color: var(--alerta); }
.vd-comanda--tarde .vd-reloj { background: var(--alerta); color: #fff; }
.vd-comanda-cab { display: flex; align-items: center; gap: .5rem; }
.vd-comanda-n { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.vd-comanda-estado { padding: .15rem .55rem; border-radius: 999px; background: var(--superficie-2); font-size: .75rem; font-weight: 800; }
.vd-comanda--e0 .vd-comanda-estado { background: var(--acento); color: var(--acento-texto); }
.vd-reloj { margin-left: auto; padding: .15rem .5rem; border-radius: 999px; background: var(--superficie-2); font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-comanda-quien { display: flex; flex-direction: column; margin-top: .5rem; font-size: .92rem; }
.vd-comanda-quien span { color: var(--suave); }
.vd-comanda-hora { color: var(--acento) !important; font-weight: 800; }
.vd-comanda-lineas { list-style: none; margin: .6rem 0; padding: .5rem 0; border-top: 1px dashed var(--linea); border-bottom: 1px dashed var(--linea); }
.vd-comanda-lineas li { display: flex; flex-wrap: wrap; gap: 0 .35rem; padding: .12rem 0; }
.vd-comanda-lineas li > span { flex: 1; min-width: 0; }
.vd-comanda-lineas small { width: 100%; padding-left: 1.6rem; color: var(--suave); font-size: .8rem; }
.vd-comanda-nota { margin: 0 0 .5rem; font-style: italic; color: var(--suave); }
.vd-comanda-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vd-comanda-total { font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-comanda-acciones { display: flex; gap: 6px; margin-left: auto; }
.vd-accion { padding: .4rem .7rem; border-radius: 999px; background: var(--superficie-2); font-size: .8rem; font-weight: 800; text-decoration: none; }
.vd-avanzar { width: 100%; min-height: 46px; border-radius: var(--radio-chico); background: var(--acento); color: var(--acento-texto); font-weight: 800; }
.vd-avanzar:active { transform: scale(.98); }
.vd-terminados { margin-top: 10px; }
.vd-terminados summary { padding: 12px 0; font-weight: 800; cursor: pointer; color: var(--suave); }
.vd-terminados .vd-comanda { margin-bottom: 8px; opacity: .7; }

.vd-dueno-cat h2 { margin: 18px 0 8px; font-size: 1rem; }
.vd-fila-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.vd-fila-item img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.vd-fila-item--off img { filter: grayscale(1); opacity: .5; }
.vd-fila-item-nombre { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vd-fila-item-nombre small { color: var(--suave); font-size: .75rem; }
.vd-precio-edit { display: flex; align-items: center; gap: 2px; padding: 0 8px; border-radius: 10px; background: var(--superficie); border: 1.5px solid var(--linea); }
.vd-precio-edit input { width: 76px; min-height: 40px; border: 0; background: none; outline: none; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }

.vd-periodos { display: flex; gap: 6px; margin-bottom: 12px; }
.vd-periodo { padding: .5rem .95rem; border-radius: 999px; border: 1.5px solid var(--linea); font-weight: 700; font-size: .88rem; }
.vd-periodo[aria-pressed="true"] { background: var(--texto); color: var(--fondo); border-color: var(--texto); }
.vd-grafico { padding: 14px; margin-bottom: 12px; border-radius: var(--radio-chico); background: var(--superficie); }
.vd-grafico h2 { margin: 0 0 12px; font-size: 1rem; }
.vd-columnas { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.vd-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.vd-col-barra { width: 100%; height: calc(var(--v) * 100%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--acento); transform-origin: bottom; animation: vd-crece .8s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes vd-crece { from { transform: scaleY(0); } }
.vd-col-etiqueta { color: var(--suave); font-size: .7rem; text-transform: uppercase; }
.vd-barras { display: grid; gap: 8px; }
.vd-barra-fila { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; align-items: center; gap: 8px; font-size: .85rem; }
.vd-barras--horas .vd-barra-fila { grid-template-columns: 2.6rem 1fr 2rem; }
.vd-barra-etiqueta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-barra-relleno { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--acento) calc(var(--v) * 100%), var(--superficie-2) 0); }
.vd-barra-valor { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.vd-cliente { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.vd-cliente-pos { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--superficie-2); font-weight: 800; font-size: .85rem; }
.vd-cliente-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vd-cliente-txt small { color: var(--suave); font-size: .8rem; }

.vd-dueno-local { display: grid; gap: 10px; }
.vd-ajuste { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-radius: var(--radio-chico); background: var(--superficie); }
.vd-ajuste > div { display: flex; flex-direction: column; }
.vd-ajuste small { color: var(--suave); font-size: .82rem; }
.vd-ajuste--columna { flex-direction: column; align-items: stretch; }
.vd-ajuste--columna .vd-pill { min-height: 42px; min-width: 64px; }
.vd-ajuste--demo { border: 1px dashed var(--linea); background: none; }

.vd-aviso { position: fixed; z-index: 70; top: calc(58px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); padding: .75rem 1.1rem; border-radius: 999px; background: var(--texto); color: var(--fondo); font-weight: 800; font-size: .9rem; white-space: nowrap; box-shadow: 0 12px 30px rgb(0 0 0 / .3); animation: vd-baja .35s cubic-bezier(.16, 1, .3, 1); }
.vd-aviso--nuevo { background: var(--ok); color: #fff; }
.vd-aviso--sale { opacity: 0; transform: translate(-50%, -10px); transition: opacity .3s, transform .3s; }
@keyframes vd-baja { from { opacity: 0; transform: translate(-50%, -14px); } }

@media (min-width: 900px) {
  .vd-tablero { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; }
  .vd-kpis--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Teléfonos angostos (iPhone SE, Galaxy chicos): el contador y el botón de agregar entran en la misma fila. */
@media (max-width: 359px) {
  .vd-stepper-btn { width: 36px; }
  .vd-agregar { font-size: .95rem; padding: 0 12px; }
}

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

/* ---------- Guía de la demo (motor/guia.js) ----------
   Amarillo propio de la guía: se distingue del color de cada rubro, así se entiende que es la
   demo la que habla y no el negocio. */
:root { --guia: #ffd23f; --guia-texto: #1d1a12; }

.vd-interruptor-btn { display: inline-flex; align-items: center; gap: .35rem; }
.vd-interruptor-icono { display: inline-flex; }
.vd-interruptor-icono svg, .vd-guia-icono svg { width: 1.15em; height: 1.15em; }
@media (max-width: 359px) { .vd-interruptor-icono { display: none; } }

/* Cinta: qué lado estás mirando. Fila de arriba: la ayuda a la izquierda y el interruptor (fijo)
   a la derecha. Fila de abajo, a todo el ancho: el lado, dicho en palabras. */
.vd-guia-cinta {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 11px;
  background: var(--guia); color: var(--guia-texto); line-height: 1.2;
}
.vd-guia-cinta--dueno { background: var(--guia-texto); color: var(--guia); }
.vd-guia-cinta-demo { min-height: 38px; display: flex; align-items: center; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .8; padding-right: calc(var(--vd-interruptor-ancho, 200px) + 4px); }
.vd-guia-cinta-txt { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: .92rem; }
.vd-guia-cinta-txt .vd-guia-icono { flex: none; margin-top: 1px; }
.vd-guia-cinta-txt b { font-weight: 900; }
.vd-guia-ayuda { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--guia-texto); color: var(--guia); font-weight: 900; font-size: 1rem; }
.vd-guia-cinta--dueno .vd-guia-ayuda { background: var(--guia); color: var(--guia-texto); }

/* El botón que hay que tocar: late hasta que lo tocás. */
.vd-guia-apunta { outline: 3px solid var(--guia) !important; outline-offset: 3px; animation: vd-guia-late 1.3s cubic-bezier(.16, 1, .3, 1) infinite !important; }
@keyframes vd-guia-late {
  0% { box-shadow: 0 0 0 0 rgb(255 210 63 / .75); }
  100% { box-shadow: 0 0 0 16px rgb(255 210 63 / 0); }
}
.vd-pedido-btn.vd-guia-apunta { transform: translateX(-50%); }

/* Bienvenida */
.vd-guia-fondo { z-index: 90; background: rgb(10 10 12 / .62); }
.vd-guia-fondo--sale { opacity: 0; transition: opacity .2s; }
.vd-guia-hoja { gap: 12px; padding: 22px 20px 18px; max-height: calc(100svh - 24px); overflow-y: auto; }
.vd-guia-sello { align-self: flex-start; padding: .25rem .6rem; border-radius: 999px; background: var(--guia); color: var(--guia-texto); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.vd-hoja strong.vd-guia-titulo { font-size: 1.6rem; line-height: 1.1; }
.vd-guia-intro { margin: 0; color: var(--suave); }
.vd-guia-lado { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radio-chico); background: var(--superficie-2, var(--fondo)); }
.vd-guia-lado-icono { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--guia); color: var(--guia-texto); }
.vd-guia-lado-icono svg { width: 24px; height: 24px; }
.vd-guia-lado div { display: flex; flex-direction: column; gap: 2px; }
.vd-guia-lado strong { font-family: var(--letra); font-size: 1rem; }
.vd-guia-lado span { font-size: .9rem; color: var(--suave); line-height: 1.3; }
.vd-guia-minuto { margin: 2px 0 0; font-weight: 700; }
.vd-guia-empezar { width: 100%; min-height: 56px; background: var(--guia); color: var(--guia-texto); font-size: 1.05rem; position: relative; overflow: hidden; }
/* Un brillo que cruza el botón cada tanto, como el de Pampasuyu. */
.vd-guia-empezar::after, .vd-guia-quiero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .55) 50%, transparent 65%); transform: translateX(-120%); animation: vd-guia-brillo 2.8s cubic-bezier(.65, 0, .35, 1) infinite 1s; }
@keyframes vd-guia-brillo { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.vd-guia-sin { align-self: center; padding: .5rem .8rem; color: var(--suave); font-weight: 700; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.vd-guia-nota { margin: 0; font-size: .78rem; color: var(--suave); text-align: center; }

/* Tarjeta del paso: abajo, encima del botón del pedido si está. */
body.vd-guia-activa #app { padding-bottom: calc(230px + env(safe-area-inset-bottom)); }
.vd-guia-paso {
  position: fixed; z-index: 45; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(520px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px;
  border-radius: 18px; background: var(--guia); color: var(--guia-texto); box-shadow: 0 14px 40px rgb(0 0 0 / .32);
}
body:has(.vd-pedido-btn) .vd-guia-paso, body:has(.vd-producto-barra) .vd-guia-paso { bottom: calc(84px + env(safe-area-inset-bottom)); }
.vd-guia-paso--entra { animation: vd-guia-entra .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes vd-guia-entra { from { opacity: 0; transform: translate(-50%, 14px); } }
.vd-guia-paso-cab { display: flex; align-items: center; gap: 8px; }
.vd-guia-paso-n { font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.vd-guia-puntos { display: flex; gap: 4px; flex: 1; }
.vd-guia-puntos i { width: 18px; height: 5px; border-radius: 3px; background: rgb(0 0 0 / .15); }
.vd-guia-puntos i.hecho { background: rgb(0 0 0 / .55); }
.vd-guia-puntos i.ahora { background: rgb(0 0 0 / .85); width: 28px; }
.vd-guia-x { width: 30px; height: 30px; margin: -6px -6px -6px 0; border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--guia-texto); }
.vd-guia-paso-titulo { font-size: 1.08rem; font-weight: 900; line-height: 1.2; }
.vd-guia-paso-txt { margin: 0; font-size: .88rem; line-height: 1.3; }
.vd-guia-paso .vd-boton { min-height: 44px; margin-top: 6px; background: var(--guia-texto); color: var(--guia); }
.vd-guia-fin { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.vd-guia-paso .vd-guia-quiero { position: relative; overflow: hidden; flex: 1 1 220px; margin: 0; }
.vd-guia-paso .vd-guia-sin { color: var(--guia-texto); }

@media (prefers-reduced-motion: reduce) {
  .vd-guia-apunta, .vd-guia-empezar::after, .vd-guia-quiero::after { animation: none !important; }
}
.vd-guia-paso--arriba { bottom: auto !important; top: calc(66px + env(safe-area-inset-top)); }
.vd-guia-mira { animation: none !important; box-shadow: 0 0 0 6px rgb(255 210 63 / .28) !important; border-radius: var(--radio-chico); }
