/* tienda.css — La página web de cada corralón (28-oct, src/tienda.js). Fondo claro, texto negro, el color del corralón
   (--acento, negocio.colorMarca) solo como acento y un solo botón principal por pantalla: «Pedir por WhatsApp». */
:root {
  --acento: #C8201B;
  --acento-suave: color-mix(in srgb, var(--acento) 9%, #fff);
  --acento-borde: color-mix(in srgb, var(--acento) 28%, #fff);
  --texto: #111;
  --texto-2: #4a4a4a;
  --texto-3: #6f6f6f;
  --fondo: #fff;
  --fondo-2: #f6f5f3;
  --linea: #e6e3df;
  --ok: #1f7a3d;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.06);
  --ancho: 1200px;
  --cab: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; font-family: Inter, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--texto); background: var(--fondo); font-size: 15px; line-height: 1.45; padding-bottom: 64px; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.visualmente-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 8px; background: #000; color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.saltar:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.envoltura { max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }

/* ── Barra de beneficios ── */
.t-beneficios { background: var(--acento-suave); border-bottom: 1px solid var(--acento-borde); font-size: 13px; color: var(--texto); }
.t-beneficios ul { list-style: none; margin: 0 auto; padding: 7px 16px; max-width: var(--ancho); display: flex; gap: 22px; justify-content: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.t-beneficios li { display: flex; align-items: center; gap: 6px; }
.t-beneficios strong { color: var(--acento); font-weight: 700; }
.t-beneficios svg { width: 16px; height: 16px; color: var(--acento); }

/* ── Cabecera ── */
.t-cab { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--linea); }
.t-cab-in { max-width: var(--ancho); margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.t-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.t-marca-logo img { height: 40px; width: auto; max-width: 140px; object-fit: contain; }
.t-marca-logo .t-inicial { width: 40px; height: 40px; border-radius: 10px; background: var(--acento); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; }
.t-marca-nombre { font-weight: 800; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.t-buscar { display: flex; align-items: center; background: var(--fondo-2); border: 1px solid var(--linea); border-radius: 999px; padding: 0 4px 0 14px; max-width: 560px; width: 100%; justify-self: center; }
.t-buscar input { flex: 1; border: 0; background: transparent; font: inherit; padding: 10px 0; min-width: 0; outline: none; }
.t-buscar button { border: 0; background: transparent; padding: 8px; border-radius: 999px; display: grid; place-items: center; color: var(--texto-2); }
.t-buscar:focus-within { border-color: var(--acento-borde); background: #fff; box-shadow: 0 0 0 3px var(--acento-suave); }
.t-carrito-btn { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--linea); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; }
.t-carrito-btn:hover { border-color: var(--texto-3); }
.t-insignia { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--acento); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.t-rubros-barra { max-width: var(--ancho); margin: 0 auto; padding: 0 16px 8px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.t-rubros-barra::-webkit-scrollbar, .t-beneficios ul::-webkit-scrollbar, .t-fila::-webkit-scrollbar { display: none; }
.t-rubros-barra a { flex: none; text-decoration: none; font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px; color: var(--texto-2); }
.t-rubros-barra a:hover { background: var(--fondo-2); color: var(--texto); }
.t-rubros-barra a[aria-current="page"] { background: var(--texto); color: #fff; }
@media (max-width: 899px) {
  .t-cab-in { grid-template-columns: 1fr auto; }
  .t-buscar { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .t-carrito-btn { display: none; }
  .t-marca-nombre { max-width: 70vw; font-size: 16px; }
}

/* ── Portada ── */
.t-hero { background: linear-gradient(180deg, var(--acento-suave), #fff 85%); border-bottom: 1px solid var(--linea); }
.t-hero-in { max-width: var(--ancho); margin: 0 auto; padding: 40px 16px 34px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: center; }
.t-hero h1 { font-size: clamp(28px, 4.2vw, 46px); line-height: 1.07; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 800; }
.t-hero h1 em { font-style: normal; color: var(--acento); }
.t-hero p.bajada { font-size: 17px; color: var(--texto-2); margin: 0 0 22px; max-width: 34em; }
.t-hero-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.t-datos { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--texto-2); }
.t-datos li { display: flex; gap: 8px; align-items: flex-start; }
.t-datos svg { width: 18px; height: 18px; color: var(--acento); margin-top: 1px; }
.t-hero-panel { background: #fff; border: 1px solid var(--linea); border-radius: 18px; box-shadow: var(--sombra); padding: 18px; display: grid; gap: 12px; }
.t-hero-panel h2 { font-size: 15px; margin: 0; }
.t-hero-panel .t-mini { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--linea); text-decoration: none; }
.t-hero-panel .t-mini:first-of-type { border-top: 0; }
.t-hero-panel .t-mini .t-foto { width: 52px; height: 52px; border-radius: 10px; }
.t-hero-panel .t-mini .t-mini-n { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.t-hero-panel .t-mini .t-mini-p { font-weight: 800; white-space: nowrap; }
.t-hero-panel .t-chico { font-size: 12px; color: var(--texto-3); margin: 0; }
@media (max-width: 899px) { .t-hero-in { grid-template-columns: 1fr; padding: 26px 16px 24px; gap: 22px; } }

.t-seccion { max-width: var(--ancho); margin: 0 auto; padding: 34px 16px 6px; }
.t-seccion-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.t-seccion h2 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.015em; margin: 0; font-weight: 800; }
.t-seccion-cab a { font-size: 14px; font-weight: 600; color: var(--acento); text-decoration: none; white-space: nowrap; }
.t-seccion-cab a:hover { text-decoration: underline; }
.t-sub { color: var(--texto-2); margin: -6px 0 16px; }

/* Rubros */
.t-rubros { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.t-rubro { display: grid; gap: 10px; text-decoration: none; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.t-rubro:hover { border-color: var(--acento-borde); box-shadow: var(--sombra); transform: translateY(-1px); }
.t-rubro .t-rubro-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--acento-suave); color: var(--acento); display: grid; place-items: center; }
.t-rubro .t-rubro-ico svg { width: 26px; height: 26px; }
.t-rubro strong { font-size: 14.5px; line-height: 1.2; }
.t-rubro span { font-size: 12.5px; color: var(--texto-3); }
@media (max-width: 520px) { .t-rubros { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Productos */
.t-fila { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 220px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 12px; scrollbar-width: none; }
.t-fila > * { scroll-snap-align: start; }
.t-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .t-grilla { grid-template-columns: repeat(2, 1fr); gap: 10px; } .t-fila { grid-auto-columns: 46%; } }
.t-prod { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.t-prod:hover { border-color: #d5d1cc; box-shadow: var(--sombra); }
.t-prod > a { text-decoration: none; display: flex; flex-direction: column; flex: 1; }
.t-foto { aspect-ratio: 1; background: var(--fondo-2); display: grid; place-items: center; color: color-mix(in srgb, var(--acento) 55%, #999); overflow: hidden; }
.t-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-foto svg { width: 42%; height: 42%; stroke-width: 1.2; }
.t-prod-cuerpo { padding: 10px 12px 4px; display: grid; gap: 4px; flex: 1; align-content: start; }
.t-prod-rubro { font-size: 11.5px; color: var(--texto-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.t-prod-nombre { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em; }
.t-precio { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.t-precio small { font-size: 12px; font-weight: 500; color: var(--texto-3); margin-left: 4px; }
.t-tarjeta { font-size: 12px; color: var(--texto-3); }
.t-prod-pie { padding: 8px 12px 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 16px; font-weight: 600; font-size: 14.5px; border: 1px solid var(--linea); background: #fff; text-decoration: none; line-height: 1.1; }
.btn:hover { border-color: var(--texto-3); }
.btn svg { width: 18px; height: 18px; }
.btn.ancho { width: 100%; }
.btn.chico { padding: 8px 12px; font-size: 13.5px; }
.btn.principal { background: var(--acento); border-color: var(--acento); color: #fff; }
.btn.principal:hover { filter: brightness(.94); }
.btn.agregado { border-color: var(--ok); color: var(--ok); }
.btn[disabled] { opacity: .5; cursor: default; }

/* Cómo comprar, pagos y envíos */
.t-pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: paso; }
.t-paso { border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; background: #fff; }
.t-paso::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--acento-suave); color: var(--acento); font-weight: 800; margin-bottom: 10px; }
.t-paso h3 { margin: 0 0 4px; font-size: 15.5px; }
.t-paso p { margin: 0; color: var(--texto-2); font-size: 14px; }
@media (max-width: 720px) { .t-pasos { grid-template-columns: 1fr; } }
.t-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.t-info-caja { border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; background: var(--fondo-2); }
.t-info-caja h3 { margin: 0 0 8px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.t-info-caja h3 svg { width: 20px; height: 20px; color: var(--acento); }
.t-info-caja ul { margin: 0; padding-left: 18px; color: var(--texto-2); font-size: 14px; display: grid; gap: 3px; }
.t-info-caja p { margin: 0; color: var(--texto-2); font-size: 14px; }
.t-calc { display: flex; gap: 16px; align-items: center; justify-content: space-between; border: 1px solid var(--acento-borde); background: var(--acento-suave); border-radius: 16px; padding: 18px 20px; flex-wrap: wrap; }
.t-calc h2 { font-size: 19px; margin: 0 0 4px; }
.t-calc p { margin: 0; color: var(--texto-2); }

/* Listado y ficha */
.t-migas { font-size: 13px; color: var(--texto-3); margin: 18px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.t-migas a { text-decoration: none; }
.t-migas a:hover { text-decoration: underline; }
.t-listado-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.t-listado-cab h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.t-listado-cab p { margin: 2px 0 0; color: var(--texto-3); font-size: 14px; }
.t-orden { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; background: #fff; }
.t-vacio { text-align: center; padding: 40px 16px; color: var(--texto-2); }
.t-vacio h2 { color: var(--texto); font-size: 20px; margin: 0 0 6px; }
.t-mas { display: flex; justify-content: center; padding: 18px 0 4px; }
.t-ficha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 6px 0 20px; }
.t-ficha .t-foto { border-radius: 16px; border: 1px solid var(--linea); }
.t-ficha h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.15; letter-spacing: -.02em; margin: 4px 0 8px; }
.t-ficha .t-marca-p { color: var(--texto-3); font-size: 14px; margin: 0 0 14px; }
.t-ficha-precio { border: 1px solid var(--linea); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; margin-bottom: 16px; }
.t-ficha-precio .t-precio { font-size: 30px; }
.t-ficha-precio .t-medio { font-size: 13px; color: var(--texto-2); }
.t-cant { display: inline-flex; align-items: center; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.t-cant button { border: 0; background: #fff; width: 40px; height: 44px; font-size: 20px; }
.t-cant button:hover { background: var(--fondo-2); }
.t-cant input { width: 58px; height: 44px; border: 0; border-left: 1px solid var(--linea); border-right: 1px solid var(--linea); text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.t-cant input::-webkit-outer-spin-button, .t-cant input::-webkit-inner-spin-button { -webkit-appearance: none; }
.t-ficha-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.t-ficha-texto { color: var(--texto-2); font-size: 14.5px; white-space: pre-line; }
.t-nota { font-size: 12.5px; color: var(--texto-3); margin: 8px 0 0; }
@media (max-width: 760px) { .t-ficha { grid-template-columns: 1fr; gap: 18px; } .t-ficha .t-foto { max-width: 420px; } }

/* ── Carrito ── */
.t-fondo { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.t-carrito { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; z-index: 41; transform: translateX(105%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.t-carrito.abierto { transform: none; }
.t-carrito-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--linea); }
.t-carrito-cab h2 { margin: 0; font-size: 18px; }
.t-cerrar { border: 0; background: transparent; padding: 6px; border-radius: 8px; }
.t-cerrar:hover { background: var(--fondo-2); }
.t-carrito-lista { flex: 1; overflow-y: auto; padding: 4px 16px; }
.t-renglon { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.t-renglon-n { font-size: 14px; font-weight: 600; line-height: 1.3; }
.t-renglon-p { font-size: 13px; color: var(--texto-3); }
.t-renglon-t { font-weight: 700; text-align: right; white-space: nowrap; }
.t-renglon .t-cant { justify-self: start; }
.t-renglon .t-cant button { width: 34px; height: 34px; font-size: 17px; }
.t-renglon .t-cant input { width: 48px; height: 34px; }
.t-quitar { border: 0; background: transparent; font-size: 13px; color: var(--texto-3); text-decoration: underline; padding: 4px 0; justify-self: end; }
.t-carrito-pie { border-top: 1px solid var(--linea); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.t-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.t-total strong { font-size: 22px; }
.t-carrito-pie textarea { font: inherit; font-size: 14px; border: 1px solid var(--linea); border-radius: 10px; padding: 10px; resize: vertical; min-height: 44px; }

/* ── Pie y barra de abajo ── */
.t-pie { border-top: 1px solid var(--linea); margin-top: 40px; background: var(--fondo-2); }
.t-pie-in { max-width: var(--ancho); margin: 0 auto; padding: 28px 16px 22px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; font-size: 14px; color: var(--texto-2); }
.t-pie h3 { color: var(--texto); font-size: 14.5px; margin: 0 0 8px; }
.t-pie p { margin: 0 0 4px; }
.t-pie a { text-decoration: none; }
.t-pie a:hover { text-decoration: underline; }
.t-pie-legal { max-width: var(--ancho); margin: 0 auto; padding: 12px 16px 22px; border-top: 1px solid var(--linea); font-size: 12.5px; color: var(--texto-3); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .t-pie-in { grid-template-columns: 1fr; gap: 16px; } }
.t-abajo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--linea); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.t-abajo a, .t-abajo button { border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11.5px; font-weight: 600; color: var(--texto-2); text-decoration: none; position: relative; }
.t-abajo [aria-current="page"] { color: var(--acento); }
.t-abajo .t-insignia { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; }
@media (min-width: 900px) { .t-abajo { display: none; } }
.t-flotante { position: fixed; right: 16px; bottom: 80px; z-index: 29; width: 54px; height: 54px; border-radius: 999px; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.t-flotante svg { width: 28px; height: 28px; stroke-width: 1.6; }
@media (min-width: 900px) { .t-flotante { bottom: 24px; } }

.t-aviso { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.t-aviso.ver { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .t-aviso { bottom: 28px; } }
.t-cargando { text-align: center; padding: 80px 16px; color: var(--texto-3); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 28-oct (Panel › Página web): la foto de arriba que sube el dueño y «Quiénes somos». Las fotos de producto que suben
   los dueños vienen con fondo propio: se ven enteras, sin recortar. */
.t-portada { max-width: var(--ancho); margin: 16px auto 0; padding: 0 16px; }
.t-portada img { display: block; width: 100%; height: clamp(150px, 26vw, 340px); object-fit: cover; border-radius: 16px; background: var(--fondo-2); }
.t-nosotros { max-width: 760px; display: grid; gap: 10px; color: var(--texto-2); font-size: 15.5px; line-height: 1.6; white-space: pre-line; }
.t-nosotros p { margin: 0; }
.t-foto img[src*="/tienda/img/"] { object-fit: contain; background: #fff; }
/* 28-oct: en el pedido, cómo paga y cómo lo recibe (van en el mensaje de WhatsApp). */
.t-elegir { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; }
.t-elegir > div { display: flex; flex-wrap: wrap; gap: 6px; }
.t-opcion { font: inherit; font-size: 13.5px; font-weight: 500; min-height: 36px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--linea); background: #fff; color: var(--texto); cursor: pointer; }
.t-opcion[aria-pressed=true] { border-color: var(--acento); background: var(--acento-suave); color: var(--texto); font-weight: 700; }
