/* pedir/estilo.css — la página pública de pedidos.
   Mobile first: whoever lands here came from an ad, on a phone, hungry.
   Everything you can tap is at least 44px.

   Layout: one store column (header, sticky category rail, product rows with
   the photo on the right), a cart pill pinned to the bottom, and the steps
   that are not the menu -- a product, the checkout -- in bottom sheets. The
   sheets only exist with JavaScript (html.js); without it the same sections
   sit inline, in order, and the one form posts exactly as before.

   Type is the system face on purpose: on an iPhone that is SF Pro, which is
   what an iOS-native page looks like, and it costs no download inside the
   Facebook in-app browser where most of this traffic opens. */

:root {
    --bg: #ffffff;
    --surface: #f4f3f2;        /* steppers, inputs, chips */
    --ink: #161413;
    --muted: #6b6461;          /* warm grey, leaning toward the brand red */
    --line: #e9e6e4;
    --brand: #af101a;          /* the Pollos red */
    --brand-press: #8d0d15;
    --brand-ink: #ffffff;
    --brand-soft: #fbeceb;
    --good: #0b7a43;
    --good-soft: #e7f6ee;
    --warn: #7a3f00;
    --warn-soft: #fff4e2;
    --scrim: rgba(18, 12, 10, .45);
    --behind-sheet: #000000;
    --shadow: 0 10px 30px rgba(30, 10, 5, .16);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;
    --col: 560px;
    --gutter: max(16px, env(safe-area-inset-left, 0px));
    --gutter-r: max(16px, env(safe-area-inset-right, 0px));
    /* Names kept for pago.php and the older rules below. */
    --rojo: var(--brand);
    --naranja: #964900;
    --tinta: var(--ink);
    --gris: var(--muted);
    --linea: var(--line);
    --fondo: var(--bg);
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121010; --surface: #221e1d; --ink: #f5f1ef; --muted: #aaa19d;
        --line: #2e2928; --brand: #e3373f; --brand-press: #c42b32; --brand-soft: #3a1a1b;
        --good: #5fd59a; --good-soft: #13291e; --warn: #f3b35b; --warn-soft: #2e2213;
        --scrim: rgba(0, 0, 0, .6); --shadow: 0 10px 30px rgba(0, 0, 0, .55);
        --naranja: #f3a25b;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
/* `hidden` always wins. Component rules here set display (flex rows, inline
   tags), and without this they quietly un-hide what the script hid -- the
   delivery row on a pickup order, the ad tag on every product. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    font-size: 16px;          /* menos de 16 y iOS hace zoom al enfocar */
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
/* While a sheet is up the page behind it sinks back; what shows around the
   card is this, like the black behind an iOS card stack. */
body.sheet-open { background: var(--behind-sheet); }

button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
.money, .pesos { font-variant-numeric: tabular-nums; }
:where(button, input, a, summary, [tabindex]):focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* Press feedback, the same 0.97 the panel uses (SMA-347). */
@media (prefers-reduced-motion: no-preference) {
    :where(.enviar, .cta, .add, .cart-pill, .mode label, .tab, .card, .mapa-yo, .hero-agregar, .stepper button, .cuantos button):active:not(:disabled) {
        transform: scale(.97);
    }
}

.page { max-width: var(--col); margin: 0 auto; background: var(--bg); }

/* The part of the page that sinks back behind a sheet. Only the menu side: the
   checkout sheet lives inside the same form and a transformed ancestor would
   pin it to the wrong box. */
.backdrop { transform-origin: 50% 0; background: var(--bg); }
.js .backdrop.is-behind-sheet {
    --sheet-progress: 0;
    transform: translateY(calc(var(--sheet-progress) * 10px)) scale(calc(1 - var(--sheet-progress) * .05));
    border-radius: calc(var(--sheet-progress) * 12px);
    overflow: hidden;
}
@media (min-width: 700px), (prefers-reduced-motion: reduce) {
    .js .backdrop.is-behind-sheet { transform: none; border-radius: 0; }
    body.sheet-open { background: var(--bg); }
}

/* ---- Header ------------------------------------------------------------- */

.cover { position: relative; aspect-ratio: 1000 / 470; max-width: 100%; overflow: hidden; background: var(--surface); }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .28)); }

