/* ============================================================================
   TIENDA LIBERTANK — estilos compartidos de tienda, producto, pago y gracias.
   Misma paleta de styles.css. La tienda es oscura a propósito: el producto es
   negro y el tono es de drop, no de catálogo.
   ============================================================================ */

:root {
  --t-fondo: #0D0D0D;
  --t-panel: #161616;
  --t-linea: rgba(255,255,255,.12);
  --t-texto: rgba(255,255,255,.86);
  --t-suave: rgba(255,255,255,.62);
  --t-fosforo: #B5281E;     /* rojo de la caja de fósforos (solo en el motivo) */
  --t-crema:   #F2E4C4;     /* crema de la caja de fósforos (solo en el motivo) */
}

.tienda { background: var(--t-fondo); color: var(--t-texto); }
.tienda h1, .tienda h2, .tienda h3 { color: var(--blanco); }
.tienda a { color: var(--amarillo); }
.tienda .contenedor { max-width: 1140px; }

/* ---------- Cabecera de la tienda ---------- */
.t-hero { padding: 56px 0 28px; }
.t-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-titulo); font-weight: 600; font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amarillo);
}
.t-kicker::before { content: ''; width: 28px; height: 2px; background: var(--amarillo); }
.t-hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.02; margin: 0; letter-spacing: -.02em; }
.t-hero p { max-width: 560px; color: var(--t-suave); font-size: 1.08rem; }

/* ---------- Avisos ---------- */
.t-aviso {
  border-radius: 12px; padding: 14px 18px; font-size: .95rem; line-height: 1.6; margin: 0 0 22px;
  background: rgba(228,174,0,.1); border: 1px solid rgba(228,174,0,.35); color: var(--t-texto);
}
.t-aviso b { color: var(--amarillo); font-family: var(--font-titulo); }
.t-aviso--error { background: rgba(192,38,27,.14); border-color: rgba(192,38,27,.5); }
.t-aviso--error b { color: #FF6B5E; }
.t-aviso:empty { display: none; }

/* ---------- Catálogo ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; padding-bottom: 96px; }
.t-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--t-panel); border: 1px solid var(--t-linea); border-radius: 18px; overflow: hidden;
  transition: transform .18s, border-color .18s;
}
.t-card:hover { transform: translateY(-3px); border-color: rgba(228,174,0,.5); }
.t-card__img { aspect-ratio: 1; background: #1E1E1E; display: grid; place-items: center; overflow: hidden; position: relative; }
.t-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-card__cuerpo { padding: 20px 22px 24px; }
.t-card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.t-card p { color: var(--t-suave); font-size: .95rem; margin: 0 0 16px; }
.t-precio { font-family: var(--font-titulo); font-weight: 800; font-size: 1.4rem; color: var(--blanco); }
.t-precio s { color: var(--t-suave); font-weight: 500; font-size: .95rem; margin-right: 8px; }
.t-precio small { display: block; font-weight: 400; font-size: .78rem; color: var(--t-suave); margin-top: 2px; }

.t-sello {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-titulo); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--amarillo); color: var(--negro); padding: 6px 12px; border-radius: 20px;
}
.t-sello--agotado { background: rgba(255,255,255,.14); color: var(--blanco); }
.t-sello--especial { background: var(--azul); color: var(--blanco); }

/* ---------- Producto ---------- */
.t-producto { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 40px 0 72px; align-items: start; }
@media (max-width: 900px) { .t-producto { grid-template-columns: 1fr; gap: 32px; padding-top: 20px; } }
@media (max-width: 560px) {
  .t-galeria__miniaturas button { width: 62px; height: 62px; }
  .t-nota-envio { padding: 16px; }
  .t-tabla th, .t-tabla td { padding: 10px 8px; }
  .t-compartir a, .t-compartir button { padding: 8px 13px; }
  .t-acciones .boton, .t-acciones .t-btn-fantasma { flex-basis: 100%; }
}

.t-galeria__principal {
  aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #1E1E1E;
  border: 1px solid var(--t-linea); position: relative; display: grid; place-items: center;
}
.t-galeria__principal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-galeria__miniaturas { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.t-galeria__miniaturas button { flex: 0 0 auto; }
/* Sin esto, las miniaturas o los botones empujan la columna y la página se corta en celular */
.t-producto > *, .t-pago > *, .t-dos > * { min-width: 0; }
.t-galeria__miniaturas button {
  width: 76px; height: 76px; border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer;
  background: #1E1E1E; border: 2px solid var(--t-linea);
}
.t-galeria__miniaturas button.activa { border-color: var(--amarillo); }
.t-galeria__miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* El motivo de la caja de fósforos, cuando aún no hay fotos */
.t-fosforo {
  width: 62%; aspect-ratio: 3/4; border-radius: 10px; position: relative;
  background: var(--t-fosforo); color: var(--t-crema); display: grid; place-items: center; text-align: center;
  box-shadow: inset 0 0 0 10px var(--t-crema), inset 0 0 0 13px var(--t-fosforo), 0 20px 50px rgba(0,0,0,.5);
  font-family: var(--font-titulo); font-weight: 800; letter-spacing: .08em; padding: 28px;
}
.t-fosforo i { font-style: normal; display: block; font-size: 2.6rem; color: var(--amarillo); margin-bottom: 10px; }
.t-fosforo small { display: block; font-weight: 500; letter-spacing: .04em; font-size: .7rem; margin-top: 12px; opacity: .85; }

.t-detalle h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); line-height: 1.08; margin: 8px 0 10px; letter-spacing: -.02em; }
.t-detalle .t-titular { font-family: var(--font-titulo); font-weight: 600; font-size: 1.2rem; color: var(--amarillo); margin: 0 0 16px; }
.t-detalle .t-desc { color: var(--t-suave); line-height: 1.7; margin: 0 0 22px; }
.t-detalle .t-precio { font-size: 2rem; margin-bottom: 4px; }
.t-detalle .t-iva { color: var(--t-suave); font-size: .85rem; margin: 0 0 24px; }

