/* Ventisca · Café de especialidad (DEMO) */
:root {
  --bg: #F6F1E9; --surface: #FFFDF9; --ink: #24180F; --muted: #6B5A4C; --line: #E3D8C9;
  --accent: #8A4B1E; --accent-ink: #FFFFFF; --accent-soft: #F3E3CC; --dark: #24180F; --dark-ink: #F6F1E9;
  --error: #A3261B; --ok: #2E6B3A;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, sans-serif;
  --r: 14px; --max: 1180px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .4em; }
p { margin: 0 0 .8em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: .6em; }

.demo-strip { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; align-items: center; padding: 8px 20px; background: var(--dark); color: var(--dark-ink); font-size: 13.5px; }
.demo-strip a { text-decoration: none; font-weight: 600; min-height: 28px; display: inline-flex; align-items: center; }
.demo-strip a:hover { text-decoration: underline; }

.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px max(20px, calc((100% - var(--max)) / 2)); background: rgba(246, 241, 233, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-size: 26px; font-weight: 600; text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.brand small { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }
.header nav { display: flex; gap: 6px; margin-left: auto; }
.header nav a { text-decoration: none; padding: 10px 12px; border-radius: 999px; font-weight: 500; }
.header nav a:hover { background: var(--accent-soft); }
.cart-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; cursor: pointer; }
.cart-button b { background: var(--bg); color: var(--ink); border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.secundario { background: transparent; color: var(--accent); }
.button.pequeno { min-height: 40px; padding: 0 16px; font-size: 15px; }
.button.full { width: 100%; }
.link { background: none; border: 0; padding: 10px 4px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; max-width: var(--max); margin: 0 auto; padding: 56px 20px 64px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -.01em; }
.hero h1 em { color: var(--accent); font-style: italic; font-weight: 400; }
.lead { font-size: 19px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 24px; }
.hero-image img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 22px; }

