/* Página de pedidos · colores desde config.js (--marca / --crema) */
:root {
  --marca: #1D4AA0;
  --crema: #F4E8CF;
  --bg: color-mix(in srgb, var(--crema) 70%, white);
  --paper: color-mix(in srgb, var(--crema) 18%, white);
  --ink: color-mix(in srgb, var(--marca) 45%, #0b0f1c);
  --ink-2: color-mix(in srgb, var(--marca) 30%, #4b5262);
  --muted: color-mix(in srgb, var(--marca) 15%, #868b98);
  --line: color-mix(in srgb, var(--marca) 16%, transparent);
  --line-strong: color-mix(in srgb, var(--marca) 38%, transparent);
  --accent: var(--marca);
  --accent-soft: color-mix(in srgb, var(--marca) 9%, transparent);
  --wa: #1F8A55;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 16px 34px -22px rgba(20, 30, 60, .45);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --bubble: "Arial Rounded MT Bold", var(--display);
  --script: "Snell Roundhand", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: color-mix(in srgb, var(--marca) 22%, #070a12); --paper: color-mix(in srgb, var(--marca) 30%, #0d111c);
    --ink: var(--crema); --ink-2: color-mix(in srgb, var(--crema) 75%, #8a90a0); --muted: color-mix(in srgb, var(--crema) 50%, #6b7182);
    --line: color-mix(in srgb, var(--crema) 12%, transparent); --line-strong: color-mix(in srgb, var(--crema) 30%, transparent);
    --accent: color-mix(in srgb, var(--marca) 45%, white); --accent-soft: color-mix(in srgb, var(--marca) 30%, transparent);
    --shadow: 0 16px 34px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 var(--sans); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.85) rotate(-12deg); } }

/* ── encabezado ── */
.top { background: var(--marca); color: var(--crema); text-align: center; padding: calc(env(safe-area-inset-top) + 24px) 20px 70px; border-radius: 0 0 38px 38px; position: relative; overflow: hidden; }
.top::before { content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none; background-image: radial-gradient(var(--crema) 1.2px, transparent 1.4px); background-size: 22px 22px; }
.top-inner { position: relative; }
.sello { width: 92px; height: 92px; display: block; margin: 0 auto 6px; animation: pop .9s var(--spring) both; }
.sello .s-fondo { fill: var(--crema); } .sello .s-aro { fill: none; stroke: var(--marca); stroke-width: 2.5; stroke-dasharray: 3 5; } .sello .s-letra { font: 400 58px var(--bubble); fill: var(--marca); }
.wordmark { margin: 0; font: 400 clamp(50px, 16vw, 78px)/.88 var(--bubble); text-transform: uppercase; display: flex; flex-direction: column; align-items: center; }
.wordmark span { animation: rise .8s var(--spring) both; } .wordmark span:first-child { font-size: .62em; animation-delay: .1s; } .wordmark span:nth-child(2) { animation-delay: .2s; }
.script { margin: 6px 0 0; font: 400 23px/1.3 var(--script); transform: rotate(-3deg); animation: rise .8s var(--ease) .35s both; }

/* ── contenido ── */
.wrap { max-width: 560px; margin: -46px auto 0; padding: 0 16px; position: relative; z-index: 2; }
.card { background: var(--paper); border: 1.5px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.producto { overflow: hidden; animation: rise .8s var(--ease) .3s both; }
.ilus-wrap { background: var(--accent-soft); padding: 22px 20px 6px; }
.ilus { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.ilus .i-sombra { fill: var(--accent); opacity: .1; }
.ilus .i-bandeja { fill: color-mix(in srgb, var(--paper) 70%, #c9ccd4); stroke: var(--line-strong); stroke-width: 2; }
.ilus .i-borde { fill: color-mix(in srgb, var(--paper) 50%, #b6bac4); }
.ilus .i-pieza { fill: #F2D59B; stroke: #D9B26A; stroke-width: 1.5; animation: rise .5s var(--spring) both; animation-delay: calc(400ms + var(--d)); }
.ilus .i-raya { stroke: #D9B26A; stroke-width: 1.4; stroke-linecap: round; fill: none; }
.fotos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.fotos img { width: 100%; flex: none; aspect-ratio: 4 / 3; object-fit: cover; scroll-snap-align: start; }
.prod-body { padding: 20px 20px 22px; }
.titular { font: 750 25px/1.15 var(--display); letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.bajada { color: var(--ink-2); margin: 8px 0 0; font-size: 16px; }
.precio-row { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; }
.precio { font: 800 40px/1 var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.precio-row span { color: var(--muted); font-weight: 600; }
.promos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.promo { background: var(--marca); color: var(--crema); border-radius: 99px; padding: 6px 13px; font-size: 14px; font-weight: 750; }
.cantidad { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1.5px dashed var(--line); }
.cantidad > span { font-weight: 650; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--accent-soft); border-radius: 99px; padding: 4px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--paper); color: var(--accent); font: 600 26px/1 var(--display); box-shadow: 0 2px 8px -4px rgba(0,0,0,.3); transition: transform .25s var(--spring), opacity .2s; }
.stepper button:active { transform: scale(.88); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 44px; text-align: center; font: 800 26px var(--display); font-variant-numeric: tabular-nums; }
.ahorro { min-height: 22px; margin: 10px 0 0; font-size: 14.5px; color: var(--muted); text-align: right; }
.ahorro.on { color: var(--wa); font-weight: 700; }

.beneficios { list-style: none; padding: 0; margin: 18px 4px; display: grid; gap: 10px; }
.beneficios li { display: flex; align-items: center; gap: 10px; font-weight: 600; animation: rise .6s var(--ease) both; }
.beneficios li:nth-child(2) { animation-delay: .08s; } .beneficios li:nth-child(3) { animation-delay: .16s; }
.beneficios svg { width: 26px; height: 26px; flex: none; padding: 4px; border-radius: 50%; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.bloque { padding: 18px 20px; margin-top: 14px; }
.bloque h3 { font: 400 23px/1.2 var(--script); color: var(--accent); margin: 0 0 8px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 10px 0; border-top: 1.5px dashed var(--line); }
dl div:first-child { border-top: 0; }
dt { color: var(--muted); font-weight: 650; font-size: 15px; } dd { margin: 0; font-size: 15.5px; }
details { border-top: 1.5px dashed var(--line); padding: 12px 0; } details:first-of-type { border-top: 0; }
summary { font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .3s var(--spring); }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 8px 0 0; color: var(--ink-2); font-size: 15.5px; }
.pie { text-align: center; color: var(--muted); font-size: 13px; margin: 26px 0 0; line-height: 1.7; }
.pie a { color: var(--muted); }

/* ── barra fija de pedido ── */
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); animation: subir .7s var(--spring) .6s both; }
@keyframes subir { from { transform: translateY(110%); } }
.barra-inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.total { display: flex; flex-direction: column; min-width: 0; }
.total small { color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.total b { font: 800 24px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pedir { flex: 1; min-height: 56px; border: 0; border-radius: 99px; background: var(--wa); color: #fff; font: 750 17px var(--display); display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 14px 24px -12px var(--wa); transition: transform .3s var(--spring); }
.pedir:active { transform: scale(.96); }
.pedir svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 360px) { .pedir { font-size: 15px; } .total b { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; } }
