/* Order page (pedidos.dondetonio.com). Tokens and sizes come from the Pencil design
   «Webapp Donde Toño · completa» › B · Pedir donde Toño (mobile/design/pencil.pen, node C0YtgX). */
:root {
  --crema: #FFF4DB; --papel: #FFFBF0; --crema-hondo: #F7E6BF;
  --cafe: #3B2412; --cafe-65: #3B2412A6; --cafe-suave: #4A2F1A; --suave: #7A6450; --linea: #3B24121F;
  --aji: #DD5436; --aji-hondo: #C94A2F; --aji-suave: #F8CDBE; --aji-claro: #FDEEE9;
  --maiz: #FFD447; --maiz-suave: #FFE7A6;
  --verde: #2E9E5B; --verde-texto: #1F7A45; --wa: #0E8540; --wa-sombra: #0A6431;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--crema); color: var(--cafe); font: 600 16px/1.35 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; }
img { display: block; }
svg.i { width: var(--s, 20px); height: var(--s, 20px); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.f { font-family: Fredoka, Manrope, sans-serif; font-weight: 600; }
.w8 { font-weight: 800; }
.muted { color: var(--cafe-65); }

#app { max-width: 430px; margin: 0 auto; min-height: 100svh; }
.page { display: flex; flex-direction: column; gap: 22px; padding: 18px 20px calc(140px + var(--safe-b)); }

/* Back to La cuadra (the street of stores) */
.volver-cuadra { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; height: 32px; margin: -6px 0 -10px -4px; padding: 0 12px 0 6px; border-radius: 16px; background: var(--crema-hondo); color: var(--cafe); font-size: 13px; font-weight: 800; text-decoration: none; }

/* Brand row */
.marca { display: flex; justify-content: space-between; align-items: center; }
.marca img { width: 84px; height: 38px; object-fit: contain; }
.estado { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #2E9E5B1F; color: var(--verde-texto); font-size: 13px; font-weight: 800; line-height: 18px; }
.estado .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.estado.cerrado { background: var(--papel); color: var(--cafe); box-shadow: inset 0 0 0 1.5px var(--linea); }
.estado.cerrado svg { color: var(--aji-hondo); }

.titulo { display: flex; flex-direction: column; gap: 6px; }
.titulo h1 { font: 600 30px/1.15 Fredoka, sans-serif; }
.titulo p { font-size: 15px; line-height: 1.4; color: var(--cafe-65); }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--maiz-suave); }
.banner .ic { width: 36px; height: 36px; border-radius: 18px; background: var(--maiz); display: grid; place-items: center; flex: none; }
.banner b { display: block; font-size: 14px; font-weight: 800; line-height: 19px; }
.banner span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--cafe-65); }
.banner.aviso { align-items: flex-start; }
.banner.cerrado { background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); }
.banner.cerrado .ic { background: var(--crema-hondo); color: var(--aji-hondo); }
/* Closed: the «+» go muted (outline) so nobody builds a whole order thinking it is open; the menu still works. */
.page.cerrado .agregar { background: transparent; color: var(--cafe-65); box-shadow: inset 0 0 0 1.5px var(--linea); }
.pie-local .ver-cuadra { display: block; margin-top: 8px; color: var(--cafe); font-weight: 700; text-decoration: underline; }
.banner.aviso .ic { background: var(--papel); color: var(--aji-hondo); }

.seccion { display: flex; flex-direction: column; gap: 12px; }
.seccion > h2 { font: 600 20px/24px Fredoka, sans-serif; }

/* Product card */
.card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 24px; background: var(--papel); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s; }
.card.en { box-shadow: inset 0 0 0 1.5px var(--aji); }
.card .foto { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; flex: none; background: var(--maiz-suave); }
.card .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card .nombre { font: 600 18px/1.15 Fredoka, sans-serif; }
.card .desc { font-size: 13px; line-height: 1.35; color: var(--cafe-65); }
.card .pie { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; min-height: 46px; }
.card .precio { font-size: 16px; font-weight: 800; line-height: 22px; }
.card.agotado { background: var(--crema-hondo); opacity: .7; }
.card.agotado .foto { filter: grayscale(1); }
.card.agotado .precio { color: var(--cafe-65); }
.pill-agotado { font-size: 12px; font-weight: 800; line-height: 16px; color: var(--aji-hondo); }

