/* Tienda en línea · MG Sistemas. Color del negocio en --c (pagina_web.color). */
:root {
  --c: #E8323A;
  --c-osc: color-mix(in srgb, var(--c) 82%, #000);
  --c-suave: color-mix(in srgb, var(--c) 10%, #fff);
  --tx: #16181d;
  --tx2: #5b616e;
  --tx3: #8b909a;
  --bg: #f6f6f7;
  --card: #fff;
  --ln: #e7e7ea;
  --ok: #15803d;
  --warn: #b45309;
  --err: #c2410c;
  --r: 16px;
  --r-s: 10px;
  --sh: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.06);
  --sh-l: 0 12px 40px rgba(16,24,40,.18);
  --hdr: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tx);
  -webkit-text-size-adjust: 100%;
}
@supports not (color: color-mix(in srgb, red 50%, white)) {
  :root { --c-osc: var(--c); --c-suave: #fdeeee; }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { line-height: 1.45; font-size: 15px; overscroll-behavior-y: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--c-osc); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- arranque ---------- */
.arranque, .vacio-total { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--tx2); gap: 12px; padding: 24px; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--c-suave); border-top-color: var(--c); animation: gira .8s linear infinite; margin: 0 auto; }
.spin.chico { width: 18px; height: 18px; border-width: 3px; display: inline-block; vertical-align: -3px; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- encabezado ---------- */
.hdr { position: sticky; top: 0; z-index: 30; height: var(--hdr); background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ln); }
.hdr-in { max-width: 1240px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.marca img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; background: #fff; }
.marca b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-suc { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--ln); font-size: 13px; font-weight: 600; max-width: 46vw; }
.chip-suc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--tx); flex: none; }
.btn-ico:hover { background: var(--bg); }
.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.s { width: 16px; height: 16px; }