.t-tallas { margin: 0 0 20px; }
.t-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-titulo); font-weight: 600; font-size: .9rem; margin-bottom: 10px;
}
.t-label a { font-weight: 500; font-size: .85rem; }
.t-tallas__lista { display: flex; gap: 10px; flex-wrap: wrap; }
.t-talla {
  min-width: 58px; padding: 12px 16px; border-radius: 12px; cursor: pointer;
  font-family: var(--font-titulo); font-weight: 600; font-size: 1rem; text-align: center;
  background: transparent; color: var(--blanco); border: 2px solid var(--t-linea);
  transition: border-color .12s, background .12s;
}
.t-talla:hover:not(:disabled) { border-color: rgba(255,255,255,.4); }
.t-talla.sel { border-color: var(--amarillo); background: rgba(228,174,0,.12); }
.t-talla:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.t-talla small { display: block; font-weight: 500; font-size: .68rem; color: var(--amarillo); margin-top: 2px; letter-spacing: .04em; }
.t-talla:disabled small { color: var(--t-suave); text-decoration: none; }

.t-cantidad { display: inline-flex; align-items: center; border: 2px solid var(--t-linea); border-radius: 12px; overflow: hidden; }
.t-cantidad button {
  width: 44px; height: 44px; background: transparent; color: var(--blanco); border: 0;
  font-size: 1.3rem; cursor: pointer;
}
.t-cantidad button:disabled { opacity: .3; cursor: not-allowed; }
.t-cantidad span { min-width: 44px; text-align: center; font-family: var(--font-titulo); font-weight: 600; }

.t-acciones { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }
.t-acciones .boton, .t-acciones .t-btn-fantasma { flex: 1 1 160px; text-align: center; }
.t-btn-fantasma {
  background: transparent; color: var(--blanco); border: 2px solid rgba(255,255,255,.3);
  font-family: var(--font-titulo); font-weight: 600; font-size: 1rem; padding: 14px 30px; border-radius: 30px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.t-btn-fantasma:hover { border-color: var(--blanco); background: rgba(255,255,255,.06); }
.t-btn-fantasma:disabled, .tienda .boton:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.t-nota-envio {
  display: grid; gap: 10px; margin: 22px 0 0; padding: 18px 20px;
  background: var(--t-panel); border: 1px solid var(--t-linea); border-radius: 14px; font-size: .92rem; color: var(--t-suave);
}
.t-nota-envio > div { display: flex; gap: 10px; align-items: flex-start; }
.t-nota-envio b { color: var(--blanco); font-weight: 500; }

.t-lista { list-style: none; padding: 0; margin: 0; }
.t-lista li { padding: 10px 0 10px 24px; border-bottom: 1px solid var(--t-linea); position: relative; color: var(--t-suave); font-size: .95rem; }
.t-lista li::before { content: ''; position: absolute; left: 0; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--amarillo); }
.t-lista li:last-child { border-bottom: 0; }

