/* =========================================================
   tienda.css — la tienda en línea que ve el público.
   Los colores de marca salen de Configuración (--t-marca,
   --t-acento en cabeza.php); lo demás vive aquí.
   ========================================================= */

:root {
  --t-fondo: #fbf7f2;
  --t-tarjeta: #ffffff;
  --t-tinta: #1f1915;
  --t-tenue: #6d625a;
  --t-linea: #eee5dc;
  --t-verde: #1a8f5a;
  --t-rojo: #c0392b;
  --t-radio: 18px;
  --t-sombra: 0 1px 2px rgba(31, 25, 21, .06), 0 8px 24px rgba(31, 25, 21, .06);
  --t-sombra-alta: 0 12px 40px rgba(31, 25, 21, .16);
  --t-barra-alto: 64px;
  --t-titulos: 'Fraunces', Georgia, serif;
}

.t-body {
  background: var(--t-fondo);
  color: var(--t-tinta);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.t-body a { color: inherit; }
.t-contenedor { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.t-contenedor-angosto { max-width: 640px; }
@media (min-width: 768px) { .t-contenedor { padding: 0 28px; } }

/* ---------- aviso de vista previa ---------- */
.t-vista-previa {
  background: #1f1915; color: #fff; text-align: center; font-size: .85rem; padding: 8px 16px;
}
.t-vista-previa a { color: var(--t-acento); margin-left: 6px; font-weight: 600; }

/* ---------- barra de arriba ---------- */
.t-barra {
  position: sticky; top: 0; z-index: 1030; height: var(--t-barra-alto);
  background: rgba(251, 247, 242, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.t-barra.con-sombra { border-color: var(--t-linea); box-shadow: 0 2px 12px rgba(31, 25, 21, .05); }
.t-barra-dentro { height: 100%; display: flex; align-items: center; gap: 12px; }
.t-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.t-marca-logo {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--t-marca-suave); font-size: 1.35rem;
}
.t-marca-logo img { width: 100%; height: 100%; object-fit: cover; }
.t-marca-nombre {
  font-family: var(--t-titulos); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-chip-sucursal {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--t-linea); background: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 600; color: var(--t-tinta);
  max-width: 42vw; white-space: nowrap;
}
.t-chip-sucursal span { overflow: hidden; text-overflow: ellipsis; }
.t-chip-sucursal .bi-geo-alt-fill { color: var(--t-marca); }
.t-barra-acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* «Categorías», arriba: en pantalla ancha, o en el celular si no hay barra de abajo. */
.t-btn-cats {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--t-linea); background: #fff;
  border-radius: 999px; padding: 9px 14px; font-size: .9rem; font-weight: 600; color: var(--t-tinta); white-space: nowrap;
}
.t-btn-cats:hover { border-color: var(--t-marca); color: var(--t-marca); }
/* La campanita y «Mis compras». Lo que no se ha leído va en rojo. */
.t-btn-barra { position: relative; background: #fff; border: 1px solid var(--t-linea); }
.t-campana-cuenta {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #e02424; color: #fff; font-size: .7rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--t-fondo);
}
.t-campana.suena .bi { animation: t-campana .6s ease 2; transform-origin: 50% 0; }
@keyframes t-campana { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-18deg); } }
.t-btn-carrito {
  position: relative; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px;
  background: var(--t-tinta); color: #fff !important; padding: 9px 16px; font-weight: 600; font-size: .92rem;
  text-decoration: none; transition: transform .15s;
}
.t-btn-carrito:active { transform: scale(.96); }
.t-btn-carrito .bi { font-size: 1.05rem; }
.t-carrito-cuenta {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--t-acento); color: #1f1300; font-size: .75rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--t-fondo);
}
.t-carrito-cuenta.salta { animation: t-salto .45s ease; }
@keyframes t-salto { 0%,100% { transform: scale(1); } 40% { transform: scale(1.35); } }

/* ---------- botones ---------- */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s, background-color .15s, box-shadow .15s; cursor: pointer; line-height: 1.2;
}
.t-btn:active { transform: scale(.97); }
.t-btn-primario { background: var(--t-marca); color: #fff !important; box-shadow: 0 6px 18px color-mix(in srgb, var(--t-marca) 35%, transparent); }
.t-btn-primario:hover { background: var(--t-marca-osc); }
.t-btn-primario:disabled { opacity: .55; box-shadow: none; }
.t-btn-vidrio { background: rgba(255, 255, 255, .16); color: #fff !important; border-color: rgba(255, 255, 255, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.t-btn-suave { background: var(--t-marca-suave); color: var(--t-marca-osc) !important; }
.t-btn-suave:hover { background: color-mix(in srgb, var(--t-marca) 18%, #fff); }
.t-btn-borde { background: #fff; color: var(--t-tinta) !important; border-color: var(--t-linea); }
.t-btn-borde:hover { border-color: var(--t-tinta); }
.t-btn-whatsapp { background: #25d366; color: #0b3d1f !important; }
.t-btn-whatsapp:hover { background: #1fbe5b; }
.t-btn-grande { padding: 15px 22px; font-size: 1.02rem; }
.t-btn-icono {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--t-fondo); color: var(--t-tinta);
  display: grid; place-items: center; font-size: 1.1rem;
}

/* ---------- portada ---------- */
.t-portada {
  position: relative; color: #fff; overflow: hidden;
  min-height: clamp(360px, 58vh, 560px); display: flex; align-items: flex-end;
  background:
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--t-acento) 55%, transparent) 0, transparent 42%),
    radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--t-marca) 60%, #000) 0, transparent 50%),
    linear-gradient(135deg, var(--t-marca) 0%, var(--t-marca-osc) 100%);
}
.t-portada::after {                       /* textura suave de puntos, para que no se vea plano */
  content: ''; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1.5px); background-size: 22px 22px;
}
.t-portada.con-foto { background: #1f1915 var(--t-portada) center / cover no-repeat; }
.t-portada.con-foto::after {
  opacity: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, .78) 100%);
}
.t-portada-dentro { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 44px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
/* los datos de hoy, a la derecha: solo en pantalla grande */
.t-portada-tarjeta {
  display: none; flex: 0 0 320px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 22px; padding: 20px 22px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (min-width: 992px) { .t-portada-tarjeta:not([hidden]) { display: block; } }
.t-portada-tarjeta h3 { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin: 0 0 12px; }
.t-portada-tarjeta .t-dato { margin: 10px 0 0; font-size: .95rem; }
.t-portada-tarjeta .t-dato > .bi { color: var(--t-acento); }
.t-portada-tarjeta .t-btn { margin-top: 16px; width: 100%; }
.t-portada-texto { max-width: 680px; }
.t-portada-estado {
  display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); margin-bottom: 14px;
}
.t-portada-estado::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84;
  box-shadow: 0 0 0 4px rgba(61, 220, 132, .25); }