.store { padding: 0 var(--gutter-r) 4px var(--gutter); position: relative; }
.logo {
    width: 72px; height: 72px; margin-top: -40px; position: relative; z-index: 2; border-radius: 50%;
    display: grid; place-items: center; background: var(--brand); color: var(--brand-ink);
    font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .5px;
    border: 4px solid var(--bg); box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.store h1 { margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts strong { color: var(--ink); font-weight: 600; }
.facts a { color: inherit; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--good); }
.dot.off { background: var(--warn); }

/* Delivery or pickup, asked first as Uber Eats asks it. Real radios, styled as
   a segmented control, so the form posts it with or without JavaScript. */
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 16px 0 0; padding: 4px; border: 0; border-radius: 999px; background: var(--surface); min-width: 0; }
.mode legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mode label {
    display: grid; place-items: center; min-height: 44px; border-radius: 999px; cursor: pointer;
    font-weight: 600; font-size: 15px; color: var(--muted);
    transition: background .2s ease-out, color .2s ease-out, transform .15s ease-out;
}
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode label:has(input:checked) { background: var(--bg); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.mode label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.mode-note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); }

/* El aviso del envío: la única línea que puede cambiar cuánto paga alguien,
   así que va arriba, a la vista. */
.envio-promo {
    display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 14px;
    background: var(--good-soft); color: var(--good); border-radius: var(--r-md);
    font-weight: 600; font-size: 14px;
}
.envio-promo svg { flex: none; }

.closed-banner { margin: 14px 0 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); }
.closed-banner strong { display: block; font-size: 15px; }
.closed-banner p { margin: 2px 0 0; font-size: 14px; }

.error {
    margin: 14px var(--gutter-r) 0 var(--gutter); padding: 12px 14px; border-radius: var(--r-sm);
    background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 15px;
}
.sheet .error { margin: 12px 0 0; }

/* ---- Category rail ------------------------------------------------------- */