.t-seccion { padding: 0 0 72px; }
.t-seccion h2 { font-size: 1.45rem; margin: 0 0 14px; }
.t-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .t-dos { grid-template-columns: 1fr; gap: 28px; } }

.t-tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.t-tabla th, .t-tabla td { padding: 11px 12px; border-bottom: 1px solid var(--t-linea); text-align: left; }
.t-tabla th { font-family: var(--font-titulo); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--t-suave); }
.t-tabla td:first-child { font-family: var(--font-titulo); font-weight: 700; color: var(--blanco); }
.t-tabla .pendiente { color: var(--t-suave); font-style: italic; }

.t-compartir { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.t-compartir span { font-size: .85rem; color: var(--t-suave); margin-right: 4px; }
.t-compartir a, .t-compartir button {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font-family: var(--font-titulo); font-weight: 600; font-size: .85rem;
  color: var(--blanco); background: var(--t-panel); border: 1px solid var(--t-linea); border-radius: 24px; padding: 9px 16px;
}
.t-compartir a:hover, .t-compartir button:hover { border-color: rgba(255,255,255,.4); }
.t-compartir svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Carrito (cajón) ---------- */
.t-carrito-boton {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: none; align-items: center; gap: 10px;
  background: var(--amarillo); color: var(--negro); border: 0; border-radius: 30px; padding: 14px 20px;
  font-family: var(--font-titulo); font-weight: 700; font-size: .95rem; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.t-carrito-boton.visible { display: inline-flex; }
.t-carrito-boton i { font-style: normal; background: var(--negro); color: var(--amarillo); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem; }

.t-cajon { position: fixed; inset: 0; z-index: 60; display: none; }
.t-cajon.abierto { display: block; }
.t-cajon__fondo { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.t-cajon__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--t-panel); border-left: 1px solid var(--t-linea);
  display: flex; flex-direction: column; padding: 24px;
}
.t-cajon__cabeza { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.t-cajon__cabeza h2 { font-size: 1.2rem; margin: 0; }
.t-cajon__cerrar { background: transparent; border: 0; color: var(--blanco); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.t-cajon__lista { flex: 1; overflow-y: auto; }
.t-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--t-linea); }
.t-item b { display: block; font-family: var(--font-titulo); font-weight: 600; color: var(--blanco); }
.t-item span { color: var(--t-suave); font-size: .88rem; }
.t-item .t-cantidad { transform: scale(.85); transform-origin: right top; }
.t-item__precio { text-align: right; font-family: var(--font-titulo); font-weight: 600; }
.t-item__quitar { background: transparent; border: 0; color: var(--t-suave); font-size: .8rem; cursor: pointer; text-decoration: underline; padding: 0; }
.t-cajon__pie { border-top: 1px solid var(--t-linea); padding-top: 16px; }
.t-totales { display: grid; gap: 6px; font-size: .95rem; margin-bottom: 16px; }
.t-totales div { display: flex; justify-content: space-between; color: var(--t-suave); }
.t-totales div.total { color: var(--blanco); font-family: var(--font-titulo); font-weight: 700; font-size: 1.15rem; padding-top: 8px; border-top: 1px solid var(--t-linea); margin-top: 4px; }
.t-totales .gratis { color: var(--amarillo); font-weight: 600; }

/* ---------- Checkout ---------- */
.t-pago { display: grid; grid-template-columns: 1.2fr .9fr; gap: 40px; padding: 32px 0 96px; align-items: start; }
@media (max-width: 900px) { .t-pago { grid-template-columns: 1fr; gap: 0; } .t-resumen { position: static; } }
.t-form-caja { background: var(--t-panel); border: 1px solid var(--t-linea); border-radius: 18px; padding: 28px; margin-bottom: 20px; }
.t-form-caja h2 { font-size: 1.15rem; margin: 0 0 18px; }
.t-campo { display: block; margin-bottom: 16px; }
.t-campo > span { display: block; font-family: var(--font-titulo); font-weight: 600; font-size: .85rem; margin-bottom: 7px; }
.t-campo input, .t-campo select, .t-campo textarea {
  width: 100%; font: 400 16px/1.4 var(--font-texto); color: var(--blanco);
  padding: 13px 14px; border-radius: 10px; background: #0D0D0D; border: 2px solid var(--t-linea);
}
.t-campo input:focus, .t-campo select:focus, .t-campo textarea:focus { outline: 2px solid var(--amarillo); outline-offset: 0; border-color: var(--amarillo); }
.t-campo input[aria-invalid="true"] { border-color: #FF6B5E; }
.t-campo .pista { font-size: .8rem; color: var(--t-suave); margin-top: 5px; }
.t-dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .t-dos-campos { grid-template-columns: 1fr; } }

.t-opciones { display: grid; gap: 10px; }
.t-opcion {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; cursor: pointer;
  border: 2px solid var(--t-linea); border-radius: 14px; background: #0D0D0D; transition: border-color .12s;
}
.t-opcion:hover { border-color: rgba(255,255,255,.35); }
.t-opcion.sel { border-color: var(--amarillo); background: rgba(228,174,0,.07); }
.t-opcion input { margin-top: 3px; accent-color: var(--amarillo); width: 20px; height: 20px; flex: 0 0 20px; }
.t-opcion b { display: block; font-family: var(--font-titulo); font-weight: 600; }
.t-opcion span { font-size: .88rem; color: var(--t-suave); }
.t-opcion .t-opcion__precio { margin-left: auto; font-family: var(--font-titulo); font-weight: 700; white-space: nowrap; color: var(--blanco); }

.t-check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; line-height: 1.55; }
.t-check input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: var(--amarillo); }

