/* =====================================================================
   El Maná — tienda online. Celular primero.
   Lona del tianguis (rosa mexicano) arriba de cada página; precios con
   letra condensada como los letreros del puesto. Todo lo demás, sobrio.
   ===================================================================== */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/static/fuentes/barlow-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
:root {
  --lona: #d81b60;
  --lona-clara: #fbe3ec;
  --tinta: #222;
  --gris: #5f5a55;
  --linea: #e4dfd8;
  --costal: #efe6d8;
  --achiote: #a8360a;
  --hoja: #1f7a45;
  --letrero: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --radio: 12px;
  --ancho: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--tinta);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body.con-barra { padding-bottom: 88px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lona); outline-offset: 2px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2 { font-family: var(--letrero); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: .005em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
main { max-width: var(--ancho); margin: 0 auto; padding: 14px 16px 0; }

/* ---------- Encabezado y lona ---------- */
.aviso-previa { background: #f5b82e; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 16px; }
.cabeza { position: sticky; top: 0; z-index: 20; background: linear-gradient(#fff, #fff) top / 100% calc(100% - 14px) no-repeat; }
.cabeza-fila { max-width: var(--ancho); margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px; }
.marca { display: flex; flex-direction: column; text-decoration: none; line-height: 1; flex: none; }
.marca-nombre { font-family: var(--letrero); font-weight: 700; font-size: 30px; }
.marca-sub { font-size: 12px; color: var(--gris); margin-top: 2px; }
.busca-chica { flex: 1; min-width: 0; }
.busca-chica input {
  width: 100%; height: 42px; border: 1px solid var(--linea); border-radius: 10px; background: #f7f5f2;
  padding: 0 12px; font-size: 16px;
}
.btn-pedido { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; text-decoration: none; }
.cuenta {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--lona); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.cuenta[hidden] { display: none; }
/* Lona: franjas rosas con orilla de olanes, como el toldo del puesto */
.lona {
  height: 22px;
  background: repeating-linear-gradient(90deg, var(--lona) 0 28px, var(--lona-clara) 28px 56px);
  -webkit-mask: radial-gradient(circle 14px at 14px 8px, #000 97%, #0000) 0 0 / 28px 100% repeat-x, linear-gradient(#000 0 0) top / 100% 8px no-repeat;
          mask: radial-gradient(circle 14px at 14px 8px, #000 97%, #0000) 0 0 / 28px 100% repeat-x, linear-gradient(#000 0 0) top / 100% 8px no-repeat;
  margin-bottom: -14px; position: relative;
}

/* ---------- Portada y buscador ---------- */
.portada { padding: 14px 0 8px; }
.portada h1 { font-size: 2.6rem; max-width: 15ch; }
.portada p { color: var(--gris); max-width: 36rem; margin: 10px 0 0; font-size: 1.05rem; }
.busca-grande { display: flex; gap: 8px; margin-top: 16px; max-width: 34rem; }
.busca-grande input {
  flex: 1; min-width: 0; height: 52px; border: 2px solid var(--tinta); border-radius: var(--radio); padding: 0 14px; font-size: 17px;
}
.busca-grande button {
  height: 52px; padding: 0 18px; border: 0; border-radius: var(--radio); background: var(--tinta); color: #fff; font-weight: 700; cursor: pointer;
}

/* ---------- Categorías (fichas deslizables) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: none; text-decoration: none; border: 1px solid var(--linea); border-radius: 999px; padding: 9px 16px;
  font-weight: 600; font-size: 15px; background: #fff;
}
.chips a[aria-current="page"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }

/* ---------- Bloques y listas ---------- */
.bloque { padding: 22px 0 6px; }
.bloque-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bloque-cabeza a { color: var(--lona); font-weight: 700; font-size: 15px; white-space: nowrap; }
.migas { font-size: 14px; color: var(--gris); padding: 8px 0 0; }
.migas a { color: var(--gris); }
.lista-cabeza { padding: 10px 0 4px; }
.lista-texto { color: var(--gris); max-width: 40rem; }
.lista-texto p { margin: 8px 0 0; }
.conteo { color: var(--gris); font-size: 14px; margin: 0 0 10px; }
.vacio { color: var(--gris); padding: 24px 0; }
.rejilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.carrusel { list-style: none; margin: 0 -16px; padding: 0 16px 4px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel .tarjeta { flex: 0 0 42%; max-width: 210px; scroll-snap-align: start; }

/* ---------- Tarjeta de producto ---------- */
.tarjeta a { display: flex; flex-direction: column; text-decoration: none; }
.tarjeta-foto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--costal); }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; }
.galeria-tira:focus-visible { outline-offset: -3px; }
.sin-foto {
  width: 100%; height: 100%; display: grid; place-items: center; background: var(--costal);
  font-family: var(--letrero); font-weight: 700; font-size: 4.5rem; color: #c8b394;
}
.sin-foto.grande { aspect-ratio: 1; border-radius: var(--radio); font-size: 9rem; }
.sello {
  position: absolute; top: 8px; left: 8px; background: var(--lona); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.sello.en-linea { position: static; display: inline-block; margin-bottom: 6px; }
.tarjeta-nombre {
  margin-top: 8px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tarjeta-tamanos { font-size: 13px; color: var(--gris); margin-top: 2px; }
.tarjeta-precio { font-family: var(--letrero); font-weight: 700; font-size: 1.65rem; color: var(--achiote); line-height: 1.1; margin-top: 2px; }
.tarjeta-precio small { font-family: system-ui, sans-serif; font-weight: 500; font-size: 13px; color: var(--gris); }
.tarjeta-agotado { font-size: 13px; font-weight: 600; color: var(--gris); }
.tarjeta.agotada .tarjeta-foto { filter: grayscale(1); opacity: .6; }

/* ---------- Ficha de producto ---------- */
.ficha { padding-top: 12px; }
.galeria-tira { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radio); background: var(--costal); scrollbar-width: none; margin: 0 -16px; }
.galeria-tira::-webkit-scrollbar { display: none; }
.galeria-tira img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; scroll-snap-align: start; }
.galeria-pista { font-size: 13px; color: var(--gris); margin: 6px 0 0; }
.ficha-info { padding-top: 16px; }
.ficha-info h1 { font-size: 2.5rem; }
.ficha-corta { font-size: 1.1rem; color: #444; margin: 8px 0 0; max-width: 40rem; }
.comprar fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.comprar legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.tamanos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tamano {
  position: relative; display: flex; flex-direction: column; border: 2px solid var(--linea); border-radius: var(--radio);
  padding: 10px 12px; cursor: pointer; background: #fff;
}
.tamano input { position: absolute; opacity: 0; pointer-events: none; }
.tamano:has(input:checked) { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.tamano:has(input:focus-visible) { outline: 3px solid var(--lona); outline-offset: 2px; }
.tamano.sin { opacity: .55; }
.tamano-etq { font-weight: 600; }
.tamano-precio { font-family: var(--letrero); font-weight: 700; font-size: 1.8rem; color: var(--achiote); line-height: 1.05; }
.tamano-ref { font-size: 12px; color: var(--gris); min-height: 18px; }
.cantidad-fila { display: flex; gap: 10px; margin-top: 14px; }
.cantidad { display: flex; border: 2px solid var(--linea); border-radius: var(--radio); overflow: hidden; flex: none; }
.cantidad button { width: 44px; border: 0; background: #f7f5f2; font-size: 22px; cursor: pointer; }
.cantidad input { width: 44px; border: 0; text-align: center; font-weight: 700; font-size: 18px; -moz-appearance: textfield; }
.cantidad input::-webkit-inner-spin-button, .cantidad input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.btn-agregar {
  flex: 1; min-height: 54px; border: 0; border-radius: var(--radio); background: var(--tinta); color: #fff;
  font-weight: 700; font-size: 17px; cursor: pointer;
}
.agregado { margin: 10px 0 0; font-weight: 600; color: var(--hoja); }
.agregado a { color: var(--hoja); }
.btn-pregunta {
  display: flex; justify-content: center; align-items: center; min-height: 48px; margin-top: 10px; border: 2px solid var(--hoja);
  border-radius: var(--radio); color: var(--hoja); font-weight: 700; text-decoration: none;
}
.ficha-texto { margin-top: 26px; max-width: 65ch; }
.ficha-texto h2 { font-size: 1.5rem; }
.ficha-texto p { line-height: 1.65; margin: 10px 0 0; }

/* ---------- Mi pedido ---------- */
.enviado { background: #eaf6ee; border: 2px solid var(--hoja); border-radius: var(--radio); padding: 12px 14px; margin-top: 12px; }
.enviado p { margin: 0 0 8px; }
.enviado a { color: var(--hoja); font-weight: 700; }
.btn-vaciar { border: 0; background: var(--hoja); color: #fff; font-weight: 700; border-radius: 10px; padding: 10px 14px; cursor: pointer; min-height: 44px; }
.pedido { max-width: 40rem; padding-bottom: 24px; }
.pedido-lista { list-style: none; margin: 16px 0 0; padding: 0; }
.renglon { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.renglon-nombre { font-weight: 600; text-decoration: none; }
.renglon-detalle { font-size: 14px; color: var(--gris); }
.renglon-sub { font-family: var(--letrero); font-weight: 700; font-size: 1.4rem; text-align: right; }
.renglon-acciones { display: flex; align-items: center; gap: 14px; }
.renglon .cantidad button { width: 38px; height: 38px; }
.renglon .cantidad input { width: 38px; font-size: 16px; }
.quitar { background: none; border: 0; color: var(--gris); text-decoration: underline; cursor: pointer; padding: 8px 0; font-size: 14px; }
.renglon.sin .renglon-detalle { color: var(--achiote); font-weight: 600; }
.pedido-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-weight: 600; }
.pedido-total b { font-family: var(--letrero); font-size: 2rem; }
.pedido-nota { background: #fff7e0; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.pedido-datos { margin-top: 18px; }
.pedido-datos h2 { font-size: 1.5rem; margin-bottom: 10px; }
.entregas { display: grid; gap: 8px; }
.entrega { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--linea); border-radius: var(--radio); padding: 12px; cursor: pointer; }
.entrega:has(input:checked) { border-color: var(--tinta); }
.entrega input { margin-top: 4px; accent-color: var(--tinta); width: 18px; height: 18px; }
.entrega small { display: block; color: var(--gris); font-size: 13px; }
.campo { display: block; margin-top: 14px; }
.campo span { display: block; font-weight: 600; margin-bottom: 4px; }
.campo small { font-weight: 400; color: var(--gris); }
.campo input { width: 100%; height: 50px; border: 2px solid var(--linea); border-radius: var(--radio); padding: 0 12px; font-size: 17px; }
.campo input:focus { border-color: var(--tinta); outline: none; }
.btn-whatsapp {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: 56px; margin-top: 18px; border: 0;
  border-radius: var(--radio); background: var(--hoja); color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
}
.btn-whatsapp:disabled { opacity: .5; cursor: not-allowed; }
.pronto { padding-bottom: 32px; }
.pronto .btn-whatsapp { max-width: 22rem; }

/* ---------- Pedido en línea y seguimiento ---------- */
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.errores { background: #fdecee; border: 2px solid #c62828; border-radius: var(--radio); padding: 10px 14px; margin-top: 12px; color: #8e1b1b; font-weight: 600; }
.errores p { margin: 4px 0; }
.dos { display: grid; grid-template-columns: 1fr 9rem; gap: 10px; }
.campo select { width: 100%; height: 50px; border: 2px solid var(--linea); border-radius: var(--radio); padding: 0 10px; font-size: 17px; background: #fff; }
.pedido-datos h2 { margin-top: 22px; }
.cuenta-final { margin-top: 20px; border-top: 2px solid var(--tinta); padding-top: 8px; }
.cuenta-final p { display: flex; justify-content: space-between; margin: 6px 0; }
.cuenta-final .cf-total b { font-family: var(--letrero); font-size: 2rem; }
.btn-hacer {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: 56px; margin-top: 14px; border: 0;
  border-radius: var(--radio); background: var(--tinta); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer;
}
.btn-hacer:disabled { opacity: .6; cursor: progress; }
.otra-via { text-align: center; margin: 10px 0 0; }
.liga { background: none; border: 0; color: var(--hoja); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 10px; font-size: 15px; }
.mis-pedidos { font-size: 14px; color: var(--gris); }
.mis-pedidos a { font-weight: 700; color: var(--tinta); }
.listo-pedido { background: #eaf6ee; border: 2px solid var(--hoja); border-radius: var(--radio); padding: 12px 14px; margin-bottom: 12px; }
.pasos { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 4px; counter-reset: paso; }
.pasos li { flex: 1; font-size: 12px; font-weight: 600; color: var(--gris); text-align: center; counter-increment: paso; }
.pasos li::before { content: counter(paso); display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 4px; border-radius: 50%; background: var(--linea); color: var(--gris); font-weight: 700; }
.pasos li.hecho { color: var(--tinta); }
.pasos li.hecho::before { content: "✓"; background: var(--hoja); color: #fff; }
.caja-pago, .caja-entrega { border: 2px solid var(--linea); border-radius: var(--radio); padding: 14px; margin-top: 16px; }
.caja-pago h2, .caja-entrega h2 { font-size: 1.5rem; }
.caja-entrega p { margin: 6px 0 0; }
.caja-estado { border-radius: var(--radio); padding: 12px 14px; margin-top: 16px; }
.caja-estado.verde { background: #eaf6ee; border: 2px solid var(--hoja); }
.caja-estado.gris { background: #f2f0ed; border: 2px solid var(--linea); }
.aviso-rojo { color: #8e1b1b; font-weight: 600; }
.datos-pago { margin: 12px 0 0; display: grid; gap: 10px; }
.datos-pago div { display: grid; gap: 2px; }
.datos-pago dt { font-size: 13px; color: var(--gris); }
.datos-pago dd { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; }
.dato-grande { font-family: var(--letrero); font-weight: 700; font-size: 1.6rem; letter-spacing: .02em; }
.copiar { border: 1px solid var(--linea); background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; min-height: 36px; }
.subir-comp { margin-top: 14px; }
.btn-archivo { position: relative; display: flex; justify-content: center; align-items: center; min-height: 52px; border: 2px dashed var(--tinta); border-radius: var(--radio); font-weight: 700; cursor: pointer; padding: 8px 12px; text-align: center; }
.btn-archivo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.btn-archivo:focus-within { outline: 3px solid var(--lona); outline-offset: 2px; }
.btn-agregar:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Barra fija «Mi pedido» ---------- */
.barra-pedido {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--tinta); color: #fff; text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  max-width: 560px; margin: 0 auto;
}
.barra-pedido[hidden] { display: none; }
.barra-total { margin-left: auto; font-family: var(--letrero); font-weight: 700; font-size: 1.4rem; }
.barra-ir { background: var(--lona); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 15px; }

/* ---------- Pie ---------- */
.pie { margin-top: 40px; background: var(--tinta); color: #eee; border-top: 6px solid var(--lona); }
.pie-dentro { max-width: var(--ancho); margin: 0 auto; padding: 24px 16px 32px; }
.pie-marca { font-family: var(--letrero); font-weight: 700; font-size: 1.6rem; margin: 0; color: #fff; }
.pie-texto p { margin: 6px 0 0; color: #ccc; }
.pie-ligas { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pie-ligas a { color: #fff; font-weight: 600; }
.pie-chico { font-size: 13px; color: #aaa; margin: 16px 0 0; }
.pedido .pie-chico { color: var(--gris); }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 640px) {
  .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 18px; }
  .carrusel .tarjeta { flex-basis: 200px; }
  .portada h1 { font-size: 3.4rem; }
  .tamanos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .portada { padding-top: 36px; }
  .portada h1 { font-size: 4.4rem; max-width: 20ch; }
  .ficha { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; align-items: start; }
  .galeria { position: sticky; top: 100px; }
  .galeria-tira { margin: 0; }
  .ficha-info { padding-top: 0; }
  .ficha-info h1 { font-size: 3rem; }
  .cabeza-fila { padding-top: 14px; }
  .busca-chica { max-width: 420px; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Envío: franja de aviso, avance y datos ---------- */
.franja {
  margin: 0; background: var(--costal); color: var(--tinta); text-align: center; font-weight: 600; font-size: 15px;
  padding: 20px 16px 8px; line-height: 1.35;
}
main.con-franja { padding-top: 10px; }
.avance-envio { margin: -6px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--lona-clara); font-weight: 600; font-size: 15px; }
.avance-envio.listo, .envio-info.listo { background: #eaf6ee; color: var(--hoja); }
.envio-info { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #f7f5f2; font-size: 15px; }
.envio-info:empty { display: none; }
.cf-nota { display: block !important; font-size: 14px; color: var(--gris); margin: 4px 0 0 !important; }
.cf-nota[hidden] { display: none !important; }
.barra-pedido { flex-wrap: wrap; row-gap: 6px; }
.barra-envio { flex: 1 0 100%; font-size: 13px; font-weight: 600; color: #ffd6e5; }
.barra-envio.listo { color: #9fe0b5; }
.barra-envio[hidden] { display: none; }
body.con-barra.con-envio { padding-bottom: 112px; }
.campo[hidden] { display: none; }