.rail {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; margin-top: 18px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transition: box-shadow .2s ease-out;
}
.rail.is-stuck { box-shadow: 0 6px 14px rgba(0, 0, 0, .07); }
.tabs {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    padding: 10px var(--gutter-r) 10px var(--gutter); scroll-padding-inline: 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
    font-weight: 600; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap;
    transition: background .2s ease-out, color .2s ease-out, transform .15s ease-out;
}
.tab[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* ---- "Los más pedidos" ---------------------------------------------------- */

.popular { padding-top: 22px; }
.popular h2, .categoria h2 { padding: 0 var(--gutter-r) 0 var(--gutter); font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.carousel {
    display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    padding: 12px var(--gutter-r) 4px var(--gutter);
}
.carousel::-webkit-scrollbar { display: none; }
.card {
    flex: 0 0 168px; scroll-snap-align: start; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
    transition: transform .15s ease-out;
}
.card .ph { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .nm { display: block; margin-top: 8px; font-weight: 600; font-size: 15px; line-height: 1.25; }
.card .pr { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* ---- The menu ------------------------------------------------------------ */

.categoria { padding-top: 26px; scroll-margin-top: 64px; }
.categoria h2 { margin-bottom: 2px; }
.products { padding: 0 var(--gutter-r) 0 var(--gutter); }

.product {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 14px; align-items: start;
    padding: 16px 0; border-bottom: 1px solid var(--line);
}
.product:last-child { border-bottom: 0; }
.product.no-photo { grid-template-columns: minmax(0, 1fr); }
.js .product.no-photo { grid-template-columns: minmax(0, 1fr) 44px; }
.js .product { cursor: pointer; }
.product .info { min-width: 0; }
.product h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.product .price { margin-top: 3px; font-size: 15px; }
.product .desc { margin-top: 4px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.size-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.size-chips span { padding: 2px 7px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; }
.size-chips span.out { text-decoration: line-through; opacity: .6; }
.product .ph { position: relative; width: 112px; height: 112px; }
.product .ph img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); background: var(--surface); }
.js .product.no-photo .ph { width: 44px; height: 44px; }

/* The "+" on the photo: one tap adds one when there is one size, and opens
   the size picker when there are several. JavaScript only -- without it the
   steppers below do the same job. */
.add {
    display: none; position: absolute; right: 6px; bottom: 6px; min-width: 40px; height: 40px; padding: 0 12px;
    align-items: center; justify-content: center; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--bg); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
    font-weight: 700; font-size: 15px;
    transition: transform .15s ease-out, background .2s ease-out, color .2s ease-out;
}
.js .add { display: inline-flex; }
.js .product.no-photo .add { right: 2px; bottom: 2px; }
.add.has { background: var(--ink); color: var(--bg); }
.add.bump { animation: bump .32s ease-out; }
@keyframes bump { 40% { transform: scale(1.16); } }

.ad-tag {
    display: inline-block; margin-bottom: 6px; padding: 3px 8px; border-radius: 6px;
    background: var(--brand-soft); color: var(--brand);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.product.advertised { margin: 8px -12px; padding: 14px 12px; border-radius: var(--r-md); border-bottom: 0; background: var(--brand-soft); }
.product.advertised .ad-tag { background: var(--bg); }

.product.agotado .info h3, .product.agotado .desc { color: var(--muted); }
.product.agotado img { filter: grayscale(1); opacity: .5; }
.precio.agotado { color: var(--muted); font-weight: 600; font-size: 14px; }

/* The real quantity boxes, one per size: what the form posts. Inline without
   JavaScript; with it they stay in the form but out of sight, and the sheet
   and the "+" write into them. */
.sizes { grid-column: 1 / -1; display: grid; gap: 6px; }
.js .sizes { display: none; }
.size-row { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.size-row .size-name { flex: 1; min-width: 0; font-size: 15px; }
.size-row .size-name small { display: block; color: var(--muted); font-size: 14px; }
.cuantos { display: flex; align-items: center; gap: 4px; flex: none; }
.cuantos button {
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface);
    font-size: 22px; line-height: 1; cursor: pointer; transition: transform .15s ease-out;
}
.cuantos input {
    width: 48px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
    text-align: center; font-size: 17px; font-variant-numeric: tabular-nums;
}
.product.agotado .cuantos { pointer-events: none; opacity: .45; }

/* SMA-95 variant B: the advertised dish above everything, with one tap to add. */
.hero-anuncio {
    margin: 16px var(--gutter-r) 0 var(--gutter); overflow: hidden; border-radius: var(--r-lg);
    background: var(--brand-soft); text-align: center; padding-bottom: 14px;
}
.hero-anuncio img { display: block; width: 100%; aspect-ratio: 1000 / 424; max-width: 100%; object-fit: cover; }
.hero-anuncio .ad-tag { margin-top: 12px; background: var(--bg); }
.hero-nombre { margin: 2px 12px 0; font-size: 20px; font-weight: 800; }
.hero-precio { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-desc { margin: 6px 16px 0; font-size: 14px; color: var(--muted); }
.hero-agregar {
    display: block; width: calc(100% - 32px); min-height: 52px; margin: 12px 16px 0; border: 0; border-radius: 999px;
    background: var(--brand); color: var(--brand-ink); font-size: 17px; font-weight: 700; cursor: pointer;
    transition: transform .15s ease-out;
}
.hero-agregar.agregado { background: var(--good); }

/* ---- Bottom bar ---------------------------------------------------------- */

/* El total y el botón viajan con quien lee el menú. `sticky` y no `fixed`:
   al llegar al final del formulario se suelta y queda en su sitio. */
.cerrar {
    position: sticky; bottom: 0; z-index: 25;
    padding: 12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter);
    pointer-events: none;
}
.cerrar > * { pointer-events: auto; }
.cart-pill {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%;
    min-height: 56px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
    background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow);
    font-weight: 700; font-size: 17px;
    transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .2s ease-out;
}
.cart-pill .count {
    display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .22); font-size: 15px;
}
.js .cart-pill.is-empty { transform: translateY(140%); opacity: 0; pointer-events: none; }
.cart-pill .count:empty { display: none; }

/* The same bar as always, carrying the notice where the cart goes. Same place,
   same pinned bottom: it is the one thing in view for the whole scroll. */
.cerrar.closed {
    padding-top: 14px; background: var(--warn-soft); border-top: 1px solid var(--line);
    text-align: center;
}
.closed-title { margin: 0 0 4px; font-weight: 700; color: var(--warn); }
.closed-note { margin: 0; font-size: 14px; color: var(--warn); }

/* The <fieldset> that switches the form off outside opening hours. It draws
   nothing: it exists so the browser can disable everything inside it at once. */
.form-body { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-body[disabled] .add, .form-body[disabled] .cuantos { opacity: .45; }
.form-body[disabled] .add { display: none; }

/* ---- Sheets -------------------------------------------------------------- */

.sheet-scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; }

/* Without JavaScript a sheet is just the next section of the page. */
.sheet { padding: 8px var(--gutter-r) 24px var(--gutter); }
.sheet-chrome { display: none; }
.js .sheet {
    position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin: 0 auto;
    width: 100%; max-width: var(--col);
    max-height: calc(100% - 28px - env(safe-area-inset-top, 0px));
    display: flex; flex-direction: column; padding: 0;
    background: var(--bg); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
    will-change: transform;
}
.js .sheet[hidden] { display: none; }
.js .sheet-chrome { display: block; position: relative; flex: none; padding: 8px 0 0; touch-action: none; }
.grabber { width: 40px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--line); }
.sheet-close {
    position: absolute; top: 10px; right: max(10px, env(safe-area-inset-right, 0px)); z-index: 3;
    display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: var(--surface); cursor: pointer;
}
.js .sheet-scroll {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 0 var(--gutter-r) 0 var(--gutter);
}
.sheet-foot {
    flex: none; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
    padding: 12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter);
    border-top: 1px solid var(--line); background: var(--bg);
}