/* ---------- banner y portada ---------- */
.banner-w { position: relative; overflow: hidden; background: var(--c); display: flex; justify-content: center; }
.banner-fondo { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(24px) saturate(1.1); opacity: .55; }
.banner { position: relative; width: auto; max-width: 100%; max-height: 300px; height: auto; display: block; }
.portada { background: #fff; border-bottom: 1px solid var(--ln); }
.portada-in { max-width: 1240px; margin: 0 auto; padding: 16px 14px 18px; display: grid; gap: 8px; justify-items: start; }
.portada h1 { margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; letter-spacing: -.01em; }
.portada .desc { margin: 0; color: var(--tx2); font-size: 14px; max-width: 760px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suc-l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; font-weight: 600; color: var(--tx); }
.estado { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: #ecfdf3; color: var(--ok); font-size: 13px; font-weight: 600; }
.estado i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.estado.cerrado { background: #fff7ed; color: var(--warn); }
.estado.cerrado i { background: #f59e0b; }
.modo { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--ln); border-radius: 999px; padding: 4px; margin-top: 4px; }
.modo button { padding: 9px 16px; border-radius: 999px; color: var(--tx2); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.modo button[aria-pressed="true"] { background: var(--c); color: #fff; }

/* ---------- aviso cerrado ---------- */
.aviso { max-width: 1240px; margin: 12px auto 0; padding: 0 14px; }
.aviso div { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: var(--r-s); padding: 10px 14px; font-size: 14px; }

/* ---------- categorías ---------- */
.cats { position: sticky; top: var(--hdr); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--ln); }
.cats-in { max-width: 1240px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
.cats-in::-webkit-scrollbar { display: none; }
.cats button { flex: none; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--ln); font-size: 14px; font-weight: 600; color: var(--tx2); white-space: nowrap; }
.cats button.on { background: var(--tx); color: #fff; border-color: var(--tx); }

/* ---------- cuerpo ---------- */
.cuerpo { max-width: 1240px; margin: 0 auto; padding: 8px 14px calc(110px + var(--safe-b)); display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .cuerpo.con-lado { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; padding-bottom: 40px; }
}
.seccion { scroll-margin-top: calc(var(--hdr) + 64px); }
.seccion h2 { font-size: 20px; margin: 18px 0 12px; letter-spacing: -.01em; }
.rejilla { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.prod { display: flex; gap: 12px; background: var(--card); border-radius: var(--r); padding: 12px; box-shadow: var(--sh); text-align: left; width: 100%; position: relative; transition: transform .12s ease, box-shadow .12s ease; }
.prod:hover { transform: translateY(-1px); box-shadow: var(--sh-l); }
.prod:active { transform: scale(.99); }
.prod-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prod-tx b { font-size: 15px; line-height: 1.25; }
.prod-tx small { color: var(--tx2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-precio { margin-top: auto; font-weight: 700; font-size: 15px; }
.prod-precio s { color: var(--tx3); font-weight: 500; margin-left: 6px; font-size: 13px; }
.prod-img { width: 104px; height: 104px; border-radius: 12px; object-fit: cover; background: var(--bg) center / 46px no-repeat; flex: none; }
.prod-img.sin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4c6cc' stroke-width='1.5'%3E%3Cpath d='M3 11h18M5 11a7 7 0 0 1 14 0M4 15h16l-1 4H5z'/%3E%3C/svg%3E"); }
.prod-mas { position: absolute; right: 18px; bottom: 18px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--tx); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.prod-mas.tx { right: 14px; bottom: 12px; }
.prod .cant-en { position: absolute; top: 18px; right: 18px; z-index: 1; background: var(--c); color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.etq { display: inline-block; align-self: flex-start; background: var(--c-suave); color: var(--c-osc); font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }

/* promos y paquetes */
.carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 80%); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
@media (min-width: 760px) { .carrusel { grid-auto-columns: minmax(260px, 340px); } }
.promo { scroll-snap-align: start; border-radius: var(--r); padding: 16px; background: linear-gradient(135deg, var(--c), var(--c-osc)); color: #fff; min-height: 96px; display: flex; flex-direction: column; gap: 4px; }
.promo b { font-size: 18px; }
.promo span { opacity: .92; font-size: 14px; }
.paq { scroll-snap-align: start; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); text-align: left; display: flex; flex-direction: column; }
.paq-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--c-suave); }
.paq-tx { padding: 12px 14px 14px; display: grid; gap: 4px; }
.paq-tx small { color: var(--tx2); }

/* ---------- barra carrito (móvil) ---------- */
.barra { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 25; }
.barra button { width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; background: var(--c); color: #fff; border-radius: 999px; padding: 14px 20px; font-weight: 700; font-size: 16px; box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 45%, transparent); }
.barra .n { background: rgba(255,255,255,.25); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; }
.barra .t { margin-left: auto; }
@media (min-width: 1024px) { .barra.con-lado { display: none; } }

/* ---------- carrito lateral (escritorio) ---------- */
.lado { display: none; }
@media (min-width: 1024px) {
  .lado { display: block; position: sticky; top: calc(var(--hdr) + 68px); background: var(--card); border-radius: var(--r); box-shadow: var(--sh); max-height: calc(100vh - var(--hdr) - 90px); overflow: hidden; }
  .lado .carro { max-height: calc(100vh - var(--hdr) - 90px); }
}

/* ---------- carrito ---------- */
.carro { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.carro-h { padding: 16px 18px 10px; display: flex; align-items: center; justify-content: space-between; }
.carro-h h3 { margin: 0; font-size: 18px; }
.carro-l { overflow-y: auto; padding: 0 18px; flex: 1; min-height: 0; }
.carro-vacio { text-align: center; color: var(--tx2); padding: 28px 10px 34px; }
.renglon { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--ln); }
.renglon b { font-size: 14px; }
.renglon small { color: var(--tx2); font-size: 12.5px; grid-column: 1 / -1; }
.renglon .imp { font-weight: 700; font-size: 14px; text-align: right; }
.renglon .acc { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.renglon .err { grid-column: 1 / -1; color: var(--err); font-size: 13px; font-weight: 600; }
.lnk { color: var(--c-osc); font-weight: 600; font-size: 13px; }
.carro-p { padding: 12px 18px calc(16px + var(--safe-b)); border-top: 1px solid var(--ln); background: #fff; display: grid; gap: 10px; }
.tot { display: grid; gap: 4px; font-size: 14px; }
.tot div { display: flex; justify-content: space-between; color: var(--tx2); }
.tot .desc { color: var(--ok); }
.tot .gran { color: var(--tx); font-weight: 800; font-size: 18px; margin-top: 4px; }
.cupon { display: flex; gap: 8px; }
.cupon input { flex: 1; text-transform: uppercase; }
.msg-err { color: var(--err); font-size: 13px; font-weight: 600; }
.msg-ok { color: var(--ok); font-size: 13px; font-weight: 600; }
.msg-av { color: var(--warn); font-size: 13px; font-weight: 600; }

/* ---------- stepper ---------- */
.stp { display: inline-flex; align-items: center; border: 1px solid var(--ln); border-radius: 999px; background: #fff; }
.stp button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; font-weight: 700; color: var(--tx); }
.stp button:disabled { color: var(--tx3); cursor: default; }
.stp span { min-width: 24px; text-align: center; font-weight: 700; }
.stp.g button { width: 44px; height: 44px; }

/* ---------- botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 12px; font-weight: 700; font-size: 15px; background: var(--c); color: #fff; transition: filter .12s; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.blq { width: 100%; }
.btn.sec { background: var(--bg); color: var(--tx); border: 1px solid var(--ln); }
.btn.lin { background: #fff; color: var(--tx); border: 1px solid var(--ln); }
.btn.chico { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.btn .grow { margin-left: auto; }
.campo { display: grid; gap: 6px; }
.campo label { font-size: 13px; font-weight: 600; color: var(--tx2); }
.inp { width: 100%; border: 1px solid #d6d7db; border-radius: 12px; padding: 12px 14px; background: #fff; font-size: 16px; }
.inp:focus { border-color: var(--c); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.inp.mal { border-color: var(--err); }
textarea.inp { min-height: 72px; resize: vertical; }
.fila { display: grid; gap: 12px; }
@media (min-width: 560px) { .fila.dos { grid-template-columns: 1fr 1fr; } .fila.tres { grid-template-columns: 2fr 1fr 1fr; } }
.ayuda { color: var(--tx3); font-size: 12.5px; }

/* ---------- hoja (modal) ---------- */
.capa { position: fixed; inset: 0; z-index: 50; background: rgba(15,17,21,.5); display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s ease; }
@keyframes aparece { from { opacity: 0; } }
.hoja { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: sube .22s cubic-bezier(.2,.9,.3,1); }
@keyframes sube { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 760px) { .capa { align-items: center; padding: 24px; } .hoja { border-radius: 22px; max-height: 88vh; } }
.hoja-cuerpo { overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.hoja-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--c-suave); }
.hoja-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 2; }
.hoja-cab { padding: 18px 18px 6px; }
.hoja-cab h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.hoja-cab p { margin: 6px 0 0; color: var(--tx2); font-size: 14px; }
.hoja-pie { padding: 12px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--ln); display: flex; gap: 12px; align-items: center; background: #fff; }
.hoja-pie .btn { flex: 1; }
.hoja-t { padding: 18px 18px 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hoja-t h3 { margin: 0; font-size: 19px; }

.grupo { padding: 14px 18px 6px; border-top: 8px solid var(--bg); }
.grupo-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.grupo-h b { font-size: 16px; }
.grupo-h small { color: var(--tx2); }
.req { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--tx2); flex: none; }
.req.falta { background: #fff1e6; color: var(--err); }
.req.listo { background: #ecfdf3; color: var(--ok); }
.opc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ln); cursor: pointer; }
.opc:last-child { border-bottom: 0; }
.opc input { width: 20px; height: 20px; accent-color: var(--c); flex: none; margin: 0; }
.opc span { flex: 1; }
.opc em { font-style: normal; color: var(--tx2); font-size: 14px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 8px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--ln); border-radius: 999px; font-size: 14px; cursor: pointer; user-select: none; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(input:checked) { background: var(--tx); color: #fff; border-color: var(--tx); }
.chips label.on { background: var(--tx); color: #fff; border-color: var(--tx); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; }
.seg label { text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg label small { display: block; color: var(--tx2); font-weight: 500; font-size: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .seg label.on { background: #fff; box-shadow: var(--sh); }
.pk-op { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ln); }
.pk-op img, .pk-op .ph { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--bg); flex: none; }
.pk-op span { flex: 1; font-size: 14px; }

/* ---------- vistas de página (pagar, seguimiento, cuenta) ---------- */
.pag { max-width: 760px; margin: 0 auto; padding: 14px 14px calc(120px + var(--safe-b)); display: grid; gap: 14px; }
.pag-h { display: flex; align-items: center; gap: 8px; }
.pag-h h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
.tarjeta { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; display: grid; gap: 12px; }
.tarjeta > h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.tarjeta > h2 .num { width: 26px; height: 26px; border-radius: 50%; background: var(--tx); color: #fff; font-size: 13px; display: grid; place-items: center; flex: none; }
.tarjeta > h2 .ok { background: var(--ok); }
.radios { display: grid; gap: 8px; }
.radio { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ln); border-radius: 12px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--c); margin: 0; flex: none; }
.radio div { flex: 1; min-width: 0; }
.radio small { display: block; color: var(--tx2); font-size: 13px; }
.radio:has(input:checked) { border-color: var(--c); background: var(--c-suave); }
.radio.on { border-color: var(--c); background: var(--c-suave); }
.mapa { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ln); background: var(--bg); z-index: 0; }
.verif { display: flex; gap: 8px; align-items: stretch; }
.verif .inp { flex: 1; }
.cod { letter-spacing: .4em; font-weight: 700; text-align: center; }
.card-el { border: 1px solid #d6d7db; border-radius: 12px; padding: 14px; background: #fff; }
.pagar-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: #fff; border-top: 1px solid var(--ln); padding: 12px 14px calc(12px + var(--safe-b)); }
.pagar-barra .in { max-width: 760px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.pagar-barra .btn { flex: 1; }
.legal { color: var(--tx3); font-size: 12.5px; }

.estado-g { text-align: center; padding: 26px 16px; display: grid; gap: 6px; }
.estado-g .big { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.estado-g .ico-g { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; background: var(--c-suave); color: var(--c-osc); }
.estado-g .ico-g .ico { width: 32px; height: 32px; }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pasos li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; position: relative; padding-bottom: 18px; color: var(--tx3); }
.pasos li:last-child { padding-bottom: 0; }
.pasos li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--ln); }
.pasos li:last-child::before { display: none; }
.pasos .pt { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ln); background: #fff; display: grid; place-items: center; z-index: 1; }
.pasos li.hecho { color: var(--tx); font-weight: 600; }
.pasos li.hecho .pt { background: var(--ok); border-color: var(--ok); color: #fff; }
.pasos li.hecho::before { background: var(--ok); }
.pasos li.actual .pt { border-color: var(--c); box-shadow: 0 0 0 4px var(--c-suave); }
.pasos small { color: var(--tx2); font-weight: 500; }
.det-l { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--ln); }
.det-l small { grid-column: 2 / 3; color: var(--tx2); font-size: 12.5px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.lista-sel { display: grid; gap: 8px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 12px; }
.tabs button { padding: 10px; border-radius: 9px; font-weight: 600; color: var(--tx2); }
.tabs button.on { background: #fff; color: var(--tx); box-shadow: var(--sh); }
.vacio { color: var(--tx2); text-align: center; padding: 18px; }
.pedido-l { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ln); align-items: center; text-align: left; width: 100%; }
.pedido-l:last-child { border-bottom: 0; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--bg); color: var(--tx2); white-space: nowrap; }
.badge.ok { background: #ecfdf3; color: var(--ok); }
.badge.x { background: #fff1e6; color: var(--err); }

/* ---------- toast / sobrecapa ---------- */
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 80; background: #1f2229; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--sh-l); max-width: calc(100vw - 32px); text-align: center; animation: sube .2s ease; }
.toast.err { background: #9a2a0a; }
.ocupado { position: fixed; inset: 0; z-index: 90; background: rgba(255,255,255,.7); display: grid; place-content: center; text-align: center; gap: 12px; font-weight: 600; color: var(--tx2); backdrop-filter: blur(2px); }

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

/* ---------- entrada: sucursales + mapa ---------- */
.entrada { display: grid; grid-template-rows: 38vh auto; min-height: calc(100vh - var(--hdr)); }
.ent-mapa { grid-row: 1; background: var(--bg); z-index: 0; }
.ent-lista { grid-row: 2; padding: 16px 14px calc(24px + var(--safe-b)); display: grid; gap: 12px; align-content: start; background: var(--bg); }
.ent-neg { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 14px; }
.ent-neg img { width: 64px; height: 64px; border-radius: 14px; object-fit: contain; flex: none; }
.ent-neg h1 { margin: 0; font-size: 20px; }
.ent-neg p { margin: 4px 0 0; color: var(--ok); font-size: 13.5px; font-weight: 600; }
.ent-lista h2 { margin: 6px 0 0; font-size: 17px; }
.ent-lista > .btn { justify-self: start; }
.radio.suc { background: #fff; text-align: left; width: 100%; }
.radio.suc.cerrada { opacity: .75; }
.radio.suc .km { font-weight: 700; font-size: 13px; color: var(--tx2); white-space: nowrap; }
.pin-suc { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.pin-suc.off { background: #9ca3af; }
.mk span { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.mk span .ico { transform: rotate(45deg); }
@media (min-width: 900px) {
  .entrada { grid-template-columns: 440px minmax(0, 1fr); grid-template-rows: none; height: calc(100vh - var(--hdr)); min-height: 0; }
  .ent-mapa { grid-row: 1; grid-column: 2; height: 100%; }
  .ent-lista { grid-row: 1; grid-column: 1; overflow-y: auto; padding: 20px; }
}

/* ---------- checkout por pasos ---------- */
.paso .paso-c { display: grid; gap: 12px; }
.paso:not(.activo) .paso-c { display: none; }
.paso.pendiente { opacity: .55; }
.paso.pendiente h2 { font-weight: 600; }
.paso.hecho { gap: 4px; }
.paso.hecho .num { background: var(--ok); }
.paso-r { color: var(--tx2); font-size: 14px; }
.paso-r:empty { display: none; }
.paso .cambiar { margin-left: auto; display: none; }
.paso.hecho .cambiar { display: inline; }

/* ---------- pie MG Sistemas ---------- */
.mg-pie { display: grid; justify-items: center; gap: 6px; padding: 24px 0 8px; color: var(--tx3); font-size: 12.5px; text-align: center; }
.mg-pie a { display: inline-flex; align-items: center; gap: 8px; color: var(--tx3); text-decoration: none; }
.mg-pie img { width: 72px; height: auto; }

/* La casilla oculta de chips/tamaños se queda dentro de su etiqueta: si no, al tocarla el navegador
   desplazaba la hoja hacia arriba y la pantalla se veía en blanco. */
.chips label, .seg label { position: relative; overflow: hidden; }
.chips input, .seg input { top: 0; left: 0; width: 1px; height: 1px; }
.hoja { overflow: clip; }

/* Antibot: campo trampa */
.trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- checkout: fila de pasos y un paso a la vez ---------- */
.pag-h .pag-tot { margin-left: auto; font-weight: 800; font-size: 15px; white-space: nowrap; }
.pasos-top { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pasos-top li { position: relative; }
.pasos-top li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 2px; background: var(--ln); }
.pasos-top li.hecho:not(:last-child)::after { background: var(--ok); }
.pasos-top button { width: 100%; display: grid; justify-items: center; gap: 4px; padding: 2px 0; color: var(--tx3); }
.pasos-top .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 2px solid var(--ln); position: relative; z-index: 1; }
.pasos-top .t { font-size: 12.5px; font-weight: 600; }
.pasos-top li.activo button { color: var(--tx); }
.pasos-top li.activo .n { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 0 0 4px var(--c-suave); }
.pasos-top li.hecho button { color: var(--ok); }
.pasos-top li.hecho .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.pasos-vista { overflow: hidden; }
.paso { display: grid; gap: 12px; }
.paso.desde-der { animation: desdeDer .28s cubic-bezier(.2,.9,.3,1); }
.paso.desde-izq { animation: desdeIzq .28s cubic-bezier(.2,.9,.3,1); }
@keyframes desdeDer { from { transform: translateX(40px); opacity: 0; } }
@keyframes desdeIzq { from { transform: translateX(-40px); opacity: 0; } }
.paso-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--ln); }
.paso-nav .btn:last-child { flex: 1; max-width: 360px; }
.paso-nav .btn.sec { flex: none; }
.res-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 12px; font-size: 14px; }
.res-fila small { color: var(--tx2); font-weight: 600; }
#resumen-datos { display: grid; gap: 8px; }

/* Totales: comisión de tarjeta explicada */
.tot small { color: var(--tx3); font-weight: 500; }
.tot .sub-tot { color: var(--tx); font-weight: 700; border-top: 1px dashed var(--ln); padding-top: 6px; margin-top: 2px; }
.tot .comision { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 10px 12px; margin: 4px 0; display: grid; gap: 4px; }
.tot .comision .com-h { display: flex; justify-content: space-between; font-weight: 700; color: #9a3412; }
.tot .comision .com-c { display: block; color: var(--tx); font-size: 14px; }
.tot .comision .com-n { display: block; color: var(--tx2); font-size: 12.5px; }
.tot .nota-com { display: block; color: var(--tx3); font-size: 12.5px; margin-top: 2px; }
.aviso-pago { display: flex; gap: 10px; align-items: flex-start; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.aviso-pago .ico { margin-top: 2px; }
.pag-h h1 { white-space: nowrap; }
.pag-h .pag-tot { font-size: 14px; text-align: right; white-space: normal; }
@media (max-width: 420px) { .pag-h h1 { font-size: 19px; } }
.acepto { align-items: flex-start; border: 1px solid var(--ln); border-radius: 12px; padding: 12px; }
.acepto .lnk { display: inline; font-size: inherit; text-decoration: underline; }
.legal-txt { padding: 0 18px 18px; font-size: 14px; line-height: 1.6; color: var(--tx); }
.legal-txt h2 { font-size: 16px; margin: 16px 0 6px; }
#hacer:disabled { opacity: .45; }
.cerrado-pie { color: var(--warn); font-weight: 600; font-size: 14px; background: #fff7ed; }
.legal-txt h1 { font-size: 17px; margin: 4px 0 2px; }
.legal-txt .fecha { color: var(--tx2); font-size: 13px; margin-top: 0; }
.legal-txt h3 { font-size: 14.5px; margin: 12px 0 4px; }
.legal-txt ul { padding-left: 20px; }
.legal-txt li { margin: 4px 0; }
.legal-txt .tabla { overflow-x: auto; margin: 10px 0; }
.legal-txt table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 420px; }
.legal-txt th, .legal-txt td { border: 1px solid var(--ln); padding: 6px 8px; text-align: left; vertical-align: top; }
.legal-txt th { background: var(--bg); }

/* Pie: enlaces legales */
.pie-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 2px 0 6px; }
.pie-legal button { background: none; border: 0; padding: 2px 0; color: var(--tx2); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }

/* Aviso de cookies */
.cookies-aviso { position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 45; max-width: 720px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--ln); border-radius: var(--r); box-shadow: var(--sh-l); padding: 14px 16px; font-size: 13.5px; color: var(--tx2); }
.cookies-aviso p { margin: 0 0 10px; }
.cookies-aviso .lnk { display: inline; font-size: inherit; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.cookies-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cookies-btns .btn { flex: 1 1 auto; min-height: 40px; padding: 8px 14px; font-size: 14px; }
@media (min-width: 760px) { .cookies-btns .btn { flex: none; } }
.ck-fila span { display: grid; gap: 2px; }
.ck-fila small { color: var(--tx2); font-size: 13px; }
.ck-fila input:disabled { opacity: .6; }

/* Casillas de aceptación */
.aceptos { border: 1px solid var(--ln); border-radius: 12px; padding: 2px 12px; margin-top: 12px; }
.aceptos .opc { align-items: flex-start; font-size: 14px; }
.aceptos .opc input { margin-top: 1px; }
.aceptos .opc.todo { border-bottom: 1px solid var(--ln); }
.aceptos .lnk { display: inline; font-size: inherit; text-decoration: underline; }
.aceptos small { color: var(--tx3); }
/* Cupón */
.cupon-t { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.cupon-t small { display: block; font-weight: 400; color: var(--tx2); }

/* ---------- Paso de pago ----------
   Celular: una sola columna (forma de pago → resumen → productos → totales → botón).
   Computadora: dos columnas tipo Amazon/Mercado Libre (izquierda: productos y forma de pago; derecha: resumen y botón). */
.bloque { display: grid; gap: 12px; min-width: 0; }
.bloque h2 { margin: 0; }
.paso-pago .col-izq, .paso-pago .col-der { display: contents; }
.paso-pago .b-pago { order: 1; }
.paso-pago .b-datos { order: 2; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--ln); }
.paso-pago .b-items { order: 3; }
.paso-pago .b-items h2 { display: none; }
.paso-pago .b-tot { order: 4; }
.paso-pago .b-fin { order: 5; }
.paso-pago .aceptos { margin-top: 0; }
@media (min-width: 960px) {
  .pag.ancho { max-width: 1140px; }
  .pag.ancho .pasos-vista { overflow: visible; overflow: clip; }
  .paso-pago { grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; background: none; box-shadow: none; padding: 0; }
  .paso-pago .col-izq, .paso-pago .col-der { display: grid; gap: 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; min-width: 0; }
  .paso-pago .col-der { gap: 14px; }
  .paso-pago .col-izq .bloque, .paso-pago .col-der .bloque { order: 0; }
  .paso-pago .b-items h2 { display: block; }
  .paso-pago .b-pago { padding-top: 18px; border-top: 1px solid var(--ln); }
  .paso-pago .b-datos { margin-top: 0; padding-top: 0; border-top: 0; }
  .paso-pago .col-der h2 { font-size: 18px; }
  .paso-pago .b-fin .paso-nav { margin-top: 0; }
  .paso-pago .b-fin .paso-nav .btn:last-child { max-width: none; }
}
.paso-pago .b-items .det-l:last-child { border-bottom: 0; }

/* ---------- Seguimiento: iconos animados (mismos iconos de la tienda) ---------- */
.estado-g .ico-g { position: relative; overflow: hidden; }
/* Reloj: la manecilla gira y un aro "respira" alrededor (esperando o en cocina). */
.estado-g .anim-reloj { overflow: visible; }
.estado-g .anim-reloj path { transform-box: view-box; transform-origin: 12px 12px; animation: seg-manecilla 3s linear infinite; }
.estado-g .anim-reloj::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); opacity: 0; animation: seg-aro 2s ease-out infinite; }
/* Moto: va dando brinquitos y pasan líneas de velocidad por detrás (en camino). */
.estado-g .anim-moto .ico { animation: seg-bache .45s ease-in-out infinite alternate; }
.estado-g .anim-moto::before, .estado-g .anim-moto::after {
  content: ""; position: absolute; height: 2px; width: 14px; border-radius: 2px; background: var(--c); opacity: .55;
  left: 100%; animation: seg-viento 1s linear infinite;
}
.estado-g .anim-moto::before { top: 24px; }
.estado-g .anim-moto::after { top: 36px; width: 10px; animation-delay: .45s; }
/* Palomita: se dibuja y hace un pequeño "pop" (listo / entregado). */
.estado-g .anim-check { animation: seg-pop .5s ease-out .1s both; }
.estado-g .anim-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: seg-trazo .55s ease-out .25s forwards; }
/* Tache: se sacude una vez (cancelado). */
.estado-g .anim-x2 { animation: seg-sacude .5s ease-in-out .15s both; }
/* El paso actual de la lista late suavemente. */
.pasos li.actual .pt { animation: seg-latido 1.6s ease-in-out infinite; }

@keyframes seg-manecilla { to { transform: rotate(360deg); } }
@keyframes seg-aro { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes seg-bache { from { transform: translateY(0) rotate(0); } to { transform: translateY(-3px) rotate(-3deg); } }
@keyframes seg-viento { from { left: 100%; } to { left: -20px; } }
@keyframes seg-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes seg-trazo { to { stroke-dashoffset: 0; } }
@keyframes seg-sacude { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes seg-latido { 0%, 100% { box-shadow: 0 0 0 4px var(--c-suave); } 50% { box-shadow: 0 0 0 9px var(--c-suave); } }
@media (prefers-reduced-motion: reduce) {
  .estado-g .ico-g, .estado-g .ico-g *, .estado-g .ico-g::before, .estado-g .ico-g::after, .pasos li.actual .pt { animation: none !important; }
  .estado-g .anim-check path { stroke-dashoffset: 0; }
}
