/* =========================================================
   Tienda pública (/{slug}). Pensada primero para el celular: el link se
   comparte en Instagram y WhatsApp. En pantallas grandes se abre en más
   columnas y el detalle del producto pasa a ser una ventana centrada.
   ========================================================= */

:root {
  --texto: #111418;
  /* Colores del negocio: la página los pisa con los que eligió en "Mi negocio". */
  --principal: #111418;
  --sobre-principal: #ffffff;
  --suave: #6b7280;
  --linea: #ebedf0;
  --fondo: #ffffff;
  --gris: #f4f5f7;
  --wa: #25d366;
  --enlace: #b3413b;
  --radio: 14px;
  --anillo: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--t-texto, "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
body.t-bloqueado { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.t-app { max-width: 1120px; margin: 0 auto; padding: 0 12px calc(88px + env(safe-area-inset-bottom)); }

/* ---------- Perfil (como el encabezado de un perfil de Instagram) ---------- */
.t-perfil { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 8px 18px; }
.t-avatar {
  width: 92px; height: 92px; border-radius: 50%; padding: 3px; background: var(--anillo); flex-shrink: 0;
}
.t-avatar > * {
  width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--fondo); background: var(--gris);
  object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800;
}
.t-avatar-chico { width: 56px; height: 56px; }
.t-avatar-chico > * { font-size: 1.3rem; border-width: 2px; }
.t-perfil h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 4px; }
.t-perfil-linea { color: var(--suave); font-size: .92rem; }
.t-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.t-boton {
  display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; min-width: 96px;
  border-radius: 10px; border: 0; background: var(--gris); font-weight: 700; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.t-boton:hover { background: #e9ebee; }
.t-boton-wa { background: var(--wa); color: #fff; }
.t-boton-wa:hover { background: #1fb959; }

/* ---------- Encabezado: logo, estado del local, info, nombre y descripción ---------- */
.t-cab { padding: 22px 6px 18px; }
.t-cab-arriba { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-logo { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--gris); border: 1px solid var(--linea); }
.t-logo > * { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; }
.t-cab-derecha { display: flex; align-items: center; gap: 12px; }
.t-estado-local { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.35; }
.t-estado-local span { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; }
.t-estado-local i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.t-estado-local.abierto span { color: #2e7d52; }
.t-estado-local.cerrado span { color: #a8483f; }
.t-estado-local small { color: var(--suave); font-size: .8rem; }
.t-btn-info { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; flex-shrink: 0; }
.t-btn-info svg { width: 34px; height: 34px; }
.t-btn-info svg { width: 26px; height: 26px; }
.t-btn-info circle:first-child { fill: #2B7BE4; }
.t-btn-info path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.t-btn-info circle:last-child { fill: #fff; }
.t-titulo { font-family: var(--t-titulo, "Fraunces", Georgia, serif); font-weight: var(--t-peso-titulo, 700); font-size: 2rem; letter-spacing: -.01em; line-height: 1.1; margin: 16px 0 6px; }
.t-bajada { white-space: pre-line; color: var(--suave); font-size: .95rem; line-height: 1.45; margin: 0; max-width: 620px; }

/* Horarios dentro de la info del negocio */
.t-horario { display: block; }
.t-horario.hoy { font-weight: 700; }
.t-horario-nota { display: block; color: var(--suave); font-size: .88rem; margin-top: 4px; }

/* ---------- Buscador y categorías (quedan fijos arriba al bajar) ---------- */
.t-barra {
  position: sticky; top: 0; z-index: 5; margin: 0 -12px; padding: 10px 12px 8px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea);
}
.t-buscar { display: flex; align-items: center; gap: 8px; background: var(--gris); border-radius: 12px; padding: 0 12px; }
.t-buscar svg { width: 18px; height: 18px; fill: none; stroke: var(--suave); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.t-buscar input { flex: 1; min-width: 0; border: 0; background: none; padding: 11px 0; font: inherit; font-size: 16px; outline: none; }
.t-chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.t-chips::-webkit-scrollbar { display: none; }
/* Cuando las categorías no entran, un degradé y una flecha que late avisan
   que hay más para el costado (y al tocarla se desliza). */
.t-chips-marco { position: relative; }
.t-chips-marco::before, .t-chips-marco::after {
  content: ""; position: absolute; top: 10px; bottom: 0; width: 56px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.t-chips-marco::before { left: 0; background: linear-gradient(to left, rgba(255, 255, 255, 0), #fff 70%); }
.t-chips-marco::after { right: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 70%); }
.t-chips-marco.hay-izq::before, .t-chips-marco.hay-der::after { opacity: 1; }
.t-chips-flecha {
  position: absolute; top: 10px; bottom: 0; z-index: 2; display: none; align-items: center; justify-content: center;
  width: 30px; padding: 0; border: 0; background: none; font-size: 1.9rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.t-chips-flecha.izq { left: -4px; }
.t-chips-flecha.der { right: -4px; }
.t-chips-marco.hay-izq .t-chips-flecha.izq { display: flex; animation: t-latido-izq 1.4s ease-in-out infinite; }
.t-chips-marco.hay-der .t-chips-flecha.der { display: flex; animation: t-latido-der 1.4s ease-in-out infinite; }
@keyframes t-latido-der { 0%, 100% { transform: translateX(0); opacity: .45; } 50% { transform: translateX(4px); opacity: 1; } }
@keyframes t-latido-izq { 0%, 100% { transform: translateX(0); opacity: .45; } 50% { transform: translateX(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .t-chips-flecha { animation: none !important; opacity: .8; } }
.t-chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linea); background: var(--fondo);
  font-size: .88rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.t-chip-sub { color: var(--suave); font-weight: 500; }
.t-chip.activo { background: var(--principal); border-color: var(--principal); color: var(--sobre-principal); }

/* ---------- Grilla de productos ---------- */
main { padding-top: 14px; }
.t-grilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
.t-card { text-decoration: none; display: block; min-width: 0; }
.t-card[hidden] { display: none; }
.t-card-foto { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radio); overflow: hidden; background: var(--gris); }
.t-card-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.t-card:hover .t-card-foto img { transform: scale(1.03); }
.t-sin-foto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: #c3c7ce; }
/* Producto sin foto: el logo del negocio, centrado y más chico, sobre el gris (no compite con las fotos reales).
   multiply: si el logo tiene fondo blanco (un JPG), el blanco se funde con el gris. */
.t-sin-foto.t-logo-placeholder img { flex: none; width: 46%; height: 46%; aspect-ratio: auto; object-fit: contain; opacity: .5; mix-blend-mode: multiply; }
.t-fotos .t-sin-foto.t-logo-placeholder img { width: 38%; height: 38%; }
.t-linea-foto .t-sin-foto.t-logo-placeholder img { width: 64%; height: 64%; }
.t-etiqueta {
  position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px;
  background: rgba(17, 20, 24, .78); color: #fff; font-size: .72rem; font-weight: 700;
}
.t-agotado .t-card-foto img { opacity: .55; }
.t-card-info { padding: 8px 2px 0; }
.t-marca { color: var(--suave); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.t-nombre { font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-precio { font-weight: 800; margin-top: 3px; }
.t-precio small { font-weight: 500; color: var(--suave); font-size: .78rem; }
/* Producto sin precio (Carlos, 07/11/2026): se consulta por WhatsApp. */
.t-precio.t-consultar { color: var(--enlace); font-size: .92rem; }
.t-vacio { text-align: center; color: var(--suave); padding: 48px 16px; }

.t-pie { text-align: center; color: var(--suave); font-size: .8rem; padding: 40px 0 8px; }
.t-pie a { font-weight: 700; text-decoration: none; }

/* ---------- Catálogo en lista (como el menú de QRico) ---------- */
.t-seccion { padding: 6px 0 4px; }
.t-seccion[hidden] { display: none; }
.t-seccion-titulo { font-family: var(--t-titulo, "Fraunces", Georgia, serif); font-size: 1.35rem; font-weight: var(--t-peso-titulo, 700); margin: 12px 0 0; }
.t-seccion-cuenta { color: var(--suave); font-size: .85rem; margin-bottom: 10px; }
.t-filas { display: grid; grid-template-columns: 1fr; gap: 10px; }
.t-fila { display: flex; align-items: stretch; background: #fafafa; border: 1px solid var(--linea); border-radius: 16px; padding: 14px; text-decoration: none; }
.t-fila-info { flex: 1; min-width: 0; padding-right: 14px; display: flex; flex-direction: column; }
.t-fila-nombre { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.t-fila-desc { color: var(--suave); font-size: .85rem; line-height: 1.4; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-fila-sin { color: #b91c1c; font-size: .8rem; font-weight: 700; margin-top: 4px; }
.t-fila-precio { align-self: flex-start; margin-top: auto; padding: 3px 10px; border-radius: 8px; background: color-mix(in srgb, var(--enlace) 12%, #ffffff); color: var(--enlace); font-weight: 800; font-size: .95rem; }
.t-fila-info .t-fila-precio { margin-top: auto; }
.t-fila-info > :nth-last-child(1) { margin-top: auto; }
.t-fila-precios { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 6px; }
.t-fila-precios .t-fila-precio { margin-top: 0; }
.t-fila-divisor { width: 1px; background: var(--linea); margin: 2px 0; }
.t-fila-foto { position: relative; width: 92px; flex-shrink: 0; margin-left: 14px; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--gris); align-self: center; }
.t-fila-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-fila.t-agotado .t-fila-foto img { opacity: .5; }

/* ---------- Botón flotante de WhatsApp (opción de Mi negocio, migración 044) ---------- */
.t-wa-flotante {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6;
  width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.t-wa-flotante svg { width: 30px; height: 30px; fill: currentColor; }
body.t-bloqueado .t-wa-flotante { display: none; }
body.t-con-carrito .t-wa-flotante { bottom: calc(84px + env(safe-area-inset-bottom)); }
/* El logo chico de WhatsApp en la ficha, al lado de "Agregar al pedido". */
.t-acciones-producto .t-boton.t-wa-producto { flex: 0 0 auto; width: 50px; min-width: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.t-wa-producto svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Hoja de detalle (sube desde abajo en el celular) ---------- */
.t-hoja { position: fixed; inset: 0; z-index: 20; }
.t-hoja[hidden] { display: none; }
.t-hoja-fondo { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: t-aparecer .2s ease; }
.t-hoja-caja {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh;
  background: var(--fondo); border-radius: 20px 20px 0 0; overflow-y: auto; overscroll-behavior: contain;
  animation: t-subir .25s ease;
}
.t-cerrar {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 6px rgba(0, 0, 0, .15); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
/* La ✕ de los botones de cerrar, dibujada (no una letra): queda centrada en
   el círculo con cualquier tipografía. */
.t-cerrar, .t-info-cerrar { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 0; color: var(--suave); }
.t-cerrar::before, .t-info-cerrar::before {
  content: ''; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 5l14 14M19 5L5 19" stroke="black" stroke-width="2.8" stroke-linecap="round"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 5l14 14M19 5L5 19" stroke="black" stroke-width="2.8" stroke-linecap="round"/></svg>') center / contain no-repeat;
}
.t-cerrar { color: var(--texto); }
@keyframes t-aparecer { from { opacity: 0; } }
@keyframes t-subir { from { transform: translateY(40px); opacity: 0; } }

/* Galería: se desliza con el dedo, una foto por vez. */
.t-galeria { position: relative; }
.t-fotos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--gris); }
.t-fotos::-webkit-scrollbar { display: none; }
.t-fotos img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 5; object-fit: contain; scroll-snap-align: center; }
.t-fotos .t-sin-foto { position: static; flex: 0 0 100%; aspect-ratio: 4 / 5; }
.t-puntos { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.t-puntos span { width: 7px; height: 7px; border-radius: 50%; background: rgba(17, 20, 24, .25); }
.t-puntos span.activo { background: var(--principal); }

.t-detalle { padding: 18px 18px 0; }
.t-detalle h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 6px; line-height: 1.25; }
.t-detalle .t-precio { font-size: 1.35rem; margin: 0 0 6px; }
.t-estado { font-size: .88rem; font-weight: 700; min-height: 1.3em; }
.t-estado.si { color: #15803d; }
.t-estado.no { color: #b91c1c; }
.t-estado.falta { color: var(--suave); font-weight: 500; }

.t-atributo { margin-top: 16px; }
.t-atributo-nombre { font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.t-atributo-nombre span { color: var(--suave); font-weight: 500; }
.t-valores { display: flex; flex-wrap: wrap; gap: 8px; }
.t-valor {
  min-width: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--linea); background: var(--fondo);
  font-weight: 600; font-size: .9rem; cursor: pointer;
}
.t-valor.elegido { border-color: var(--principal); background: var(--principal); color: var(--sobre-principal); }
.t-valor.agotado { color: var(--suave); text-decoration: line-through; }
.t-valor.no-existe { color: #c3c7ce; border-style: dashed; }
/* Colores: un circulito del color real (atributo_valores.color), con un anillo cuando está elegido. */
.t-valor.t-color { width: 36px; height: 36px; min-width: 0; padding: 0; border-radius: 50%; border: 3px solid var(--fondo); background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.t-valor.t-color.elegido { background: var(--c); border-color: var(--fondo); box-shadow: 0 0 0 2.5px var(--principal); }
.t-valor.t-color.agotado { opacity: .55; background-image: linear-gradient(135deg, transparent 46%, rgba(255, 255, 255, .95) 46%, rgba(255, 255, 255, .95) 54%, transparent 54%); }
.t-valor.t-color.no-existe { opacity: .25; border-style: solid; }

.t-descripcion { color: #374151; line-height: 1.55; margin: 18px 0 0; white-space: pre-line; }

.t-acciones-producto {
  position: sticky; bottom: 0; display: flex; gap: 8px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  margin-top: 18px; background: linear-gradient(to top, var(--fondo) 75%, rgba(255, 255, 255, 0));
}
.t-acciones-producto .t-boton { flex: 1; padding: 13px 16px; font-size: .95rem; }
.t-acciones-producto .t-compartir { flex: 0 0 auto; min-width: 0; }

/* Info del negocio (botón "i"): tarjeta con su propio encabezado y cierre */
.t-hoja-caja:has(.t-info) > .t-cerrar { display: none; }
.t-info-agarre { width: 40px; height: 4px; border-radius: 2px; background: #dcdfe4; margin: 10px auto 0; }
.t-info-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px 14px; border-bottom: 1px solid var(--linea); }
.t-info-cab h2 { font-family: var(--t-titulo, "Fraunces", Georgia, serif); font-size: 1.35rem; font-weight: var(--t-peso-titulo, 700); margin: 0; }
.t-info-cerrar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--linea); background: var(--gris);
  cursor: pointer;
}
.t-info-cuerpo { padding: 16px 20px calc(22px + env(safe-area-inset-bottom)); }
.t-info-desc { white-space: pre-line; color: #4b5563; line-height: 1.55; margin: 0 0 4px; }
.t-info-fila { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.t-info-icono {
  width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--linea); background: #fafafa; font-size: 1.05rem;
}
.t-info-icono svg { width: 19px; height: 19px; fill: none; stroke: #4b5563; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-info-fila b, .t-info-redes b { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; margin-bottom: 3px; }
.t-info-fila a { color: var(--enlace); text-underline-offset: 2px; }
/* Encabezado con logo y "Abierto · cierra…", botones de acción y horarios en tablita. */
.t-info-titulo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-info-logo { width: 46px; height: 46px; flex: none; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--gris); border: 1px solid var(--linea); font-weight: 800; font-size: 1.2rem; }
.t-info-logo img { width: 100%; height: 100%; object-fit: cover; }
.t-info-estado { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .86rem; color: var(--suave); }
.t-info-estado i { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.t-info-estado.abierto { color: #15803d; font-weight: 600; }
.t-info-estado.abierto i { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.t-info-desc { margin: 0 0 4px; }
a.t-info-fila { color: inherit; text-decoration: none; }
/* Cada ícono con su color (y el fondo del mismo tono, clarito). */
.t-info-icono.lugar { background: #FDECEC; border-color: #F8CFCF; } .t-info-icono.lugar svg { stroke: #DC2626; }
.t-info-icono.reloj { background: #FFF4E0; border-color: #F6DDB0; } .t-info-icono.reloj svg { stroke: #D97706; }
.t-info-icono.whatsapp { background: #E6F6EC; border-color: #BFE6CD; } .t-info-icono.whatsapp svg { stroke: #16A34A; }
.t-info-icono.telefono { background: #E6F0FB; border-color: #C3D9F3; } .t-info-icono.telefono svg { stroke: #2563EB; }
.t-info-icono.email { background: #EFEAFB; border-color: #D8CEF3; } .t-info-icono.email svg { stroke: #7C3AED; }
.t-info-icono.instagram { background: #FCE8F3; border-color: #F5C9E1; } .t-info-icono.instagram svg { stroke: #C13584; }
a.t-info-fila > div > span { color: var(--enlace); }
a.t-info-fila:active { background: var(--gris); }
.t-info-fila > div > span { display: block; }
.t-info-fila:last-child { border-bottom: 0; }
.t-info-redes { padding-top: 16px; }
.t-pastilla {
  display: inline-block; margin: 4px 8px 0 0; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--linea);
  background: var(--gris); font-weight: 700; font-size: .92rem; text-decoration: none;
}

/* ---------- Combos y promos: descuento, "incluye" y mitad y mitad ---------- */
.t-antes { color: var(--suave); font-weight: 500; font-size: .85em; }
.t-ahorro { padding: 2px 7px; border-radius: 6px; background: #dcfce7; color: #15803d; font-weight: 800; font-size: .78rem; }
.t-etiqueta-ahorro { background: #15803d; }
.t-incluye { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--gris); font-size: .9rem; line-height: 1.6; }
.t-incluye b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
.t-mitad-link {
  display: block; width: 100%; margin-top: 14px; padding: 11px 14px; border-radius: 12px; border: 1.5px dashed var(--principal);
  background: none; color: var(--principal); font-weight: 700; text-align: left; cursor: pointer;
}
.t-mitad-cuerpo { padding: 4px 20px 0; }
.t-mitad p { color: var(--suave); margin: 4px 0 12px; font-size: .9rem; }
/* El gusto ya elegido, resaltado arriba; después "Elegí la otra mitad". */
.t-mitad-elegida {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; padding: 10px 12px;
  border: 2px solid var(--principal); border-radius: 14px; background: color-mix(in srgb, var(--principal) 6%, #fff);
}
.t-mitad-elegida-foto { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--gris); }
.t-mitad-elegida-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-mitad-elegida-texto { flex: 1; min-width: 0; }
.t-mitad-elegida-texto small { display: block; color: var(--suave); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.t-mitad-elegida-texto b { display: block; font-size: 1.05rem; }
.t-mitad-elegida-precio { font-weight: 700; white-space: nowrap; }
.t-mitad-elegida-marca {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--principal); color: var(--sobre-principal);
  display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800;
}
.t-mitad h3 { font-size: 1rem; font-weight: 800; margin: 16px 0 2px; }
.t-mitad .t-mitad-regla { font-size: .82rem; margin: 0 0 10px; }
.t-linea-incluye { color: var(--suave); font-size: .8rem; line-height: 1.35; margin-top: 2px; }

/* ---------- Pedidos: barra del carrito, carrito y confirmación ---------- */
.t-boton-principal { background: var(--principal); color: var(--sobre-principal); }
.t-boton-principal:hover { background: var(--principal); filter: brightness(1.12); }
.t-boton[disabled] { opacity: .45; cursor: default; filter: none; }

.t-carrito-barra {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border: 0; border-radius: 14px; background: var(--principal); color: var(--sobre-principal);
  font-weight: 800; font-size: 1rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); cursor: pointer; animation: t-subir .25s ease;
}
.t-carrito-barra[hidden], body.t-bloqueado .t-carrito-barra { display: none; }
.t-carrito-cuenta {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: #E53935; color: #fff; font-size: .9rem; box-shadow: 0 0 0 2px color-mix(in srgb, #fff 35%, transparent);
}
/* Al sumar algo al carrito, el número da un saltito (20/10/2026). */
.t-carrito-cuenta.salta { animation: t-salta .35s ease; }
@keyframes t-salta { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.t-carrito-total { margin-left: auto; }
.t-aviso-agregado {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 7; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 9px 20px 9px 9px; border-radius: 999px;
  background: #fff; color: #111418; font-weight: 700; font-size: .95rem; border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .15); animation: t-aviso-entra .35s cubic-bezier(.2, 1.4, .4, 1); white-space: nowrap;
}
.t-aviso-agregado[hidden] { display: none; }
.t-aviso-tilde { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #22A447; color: #fff; font-size: .95rem; font-weight: 800; }
@keyframes t-aviso-entra { from { transform: translate(-50%, 14px) scale(.9); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }

.t-hoja-caja:has(.t-carrito) > .t-cerrar, .t-hoja-caja:has(.t-mitad) > .t-cerrar { display: none; }
.t-carrito-cuerpo { padding: 6px 20px 0; }
.t-linea { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.t-linea-foto { width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--gris); position: relative; }
.t-linea-foto img { width: 100%; height: 100%; object-fit: cover; }
.t-linea-info { flex: 1; min-width: 0; }
.t-linea-nombre { font-weight: 700; line-height: 1.25; }
.t-linea-variante { color: var(--suave); font-size: .85rem; }
.t-linea-precio { font-weight: 800; font-size: .92rem; margin-top: 2px; }
.t-cantidad { display: flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 10px; flex-shrink: 0; }
.t-cantidad button { width: 34px; height: 34px; border: 0; background: none; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.t-cantidad span { min-width: 22px; text-align: center; font-weight: 800; }
.t-carrito-suma { display: flex; justify-content: space-between; padding: 16px 0 6px; font-size: 1.1rem; font-weight: 800; }
.t-carrito-nota { color: var(--suave); font-size: .82rem; margin: 0 0 6px; }
.t-carrito-datos { margin-top: 14px; }
.t-carrito-datos h3 { font-size: 1rem; font-weight: 800; margin: 0 0 10px; }
.t-campo { display: block; margin-bottom: 12px; }
.t-campo[hidden] { display: none; }
.t-campo span { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 5px; }
.t-campo input, .t-campo textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--fondo);
  font: inherit; font-size: 16px; color: inherit;
}
.t-campo input:focus, .t-campo textarea:focus { outline: none; border-color: var(--principal); }
.t-campo textarea { resize: vertical; min-height: 70px; }
.t-carrito-error { color: #b91c1c; font-weight: 700; font-size: .9rem; margin: 4px 0 0; }
/* Lo que falta completar al enviar: borde rojo y el aviso ahí mismo. */
.t-falta .t-opcion, .t-falta .t-entrega, .t-falta .t-pago, .t-falta.t-campo input, .t-falta.t-campo textarea { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.t-falta-aviso { color: #b91c1c; font-weight: 700; font-size: .88rem; margin: 6px 0 0; }
.t-falta { animation: t-falta-sacudon .35s ease; }
@keyframes t-falta-sacudon { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .t-falta { animation: none; } }
/* "Vaciar carrito" en la cabecera del pedido. */
.t-cab-acciones { display: flex; align-items: center; gap: 8px; }
.t-vaciar {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #fecaca; border-radius: 99px;
  background: #fef2f2; color: #b91c1c; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
}
.t-vaciar svg { width: 15px; height: 15px; }
.t-carrito .t-acciones-producto { margin-top: 8px; }
.t-acciones-envio { flex-direction: column; align-items: stretch; }
/* "Armar mitad y mitad" directo en la tarjeta del producto. */
.t-mitad-boton {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 6px 0 4px; padding: 3px 11px;
  border: 1.5px dashed var(--texto); border-radius: 99px; background: #fff; color: var(--texto);
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.t-envio-ayuda { margin: 8px 0 0; text-align: center; color: var(--suave); font-size: .84rem; line-height: 1.35; }
.t-envio-ayuda b { color: var(--texto); }
/* Entrega y forma de pago: opciones grandes, fáciles de tocar. */
.t-opciones { display: grid; gap: 8px; }
.t-opcion {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--linea); cursor: pointer;
}
.t-opcion:has(input:checked) { border-color: var(--principal); background: color-mix(in srgb, var(--principal) 5%, #ffffff); }
.t-opcion input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--principal); flex-shrink: 0; }
.t-opcion b { display: block; font-weight: 700; }
.t-opcion small { display: block; color: var(--suave); font-size: .84rem; margin-top: 2px; }
/* Entrega (como en QRico): botones lado a lado con su ícono; el elegido, del color del negocio. */
.t-entregas { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.t-entrega {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--gris);
  font-weight: 700; font-size: .95rem; text-align: center; cursor: pointer; transition: background .15s, color .15s;
}
.t-entrega span { font-size: 1.2rem; line-height: 1; }
.t-entrega:has(input:checked) { background: var(--principal); border-color: var(--principal); color: var(--sobre-principal); }
.t-entrega:has(input:focus-visible), .t-pago:has(input:focus-visible) { outline: 2px solid var(--enlace); outline-offset: 2px; }
.t-entrega input, .t-pago input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.t-campo-direccion { margin: 10px 0 0; }
/* Lo que corresponde a lo elegido: dónde se retira, lo que cuesta el envío. */
.t-aviso-entrega {
  margin-top: 10px; padding: 11px 14px; border-radius: 12px; line-height: 1.4; font-size: .92rem;
  background: color-mix(in srgb, var(--enlace) 10%, #ffffff); color: var(--texto);
}
.t-aviso-entrega a { color: color-mix(in srgb, var(--enlace) 75%, #000000); text-underline-offset: 2px; }
.t-aviso-entrega small { display: block; margin-top: 3px; color: var(--suave); font-size: .84rem; }
/* Formas de pago: tarjetas con un círculo que se marca con ✓. */
.t-pagos { display: grid; gap: 10px; }
.t-pago {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px;
  border: 1.5px solid var(--linea); background: var(--gris); cursor: pointer;
}
.t-pago-marca {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d1d5db; background: #fff;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; font-weight: 800;
}
.t-pago-icono { flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; }
.t-pago-icono svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.t-pago-icono.efectivo { color: #2E8B5C; background: #E6F2EA; }
.t-pago-icono.transferencia { color: #2B6CB0; background: #E3EEF8; }
.t-pago-texto { flex: 1; min-width: 0; }
.t-pago-texto b { display: block; font-weight: 800; }
.t-pago-texto small { display: block; color: var(--suave); font-size: .84rem; margin-top: 2px; }
.t-pago-descuento { flex: none; padding: 2px 9px; border-radius: 99px; background: #dcfce7; color: #15803d; font-size: .8rem; font-weight: 800; }
.t-pago:has(input:checked) { border-color: var(--enlace); background: color-mix(in srgb, var(--enlace) 9%, #ffffff); }
.t-pago:has(input:checked) .t-pago-marca { border-color: var(--enlace); background: var(--enlace); }
.t-pago:has(input:checked) .t-pago-marca::after { content: '✓'; }
/* Alias para transferir, a la vista apenas elige transferencia. */
.t-alias { margin-top: 10px; padding: 14px; border: 1.5px dashed var(--linea); border-radius: 14px; }
.t-alias-valor { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; word-break: break-all; }
.t-alias-titular { color: var(--suave); font-size: .88rem; margin-top: 2px; }
.t-alias-nota { margin: 10px 0 0; font-size: .86rem; color: var(--suave); line-height: 1.4; }
.t-alias-nota b { color: var(--texto); }
.t-copiar-alias { width: 100%; margin-top: 12px; padding: 11px; background: var(--fondo); border: 1.5px solid var(--linea); }

.t-carrito-cuentas { margin-top: 10px; border-top: 1px solid var(--linea); padding-top: 8px; }
.t-carrito-cuentas > div:not(.t-carrito-suma) { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #374151; }
.t-cuenta-descuento { color: #15803d !important; }
.t-carrito-cerrado { margin: 12px 0 2px; padding: 10px 14px; border-radius: 12px; background: #fef9c3; color: #713f12; font-size: .9rem; font-weight: 600; }
.t-carrito-cerrado.no { background: #fee2e2; color: #991b1b; }
.t-transferencia { margin: 14px 0 6px; padding: 14px; border-radius: 14px; background: var(--gris); text-align: left; }
.t-transferencia-titulo { font-size: .85rem; color: var(--suave); font-weight: 600; }
.t-transferencia-alias { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.t-transferencia-alias b { font-size: 1.15rem; word-break: break-all; }
.t-listo .t-transferencia .t-copiar { width: auto; margin: 0; padding: 8px 14px; font-size: .88rem; background: var(--fondo); border: 1.5px solid var(--linea); }
.t-transferencia-titular { font-size: .88rem; color: #374151; margin-top: 4px; }
.t-carrito-vacio { color: var(--suave); text-align: center; padding: 32px 0; }

.t-listo { padding: 30px 22px calc(24px + env(safe-area-inset-bottom)); text-align: center; }
.t-listo-icono {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #dcfce7; color: #15803d; font-size: 2rem; font-weight: 800;
}
.t-listo h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 6px; }
.t-listo p { color: #4b5563; line-height: 1.5; margin: 6px 0; }
.t-listo .t-boton { width: 100%; padding: 14px 16px; font-size: 1rem; margin-top: 10px; }

/* ---------- Pedido que falta confirmar por WhatsApp ---------- */
.t-falta-confirmar .t-listo-icono { background: #fef3c7; color: #b45309; }
.t-falta-confirmar .t-boton-wa { font-size: 1.05rem; font-weight: 800; padding: 16px; }
.t-listo .t-pendiente-ayuda { font-size: .88rem; color: var(--suave); margin-top: 12px; }
.t-pendiente {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 16px; border: 0; border-bottom: 1px solid #fcd34d; background: #fef3c7; color: #78350f;
  font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.t-pendiente-opciones { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linea); }
.t-pendiente-enlaces { display: flex; justify-content: center; gap: 22px; }
.t-enlace { border: 0; background: none; padding: 6px 2px; font: inherit; font-size: .92rem; font-weight: 600; color: #4b5563; text-decoration: underline; cursor: pointer; }
.t-enlace:disabled { opacity: .6; cursor: default; }
.t-listo .t-pendiente-seguro { font-weight: 700; color: #111418; margin: 0 0 4px; }
.t-pendiente-si-no { display: flex; gap: 10px; }
.t-listo .t-pendiente-si-no .t-boton { margin-top: 6px; }
.t-boton-peligro { background: #b91c1c; color: #fff; }
.t-boton-peligro:hover { background: #991b1b; }
.t-pendiente-accion { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--wa); color: #fff; font-weight: 700; font-size: .85rem; }

/* ---------- Modo mostrador (el local carga un pedido) ---------- */
.t-mostrador { padding: 10px 16px; background: #111418; color: #fff; font-size: .9rem; font-weight: 600; text-align: center; }
.t-mostrador a { color: #fff; margin-left: 6px; }

/* ---------- Aviso de tienda pendiente ---------- */
.t-aviso { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; }
.t-aviso h1 { font-size: 1.5rem; margin: 14px 0 6px; }
.t-aviso p { color: var(--suave); margin: 4px 0; max-width: 360px; }
.t-aviso .t-aviso-titulo { color: var(--texto); font-weight: 700; font-size: 1.05rem; }
.t-aviso .t-aviso-duenio { font-size: .85rem; margin-top: 28px; }

/* ---------- Pantallas más grandes ---------- */
@media (min-width: 640px) {
  .t-app { padding-left: 20px; padding-right: 20px; }
  .t-barra { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .t-grilla { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
  .t-perfil { flex-direction: row; text-align: left; align-items: center; gap: 28px; padding: 40px 8px 26px; }
  .t-cab { padding: 34px 8px 24px; }
  .t-logo { width: 64px; height: 64px; }
  .t-titulo { font-size: 2.6rem; }
  .t-avatar { width: 128px; height: 128px; }
  .t-avatar > * { font-size: 2.8rem; }
  .t-avatar-chico { width: 56px; height: 56px; }
  .t-perfil h1 { font-size: 1.8rem; margin-top: 0; }
  .t-acciones { justify-content: flex-start; }
  .t-buscar { max-width: 420px; }
}
@media (min-width: 960px) {
  .t-grilla { grid-template-columns: repeat(4, 1fr); }
  .t-filas { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  /* El detalle pasa a ser una ventana centrada: foto a la izquierda, datos a la derecha. */
  .t-hoja-caja {
    left: 50%; top: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%);
    width: min(940px, 92vw); max-height: 88vh; border-radius: 20px; animation: t-aparecer .2s ease;
  }
  .t-producto { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  /* La foto va enmarcada (8/11/2026): margen alrededor, esquinas redondeadas y un alto que siempre cabe en la
     ventana (antes era ancho x 5/4 y, en pantallas bajas, se salía del recuadro y se cortaba contra el borde). */
  .t-producto .t-galeria { position: sticky; top: 0; padding: 14px; }
  .t-producto .t-fotos { border-radius: 14px; }
  .t-producto .t-fotos img, .t-producto .t-fotos .t-sin-foto { aspect-ratio: auto; height: clamp(300px, calc(88vh - 28px), 620px); }
  .t-producto .t-puntos { bottom: 26px; }
  .t-detalle { padding: 28px 28px 0; }
  .t-acciones-producto { padding: 18px 28px 24px; }
}
@media (min-width: 960px) {
  .t-hoja-caja:has(.t-info), .t-hoja-caja:has(.t-carrito), .t-hoja-caja:has(.t-mitad) { width: min(480px, 92vw); }
}

/* Nota de un producto en el carrito ("sin lechuga"). */
.t-nota { margin-top: 6px; }
.t-nota-boton {
  padding: 4px 12px; border: 1.5px dashed var(--suave); border-radius: 99px; background: none;
  color: var(--texto); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.t-nota-campo {
  width: 100%; padding: 6px 10px; border: 1.5px solid var(--linea); border-radius: 10px;
  font: inherit; font-size: .88rem; background: #FFFBEA;
}
.t-nota-campo:focus { outline: none; border-color: var(--principal); }

/* Botón "+" de cada producto (tienda.js, crearBotonesMas): agrega sin abrir el
   producto. Si ya está en el pedido, "− n +" (como el menú anterior de Wicheff).
   En la lista va debajo de la foto; en la grilla, sobre la foto. */
.t-fila-lado { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 14px; align-self: center; }
.t-fila-lado .t-fila-foto { width: 76px; margin-left: 0; }
.t-mas-sobre-foto { position: absolute; right: 7px; bottom: 7px; z-index: 1; }
.t-mas {
  width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: var(--principal); color: var(--sobre-principal); cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.t-mas[hidden] { display: none; }
.t-mas svg { display: block; }
.t-mas:active { transform: scale(.92); }
.t-mas-sobre-foto .t-mas { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 1px 4px rgba(0, 0, 0, .18); }
.t-paso {
  display: flex; align-items: center; height: 34px; border-radius: 99px;
  background: var(--principal); color: var(--sobre-principal); box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.t-paso[hidden] { display: none; }
.t-paso button {
  width: 30px; height: 34px; padding: 0 0 2px; border: 0; background: none; color: inherit;
  font-size: 20px; font-weight: 600; line-height: 1; cursor: pointer;
}
.t-paso-n { min-width: 18px; text-align: center; font-size: 14px; font-weight: 700; }
/* Info del negocio: letra del contenido más chica. */
.t-info-cuerpo { font-size: .9rem; }
.t-info-desc { font-size: .88rem; }
.t-info-fila { padding: 11px 0; gap: 12px; }
.t-info-fila b { font-size: .68rem; margin-bottom: 2px; }
.t-info-icono { width: 34px; height: 34px; }
.t-info-icono svg { width: 17px; height: 17px; }
.t-info-cab h2 { font-size: 1.2rem; }
.t-info-estado { font-size: .8rem; }

/* Modo mantenimiento (21/10/2026): la tienda se ve, sin carrito. */
.t-mantenimiento { background: #FDF1E1; color: #8A4B08; }

/* Foto que se cortaría mucho: entera, sobre blanco (fotos.js, 21/10/2026). */
img.foto-entera { object-fit: contain !important; background: #fff; }

/* ---- Accesibilidad (8/11/2026) ---- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--principal, #1f2937); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