/* The product sheet. */
.product-sheet .sheet-chrome { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.product-sheet .grabber { background: rgba(255, 255, 255, .8); }
.product-sheet .sheet-scroll { padding: 0; }
.sheet-photo { aspect-ratio: 4 / 3; max-width: 100%; background: var(--surface); }
.sheet-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet-body { padding: 18px var(--gutter-r) 8px var(--gutter); }
.sheet-body h2 { font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; }
.product-sheet:not(:has(.sheet-photo:not([hidden]))) .sheet-body { padding-top: 56px; }
.sheet-price { margin-top: 6px; font-size: 17px; }
.sheet-desc { margin: 10px 0 0; color: var(--muted); }
.size-picker { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.size-picker legend { padding: 0; margin-bottom: 4px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.size-option {
    display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    min-height: 54px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.size-option:last-child { border-bottom: 0; }
.size-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
.size-option em { margin-left: 4px; color: var(--good); font-style: normal; font-size: 13px; font-weight: 600; }
.size-option.out { color: var(--muted); cursor: not-allowed; }
.size-option .money { font-weight: 600; }

.stepper { display: inline-flex; align-items: center; flex: none; border-radius: 999px; background: var(--surface); }
.stepper button {
    display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none;
    font-size: 22px; cursor: pointer; transition: transform .15s ease-out;
}
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper.small button { width: 36px; height: 36px; font-size: 18px; }

.cta, .enviar {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 52px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
    background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 17px;
    transition: transform .15s ease-out, opacity .2s;
}
.cta:hover, .enviar:hover { background: var(--brand-press); }
.cta[aria-disabled="true"], .enviar:disabled { opacity: .45; cursor: not-allowed; }
/* SMA-334: the order is on its way; a second tap does nothing. */
.enviar.enviando { opacity: .7; cursor: progress; }
.enviar { width: 100%; }

/* ---- Checkout ------------------------------------------------------------ */

/* The button and, on a door-only lane, "Pagas al recibir" right under it. */
.checkout-sheet .sheet-foot { flex-direction: column; align-items: stretch; gap: 0; }
.checkout-sheet .sheet-foot .nota { margin-top: 8px; text-align: center; font-size: 13px; }
/* The pill has nothing to do while a sheet covers the page. */
body.sheet-open .cerrar { visibility: hidden; }
.add-more { display: none; }
.js .add-more { display: inline-block; }
.summary { display: none; }
.js .summary { display: grid; }

.checkout-head { padding: 14px 0 4px; }
.checkout-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.checkout-mode { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; color: var(--muted); font-size: 15px; }
.link-button { padding: 8px 0; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; }
.block { padding: 14px 0; border-bottom: 8px solid var(--surface); }
.js .sheet .block { margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter-r); }
.block:last-child { border-bottom: 0; }
.block > h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.cart-lines:empty { display: none; }
.cart-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; }
.cart-line img, .cart-line .no-img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface); }
.cart-line .nm { font-weight: 600; font-size: 15px; line-height: 1.3; }
.cart-line .pr { color: var(--muted); font-size: 14px; }
.add-more { display: inline-block; margin-top: 4px; padding: 10px 0; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; }