.t-portada-estado.cerrado::before { background: #ff6b5b; box-shadow: 0 0 0 4px rgba(255, 107, 91, .25); }
.t-titulo {
  font-family: var(--t-titulos); font-weight: 800; letter-spacing: -.02em; line-height: 1.02;
  font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 0 0 12px; text-wrap: balance;
}
.t-eslogan { font-size: clamp(1.02rem, 2.2vw, 1.25rem); opacity: .92; margin: 0 0 24px; max-width: 520px; }
.t-portada-botones { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- barra pegajosa: buscador y categorías ---------- */
.t-menu { padding-bottom: 32px; }
.t-pegajoso {
  position: sticky; top: var(--t-barra-alto); z-index: 1020; background: var(--t-fondo);
  padding: 14px 0 0; border-bottom: 1px solid var(--t-linea);
}
.t-buscador { position: relative; margin-bottom: 10px; }
.t-buscador .bi { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--t-tenue); }
.t-buscador input {
  width: 100%; border: 1px solid var(--t-linea); background: #fff; border-radius: 14px;
  padding: 12px 16px 12px 44px; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.t-buscador input:focus { border-color: var(--t-marca); box-shadow: 0 0 0 4px var(--t-marca-suave); }
.t-categorias {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; scroll-behavior: smooth;
}
.t-categorias::-webkit-scrollbar { display: none; }
.t-cat {
  flex: 0 0 auto; border: 1px solid var(--t-linea); background: #fff; color: var(--t-tinta); border-radius: 999px;
  padding: 7px 14px; font-size: .9rem; font-weight: 600; white-space: nowrap; transition: all .15s;
}
.t-cat:hover { border-color: var(--t-tinta); }
.t-cat.activa { background: var(--t-tinta); border-color: var(--t-tinta); color: #fff; }
.t-cat small { opacity: .6; font-weight: 500; margin-left: 4px; }

/* ---------- secciones del menú ---------- */
.t-seccion { padding-top: 30px; scroll-margin-top: calc(var(--t-barra-alto) + 124px); }
.t-seccion-titulo {
  font-family: var(--t-titulos); font-weight: 800; font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -.015em; margin: 0 0 16px;
}
.t-seccion-cabeza { margin-bottom: 22px; }
.t-antetitulo {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--t-marca); margin-bottom: 6px;
}
/* En celular van dos por renglón, como las tarjetas del punto de venta. */
.t-rejilla { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .t-rejilla { gap: 18px; } }
@media (min-width: 992px) { .t-rejilla { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .t-rejilla { grid-template-columns: repeat(4, 1fr); } }

/* la tarjeta: la foto arriba y el texto abajo, en cualquier pantalla */
.t-producto {
  position: relative; display: flex; flex-direction: column; background: var(--t-tarjeta); border-radius: var(--t-radio);
  padding: 0; overflow: hidden; box-shadow: var(--t-sombra); cursor: pointer; text-align: left; border: 0; width: 100%;
  transition: transform .2s, box-shadow .2s; color: var(--t-tinta);
}
.t-producto:hover { transform: translateY(-2px); box-shadow: var(--t-sombra-alta); }
.t-producto:focus-visible { outline: 3px solid var(--t-marca); outline-offset: 2px; }
.t-producto-foto {
  position: relative; flex: none; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--t-marca-suave); display: grid; place-items: center; font-size: 2.8rem;
}
.t-producto-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.t-producto:hover .t-producto-foto img { transform: scale(1.05); }
.t-producto-info { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px 12px 12px; }
.t-producto-nombre { font-weight: 700; font-size: .95rem; line-height: 1.25; margin: 0 0 4px; }
.t-producto-desc {
  color: var(--t-tenue); font-size: .8rem; line-height: 1.4; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.t-producto-pie { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-precio { font-weight: 700; font-size: 1.02rem; }
.t-precio small { font-weight: 500; color: var(--t-tenue); font-size: .8rem; }
.t-precio-antes { color: var(--t-tenue); text-decoration: line-through; font-size: .85rem; font-weight: 500; margin-left: 6px; }
.t-agregar {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: #fff; color: var(--t-tinta); display: grid; place-items: center; font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18); transition: transform .15s, background .15s;
}
.t-agregar:hover { background: var(--t-marca); color: #fff; }
.t-agregar:active { transform: scale(.9); }
.t-cinta {
  position: absolute; top: 8px; left: 8px; z-index: 1; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.t-agotado-marca {
  position: absolute; inset: auto 0 0 0; background: rgba(31, 25, 21, .78); color: #fff; font-size: .72rem;
  font-weight: 700; text-align: center; padding: 4px; letter-spacing: .06em; text-transform: uppercase;
}
/* Lo que ya va en el pedido: el mismo botón de agregar, con el color de la
   marca, aro blanco y cuánto llevas. A granel («½ kg») se estira a pastilla. */
.t-agregar.en-carrito {
  width: auto; min-width: 36px; padding: 0 6px; border-radius: 999px; border: 3px solid #fff;
  background: var(--t-marca); color: #fff; font-size: .9rem; font-weight: 800; line-height: 1; white-space: nowrap;
}
.t-agregar.en-carrito:hover { background: var(--t-marca-osc); }
@media (min-width: 576px) {
  .t-producto-foto { font-size: 3.6rem; }
  .t-producto-info { padding: 14px 16px 16px; }
  .t-producto-nombre { font-size: 1rem; }
  .t-producto-desc { font-size: .86rem; }
  .t-agregar { right: 12px; bottom: 12px; width: 40px; height: 40px; }
  .t-agregar.en-carrito { min-width: 40px; font-size: 1rem; }
}

/* lo más pedido: una tira que se desliza */
.t-tira { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px;
  scrollbar-width: none; }
.t-tira::-webkit-scrollbar { display: none; }
.t-tira .t-producto { flex: 0 0 min(78vw, 260px); flex-direction: column; padding: 0; overflow: hidden; scroll-snap-align: start; }
.t-tira .t-producto-foto { order: 0; flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
.t-tira .t-producto-info { padding: 12px 14px 14px; }
.t-tira .t-agregar { right: 12px; bottom: 12px; }
.t-numero-top {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  background: var(--t-acento); color: #1f1300; font-weight: 800; font-size: .85rem; display: grid; place-items: center;
}

.t-cargando { padding-top: 30px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.t-esqueleto { height: 136px; border-radius: var(--t-radio);
  background: linear-gradient(90deg, #f1ebe4 25%, #f8f3ee 37%, #f1ebe4 63%); background-size: 400% 100%;
  animation: t-brillo 1.4s ease infinite; }
@keyframes t-brillo { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.t-vacio { text-align: center; color: var(--t-tenue); padding: 48px 0; }
.t-vacio .bi { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* ---------- la página del producto ----------
   Va debajo de la barra de arriba, en lugar del menú (que se esconde). En el
   celular la ficha va de orilla a orilla; en pantalla ancha, en una tarjeta.
   Debajo sigue «Más productos», en la misma rejilla del menú. */
.t-pagina-producto { padding-bottom: 32px; outline: none; }
.t-pagina-caja { max-width: 1180px; margin: 0 auto; }
.t-pagina-blanca { background: #fff; }
.t-pagina-producto .t-cargando { padding: 16px; }
.t-mas-productos { padding: 28px 16px 0; }
.t-mas-productos > .t-mas-titulo { font-size: 1.35rem; margin-bottom: 14px; }
@media (max-width: 767.98px) {
  .t-pagina-producto .t-ficha-cuerpo { padding: 20px 16px; }
  .t-pagina-producto .t-ficha-mas { padding: 0 16px 24px; }
}
@media (min-width: 768px) {
  .t-pagina-caja { padding: 24px 28px 0; }
  .t-pagina-blanca { border-radius: 24px; overflow: hidden; box-shadow: var(--t-sombra); }
  .t-mas-productos { padding: 36px 0 0; }
}
/* La flecha de regresar en la barra de arriba (solo en la página de un producto). */
.t-barra-regresar { flex: 0 0 auto; margin-left: -8px; margin-right: -4px; font-size: 1.25rem; }
.t-ficha { display: grid; grid-template-columns: 1fr; }
@media (min-width: 768px) { .t-ficha { grid-template-columns: 1.05fr 1fr; min-height: 440px; } }
.t-ficha-foto { position: relative; background: var(--t-marca-suave); min-height: 260px; display: grid; place-items: center; font-size: 6rem; }
.t-ficha-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* La galería: sus fotos y videos en una tira que se desliza con el dedo y se
   detiene en cada uno. La cuenta y los puntos dicen en cuál vas; las flechas
   salen donde hay ratón o la pantalla es ancha (en el teléfono se desliza). */
.t-galeria {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.t-galeria::-webkit-scrollbar { display: none; }
.t-galeria-pieza { position: relative; flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.t-galeria-pieza video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.t-galeria-cuenta {
  position: absolute; right: 12px; bottom: 12px; z-index: 1; pointer-events: none; border-radius: 999px;
  background: rgba(31, 25, 21, .62); color: #fff; font-size: .75rem; font-weight: 600; line-height: 1; padding: 6px 10px;
}
.t-galeria-puntos {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 1; pointer-events: none;
  display: flex; justify-content: center; gap: 6px;
}
.t-galeria-puntos i {
  width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 1px rgba(31, 25, 21, .18); transition: width .2s, background .2s;
}
.t-galeria-puntos i.activo { width: 18px; background: #fff; }
.t-ficha-foto.en-video .t-galeria-cuenta, .t-ficha-foto.en-video .t-galeria-puntos { display: none; }
.t-galeria-flecha {
  position: absolute; top: 50%; z-index: 1; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: var(--t-sombra); color: var(--t-tinta); font-size: 1.1rem;
  display: none; place-items: center;
}
.t-galeria-flecha.anterior { left: 12px; }
.t-galeria-flecha.siguiente { right: 12px; }
@media (min-width: 768px), (hover: hover) and (pointer: fine) { .t-galeria-flecha:not([hidden]) { display: grid; } }
@media (max-width: 767.98px) { .t-ficha-foto.con-galeria { min-height: min(78vw, 340px); } }
.t-ficha-cuerpo { padding: 24px; display: flex; flex-direction: column; }
.t-ficha-nombre { font-family: var(--t-titulos); font-weight: 800; font-size: 1.7rem; line-height: 1.1; margin: 0 0 8px; letter-spacing: -.01em; }
.t-ficha-precio { font-size: 1.25rem; font-weight: 700; margin-bottom: 14px; }
.t-ficha-desc { color: var(--t-tenue); line-height: 1.55; margin-bottom: 16px; white-space: pre-line; }
.t-ficha-subtitulo { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--t-tenue); margin: 4px 0 8px; }
.t-ingredientes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.t-ingrediente { background: var(--t-fondo); border: 1px solid var(--t-linea); border-radius: 999px; padding: 4px 11px; font-size: .84rem; }
.t-ficha-agotado { background: #fff4f2; color: var(--t-rojo); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }
.t-ficha-acciones { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
/* La cantidad: un renglón que abre la lista, y debajo «Comprar ahora» y «Agregar al carrito». */
.t-elegir {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--t-linea); border-radius: 12px;
  background: var(--t-fondo); padding: 14px 16px; font-size: 1rem; color: var(--t-tinta); text-align: left;
}
.t-elegir b { margin-left: 4px; }
.t-elegir small { color: var(--t-tenue); font-size: .95rem; }
.t-elegir .bi { margin-left: auto; color: var(--t-marca); }
.t-elegir:focus-visible { outline: 3px solid var(--t-marca); outline-offset: 2px; }
.t-cantidad { display: inline-flex; align-items: center; border: 1px solid var(--t-linea); border-radius: 999px; background: #fff; }
.t-cantidad button { width: 42px; height: 44px; border: 0; background: none; font-size: 1.2rem; color: var(--t-tinta); }
.t-cantidad button:disabled { opacity: .3; }
/* El número se puede escribir. 16px: con menos, el iPhone acerca la pantalla al tocarlo. */
.t-cantidad input {
  width: 54px; border: 0; border-radius: 8px; background: none; padding: 0; text-align: center;
  font-weight: 700; font-size: 16px; color: var(--t-tinta);
}
.t-cantidad input:focus { outline: 2px solid var(--t-marca); }
.t-cantidad small { margin: 0 2px 0 1px; color: var(--t-tenue); font-size: .8rem; }
.t-ficha-acciones .t-btn-primario, .t-ficha-acciones .t-btn-suave { padding: 14px 18px; font-size: 1rem; }
.t-ficha-acciones .t-btn-suave .bi { font-size: 1.2rem; }
/* La lista de cantidades va DENTRO de la página del producto. En el celular
   sube desde abajo; en pantalla ancha queda al centro. Va encima de la barra
   de arriba, la de abajo y la burbuja del chat; debajo del carrito. Mientras
   está abierta, la página de atrás no se mueve (t-hoja-abierta). */
body.t-hoja-abierta { overflow: hidden; }
.t-cuanto-fondo { position: fixed; inset: 0; z-index: 1043; background: rgba(0, 0, 0, .5); animation: t-cuanto-fondo .2s; }
.t-cuanto {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1044; background: #fff; border-radius: 20px 20px 0 0;
  max-height: 85vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); animation: t-cuanto-sube .25s ease-out;
}
.t-cuanto.sin-subir { animation: none; }
.t-cuanto-asa { display: block; position: relative; width: 100%; height: 26px; border: 0; background: none; }
.t-cuanto-asa::before {
  content: ''; position: absolute; left: 50%; top: 10px; width: 40px; height: 5px; margin-left: -20px;
  border-radius: 999px; background: #c9c2bb;
}
.t-cuanto-titulo {
  font-family: var(--t-titulos); font-weight: 800; font-size: 1.3rem; margin: 0; padding: 8px 20px 18px;
  border-bottom: 1px solid var(--t-linea);
}
.t-cuanto-lista button {
  display: block; width: 100%; border: 0; border-bottom: 1px solid var(--t-linea); background: none;
  padding: 17px 20px; font-size: .95rem; color: var(--t-tinta); text-align: center;
}
.t-cuanto-lista button:last-child { border-bottom: 0; }
.t-cuanto-lista button:hover { background: var(--t-fondo); }
.t-cuanto-lista button.elegida { color: var(--t-marca); font-weight: 700; }
.t-cuanto-lista button:focus-visible { outline: 2px solid var(--t-marca); outline-offset: -2px; }
.t-cuanto-otra { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px 22px; }
.t-cuanto-otra input { flex: 1; min-width: 0; font-size: 16px; border-radius: 12px; padding: 12px 14px; }
.t-cuanto-aviso { flex: 0 0 100%; color: var(--t-rojo); font-size: .88rem; }
.t-cuanto-aviso:empty { display: none; }
@keyframes t-cuanto-sube { from { transform: translateY(100%); } to { transform: none; } }
@keyframes t-cuanto-fondo { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 768px) {
  .t-cuanto {
    left: 50%; right: auto; top: 50%; bottom: auto; width: 360px; border-radius: 20px;
    transform: translate(-50%, -50%); animation: t-cuanto-fondo .2s;
  }
  .t-cuanto-asa { display: none; }
  .t-cuanto-titulo { padding-top: 20px; }
}
.t-compartir { display: flex; gap: 8px; margin-top: 14px; }
.t-compartir button, .t-compartir a { font-size: .82rem; padding: 7px 12px; }

/* ---------- carrito y pedido ---------- */
.t-carrito { width: min(100vw, 460px) !important; border: 0 !important; background: #fff; }
.t-carrito .offcanvas-header { gap: 10px; border-bottom: 1px solid var(--t-linea); padding: 14px 18px; }
.t-carrito .offcanvas-title { font-family: var(--t-titulos); font-weight: 800; font-size: 1.35rem; margin: 0; }
.t-carrito .offcanvas-body { padding: 18px; }
.t-pasos { display: flex; gap: 6px; padding: 12px 18px 0; }
.t-pasos span { flex: 1; font-size: .75rem; font-weight: 600; color: var(--t-tenue); text-align: center; padding-top: 8px;
  border-top: 3px solid var(--t-linea); }
.t-pasos span.activo { color: var(--t-tinta); border-color: var(--t-marca); }
.t-pasos span.hecho { border-color: color-mix(in srgb, var(--t-marca) 45%, #fff); }
.t-linea-carrito { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--t-linea); }
.t-linea-foto { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; overflow: hidden; background: var(--t-marca-suave);
  display: grid; place-items: center; font-size: 1.6rem; }
.t-linea-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-linea-nombre { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.t-linea-precio { color: var(--t-tenue); font-size: .85rem; }
.t-cantidad-chica button { width: 32px; height: 34px; font-size: 1rem; }
.t-cantidad-chica input { width: 38px; height: 30px; }
.t-cantidad-chica input.granel { width: 50px; }
.t-carrito-pie { border-top: 1px solid var(--t-linea); padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: #fff; }
.t-carrito-pie:empty { display: none; }
.t-renglon { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .95rem; }
.t-renglon-suave { color: var(--t-tenue); font-size: .9rem; }
.t-renglon-total { font-weight: 800; font-size: 1.15rem; border-top: 1px dashed var(--t-linea); margin-top: 6px; padding-top: 10px; }
.t-carrito-vacio { text-align: center; padding: 48px 12px; color: var(--t-tenue); }
.t-carrito-vacio .bi { font-size: 3rem; display: block; margin-bottom: 10px; opacity: .5; }

.t-opcion {
  display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--t-linea); border-radius: 14px;
  padding: 14px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, background .15s;
}
.t-opcion:hover { border-color: #cfc3b8; }
.t-opcion input { margin-top: 4px; accent-color: var(--t-marca); width: 18px; height: 18px; flex: 0 0 18px; }
.t-opcion.elegida { border-color: var(--t-marca); background: var(--t-marca-suave); }
.t-opcion-titulo { font-weight: 700; }
.t-opcion-sub { color: var(--t-tenue); font-size: .86rem; }
.t-opcion-precio { margin-left: auto; font-weight: 700; white-space: nowrap; }
.t-campo { margin-bottom: 14px; }
.t-campo label { font-weight: 600; font-size: .88rem; margin-bottom: 6px; display: block; }
.t-campo label small { font-weight: 500; color: var(--t-tenue); }
.t-campo .form-control, .t-campo .form-select { border-radius: 12px; padding: 11px 14px; border-color: var(--t-linea); font-size: 1rem; }
.t-campo .form-control:focus, .t-campo .form-select:focus { border-color: var(--t-marca); box-shadow: 0 0 0 4px var(--t-marca-suave); }
.t-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.t-aviso-anticipo { background: #fff8e8; border: 1px solid #f3dfae; border-radius: 14px; padding: 14px; margin: 12px 0; }
.t-aviso-anticipo strong { font-size: 1.05rem; }
.t-error { background: #fff1ef; color: var(--t-rojo); border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-bottom: 12px; }

/* listo */
.t-exito { text-align: center; padding: 18px 4px; }
.t-exito-icono { width: 84px; height: 84px; border-radius: 50%; background: #e9f8ef; color: var(--t-verde);
  display: grid; place-items: center; font-size: 2.6rem; margin: 0 auto 14px; animation: t-aparecer .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes t-aparecer { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.t-exito h3 { font-family: var(--t-titulos); font-weight: 800; font-size: 1.6rem; }
.t-folio { display: inline-block; background: var(--t-fondo); border-radius: 10px; padding: 6px 14px; font-weight: 700; letter-spacing: .03em; margin: 6px 0 14px; }

/* ---------- barra de abajo en el celular, como la de una app ---------- */
.t-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--t-linea); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(31, 25, 21, .06);
}
.t-nav-boton {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; border: 0; background: none;
  padding: 4px 2px; color: var(--t-tinta); font-size: .7rem; font-weight: 500; line-height: 1.2;
}
.t-nav-boton .bi { font-size: 1.45rem; line-height: 1; }
.t-nav-boton > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-nav-boton.activo { color: var(--t-marca); font-weight: 700; }
.t-nav-boton:disabled { opacity: .4; }
.t-nav-icono { position: relative; line-height: 1; }
.t-nav-cuenta {
  position: absolute; top: -7px; left: 58%; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--t-marca); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid #fff;
}
.t-nav-cuenta.salta { animation: t-salto .45s ease; }
.t-nav-carrito.con-algo > span:last-child { font-weight: 700; }
/* La copia del producto que «vuela» al carrito al agregarlo. */
.t-vuelo { position: fixed; z-index: 1070; pointer-events: none; }
.t-vuelo > span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: var(--t-marca-suave); border: 3px solid #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .28); font-size: 2rem;
}
.t-vuelo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes t-subir { from { transform: translateY(120%); } to { transform: none; } }
@media (min-width: 992px) { .t-nav { display: none; } }
@media (max-width: 991.98px) { body.t-con-barra { padding-bottom: calc(62px + env(safe-area-inset-bottom)); } }

/* ---------- debajo de la ficha: detalles, relacionados, preguntas y opiniones ---------- */
.t-ficha-mas { padding: 0 24px 28px; }
.t-ficha-mas:empty { display: none; }
.t-mas-seccion { border-top: 1px solid var(--t-linea); padding: 22px 0 6px; }
.t-mas-titulo { font-family: var(--t-titulos); font-weight: 800; font-size: 1.25rem; margin: 0 0 12px; }
.t-mas-enlace {
  border: 0; background: none; padding: 8px 0; color: var(--t-marca); font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.t-mas-vacio { color: var(--t-tenue); font-size: .92rem; margin: 10px 0; }
.t-detalles-lista { margin: 0 0 10px; padding-left: 20px; color: var(--t-tinta); }
.t-detalles-lista li { margin-bottom: 6px; }
.t-detalles-lista li::marker { color: var(--t-tenue); }
.t-detalles-resumen { white-space: pre-line; color: var(--t-tinta); line-height: 1.5; margin-bottom: 4px; }
.t-detalles-desc p { margin: 0 0 10px; line-height: 1.55; }
.t-detalles-desc ul { padding-left: 20px; margin: 0 0 12px; }
.t-detalles-desc li { margin-bottom: 6px; }
.t-caracteristicas { width: 100%; border-collapse: collapse; font-size: .95rem; }
.t-caracteristicas th, .t-caracteristicas td { padding: 11px 12px; border-bottom: 1px solid var(--t-linea); vertical-align: top; }
.t-caracteristicas th { width: 42%; font-weight: 600; background: var(--t-fondo); }

/* productos relacionados: una tira que se desliza */
.t-relacionados { padding-bottom: 14px; }
.t-rel {
  flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; text-align: left;
  border: 1px solid var(--t-linea); border-radius: 14px; background: #fff; padding: 0 0 10px; overflow: hidden; color: var(--t-tinta);
}
.t-rel-foto {
  position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--t-marca-suave);
  font-size: 2.6rem; margin-bottom: 4px;
}
.t-rel-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-rel-nombre, .t-rel-menos, .t-rel-precio { padding: 0 10px; }
.t-rel-nombre { font-size: .86rem; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.t-rel-menos { align-self: flex-start; margin-left: 10px; padding: 1px 6px; border-radius: 4px; background: var(--t-verde); color: #fff; font-size: .72rem; font-weight: 700; }
.t-rel-precio { font-weight: 700; font-size: 1rem; }
.t-rel-precio s { color: var(--t-tenue); font-weight: 400; font-size: .78rem; }
.t-rel:hover { border-color: var(--t-marca); }

/* preguntas */
.t-pregunta { padding: 12px 0; border-bottom: 1px solid var(--t-linea); }
.t-pregunta:last-of-type { border-bottom: 0; }
.t-pregunta-q { margin: 0 0 4px; font-weight: 500; }
.t-pregunta-r { margin: 0; padding-left: 12px; border-left: 2px solid var(--t-linea); color: var(--t-tenue); white-space: pre-line; }
.t-pregunta-r span { font-size: .8rem; opacity: .8; margin-left: 4px; }
.t-pregunta.mia { margin-top: 10px; background: var(--t-fondo); border: 0; border-radius: 12px; padding: 12px 14px; }
.t-pregunta-espera { margin: 0; font-size: .82rem; color: var(--t-tenue); display: flex; gap: 6px; }
#t-sec-preguntas > .t-btn { margin-bottom: 6px; }

/* opiniones */
.t-estrellas { color: #f2a007; letter-spacing: 1px; font-size: .95rem; line-height: 1; }
.t-estrellas .vacias { color: #ddd3c9; }
.t-estrellas.grande { font-size: 1.25rem; }
.t-op-resumen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.t-op-promedio { font-size: 2rem; font-weight: 800; line-height: 1; }
.t-op-total { color: var(--t-tenue); font-size: .9rem; }
.t-op-resumen.grande { align-items: flex-start; gap: 22px; padding: 4px 0 6px; }
.t-op-resumen.grande .t-op-promedio { font-size: 2.6rem; display: block; margin-bottom: 4px; }
.t-op-barras { flex: 1; min-width: 160px; display: grid; gap: 5px; }
.t-op-barra { display: grid; grid-template-columns: 36px 1fr 28px; align-items: center; gap: 8px; font-size: .8rem; color: var(--t-tenue); }
.t-op-barra-fondo { height: 6px; border-radius: 999px; background: var(--t-linea); overflow: hidden; }
.t-op-barra-fondo span { display: block; height: 100%; background: #f2a007; border-radius: 999px; }
.t-op-gracias { display: flex; gap: 8px; align-items: center; background: #e9f8ef; color: var(--t-verde); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 12px; }
#t-sec-opiniones > .t-btn { margin-bottom: 6px; }
.t-op { padding: 14px 0; border-bottom: 1px solid var(--t-linea); }
.t-op:last-child { border-bottom: 0; }
.t-op-cabeza { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.t-op-avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.t-op-nombre { font-weight: 600; font-size: .92rem; margin-bottom: 2px; }
.t-op-verificada { color: var(--t-verde); font-size: .75rem; font-weight: 600; margin-left: 4px; white-space: nowrap; }
.t-op-verificada .bi { margin-right: 3px; }
.t-op-texto { margin: 0 0 8px; white-space: pre-line; line-height: 1.45; }
.t-op-medios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.t-op-medio {
  position: relative; width: 96px; height: 96px; border: 0; padding: 0; border-radius: 10px; overflow: hidden;
  background: var(--t-marca-suave); display: grid; place-items: center; font-size: 1.6rem; color: var(--t-tenue);
}
.t-op-medio img { width: 100%; height: 100%; object-fit: cover; }
.t-op-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); color: #fff; font-size: 2rem; pointer-events: none; }
.t-op-fecha { color: var(--t-tenue); font-size: .8rem; }
.t-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 0 4px; }
.t-chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--t-linea); background: #fff; border-radius: 999px;
  padding: 6px 13px; font-size: .85rem; font-weight: 600; color: var(--t-tinta);
}
.t-chip.activo { border-color: var(--t-marca); background: var(--t-marca-suave); color: var(--t-marca); }

/* las hojas anchas: detalles, preguntar, opiniones, opinar */
.t-cuanto.ancha { max-height: 88vh; }
.t-hoja-cabeza { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--t-linea); }
.t-hoja-cabeza .t-cuanto-titulo { flex: 1; padding: 8px 0 14px; border-bottom: 0; font-size: 1.2rem; }
.t-hoja-cabeza .t-btn-icono { margin-bottom: 6px; }
.t-hoja-texto { padding: 14px 20px 24px; }
.t-pestanas-hoja { display: flex; border-bottom: 1px solid var(--t-linea); }
.t-pestanas-hoja button {
  flex: 1; border: 0; background: none; padding: 13px 8px; font-weight: 600; color: var(--t-tinta); border-bottom: 3px solid transparent;
}
.t-pestanas-hoja button.activa { color: var(--t-marca); border-bottom-color: var(--t-marca); }
.t-hoja-form { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.t-hoja-form .form-control { border-radius: 12px; font-size: 16px; border-color: var(--t-linea); }
.t-hoja-etiqueta { font-weight: 600; font-size: .9rem; margin: 4px 0 -4px; }
.t-hoja-etiqueta small { font-weight: 400; color: var(--t-tenue); }
.t-hoja-nota { color: var(--t-tenue); font-size: .82rem; text-align: center; margin: 0; }
.t-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.t-opinar-estrellas { display: flex; justify-content: center; gap: 6px; }
.t-opinar-estrellas button { border: 0; background: none; padding: 0 2px; font-size: 2.6rem; line-height: 1; color: #ddd3c9; transition: transform .12s; }
.t-opinar-estrellas button.llena { color: #f2a007; }
.t-opinar-estrellas button:active { transform: scale(1.2); }
.t-opinar-que { text-align: center; font-weight: 600; color: var(--t-tenue); min-height: 1.4em; }
.t-opinar-medios { display: flex; gap: 8px; flex-wrap: wrap; }
.t-opinar-medio, .t-opinar-mas {
  position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: var(--t-fondo); color: var(--t-tenue); font-size: 1.5rem;
}
.t-opinar-medio img { width: 100%; height: 100%; object-fit: cover; }
.t-opinar-medio button {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: .65rem; display: grid; place-items: center; z-index: 1;
}
.t-opinar-mas { border: 1.5px dashed var(--t-linea); cursor: pointer; font-size: .75rem; font-weight: 600; align-content: center; gap: 2px; margin: 0; }
.t-opinar-mas .bi { font-size: 1.4rem; display: block; text-align: center; }
/* el visor de una foto o video de una opinión */
.t-visor { position: fixed; inset: 0; z-index: 1046; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.t-visor img, .t-visor video { max-width: 100%; max-height: 100%; border-radius: 8px; }
.t-visor-cerrar { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, .92); }
@media (min-width: 768px) {
  .t-ficha-mas { padding: 0 32px 32px; }
  .t-cuanto.ancha { width: 560px; max-height: 82vh; }
  .t-rel { flex-basis: 170px; }
}

/* ---------- categorías: la lista a la izquierda y sus productos a la derecha ----------
   En el celular ocupa la pantalla y deja a la vista la barra de abajo (va justo
   debajo de ella); en pantalla ancha es una ventana al centro sobre fondo oscuro.
   El carrito se abre encima. Si se abre un producto, Categorías se tapa sin
   cerrarse (t-tapada): al regresar sigue igual, en la misma categoría. */
.t-cats { position: fixed; inset: 0; z-index: 1034; }
.t-cats[hidden] { display: none; }
.t-cats.t-tapada { visibility: hidden; }
body.t-cats-abierto { overflow: hidden; }
.t-cats-caja { height: 100%; display: flex; flex-direction: column; background: #fff; }
.t-cats-cabeza { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--t-linea); }
.t-cats-cabeza h2 { flex: 1; font-family: var(--t-titulos); font-weight: 800; font-size: 1.35rem; margin: 0; }
.t-cats-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: 108px minmax(0, 1fr); }
.t-cats-lista { overflow-y: auto; overscroll-behavior: contain; background: var(--t-fondo); border-right: 1px solid var(--t-linea); }
.t-cats-cat {
  display: block; width: 100%; border: 0; border-bottom: 1px solid var(--t-linea); border-left: 3px solid transparent;
  background: none; padding: 15px 10px 15px 11px; text-align: left; font-size: .84rem; line-height: 1.25;
  color: var(--t-tinta); overflow-wrap: anywhere;
}
.t-cats-cat.activa { background: #fff; border-left-color: var(--t-marca); color: var(--t-marca); font-weight: 700; }
.t-cats-cat:focus-visible, .t-cats-producto:focus-visible { outline: 2px solid var(--t-marca); outline-offset: -2px; }
.t-cats-productos {
  overflow-y: auto; overscroll-behavior: contain; padding: 18px 10px 28px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 8px; align-content: start;
}
.t-cats-productos .t-vacio { grid-column: 1 / -1; }
.t-cats-producto {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; border: 0; background: none;
  padding: 0; color: var(--t-tinta); text-align: center;
}
.t-cats-foto {
  width: min(100%, 76px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--t-marca-suave);
  display: grid; place-items: center; font-size: 1.9rem; transition: transform .15s;
}
.t-cats-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-cats-producto:hover .t-cats-foto { transform: scale(1.05); }
.t-cats-nombre {
  font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.t-cats-precio { font-size: .78rem; font-weight: 700; }
/* Lo agotado no se ve opaco (como en el menú): lo dice el letrero rojo en vez del precio. */
.t-cats-producto.agotado .t-cats-precio { color: var(--t-rojo); font-weight: 600; }
@media (min-width: 576px) {
  .t-cats-cuerpo { grid-template-columns: 180px minmax(0, 1fr); }
  .t-cats-cat { padding: 15px 16px; font-size: .92rem; }
  .t-cats-productos { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); padding: 22px 18px 28px; gap: 24px 12px; }
  .t-cats-foto { width: 88px; font-size: 2.2rem; }
  .t-cats-nombre { font-size: .88rem; }
  .t-cats-precio { font-size: .84rem; }
}
@media (max-width: 991.98px) { body.t-con-barra .t-cats { bottom: calc(62px + env(safe-area-inset-bottom)); } }
@media (min-width: 992px) {
  .t-cats:not([hidden]) { display: grid; place-items: center; background: rgba(31, 25, 21, .5); }
  .t-cats-caja { width: min(1040px, 92vw); height: min(680px, 86vh); border-radius: 24px; overflow: hidden; box-shadow: var(--t-sombra-alta); }
  .t-cats-cabeza { padding: 16px 20px 16px 26px; }
  .t-cats-cuerpo { grid-template-columns: 240px minmax(0, 1fr); }
  .t-cats-cat { padding: 15px 22px; }
  .t-cats-productos { padding: 26px 24px 32px; gap: 28px 14px; }
  .t-cats-foto { width: 96px; }
}

/* ---------- el panel de «Notificaciones» y «Mis compras», y el letrero ---------- */
.t-lado-fondo { position: fixed; inset: 0; z-index: 1049; background: rgba(0, 0, 0, .5); }
.t-lado {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1050; width: min(100vw, 420px); background: #fff;
  display: flex; flex-direction: column; box-shadow: var(--t-sombra-alta); animation: t-lado-entra .25s ease-out;
}
@keyframes t-lado-entra { from { transform: translateX(100%); } to { transform: none; } }
body.t-lado-abierto { overflow: hidden; }
.t-lado-cabeza { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--t-linea); }
.t-lado-cabeza .t-btn-icono:focus-visible { outline: 2px solid var(--t-marca); outline-offset: 2px; }
.t-lado-cabeza h2 { flex: 1; font-family: var(--t-titulos); font-weight: 800; font-size: 1.35rem; margin: 0; }
.t-lado-cuerpo { flex: 1; overflow-y: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.t-lado-vacio { text-align: center; color: var(--t-tenue); padding: 56px 28px; }
.t-lado-vacio .bi { display: block; font-size: 2.6rem; margin-bottom: 10px; opacity: .5; }
.t-lado-nota { color: var(--t-tenue); font-size: .8rem; text-align: center; padding: 14px 24px 0; margin: 0; }
.t-aviso, .t-compra {
  display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--t-linea); text-decoration: none;
}
.t-aviso:hover, .t-compra:hover { background: var(--t-fondo); }
.t-aviso > .bi, .t-letrero > .bi { font-size: 1.3rem; line-height: 1.2; color: var(--t-verde); }
.t-aviso.mal > .bi, .t-letrero.mal > .bi { color: var(--t-rojo); }
.t-aviso.nuevo { background: var(--t-marca-suave); }
.t-aviso-texto { flex: 1; min-width: 0; font-size: .93rem; line-height: 1.35; }
.t-aviso-texto small { display: block; color: var(--t-tenue); margin-top: 3px; }
.t-aviso b, .t-letrero b { color: var(--t-marca-osc); white-space: nowrap; }
.t-compra { align-items: center; }
.t-compra-datos { flex: 1; min-width: 0; }
.t-compra-folio { display: block; font-weight: 700; }
.t-compra-datos small { display: block; color: var(--t-tenue); margin-bottom: 5px; }
.t-compra-total { font-weight: 700; white-space: nowrap; }
.t-compra > .bi { color: var(--t-tenue); }
.t-en-curso { background: var(--t-marca-suave); color: var(--t-marca-osc); }
.t-letrero {
  position: fixed; left: 12px; right: 12px; top: calc(var(--t-barra-alto) + 10px); z-index: 1048; max-width: 460px;
  margin: 0 auto; display: flex; gap: 12px; background: #fff; border-radius: 16px; padding: 14px 16px;
  border-left: 5px solid var(--t-verde); box-shadow: var(--t-sombra-alta); text-decoration: none;
  font-size: .93rem; line-height: 1.35; animation: t-letrero .3s ease;
}
.t-letrero.mal { border-left-color: var(--t-rojo); }
@keyframes t-letrero { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- sucursales ---------- */
.t-hoja { border: 0; border-radius: 24px; padding: 24px; }
.t-hoja-titulo { font-family: var(--t-titulos); font-weight: 800; font-size: 1.45rem; margin: 0 0 4px; }
.t-hoja-sub { color: var(--t-tenue); margin-bottom: 16px; }
.t-sucursal-opcion { width: 100%; text-align: left; background: #fff; }

/* ---------- ubicación ---------- */
.t-ubicacion { padding: 56px 0 64px; background: #fff; border-top: 1px solid var(--t-linea); }
.t-pestanas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.t-pestana { border: 1px solid var(--t-linea); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; }
.t-pestana.activa { background: var(--t-tinta); color: #fff; border-color: var(--t-tinta); }
.t-ubicacion-tarjeta {
  display: grid; grid-template-columns: 1fr; border-radius: 24px; overflow: hidden; background: var(--t-fondo);
  box-shadow: var(--t-sombra);
}
@media (min-width: 992px) { .t-ubicacion-tarjeta { grid-template-columns: 1.55fr 1fr; } }
.t-mapa { position: relative; min-height: 320px; background: #e9e2da; }
@media (min-width: 992px) { .t-mapa { min-height: 460px; } }
.t-mapa iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.t-mapa-vacio { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--t-tenue); }
.t-mapa-vacio .bi { font-size: 2.5rem; }
.t-ubicacion-datos { padding: 28px; display: flex; flex-direction: column; }
.t-ubicacion-nombre { font-family: var(--t-titulos); font-weight: 800; font-size: 1.5rem; margin: 0; }
.t-pastilla { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; }
.t-pastilla .bi { font-size: .45rem; }
.t-abierto { background: #e6f6ed; color: var(--t-verde); }
.t-cerrado { background: #fdecea; color: var(--t-rojo); }
.t-dato { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 0; line-height: 1.5; }
.t-dato > .bi { color: var(--t-marca); font-size: 1.1rem; margin-top: 1px; }
.t-horario { border-collapse: collapse; }
.t-horario th { font-weight: 600; padding: 1px 16px 1px 0; white-space: nowrap; }
.t-horario td { color: var(--t-tenue); padding: 1px 0; }
.t-ubicacion-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ---------- pie ---------- */
.t-pie { background: #1f1915; color: #e9e1da; padding: 40px 0 24px; }
.t-pie-dentro { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.t-pie-marca { font-family: var(--t-titulos); font-weight: 800; font-size: 1.4rem; color: #fff; }
.t-pie-eslogan { opacity: .7; font-size: .92rem; }
.t-pie-redes { display: flex; gap: 10px; }
.t-pie-redes a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 1.1rem; transition: background .15s; }
.t-pie-redes a:hover { background: var(--t-marca); }
.t-pie-final { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; opacity: .65; }
.t-pie-final a { text-decoration: none; }
.t-pie-final a:hover { text-decoration: underline; }

/* ---------- seguimiento del pedido ---------- */
.t-seguimiento { padding: 36px 0 56px; }
.t-seg-cabeza { text-align: center; margin-bottom: 22px; }
.t-seg-icono { width: 76px; height: 76px; border-radius: 50%; background: var(--t-marca-suave); color: var(--t-marca);
  display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 12px; }
.t-seg-mal { background: #fdecea; color: var(--t-rojo); }
.t-seg-titulo { font-family: var(--t-titulos); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0 0 4px; }
.t-seg-sub { color: var(--t-tenue); margin: 0; }
.t-linea-tiempo { list-style: none; padding: 0; margin: 0 0 12px; display: flex; justify-content: space-between; position: relative; }
.t-linea-tiempo::before { content: ''; position: absolute; top: 15px; left: 12%; right: 12%; height: 3px; background: var(--t-linea); }
.t-linea-tiempo li { position: relative; flex: 1; text-align: center; font-size: .78rem; font-weight: 600; color: var(--t-tenue); }
.t-punto { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--t-linea);
  display: grid; place-items: center; margin: 0 auto 6px; color: #fff; }
.t-linea-tiempo li.hecho .t-punto { background: var(--t-marca); border-color: var(--t-marca); }
.t-linea-tiempo li.actual { color: var(--t-tinta); }
.t-linea-tiempo li.actual .t-punto { border-color: var(--t-marca); box-shadow: 0 0 0 6px var(--t-marca-suave); }
.t-nota-centro { text-align: center; color: var(--t-tenue); font-size: .9rem; margin: 10px 0 20px; }
.t-tarjeta { background: #fff; border-radius: var(--t-radio); padding: 18px 20px; box-shadow: var(--t-sombra); margin: 16px 0; }
.t-tarjeta-titulo { font-size: 1rem; font-weight: 700; display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.t-tarjeta-titulo .bi { color: var(--t-marca); }
.t-tarjeta-pago { border: 2px solid var(--t-acento); }
.t-monto-grande { font-family: var(--t-titulos); font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.t-datos-banco { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 8px; }
.t-datos-banco dt { color: var(--t-tenue); font-weight: 500; font-size: .88rem; }
.t-datos-banco dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-copiable { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; word-break: break-all; }
.t-btn-copiar { border: 1px solid var(--t-linea); background: var(--t-fondo); border-radius: 8px; font-size: .75rem; padding: 2px 8px; }
.t-nota { color: var(--t-tenue); font-size: .88rem; margin: 8px 0 0; }
.t-enlace-volver { display: inline-flex; gap: 6px; margin-top: 16px; color: var(--t-tenue); text-decoration: none; font-weight: 600; }

/* ---------- pagar el anticipo ----------
   Como la confirmación de una tienda grande: cuánto ahora y cuánto después
   en grande, y los pasos numerados, para que nadie transfiera de más. */
.t-pago-montos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.t-pago-montos > div { background: var(--t-fondo); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; }
.t-pago-montos > div:first-child { background: var(--t-marca-suave); }
.t-pago-montos span { font-size: .8rem; font-weight: 600; color: var(--t-tenue); }
.t-pago-montos strong { font-family: var(--t-titulos); font-size: 1.55rem; font-weight: 800; line-height: 1.15; }
.t-pago-montos small { font-size: .78rem; color: var(--t-tenue); }
.t-pasos-pago { counter-reset: paso; list-style: none; padding: 0; margin: 0 0 14px; }
.t-pasos-pago li { counter-increment: paso; position: relative; padding: 4px 0 4px 36px; line-height: 1.4; }
.t-pasos-pago li::before {
  content: counter(paso); position: absolute; left: 0; top: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--t-marca); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center;
}
.t-pago-listo { border: 2px solid var(--t-verde); }
.t-pago-listo .t-tarjeta-titulo .bi { color: var(--t-verde); }
.t-banda { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px;
  background: #fff8e8; border: 1px solid #f3dfae; font-weight: 600; }
.t-banda-bien { background: #e9f8ef; border-color: #b9e6cb; color: #0f5c38; }
.t-banda-mal { background: #fff1ef; border-color: #f5c6c0; color: var(--t-rojo); }

/* ---------- GIF de la esquina (Configuración › Tienda) ---------- */
/* Adorno: los toques pasan a lo que queda debajo. Debajo de hojas, visor y chat. */
.t-gif {
  position: fixed; z-index: 1033; max-width: 96px; max-height: 96px; width: auto; height: auto; pointer-events: none;
}
@media (min-width: 992px) { .t-gif { max-width: 130px; max-height: 130px; } }
.t-gif-abajo-izquierda  { left: 12px;  bottom: calc(14px + env(safe-area-inset-bottom)); }
.t-gif-abajo-derecha    { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
.t-gif-arriba-izquierda { left: 12px;  top: calc(var(--t-barra-alto) + 10px); }
.t-gif-arriba-derecha   { right: 12px; top: calc(var(--t-barra-alto) + 10px); }
/* Abajo a la derecha está la burbuja del chat (58 px): el GIF va encima de ella. */
body:has(.t-chat-burbuja) .t-gif-abajo-derecha { bottom: calc(86px + env(safe-area-inset-bottom)); }
/* Con la barra de abajo (celular), arriba de ella. */
@media (max-width: 991.98px) {
  body.t-con-barra .t-gif-abajo-izquierda,
  body.t-con-barra .t-gif-abajo-derecha { bottom: calc(74px + env(safe-area-inset-bottom)); }
  body.t-con-barra:has(.t-chat-burbuja) .t-gif-abajo-derecha { bottom: calc(146px + env(safe-area-inset-bottom)); }
}

/* ---------- chat a WhatsApp ---------- */
.t-chat-burbuja {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 1041;
  width: 58px; height: 58px; border-radius: 50%; border: 0; background: #25d366; color: #fff; font-size: 1.75rem;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); transition: transform .15s, bottom .25s;
}
.t-chat-burbuja:hover { transform: scale(1.06); }
.t-chat-burbuja.abierta { background: #128c7e; }
/* Con la barra de abajo (celular), la burbuja va arriba de ella. */
@media (max-width: 991.98px) { body.t-con-barra .t-chat-burbuja { bottom: calc(78px + env(safe-area-inset-bottom)); } }
.t-chat {
  position: fixed; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 1042;
  width: min(370px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px));
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #efeae2;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28); animation: t-subir .25s ease;
}
.t-chat[hidden] { display: none; }
@media (max-width: 991.98px) {
  body.t-con-barra .t-chat { bottom: calc(148px + env(safe-area-inset-bottom)); height: min(540px, calc(100vh - 180px)); }
}
.t-chat-cabeza { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #075e54; color: #fff; }
.t-chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 38px; }
.t-chat-nombre { font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-chat-estado { font-size: .75rem; opacity: .85; }
.t-chat-cerrar { border: 0; background: none; color: #fff; font-size: 1.1rem; padding: 4px; }
.t-chat-cuerpo { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.t-chat-msj {
  max-width: 85%; background: #fff; border-radius: 4px 12px 12px 12px; padding: 8px 11px; font-size: .92rem; line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08); align-self: flex-start; word-wrap: break-word;
}
.t-chat-msj.mio { align-self: flex-end; background: #d9fdd3; border-radius: 12px 4px 12px 12px; }
.t-chat-msj a { color: #027eb5; font-weight: 600; }
.t-chat-escribiendo { display: flex; gap: 4px; padding: 11px 13px; }
.t-chat-escribiendo span { width: 7px; height: 7px; border-radius: 50%; background: #9aa5a1; animation: t-punto 1s infinite; }
.t-chat-escribiendo span:nth-child(2) { animation-delay: .15s; }
.t-chat-escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes t-punto { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.t-chat-opciones { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.t-chat-opciones:empty { display: none; }
.t-chat-opcion { border: 1px solid #b5d9c3; background: #fff; color: #075e54; border-radius: 999px; padding: 5px 11px; font-size: .82rem; font-weight: 600; }
.t-chat-opcion:hover { background: #e7f6ec; }
.t-chat-pie { display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #f0f2f5; }
.t-chat-pie input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 10px 14px; font-size: 16px; outline: none; }
.t-chat-pie button { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; background: #25d366; color: #fff; }
@media (max-width: 575.98px) {
  .t-chat { right: 8px; left: 8px; width: auto; }
}
/* ---------- temporadas: letrero, adorno y lo que cae al entrar ----------
   Configuración › Tienda › Temporadas. Todo dibujado: el papel picado son
   banderitas recortadas con clip-path y perforadas con una máscara; la navidad,
   foquitos. Cuelga sobre lo de abajo sin empujarlo y no estorba al tocar. */
.t-letrero-temporada {
  position: relative; background: var(--tmp-fondo); color: var(--tmp-tinta); text-align: center;
  font-weight: 700; font-size: .9rem; line-height: 1.3; padding: 8px 16px 10px; letter-spacing: .01em;
}
.t-letrero-temporada::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--tmp1) 33.3%, var(--tmp2) 33.3% 66.6%, var(--tmp3) 66.6%);
}
.t-adorno {
  position: relative; z-index: 1025; height: 34px; margin-bottom: -34px; overflow: hidden; pointer-events: none;
  display: flex; justify-content: center; gap: 5px; filter: drop-shadow(0 1px 1.5px rgba(31, 25, 21, .28));
}
.t-adorno::before { content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: rgba(31, 25, 21, .35); }
.t-adorno span {
  flex: 0 0 30px; height: 28px; margin-top: 4px; background: var(--tmp1); transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 87.5% 100%, 75% 76%, 62.5% 100%, 50% 76%, 37.5% 100%, 25% 76%, 12.5% 100%, 0 76%);
  -webkit-mask: radial-gradient(circle, transparent 1.8px, #000 2.3px) 0 0 / 7px 7px;
          mask: radial-gradient(circle, transparent 1.8px, #000 2.3px) 0 0 / 7px 7px;
}
.t-adorno span:nth-child(3n+2) { background: var(--tmp2); transform: rotate(-3deg); }
.t-adorno span:nth-child(3n) { background: var(--tmp3); transform: rotate(3deg); }
/* Navidad: una tira de foquitos de colores. */
.t-adorno-navidad { gap: 20px; filter: none; }
.t-adorno-navidad::before { top: 6px; height: 1.5px; background: #2e3b2c; }
.t-adorno-navidad span {
  flex: 0 0 10px; height: 14px; margin-top: 7px; border-radius: 45% 45% 50% 50%; clip-path: none;
  -webkit-mask: none; mask: none; box-shadow: 0 0 9px 2px var(--tmp1);
}
.t-adorno-navidad span:nth-child(3n+2) { box-shadow: 0 0 9px 2px var(--tmp2); transform: none; }
.t-adorno-navidad span:nth-child(3n) { box-shadow: 0 0 9px 2px var(--tmp3); transform: none; }
.t-adorno-navidad span:nth-child(4n) { background: #1e88e5; box-shadow: 0 0 9px 2px #1e88e5; }
/* Lo que cae al entrar (tienda-temporada.js), unos segundos. */
.t-cae { position: fixed; inset: 0; z-index: 1060; pointer-events: none; overflow: hidden; }
.t-cae > i { position: absolute; top: -40px; display: block; font-style: normal; line-height: 1; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .t-chat, .t-chat-escribiendo span, .t-cuanto, .t-cuanto-fondo, .t-lado, .t-letrero, .t-campana.suena .bi { animation: none; }
}