.t-resumen { position: sticky; top: 90px; }
.t-resumen .t-form-caja { padding: 24px; }
.t-pagar { width: 100%; margin-top: 8px; text-align: center; }
.t-wompi { display: flex; justify-content: center; gap: 14px; align-items: center; margin-top: 14px; font-size: .8rem; color: var(--t-suave); }
.t-wompi b { color: var(--t-texto); font-weight: 500; }

/* ---------- Gracias ---------- */
.t-gracias { max-width: 640px; margin: 0 auto; padding: 64px 24px 96px; text-align: center; }
.t-gracias .t-form-caja { text-align: left; }
.t-estado {
  display: inline-block; font-family: var(--font-titulo); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 20px; margin-bottom: 18px;
}
.t-estado--ok { background: rgba(0,57,199,.25); color: #9DB7FF; }
.t-estado--pend { background: rgba(228,174,0,.18); color: var(--amarillo); }
.t-estado--mal { background: rgba(192,38,27,.2); color: #FF6B5E; }
.t-gracias h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 12px; }
.t-gracias p { color: var(--t-suave); }

.t-cargando { display: flex; gap: 14px; align-items: center; justify-content: center; color: var(--t-suave); padding: 40px 0; }
.t-giro { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--t-linea); border-top-color: var(--amarillo); animation: t-girar .8s linear infinite; }
@keyframes t-girar { to { transform: rotate(360deg); } }

.t-migas { font-size: .88rem; color: var(--t-suave); padding: 20px 0 0; }
.t-migas a { color: var(--t-suave); text-decoration: none; }
.t-migas a:hover { color: var(--amarillo); }

/* ---------- Ajustes finales (van al final para ganar sobre las reglas de arriba) ---------- */
.t-campo .pista { font-family: var(--font-texto); font-weight: 400; margin-bottom: 0; }
.t-wompi { flex-wrap: wrap; text-align: center; gap: 4px 14px; }
@media (max-width: 560px) {
  .t-acciones .boton, .t-acciones .t-btn-fantasma { flex: 1 1 100%; }
  .t-form-caja { padding: 22px 18px; }
}