.section { max-width: var(--max); margin: 0 auto; padding: 64px 20px; }
.section-dark { max-width: none; background: var(--dark); color: var(--dark-ink); padding-left: max(20px, calc((100% - var(--max)) / 2)); padding-right: max(20px, calc((100% - var(--max)) / 2)); }
.section-dark .eyebrow { color: #E8B98C; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin: 0; }
.section-head > p { margin: 0; max-width: 40ch; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: thin; }
.chips button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card-media { aspect-ratio: 4 / 3; background: var(--accent-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card-cat { font-size: 13px; color: var(--muted); margin-bottom: .3em; }
.card h3 { font-size: 21px; }
.card-desc { color: var(--muted); font-size: 15px; flex: 1; }
.card-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.precio { font-weight: 600; font-variant-numeric: tabular-nums; }
.card .precio { font-size: 18px; }
.stepper-cant { display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: 999px; }
.stepper-cant button { width: 40px; height: 40px; border: 0; background: none; color: var(--accent); font-size: 20px; font-weight: 600; cursor: pointer; border-radius: 999px; }
.stepper-cant button:hover { background: var(--accent-soft); }
.stepper-cant span { min-width: 24px; text-align: center; font-weight: 600; }

.locales { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.local { border: 1px solid rgba(246, 241, 233, .22); border-radius: var(--r); padding: 24px; }
.local h3 { font-size: 26px; }
.nota-clara { color: #D9CCBC; font-size: 14px; margin: 0; }

.pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pasos li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.pasos b { font-family: var(--serif); color: var(--accent); font-size: 28px; }
.pasos h3 { font-size: 22px; margin-top: 8px; }
.pasos p { color: var(--muted); margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 36px max(20px, calc((100% - var(--max)) / 2)) 110px; color: var(--muted); font-size: 15px; }
.footer a { color: var(--accent); font-weight: 600; display: inline-block; padding: 3px 0; }
.footer b { color: var(--ink); }

.barra-movil { display: none; }

/* Diálogos */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(36, 24, 15, .55); }
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100%); display: none; flex-direction: column; }
.drawer[open] { display: flex; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.drawer-head h2 { font-size: 26px; margin: 0; }
.close { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: none; font-size: 26px; line-height: 1; cursor: pointer; }
#carrito-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.linea { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "txt total" "cant cant"; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.linea > div:first-child { grid-area: txt; display: flex; flex-direction: column; }
.linea .stepper-cant { grid-area: cant; justify-self: start; }
.linea > .precio { grid-area: total; }
.linea .muted { font-size: 14px; }
.vacio { color: var(--muted); padding: 24px 0; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.fila { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 8px; }
.fila > span:last-child, .fila > b:last-child { text-align: right; font-variant-numeric: tabular-nums; flex: none; max-width: 60%; }
.fila.total { font-size: 19px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }

.checkout { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; border-radius: 18px; overflow-y: auto; }
.stepper { list-style: none; display: flex; gap: 8px; margin: 0; padding: 14px 20px 0; counter-reset: paso; flex-wrap: wrap; }
.stepper li { counter-increment: paso; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.stepper li::before { content: counter(paso); width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; }
.stepper li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.stepper li[aria-current="step"]::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper li + li { padding-left: 8px; border-left: 1px solid var(--line); }
.paso { padding: 16px 20px 24px; }
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.campos { display: grid; gap: 14px; }
.campos.dos { grid-template-columns: 1fr 1fr; }
.campos .ancha { grid-column: 1 / -1; }
label, .campo-tipo { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 15px; }
.etiqueta { font-weight: 500; }
.opcional { color: var(--muted); font-weight: 400; }
input:not([type="radio"]), select { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #BFAE99; border-radius: 10px; background: #fff; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.error { color: var(--error); font-weight: 500; font-size: 14px; min-height: 0; }
.error:empty { display: none; }
.error-txt { color: var(--error); font-weight: 500; }
.toggle { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.toggle label { flex-direction: row; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid #BFAE99; border-radius: 999px; cursor: pointer; background: #fff; }
.toggle label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.toggle.mini { margin: 0; }
.toggle.mini label { min-height: 44px; padding: 0 14px; }
input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
#bloque-despacho .button.secundario { margin-top: 16px; }
.nota { color: var(--muted); font-size: 15px; margin: 10px 0; }
.nota.pequena { font-size: 13.5px; }
.mapa { height: 320px; border-radius: 12px; border: 1px solid var(--line); background: #EAE3D8; overflow: hidden; display: grid; }
.mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
.mapa-vacio { margin: auto; padding: 16px; text-align: center; color: var(--muted); font-size: 15px; }
.opciones { display: grid; gap: 10px; }
.opcion { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #BFAE99; border-radius: 12px; cursor: pointer; background: #fff; }
.opcion:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.opcion > span { display: flex; flex-direction: column; }
.opcion small { color: var(--muted); font-weight: 400; font-size: 14px; }
.resumen { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 18px; font-size: 15px; }
.aviso-demo { background: var(--accent-soft); border: 1px solid #DDBF97; border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.acciones .button { flex: 1 1 200px; }
.numero-pedido { font-size: 40px; color: var(--accent); margin: 0; }
#paso-3 .lead { font-size: 17px; }

/* Simulador de pago (tarjeta virtual fija, sin campos de tarjeta) */
.pasarela { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: #fff; }
.pasarela-cab { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.candado { width: 40px; height: 40px; flex: none; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pasarela-titulo { font-weight: 600; margin: 0; }
.pasarela-comercio { color: var(--muted); font-size: 14px; margin: 0; }
.pasarela-total { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.pasarela-total span { color: var(--muted); font-size: 13px; }
.pasarela-total b { font-size: 22px; font-variant-numeric: tabular-nums; }
.tarjeta-virtual { position: relative; max-width: 360px; aspect-ratio: 1.586; margin: 0 auto; padding: 18px 20px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #24180F 0%, #5A3216 60%, #8A4B1E 100%); box-shadow: 0 10px 24px rgba(36, 24, 15, .28); display: flex; flex-direction: column; justify-content: space-between; user-select: none; }
.tv-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.tv-demo { border: 1px solid rgba(255, 255, 255, .7); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.tv-chip { width: 42px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #E9CE8A, #B88A3A); }
.tv-numero { font: 600 clamp(17px, 5vw, 22px)/1 ui-monospace, 'Courier New', monospace; letter-spacing: .08em; margin: 0; }
.tv-pie { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; letter-spacing: .06em; }
.pasarela .nota.pequena { text-align: center; }
.estado-pago { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 28px; margin: 8px 0 0; font-weight: 500; }
.estado-pago:empty { display: none; }
.girando { width: 20px; height: 20px; border-radius: 999px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.ok-mini { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 700; }
.exito { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.exito .eyebrow { color: var(--ok); margin-bottom: .3em; }
.check { width: 56px; height: 56px; flex: none; border-radius: 999px; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 30px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .girando { animation-duration: 2.4s; } }

.orden { display: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .hero-image { order: -1; }
  .hero-image img { aspect-ratio: 16 / 10; }
  .header nav { display: none; }
  .cart-button { margin-left: auto; }
}
@media (max-width: 600px) {
  .section { padding: 48px 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .header { padding: 10px 16px; }
  .demo-strip { padding: 8px 16px; }
  .campos.dos { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px; }
  .card h3 { font-size: 17px; }
  .card-desc { font-size: 14px; }
  .card-pie { flex-direction: column; align-items: stretch; }
  .card-pie .button, .card-pie .stepper-cant { width: 100%; justify-content: space-between; }
  .card-pie .button { justify-content: center; }
  .checkout { width: 100%; max-width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .stepper { gap: 6px; padding: 12px 16px 0; }
  .stepper li { font-size: 13px; gap: 6px; }
  .stepper li + li { padding-left: 6px; }
  .paso { padding: 14px 16px 24px; }
  .drawer-head { padding: 14px 16px; }
  .mapa { height: 280px; }
  .barra-movil { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .barra-movil button { width: 100%; min-height: 50px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px; cursor: pointer; }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
  .brand { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Orden de pedido impresa (ticket de 80 mm) */
@media print {
  @page { size: 80mm auto; margin: 4mm; }
  body > *:not(#orden-impresion) { display: none !important; }
  body { background: #fff; color: #000; }
  .orden { display: block; width: 72mm; font: 11pt/1.35 'Courier New', monospace; color: #000; }
  .orden p { margin: 0 0 2mm; }
  .o-marca { font-weight: 700; text-align: center; }
  .o-titulo { font-weight: 700; text-align: center; font-size: 12pt; }
  .o-fila { display: flex; justify-content: space-between; gap: 3mm; }
  .o-fila span:last-child:not(:first-child) { white-space: nowrap; }
  .o-total { font-weight: 700; font-size: 12pt; }
  .o-pie { text-align: center; font-size: 9pt; }
  .orden hr { border: 0; border-top: 1px dashed #000; margin: 2mm 0; }
}
