/* ============================================================================
   Menú Digital — Las Pinchis Alitas
   Estilos mobile-first + responsive escritorio. Marca naranja #FF9500 / #F7941D.
   ========================================================================== */

:root {
  --orange:      #FF9500;
  --orange-2:    #F7941D;
  --orange-dark: #d97b00;
  --bg:          #f4f4f6;
  --card:        #ffffff;
  --text:        #1c1c1e;
  --text-muted:  #8a8a8e;
  --border:      #e6e6ea;
  --border-2:    #d9d9df;
  --green:       #34c759;
  --red:         #ff3b30;
  --shadow:      0 2px 10px rgba(0,0,0,.06);
  --shadow-lg:   0 8px 30px rgba(0,0,0,.16);
  --radius:      16px;
  --radius-sm:   10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overscroll-behavior-y: none;
}
body.no-scroll { overflow: hidden; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 16px; }
img { display: block; }

/* ── Utilidades ───────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 14px; }

/* ── Foto de portada (hero) ───────────────────────────────────────────── */
.hero-cover {
  height: 150px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 55%, var(--orange-dark) 100%);
  background-size: cover; background-position: center;
  position: relative;
}
.hero-cover.has-photo::after {
  /* Degradado sutil abajo para que el header respire bajo la foto */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.10) 100%);
}
@media (min-width: 720px) { .hero-cover { height: 210px; } }