.paso label, .field { display: block; margin: 14px 0; font-size: 14px; font-weight: 600; }
.paso input[type=text], .paso input[type=tel] {
    display: block; width: 100%; min-height: 50px; margin-top: 6px; padding: 0 14px;
    font-size: 16px; font-weight: 400; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); transition: border-color .15s, background .15s;
}
.paso input:focus { outline: none; border-color: var(--ink); background: var(--bg); }
.paso small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; font-size: 13px; }
.paso .cuantos label { display: inline; margin: 0; }
.paso h2 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }

/* The address suggestions: our own list, not a datalist (SMA-96). */
#campo-direccion label { position: relative; }
.sugerencias {
    position: absolute; left: 0; right: 0; z-index: 1000; margin: 4px 0 0; padding: 4px; list-style: none;
    max-height: 260px; overflow-y: auto; background: var(--bg);
    border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow);
    transform-origin: top left; animation: sugerencias-in .2s ease-out;
}
@keyframes sugerencias-in { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .sugerencias { animation: none; } }
.sugerencias li { padding: 12px 10px; border-radius: 8px; font-weight: 400; font-size: 15px; cursor: pointer; }
.sugerencias li:hover { background: var(--surface); }

.radio { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: 18px; font-weight: 400; font-size: 15px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--brand); }
/* `hidden` on a label has to win over the inline-flex above, or a payment
   option the order cannot use stays on screen. */
.radio[hidden] { display: none; }

.pago { margin: 0; padding: 0; border: 0; min-width: 0; }
.pago legend { padding: 0; margin-bottom: 4px; font-size: 18px; font-weight: 700; font-family: var(--font-display); }

.summary { display: grid; gap: 8px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary .muted { color: var(--muted); }
.summary .total { padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: 18px; }

.nota { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.nota.legal { font-size: 13px; }
.nota a { color: inherit; }
.nota.aviso { padding: 12px 14px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); }

/* ---- El mapa ------------------------------------------------------------- */

.mapa-caja { margin-top: 14px; }
.mapa-caja > summary { padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--brand); cursor: pointer; }
.mapa {
    position: relative; height: 280px; overflow: hidden; border-radius: var(--r-md);
    border: 1px solid var(--line);
    /* Leaflet mide el contenedor al arrancar; sin alto propio nace de 0px. */
    background: var(--line);
    touch-action: none;
}
/* El pin vive en el centro y NO se mueve: lo que se mueve es el mapa. */
.mapa-pin {
    position: absolute; left: 50%; top: 50%; z-index: 500; width: 22px; height: 22px; margin: -22px 0 0 -11px;
    border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    background: var(--brand); box-shadow: 0 2px 5px rgba(0, 0, 0, .45); pointer-events: none;
}
.mapa-yo {
    width: 100%; min-height: 44px; margin-bottom: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--bg); font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .15s ease-out;
}
.mapa-estado { min-height: 20px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* ---- Confirmation (also pedir/pago.php) ----------------------------------- */

.listo { max-width: var(--col); margin: 0 auto; padding: 28px var(--gutter-r) 32px var(--gutter); }
.listo h1, .listo h2 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; text-align: center; }
.listo > p { text-align: center; color: var(--muted); }
.tick { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--good-soft); color: var(--good); }
.tick path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cuenta { width: 100%; margin: 18px 0; border-collapse: collapse; }
.cuenta td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.cuenta .pesos { text-align: right; white-space: nowrap; }
.cuenta .granTotal td { padding-top: 12px; border-bottom: 0; font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.listo .enviar { margin-top: 16px; }

/* El campo trampa: fuera de la pantalla, no oculto con display:none, porque
   algunos robots se saltan lo que está en display:none. */
.hp { position: absolute; left: -9999px; top: -9999px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