.tile-gaseosa { width: 96px; height: 96px; border-radius: 18px; background: var(--maiz-suave); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: none; color: var(--aji-hondo); }
.tile-gaseosa span { font: 600 14px/17px Fredoka, sans-serif; color: var(--cafe); }

.agregar { width: 40px; height: 40px; border-radius: 20px; background: var(--aji); color: #fff; display: grid; place-items: center; flex: none; transition: transform .12s; }
.agregar:active, .ctr button:active { transform: scale(.92); }
.ctr { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; height: 40px; border-radius: 20px; background: var(--cafe); color: var(--crema); flex: none; }
.ctr.h36 { height: 36px; }
.ctr button { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: transform .12s; }
.ctr button:disabled { opacity: .35; }
.ctr output { width: 24px; text-align: center; font-size: 16px; font-weight: 800; line-height: 22px; }

.pie-local { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; font-size: 12px; line-height: 16px; color: var(--cafe-65); text-align: center; }

/* Skeleton (loading) */
.sk { background: var(--crema-hondo); border-radius: 12px; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 50% { opacity: .55; } }

/* Fixed bottom bar */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 20px calc(12px + max(22px, var(--safe-b))); background: var(--crema); border-top: 1px solid var(--linea); box-shadow: 0 -8px 24px var(--linea); }
.barra .in { max-width: 390px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.barra.entra { animation: sube .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes sube { from { transform: translateY(100%); } }
.btn { width: 100%; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 8px; border-radius: 18px; background: var(--aji); color: #fff; box-shadow: 0 4px 0 var(--aji-hondo); font-size: 16px; font-weight: 800; line-height: 22px; text-align: left; transition: transform .1s, box-shadow .1s; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--aji-hondo); }
.btn .cant { width: 40px; height: 40px; border-radius: 12px; background: #FFFFFF33; display: grid; place-items: center; flex: none; }
.btn .txt { flex: 1; min-width: 0; }
.btn .tot { margin-right: 12px; }
.btn.wa { background: var(--wa); box-shadow: 0 4px 0 var(--wa-sombra); }
.btn.wa:active:not(:disabled) { box-shadow: 0 2px 0 var(--wa-sombra); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.centro { justify-content: center; }
.micro { font-size: 12px; line-height: 16px; color: var(--suave); text-align: center; }

/* Bottom sheets */
.velo { position: fixed; inset: 0; z-index: 10; background: #2A1A0C8C; display: flex; align-items: flex-end; justify-content: center; animation: velo .2s ease-out; }
@keyframes velo { from { background: #2A1A0C00; } }
.hoja { width: 100%; max-width: 430px; max-height: calc(100svh - 24px); display: flex; flex-direction: column; background: var(--crema); border-radius: 28px 28px 0 0; box-shadow: 0 -6px 30px #2A1A0C33; animation: hoja .3s cubic-bezier(.2,.9,.3,1); }
@keyframes hoja { from { transform: translateY(100%); } }
.hoja .scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.asa { display: flex; justify-content: center; padding: 8px 0 6px; }
.asa i { width: 40px; height: 5px; border-radius: 3px; background: #3B241238; }
.cerrar { width: 36px; height: 36px; border-radius: 18px; background: var(--crema-hondo); display: grid; place-items: center; flex: none; }
.h-prod { display: flex; gap: 16px; padding: 6px 20px 20px; }
.h-prod .foto { width: 108px; height: 108px; border-radius: 24px; background: var(--maiz-suave); object-fit: cover; flex: none; }
.h-prod .tile-gaseosa { width: 108px; height: 108px; border-radius: 24px; }
.h-prod .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.h-prod .nombre { font: 600 24px/1.1 Fredoka, sans-serif; }
.h-prod .desc { font-size: 13px; line-height: 1.35; color: var(--cafe-65); }
.h-prod .pie { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.h-prod .precio { font-size: 17px; font-weight: 800; line-height: 23px; }
.div { height: 1px; background: var(--linea); margin: 0 20px; }
.h-sec { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.h-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.h-cab h3 { font: 600 18px/22px Fredoka, sans-serif; }
.h-cab p { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--cafe-65); }
.cuenta { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--cafe); color: var(--crema); font-size: 13px; font-weight: 800; line-height: 18px; flex: none; }
.cuenta .pts { display: flex; gap: 3px; }
.cuenta .pts i { width: 7px; height: 7px; border-radius: 50%; background: #FFF4DB4D; }
.cuenta .pts i.on { background: var(--maiz); }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.op { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); font-size: 14px; font-weight: 800; line-height: 19px; transition: transform .12s, background .12s; }
.op:active:not(:disabled) { transform: scale(.95); }
.op.on { background: var(--aji-suave); box-shadow: inset 0 0 0 1.5px var(--aji); color: var(--aji-hondo); }
.op:disabled { background: var(--crema-hondo); box-shadow: none; color: var(--cafe-65); opacity: .7; cursor: default; }
.op.lleno:disabled { background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); color: var(--cafe); opacity: .4; }
.toques { border-radius: 20px; background: var(--papel); box-shadow: inset 0 0 0 1px var(--linea); }
.toque { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.toque + .toque { border-top: 1px solid var(--linea); }
.toque .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--crema-hondo); }
.toque .ic.sal { background: var(--maiz-suave); }
.toque .tx { flex: 1; min-width: 0; }
.toque .tx b { display: block; font-size: 15px; font-weight: 800; line-height: 20px; }
.toque .tx span { display: block; margin-top: 1px; font-size: 13px; line-height: 18px; color: var(--cafe-65); }
.sw { width: 51px; height: 31px; border-radius: 16px; padding: 2px; background: #3B241229; display: flex; flex: none; transition: background .18s; }
.sw i { width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px #3B241233; transition: transform .18s; }
.sw.on { background: var(--aji); }
.sw.on i { transform: translateX(20px); }
.h-barra { padding: 12px 20px calc(12px + max(22px, var(--safe-b))); background: var(--crema); border-top: 1px solid var(--linea); box-shadow: 0 -8px 24px var(--linea); }

/* "Another one like this?" sheet */
.h-cont { display: flex; flex-direction: column; gap: 16px; padding: 6px 20px 20px; }
.h-enc { display: flex; align-items: center; gap: 14px; }
.h-enc .foto { width: 64px; height: 64px; border-radius: 18px; background: var(--maiz-suave); object-fit: cover; flex: none; }
.h-enc .tile-gaseosa { width: 64px; height: 64px; }
.h-enc .tx { flex: 1; min-width: 0; }
.h-enc h3 { font: 600 22px/27px Fredoka, sans-serif; }
.h-enc p { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--cafe-65); }
.rotulo { font-size: 12px; font-weight: 800; letter-spacing: .6px; line-height: 16px; color: var(--cafe-65); text-transform: uppercase; }
.var { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); width: 100%; text-align: left; }
.var.on { background: var(--aji-suave); box-shadow: inset 0 0 0 2px var(--aji); }
.radio { width: 22px; height: 22px; border-radius: 11px; box-shadow: inset 0 0 0 2px var(--cafe-65); display: grid; place-items: center; flex: none; }
.var.on .radio { box-shadow: inset 0 0 0 2px var(--aji); }
.var.on .radio::after { content: ''; width: 12px; height: 12px; border-radius: 6px; background: var(--aji); }
.var .tx { flex: 1; min-width: 0; }
.var .tx b { display: block; font-size: 15px; font-weight: 800; line-height: 20px; }
.var .tx span { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--cafe-65); }
.o { display: flex; align-items: center; gap: 12px; font-size: 13px; line-height: 18px; color: var(--cafe-65); }
.o::before, .o::after { content: ''; flex: 1; height: 1px; background: var(--linea); }
.cero { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 18px; background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); width: 100%; text-align: left; font-size: 15px; font-weight: 800; }
.cero .txt { flex: 1; }
.ayuda { font-size: 12px; line-height: 16px; color: var(--cafe-65); }

/* Order view */
.pedido { display: flex; flex-direction: column; gap: 16px; padding: 12px 20px calc(160px + var(--safe-b)); }
.p-enc { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.p-enc .t { display: flex; align-items: flex-end; gap: 8px; }
.p-enc h1 { font: 600 28px/1.1 Fredoka, sans-serif; }
.p-enc .t span { font-size: 13px; line-height: 18px; color: var(--suave); padding-bottom: 3px; }
.mas { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 4px 0 8px; color: var(--aji-hondo); font-size: 14px; font-weight: 800; }
.resumen-top { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 16px; border-radius: 20px; background: var(--maiz-suave); }
.resumen-top .tx { flex: 1; min-width: 0; }
.resumen-top b { display: block; font-size: 16px; font-weight: 800; line-height: 22px; }
.resumen-top span { display: block; margin-top: 1px; font-size: 13px; line-height: 18px; color: var(--cafe-suave); }
.vaciar { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border-radius: 20px; background: var(--papel); font-size: 13px; font-weight: 800; flex: none; }
.lista { padding: 2px 14px; border-radius: 24px; background: var(--papel); box-shadow: inset 0 0 0 1px var(--linea); }
.item { display: flex; gap: 12px; padding: 12px 0; }
.item + .item { border-top: 1px solid var(--linea); }
.item .foto { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; background: var(--maiz-suave); }
.item .tile-g { width: 64px; height: 64px; border-radius: 16px; background: var(--aji); color: var(--crema); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: none; }
.item .tile-g span { font-size: 10px; font-weight: 800; line-height: 14px; }
.item .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .np { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 800; line-height: 20px; }
.item .unit { font-size: 12px; line-height: 16px; color: var(--suave); }
.item .det { font-size: 13px; line-height: 18px; color: var(--suave); }
.item .vars { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.item .vars div { display: flex; gap: 6px; font-size: 13px; line-height: 18px; color: var(--cafe-suave); }
.item .vars em { font-style: normal; font-weight: 800; color: var(--aji-hondo); flex: none; }
.item .acc { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.editar { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--linea); font-size: 13px; font-weight: 800; }
.sugerencia { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--maiz-suave); }
.sugerencia .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--papel); color: var(--aji-hondo); display: grid; place-items: center; flex: none; }
.sugerencia .tx { flex: 1; min-width: 0; }
.sugerencia b { display: block; font-size: 15px; font-weight: 800; line-height: 20px; }
.sugerencia span { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--cafe-suave); }
.datos { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.datos > h2 { font: 600 20px/24px Fredoka, sans-serif; }
.fila2 { display: flex; gap: 10px; }
.campo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 13px; font-weight: 800; line-height: 18px; }
.caja { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 16px; background: var(--papel); box-shadow: inset 0 0 0 1.5px var(--linea); color: var(--cafe-65); transition: box-shadow .12s; }
.caja:focus-within { box-shadow: inset 0 0 0 2px var(--aji); }
.caja.mal { box-shadow: inset 0 0 0 2px var(--aji-hondo); }
.caja input, .caja textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 600; line-height: 22px; color: var(--cafe); }
.caja input::placeholder, .caja textarea::placeholder { color: var(--cafe-65); opacity: 1; }
.caja.nota { height: auto; min-height: 52px; align-items: flex-start; padding: 15px 14px; }
.caja.nota textarea { resize: none; line-height: 1.35; height: 22px; overflow: hidden; }
.campo .err { font-size: 12px; font-weight: 800; line-height: 16px; color: var(--aji-hondo); }
.alerta { display: flex; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--aji-claro); color: var(--aji-hondo); }
.alerta p { flex: 1; font-size: 14px; line-height: 1.4; color: var(--cafe-suave); }
.alerta a { display: inline-block; margin-top: 8px; color: var(--aji-hondo); font-weight: 800; }
.total-fin { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--linea); }
.total-fin b { display: block; font-size: 14px; font-weight: 800; line-height: 19px; }
.total-fin span { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--suave); }
.total-fin .v { font: 600 24px/29px Fredoka, sans-serif; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