/* ── Header centrado (logo + nombre + sub + toggle) ───────────────────── */
.app-header {
  background: #fff;
  box-shadow: var(--shadow);
  position: relative; z-index: 20;
}
.brand-block {
  max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 10px 14px 12px;
}
.brand-logo {
  width: 64px; height: 64px; border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,.16);
  margin-top: -42px;            /* se monta un poco sobre la foto de portada */
  border: 3px solid #fff; background: #fff;
}
.brand-name {
  font-weight: 800; font-size: 20px; letter-spacing: -.3px;
  margin-top: 8px;
}
.brand-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.brand-sub b { color: var(--orange-dark); font-weight: 700; }
/* Horario (días/horas) arriba, bajo el nombre */
.brand-hours { display: none; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.brand-hours .sch-pill { font-weight: 700; font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.brand-hours .sch-pill.open   { color: #148a3a; background: #e6f7ec; }
.brand-hours .sch-pill.closed { color: #b42318; background: #fde8e6; }
.brand-hours .sch-txt { font-weight: 600; color: var(--text); }

/* Toggle recoger / domicilio — ~50% más chico y CENTRADO junto al logo/nombre */
.order-toggle {
  display: inline-flex; gap: 4px;
  background: #ececf0; border-radius: 999px; padding: 4px;
  margin-top: 12px;
  width: auto; max-width: 320px;
}
.order-toggle button {
  padding: 8px 16px; border-radius: 999px;
  font-weight: 700; font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.order-toggle button.active {
  background: #fff; color: var(--orange-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
.order-toggle .ot-emoji { font-size: 15px; }

/* Toggle recoger/domicilio DENTRO del carrito y checkout — siempre visible + línea de envío/ETA */
.sheet-ottoggle {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px 10px; border-bottom: 1px solid var(--border); background: #fafafb;
}
.sheet-ottoggle .order-toggle { margin-top: 0; }
.ot-hint { font-size: 12.5px; color: var(--text-muted); text-align: center; }
.ot-hint b { color: var(--orange-dark); font-weight: 700; }

/* Barra de categorías STICKY — se pega arriba y queda VISIBLE (nada la tapa,
   el header se desplaza con la página). */
.catbar-wrap {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 8px rgba(0,0,0,.06);
}
.searchbar { padding: 8px 14px 2px; max-width: 1080px; margin: 0 auto; }
.searchbar input {
  width: 100%; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--border-2); background: #f6f6f8; outline: none;
}
.searchbar input:focus { border-color: var(--orange); background: #fff; }
.catbar {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px;
  max-width: 1080px; margin: 0 auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.catbar::-webkit-scrollbar { display: none; }
.catbar button {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: #f0f0f4; color: var(--text); font-weight: 600; font-size: 14px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.catbar button.active { background: var(--orange); color: #fff; }

/* ── Menú / productos ─────────────────────────────────────────────────── */
main { padding-bottom: 96px; }
.cat-section { padding: 8px 0 6px; }
.cat-title {
  font-size: 20px; font-weight: 800; letter-spacing: -.4px;
  margin: 14px 4px 8px;
}
.product-grid {
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
.product-card {
  display: flex; gap: 12px; background: var(--card);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  position: relative; cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.product-card:active { transform: scale(.99); }
.pc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pc-name { font-weight: 700; font-size: 16px; letter-spacing: -.2px; }
.pc-desc {
  font-size: 13px; color: var(--text-muted); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-price { margin-top: auto; padding-top: 8px; font-weight: 800; color: var(--orange-dark); }
.pc-price .from { font-weight: 600; color: var(--text-muted); font-size: 12px; margin-right: 2px; }
.pc-media { position: relative; flex: 0 0 auto; }
.pc-img {
  width: 92px; height: 92px; border-radius: 12px; object-fit: cover;
  background: #f0f0f4;
}
.pc-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #c9c9cf;
}
.pc-add {
  position: absolute; right: -6px; bottom: -6px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(255,149,0,.5);
}
.pc-unavailable { opacity: .5; }
.pc-badge {
  position: absolute; top: 8px; left: 8px; background: #555; color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
}
.no-results { text-align: center; color: var(--text-muted); padding: 40px 20px; }

/* ── Barra "Ver carrito" (siempre visible, fija abajo) ─────────────────── */
.cart-fab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(244,244,246,0), var(--bg) 40%);
}
.cart-fab-inner {
  max-width: 1080px; margin: 0 auto; width: 100%;
  background: var(--orange); color: #fff; border-radius: 14px;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; box-shadow: var(--shadow-lg);
  transition: background .15s, opacity .15s;
}
.cart-fab-inner .cf-left { display: flex; align-items: center; }
.cart-fab-inner .cf-count {
  background: rgba(255,255,255,.25); border-radius: 999px;
  padding: 2px 10px; margin-right: 10px; font-size: 14px;
}
.cart-fab-inner .cf-total { font-size: 17px; }
/* Desactivada (carrito vacío) → gris, sin sombra fuerte */
.cart-fab-inner.is-empty {
  background: #c9c9cf; color: #fff; cursor: not-allowed;
  box-shadow: var(--shadow);
}
.cart-fab-inner:disabled { cursor: not-allowed; }

/* ── Overlays / modales genéricos ─────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
/* El modal del producto puede abrirse ENCIMA del carrito (editar un renglón):
   sin esto el carrito, que va después en el HTML, lo taparía. */
#product-overlay { z-index: 62; }
.sheet {
  background: var(--bg); width: 100%; max-width: 560px;
  max-height: 92vh; border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(24px); transition: transform .2s;
}
.overlay.open .sheet { transform: translateY(0); }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
}
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 800; flex: 1; }
.sheet-close {
  width: 32px; height: 32px; border-radius: 50%; background: #eee;
  font-size: 18px; color: #666; display: flex; align-items: center; justify-content: center;
}
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 20px; flex: 1; }
.sheet-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border);
}

/* ── Modal de producto ────────────────────────────────────────────────── */
.pm-hero { width: 100%; height: 190px; object-fit: cover; background: #f0f0f4; border-radius: 14px; }
.pm-hero.placeholder { display: flex; align-items: center; justify-content: center; font-size: 54px; color: #c9c9cf; }
.pm-name { font-size: 20px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -.3px; }
.pm-desc { font-size: 14px; color: var(--text-muted); }
/* Lo que trae el combo ya decidido por el negocio. Va pegado a la descripción
   y en un tono aparte para que no se lea como parte de ella. */
.pm-incluye { margin-top: 8px; padding: 9px 11px; border-radius: 10px;
  background: var(--bg, #f5f5f7); font-size: 13px; line-height: 1.45; }

.opt-group { margin-top: 18px; }
.opt-group.missing .opt-title { color: var(--red); }
.opt-group.missing .chips { animation: shake .35s; }
@keyframes shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)}
}
.opt-title {
  font-weight: 700; font-size: 15px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tag-req { font-size: 11px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 999px; }
.tag-opt { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.tag-hint { font-size: 12px; font-weight: 500; color: var(--orange-dark); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--border-2); background: #fff; border-radius: 12px;
  padding: 9px 13px; font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px; transition: border-color .12s, background .12s;
}
.chip .chip-price { font-size: 13px; color: var(--orange-dark); font-weight: 700; }
.chip.selected { border-color: var(--orange); background: #fff6e9; }
.chip.selected .chip-check { color: var(--orange); }
.chip.disabled { opacity: .32; pointer-events: none; }
.chip-check { display: none; font-weight: 800; }
.chip.selected .chip-check { display: inline; }

/* Extras (checkbox con +$) */
.extra-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.extra-row:last-child { border-bottom: none; }
.extra-row .ex-name { flex: 1; font-size: 15px; }
.extra-row .ex-price { color: var(--orange-dark); font-weight: 700; font-size: 14px; }
.extra-check {
  width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  flex: 0 0 auto; transition: background .12s, border-color .12s;
}
.extra-row.on .extra-check { background: var(--orange); border-color: var(--orange); }

/* Cantidad */
.qty-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 18px; }
.qty-btn {
  width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1.5px solid var(--border-2);
  font-size: 22px; font-weight: 700; color: var(--orange-dark);
  display: flex; align-items: center; justify-content: center;
}
.qty-num { font-size: 20px; font-weight: 800; min-width: 30px; text-align: center; }

textarea.notes-in, input.text-in, select.text-in {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-2); background: #fff; outline: none; resize: vertical;
}
textarea.notes-in:focus, input.text-in:focus, select.text-in:focus { border-color: var(--orange); }
.field-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Botón grande (agregar / continuar / enviar) */
.btn-primary {
  width: 100%; padding: 15px; border-radius: 14px; background: var(--orange); color: #fff;
  font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 12px rgba(255,149,0,.35);
}
.btn-primary.center { justify-content: center; gap: 8px; }
.btn-primary:disabled { opacity: .5; box-shadow: none; }

/* ── Iconos de marca (mismos que la appweb: /icons/ui/*.png por máscara CSS) ──
   Uso: <i class="ico" style="--ico:url(/icons/ui/basura.png)"></i>
   Toman el color del texto (currentColor), así que combinan en cualquier fondo. */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em;
  background-color: currentColor; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
/* Fuera de horario: botón APAGADO (gris, no naranja) para que se vea bloqueado */
.btn-primary.locked { background: #d3d3d8; color: #6b6b70; box-shadow: none; cursor: not-allowed; opacity: 1; }
.closed-note { font-size: 12.5px; line-height: 1.35; color: #b42318; background: #fde8e6;
  border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; text-align: center; }
.btn-primary .bp-price { font-size: 17px; }
.btn-ghost {
  width: 100%; padding: 13px; border-radius: 12px; background: #f0f0f4; color: var(--text);
  font-weight: 700; font-size: 15px; text-align: center;
}

/* ── Carrito ──────────────────────────────────────────────────────────── */
/* El renglón viaja dentro de .ci-wrap: el botón rojo vive DEBAJO y se descubre
   al deslizar el renglón hacia la izquierda (mismo gesto que la appweb). */
.ci-wrap { position: relative; overflow: hidden; border-radius: 12px; border-bottom: 1px solid var(--border); }
.ci-swipe {
  position: absolute; right: 0; top: 0; bottom: 0; width: 96px;
  display: flex; align-items: center; justify-content: center; background: var(--red);
}
.ci-swipe-del {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; font-size: 12px; font-weight: 700; padding: 8px; background: none;
}
.ci-swipe-del .ico { width: 20px; height: 20px; }

.cart-item {
  display: flex; gap: 10px; padding: 12px 0;
  background: var(--bg);                /* tapa el botón rojo hasta que se desliza */
  cursor: pointer;                      /* tocar el renglón lo abre para editarlo */
  touch-action: pan-y;                  /* el dedo hacia arriba/abajo sigue haciendo scroll */
  will-change: transform;
}
.cart-item .ci-img {
  width: 60px; height: 60px; border-radius: 10px; object-fit: cover;
  background: #f0f0f4; flex: 0 0 auto;
}
.cart-item .ci-img.placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #c9c9cf;
}
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 700; font-size: 15px; }
.cart-item .ci-opts { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.cart-item .ci-note { font-size: 12.5px; color: var(--orange-dark); margin-top: 2px; font-style: italic; }
.cart-item .ci-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ci-qty { display: flex; align-items: center; gap: 12px; }
.ci-qty button {
  width: 30px; height: 30px; border-radius: 50%; background: #f0f0f4; font-size: 17px;
  font-weight: 700; color: var(--orange-dark); display: flex; align-items: center; justify-content: center;
}
.ci-qty .ci-del { color: var(--red); background: #fdecec; }
.ci-price { font-weight: 800; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 44px 12px; }
.cart-empty .ce-emoji { font-size: 46px; }

.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.summary-row.total { font-weight: 800; font-size: 18px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.summary-row .muted { color: var(--text-muted); }

/* ── Checkout ─────────────────────────────────────────────────────────── */
.form-block { background: #fff; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.form-block h4 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .req-star { color: var(--red); }
.field.invalid .text-in, .field.invalid .phone-in input { border-color: var(--red); background: #fff5f5; }
.err-msg { display: none; color: var(--red); font-size: 12.5px; margin-top: 5px; }
.field.invalid .err-msg { display: block; }

/* Nombre + Apellido en 2 columnas */
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }

.phone-in { display: flex; gap: 8px; }
.phone-in select { flex: 0 0 96px; }
.phone-in input { flex: 1; }

/* Pago (radios) */
.pay-opts { display: flex; flex-direction: column; gap: 8px; }
.pay-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border: 1.5px solid var(--border-2); border-radius: 12px; font-weight: 600;
}
.pay-opt.selected { border-color: var(--orange); background: #fff6e9; }
.pay-opt .po-radio {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-2); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.pay-opt.selected .po-radio { border-color: var(--orange); }
.pay-opt.selected .po-radio::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }
.pay-opt .po-emoji { font-size: 20px; }
.pay-opt .po-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* Datos de transferencia (CLABE + copiar) */
.transfer-box {
  margin-top: 4px; background: #fffaf0; border: 1px solid var(--orange);
  border-radius: 12px; padding: 12px 14px;
}
/* Se DESLIZA desde el botón de Transferencia al elegirlo (no aparece de golpe abajo). */
.transfer-box:not(.hidden) { animation: tbSlide .22s ease; }
@keyframes tbSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.transfer-box .tb-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.transfer-box .tb-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.transfer-box .tb-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; width: 54px; flex: 0 0 auto; }
.transfer-box .tb-val { font-size: 14px; font-weight: 600; }
.transfer-box .tb-clabe {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .5px; color: var(--text);
  word-break: break-all;
}
.transfer-box .tb-copy {
  flex: 0 0 auto; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; white-space: nowrap;
}
.transfer-box .tb-note {
  font-size: 12.5px; color: var(--orange-dark); margin-top: 4px; line-height: 1.35;
  border-top: 1px dashed var(--orange); padding-top: 8px;
}

/* ¿Con cuánto paga? (efectivo) — se desliza bajo la opción Efectivo */
.cash-box {
  margin-top: 4px; background: #f6fbf7; border: 1px solid var(--green, #34c759);
  border-radius: 12px; padding: 12px 14px;
}
.cash-box:not(.hidden) { animation: tbSlide .22s ease; }
.cash-box .cb-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.cash-box .cb-row { display: flex; align-items: center; gap: 10px; }
.cash-box .cb-lbl { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.cash-box .cb-field {
  flex: 1; display: flex; align-items: center; gap: 4px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px;
}
.cash-box .cb-cur { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.cash-box .cb-field input {
  flex: 1; border: none; outline: none; background: none; width: 100%;
  font-size: 16px; font-weight: 700; color: var(--text); font-family: inherit;
}
.cash-box .cb-note { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.35; }
.cash-box .cb-note.ok   { color: #148a3a; font-weight: 700; }
.cash-box .cb-note.warn { color: var(--red, #ff3b30); font-weight: 700; }

/* Datos de transferencia dentro de la pantalla de gracias (para copiar la CLABE) */
.sv-transfer {
  background: #fffaf0; border: 1px solid var(--orange); border-radius: 14px;
  padding: 14px 16px; margin: 14px 0 4px; text-align: left;
}
.sv-transfer .tb-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; text-align: center; }
.sv-transfer .tb-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sv-transfer .tb-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; width: 54px; flex: 0 0 auto; }
.sv-transfer .tb-val { font-size: 14px; font-weight: 600; }
.sv-transfer .tb-clabe {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .5px; word-break: break-all;
}
.sv-transfer .tb-copy {
  flex: 0 0 auto; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; white-space: nowrap;
}
.sv-transfer .tb-note {
  font-size: 12.5px; color: var(--orange-dark); margin-top: 4px; line-height: 1.35;
  border-top: 1px dashed var(--orange); padding-top: 8px;
}
.sv-cta-app { text-decoration: none; }

/* Botón GPS del formulario de dirección */
.btn-gps {
  width: 100%; padding: 12px; border-radius: 12px; margin-bottom: 10px;
  background: #eef6ff; color: #0a7cff; border: 1.5px solid #bfdcff;
  font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-gps:active { background: #e0efff; }

/* Bloque identificarme */
.ident-box { background: #fffaf0; border: 1px dashed var(--orange); border-radius: 12px; padding: 12px 14px; }
.ident-box .ib-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ident-box .ib-help { font-size: 12px; color: var(--text-muted); margin: 6px 0 10px; }
.ident-box .ib-ok { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 8px; }
.ident-box .ib-bad { font-size: 13px; font-weight: 600; color: var(--red); margin-top: 8px; }
.code-in { letter-spacing: 6px; text-align: center; font-size: 22px; font-weight: 800; }

/* Mapa dirección */
#maddr-map { width: 100%; height: 220px; border-radius: 12px; background: #e9e9ee; margin-top: 2px; }
.map-hint { font-size: 12px; color: var(--text-muted); margin: 6px 0 12px; text-align: center; }

/* ── Pago con tarjeta (Stripe Payment Element) ────────────────────────── */
.card-total-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.card-total-row .muted { color: var(--text-muted); font-weight: 600; }
.card-total { font-size: 22px; font-weight: 800; color: var(--orange-dark); }
.card-status { font-size: 13.5px; color: var(--text-muted); min-height: 18px; margin-bottom: 8px; text-align: center; }
#cardPaymentBrick_container { min-height: 40px; }
/* Desglose de la comisión de tarjeta (antes de pagar) */
.card-breakdown { background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.cb-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-muted); padding: 4px 0; }
.cb-row span:last-child { color: var(--text); font-weight: 600; }
.cb-row.cb-total { border-top: 1px dashed #e3e3ea; margin-top: 4px; padding-top: 8px; font-size: 15.5px; font-weight: 800; color: var(--text); }
.cb-row.cb-total span:last-child { color: var(--orange-dark); font-weight: 800; }
.card-secure { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }
.mini-spin {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px;
  border: 2px solid #d9d9df; border-top-color: var(--orange); border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ── Pantalla de éxito ────────────────────────────────────────────────── */
.success-view {
  position: fixed; inset: 0; z-index: 70; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; overflow-y: auto;
}
.success-view .sv-emoji { font-size: 72px; animation: pop .4s; }
@keyframes pop { 0%{transform:scale(0)} 70%{transform:scale(1.15)} 100%{transform:scale(1)} }
.success-view h2 { font-size: 26px; font-weight: 800; margin: 10px 0 4px; }
.success-view .sv-sub { color: var(--text-muted); max-width: 340px; }
.sv-folio {
  background: #fff; border-radius: 14px; padding: 16px 24px; margin: 20px 0; box-shadow: var(--shadow);
  font-size: 15px;
}
.sv-folio b { font-size: 22px; color: var(--orange-dark); display: block; margin-top: 2px; }
.sv-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 360px; }
.sv-cta-app {
  background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #fff;
  border-radius: 16px; padding: 18px; font-weight: 800; font-size: 16px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.sv-cta-app .cta-sub { font-size: 12.5px; font-weight: 500; opacity: .95; }

/* Loader / toast */
.loader-fs {
  position: fixed; inset: 0; z-index: 90; background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
}
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid #f0d9b8; border-top-color: var(--orange); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: #1c1c1e; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  font-size: 14px; z-index: 95; opacity: 0; transition: opacity .2s, transform .2s; max-width: 90%;
  pointer-events: none;   /* nunca intercepta taps (aun invisible cubría el botón de pago) */
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* El toast sigue sin interceptar taps; solo su botón "Deshacer" mientras se ve. */
.toast-undo {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 6px 11px;
  border-radius: 9px; background: rgba(255,255,255,.16); color: #fff;
  font-size: 13.5px; font-weight: 700; pointer-events: none;
}
.toast.show .toast-undo { pointer-events: auto; }
.toast-undo .ico { width: 15px; height: 15px; }

/* ── Escritorio ───────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .pc-img { width: 110px; height: 110px; }
  .cart-fab-inner { border-radius: 16px; }
}
/* Web = máximo 2 columnas (más espacio por tarjeta, pedido del dueño). Móvil = 1. */
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

/* Aviso de zona de entrega (radio configurado en el panel admin) */
.range-msg{margin:8px 0 2px;padding:9px 11px;border-radius:10px;font-size:13px;line-height:1.5}
.range-msg.ok{background:#eafaf0;color:#1a7f43;border:1px solid #bfe9cf}
.range-msg.bad{background:#fdecec;color:#b42318;border:1px solid #f6cecb}
.range-msg .ico{width:14px;height:14px;vertical-align:-2px;margin-right:3px}
.range-msg a{color:inherit;font-weight:700;text-decoration:underline}

/* Comisión de la tarjeta, a la derecha de su renglón. Verde y no rojo: no es un
   castigo escondido, es el costo de la pasarela dicho de frente y por delante. */
.pay-opt .po-fee{
  margin-left:auto;flex:0 0 auto;font-size:12px;font-weight:800;color:#148a3a;
  background:rgba(20,138,58,.12);border-radius:8px;padding:5px 9px;white-space:nowrap;
}
.pay-opt .po-fee:empty{display:none}
