/* ============================================================
   TIENDA PUBLICA (/tienda)

   Web normal y responsive: aca entra cualquiera, desde la compu o
   desde el celular. NO usa el marco de telefono de la app de los
   talleres (.phone) -- son dos canales distintos.

   Los colores salen de los tokens de L'TOKE que estan en style.css
   (navy #1E2D40 + rojo #C0141B), asi la marca es una sola.
   ============================================================ */

body.tienda { background: var(--surface); }
.t-ancho { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }

/* Numeros y titulos en Space Grotesk -- style.css ya lo aplica a
   body/h1-h4 globalmente; esto cubre los <div> de precio/titulo que
   no son h1-h4 (mismo criterio que tuttilitario.css). */
body.tienda .t-hero-tit,
body.tienda .t-card-precio,
body.tienda .t-ficha-precio,
body.tienda .t-linea-precio,
body.tienda .t-envio-precio,
body.tienda .t-resumen-total,
body.tienda .t-footer-tit,
body.tienda .t-gracias h1,
body.tienda .t-pagina h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
body.tienda .t-card-precio,
body.tienda .t-ficha-precio,
body.tienda .t-linea-precio,
body.tienda .t-envio-precio { letter-spacing: -.2px; }

/* ---- cabecera ---- */
.t-header { background: var(--bg-dark); position: sticky; top: 0; z-index: 30; position: relative; }
.t-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red) 35%, #E4444C 50%, var(--red) 65%, transparent);
  opacity: .85;
}
.t-header-in { display: flex; align-items: center; gap: 16px; padding: 13px 18px; }
.t-logo { flex-shrink: 0; display: block; }
.t-logo img { width: 104px; height: auto; display: block; }
.t-buscar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  background: #fff; border-radius: 11px; padding: 10px 13px;
  border: 1.5px solid transparent; box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: border-color .15s, box-shadow .15s;
}
.t-buscar:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(192,20,27,.16); }
.t-buscar input {
  flex: 1; min-width: 0; border: none; outline: none;
  font-size: 14.5px; background: transparent; color: var(--ink);
}
.t-carrito { position: relative; color: #fff; display: flex; padding: 6px; flex-shrink: 0; transition: opacity .15s, transform .15s; }
.t-carrito:hover { color: #fff; opacity: .8; transform: translateY(-1px); }
.t-carrito-n {
  position: absolute; top: -2px; right: -4px;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-dark);
}

.t-main { padding-top: 22px; padding-bottom: 44px; min-height: 60vh; }
.t-titulo { font-size: 23px; margin: 14px 0 18px; }
.t-volver { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; }

/* ---- banner principal ---- */
.t-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--bg-dark) 0%, #2c4362 65%, #3a2230 100%);
  border-radius: 18px; padding: 40px 28px; margin-bottom: 22px;
  color: #fff; text-align: center;
  animation: tFadeInUp .5s ease both;
  box-shadow: 0 10px 30px rgba(20,30,50,.25);
}
.t-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 70%;
  background: radial-gradient(closest-side, rgba(192,20,27,.35), transparent 70%);
  pointer-events: none;
}
.t-hero-tit { font-size: 27px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.3px; position: relative; z-index: 1; }
.t-hero-sub { font-size: 14px; color: rgba(255,255,255,.78); position: relative; z-index: 1; }
.t-hero-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  position: relative; z-index: 1; margin-top: 14px;
}
.t-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; padding: 6px 13px; font-size: 12px; font-weight: 600;
  color: #fff;
}
.t-hero-badge svg { color: #FF8189; flex-shrink: 0; }
@media (min-width: 640px) {
  .t-hero { padding: 52px 40px; }
  .t-hero-tit { font-size: 36px; }
  .t-hero-sub { font-size: 15.5px; }
}

/* ---- secciones / categorias ---- */
.t-categorias {
  display: grid; gap: 12px; margin-bottom: 22px;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.t-categoria-tile {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 10px; color: inherit; text-align: center;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  animation: tFadeInUp .45s ease both;
}
.t-categoria-tile:hover {
  transform: translateY(-3px); border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(20,30,50,.12); color: inherit;
}
.t-categoria-emoji {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-light); font-size: 22px; line-height: 1;
  transition: transform .15s;
}
.t-categoria-tile:hover .t-categoria-emoji { transform: scale(1.06); }
.t-categoria-nombre { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.t-categoria-n { font-size: 11px; color: var(--ink-soft); }

@keyframes tFadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- elegir el auto (mismos 3 momentos que la app del taller) ---- */
.t-auto {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 20px;
}
.t-auto-tit { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.t-auto-form { display: flex; gap: 9px; flex-wrap: wrap; }
.t-auto-form input[type=text] {
  flex: 1; min-width: 210px; height: 46px;
  border: 1.5px solid var(--border); border-radius: 11px; padding: 0 14px;
  font-size: 14.5px; background: var(--card); color: var(--ink); outline: none;
}
.t-auto-form input[type=text]:focus { border-color: var(--blue); }
.t-auto-activo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.t-auto-quitar { font-size: 12.5px; font-weight: 700; text-decoration: underline; }
.t-select {
  height: 38px; border: 1.5px solid var(--border); border-radius: 9px;
  padding: 0 10px; font-size: 13.5px; background: var(--card);
  color: var(--ink); font-weight: 600;
}
.t-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.t-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.t-chip:hover { border-color: var(--blue); color: var(--blue); }
.t-chip-n { font-size: 11px; opacity: .6; font-weight: 700; }

.t-conteo { font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; }
.t-nota { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 12px; }

/* ---- grilla de productos ---- */
.t-grid {
  display: grid; gap: 14px; margin-top: 12px;
  /* 150px (no 215px) para que en un celular normal (~375-390px de
     ancho) entren 2 productos por fila en vez de 1 -- la mayoria de
     quien compra repuestos entra desde el celular. */
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (max-width: 360px) {
  .t-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .t-card-cuerpo { padding: 9px 10px 10px; }
  .t-card-nombre { font-size: 12px; }
}
.t-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; color: inherit;
  transition: box-shadow .15s, transform .15s;
  animation: tFadeInUp .35s ease both;
}
.t-card:hover { box-shadow: 0 6px 20px rgba(20,30,50,.11); transform: translateY(-2px); color: inherit; }
.t-card-foto {
  position: relative; aspect-ratio: 1/1; background: var(--surface);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.t-card-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; transition: transform .25s ease; }
.t-card:hover .t-card-foto img { transform: scale(1.05); }
.t-card-cuerpo { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.t-card-nombre { font-size: 13px; font-weight: 600; line-height: 1.35; }
.t-card-marca { font-size: 11.5px; color: var(--ink-soft); }
.t-card-pie {
  margin-top: auto; padding-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.t-card-precio { font-size: 16px; font-weight: 800; color: var(--bg-dark); }

.t-vacio { text-align: center; color: var(--ink-soft); padding: 56px 20px; font-size: 14.5px; line-height: 1.6; }
.t-cargando { text-align: center; padding: 22px; color: var(--ink-soft); font-size: 13px; }

/* ---- ficha del producto ---- */
.t-ficha {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 28px; margin-top: 16px; align-items: start;
}
@media (max-width: 760px) { .t-ficha { grid-template-columns: 1fr; gap: 18px; } }
.t-ficha-foto {
  position: relative; aspect-ratio: 1/1; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(20,30,50,.08);
}
.t-ficha-foto img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #fff; padding: 14px;
}
.t-ficha-datos { display: flex; flex-direction: column; gap: 11px; }
.t-ficha-nombre { font-size: 22px; line-height: 1.25; margin: 0; }
.t-ficha-marca {
  display: inline-flex; align-self: flex-start; font-size: 11.5px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; color: var(--blue);
  background: var(--blue-light); border-radius: 6px; padding: 3px 9px;
}
.t-ficha-precio { font-size: 32px; font-weight: 800; color: var(--bg-dark); letter-spacing: -.5px; }
.t-ficha-entrega { border-radius: 12px; padding: 13px 15px; font-size: 13px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.t-ficha-entrega svg { flex-shrink: 0; margin-top: 1px; }
.t-ficha-entrega-tit { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.t-ficha-entrega.es-verde { background: var(--green-light); color: var(--green); }
.t-ficha-entrega.es-amarillo { background: var(--amber-light); color: var(--amber); }
.t-ficha-entrega.es-rojo { background: var(--red-light); color: var(--red); }
.t-ficha-nota { font-size: 12.5px; color: var(--ink-soft); }
.t-ficha-form { display: flex; gap: 11px; align-items: flex-end; flex-wrap: wrap; margin-top: 4px; }
.t-ficha-form .btn { width: auto; flex: 1; min-width: 190px; }
.t-cant { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.t-cant input {
  width: 78px; height: 50px; border: 1.5px solid var(--border); border-radius: 11px;
  text-align: center; font-size: 16px; font-weight: 700;
  background: var(--card); color: var(--ink);
}
.t-ficha-envio {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.55;
  border-top: 1px solid var(--border); padding-top: 13px; margin-top: 4px;
}
.t-agregado {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--green-light); color: var(--green);
  border-radius: 11px; padding: 12px 15px;
  font-size: 13.5px; font-weight: 600; margin: 14px 0;
  animation: tSlideDown .3s ease both;
}
@keyframes tSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.t-carrito-n { animation: tPop .3s ease; }
@keyframes tPop {
  0% { transform: scale(.4); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ---- carrito ---- */
.t-checkout-cols { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 880px) { .t-checkout-cols { grid-template-columns: 1fr; } }
.t-linea {
  display: flex; gap: 13px; background: var(--card);
  border: 1px solid var(--border); border-radius: 13px; padding: 13px; margin-bottom: 11px;
}
.t-linea-foto {
  position: relative; width: 78px; height: 78px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.t-linea-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.t-linea-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t-linea-nombre { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.t-linea-sku { font-size: 11.5px; color: var(--ink-soft); }
.t-linea-acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.t-qty { display: flex; align-items: center; gap: 9px; }
.t-qty span { font-size: 13.5px; font-weight: 700; min-width: 16px; text-align: center; }
.t-linea-precio { font-size: 15px; font-weight: 800; white-space: nowrap; }
.t-quitar { border: none; background: none; padding: 0; color: var(--ink-soft); font-size: 11.5px; text-decoration: underline; }

.t-resumen {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 17px; position: sticky; top: 82px;
}
.t-resumen-tit { font-weight: 700; font-size: 14.5px; margin-bottom: 12px; }
.t-resumen-fila { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; }
.t-resumen-suave { color: var(--ink-soft); font-size: 12.5px; }
.t-resumen-total {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 17px; font-weight: 800;
  border-top: 1px solid var(--border); margin-top: 9px; padding-top: 12px;
}
.t-resumen-nota { font-size: 12px; color: var(--ink-soft); line-height: 1.5; margin-top: 12px; text-align: center; }

/* ---- sugerencias de accesorios en el carrito ---- */
.t-upsell { margin-top: 28px; }
.t-upsell-tit { font-weight: 700; font-size: 14.5px; margin-bottom: 12px; }
.t-upsell-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.t-upsell-card {
  flex: 0 0 140px; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.t-upsell-foto {
  aspect-ratio: 1/1; background: var(--surface); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.t-upsell-foto img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.t-upsell-nombre { font-size: 11.5px; font-weight: 600; line-height: 1.3; min-height: 29px; }
.t-upsell-precio { font-size: 13px; font-weight: 800; }
.t-upsell-btn {
  width: 100%; border: none; background: var(--bg-dark); color: #fff;
  border-radius: 8px; padding: 7px; font-weight: 700; font-size: 12px;
  cursor: pointer; font-family: inherit;
}
.t-upsell-btn:hover { opacity: .88; }

/* ---- paginas de contenido (envios/devoluciones, garantia) ---- */
.t-pagina { max-width: 720px; margin: 0 auto; padding-bottom: 20px; }
.t-pagina h1 { font-size: 26px; margin: 6px 0 22px; }
.t-pagina h2 { font-size: 17px; margin: 26px 0 8px; color: var(--bg-dark); }
.t-pagina p, .t-pagina li { font-size: 14px; line-height: 1.7; color: var(--ink); }
.t-pagina ul, .t-pagina ol { padding-left: 20px; margin: 8px 0; }
.t-pagina-nota {
  margin-top: 26px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; font-size: 12.5px;
  color: var(--ink-soft); line-height: 1.6;
}

/* ---- pie ---- */
.t-footer { background: var(--bg-dark); color: var(--on-dark-soft); padding: 32px 0; font-size: 13px; line-height: 1.6; position: relative; }
.t-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red) 35%, #E4444C 50%, var(--red) 65%, transparent);
  opacity: .75;
}
.t-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; }
.t-footer-tit { color: #fff; font-weight: 700; margin-bottom: 6px; letter-spacing: .1px; }
.t-footer a { color: #fff; text-decoration: underline; }

/* ---- tienda todavia cerrada ---- */
.t-cerrada {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 30px; color: #fff; gap: 8px;
}
.t-cerrada h1 { font-size: 25px; margin-top: 16px; }
.t-cerrada p { color: var(--on-dark-soft); font-size: 15px; max-width: 430px; line-height: 1.6; margin: 0; }
.t-cerrada-taller { margin-top: 18px !important; font-size: 13.5px !important; }
.t-cerrada a { color: #fff; text-decoration: underline; }

/* ---- checkout ---- */
.t-form-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 17px 19px; margin-bottom: 14px; }
.t-form-tit { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; margin-bottom: 14px; }
.t-form-tit svg { color: var(--blue); flex-shrink: 0; }
.t-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 620px) { .t-form-grid { grid-template-columns: 1fr; } }
.t-campo { display: flex; flex-direction: column; gap: 5px; }
.t-campo-ancho { grid-column: 1 / -1; }
.t-campo > span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.t-campo input, .t-campo select {
  height: 44px; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0 13px; font-size: 14px; background: var(--card);
  color: var(--ink); outline: none; width: 100%;
}
.t-campo input:focus, .t-campo select:focus { border-color: var(--blue); }
.t-aviso-envio { background: var(--amber-light); border-radius: 10px; padding: 13px 15px; font-size: 13px; line-height: 1.55; }
.t-resumen-item { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; line-height: 1.4; }

/* ---- gracias ---- */
.t-gracias { max-width: 560px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 13px; padding: 20px 0 40px; }
.t-gracias-tick {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.t-gracias h1 { font-size: 26px; margin: 4px 0 0; }
.t-gracias > p { font-size: 15px; color: var(--ink-soft); margin: 0; line-height: 1.6; }
.t-gracias-caja { width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; text-align: left; }
.t-gracias-tit { font-weight: 700; font-size: 13.5px; margin-bottom: 9px; }
.t-gracias-pasos { margin: 0; padding-left: 19px; font-size: 13.5px; line-height: 1.75; }

/* ---- opciones de envio en el checkout ---- */
.t-envio-opts { display: flex; flex-direction: column; gap: 9px; }
.t-envio-op {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 13px 15px;
}
.t-envio-op:hover { border-color: var(--ink-soft); }
.t-envio-op.es-elegida { border-color: var(--blue); background: var(--blue-light); }
.t-envio-op input[type=radio] { width: 19px; height: 19px; flex-shrink: 0; accent-color: var(--blue); }
.t-envio-txt { flex: 1; min-width: 0; }
.t-envio-tit { font-size: 13.5px; font-weight: 700; }
.t-envio-det { font-size: 12px; color: var(--ink-soft); line-height: 1.45; margin-top: 2px; }
.t-envio-demora { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }
.t-envio-precio { font-size: 15px; font-weight: 800; white-space: nowrap; }
.t-resumen-peso { font-size: 11.5px; color: var(--ink-soft); margin-top: 9px; line-height: 1.45; }

/* ---- aviso cuando Hernan mira su propia tienda estando cerrada ---- */
.t-vista-previa {
  background: var(--amber-light); color: var(--amber);
  text-align: center; font-size: 12.5px; font-weight: 600;
  padding: 9px 16px; line-height: 1.5;
}
.t-vista-previa a { color: var(--amber); text-decoration: underline; }
