/* =========================================================
   Testimonios (16-nov-2026) — inicio (banda oscura + carrusel)
   y ficha de producto (resumen + lista). Ver includes/testimonios.php
   ========================================================= */

/* ---------- Estrellas (relleno parcial con --r) ---------- */
.ts-estrellas { display: inline-flex; gap: 2px; font-size: 16px; line-height: 1; vertical-align: middle; --ts-llena: var(--dorado-claro, #e6c75a); --ts-vacia: rgba(255, 255, 255, 0.22); }
.ts-estrella {
  width: 1em; height: 1em; display: block;
  background: linear-gradient(90deg, var(--ts-llena) var(--r), var(--ts-vacia) var(--r));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ts-estrellas--grande { font-size: 22px; gap: 3px; }

/* ---------- Nota grande ---------- */
.ts-nota { display: flex; align-items: center; gap: 14px; }
.ts-nota__valor { font-family: var(--fuente-display); font-weight: 400; font-size: 64px; line-height: 0.9; color: var(--blanco); }
.ts-nota__n { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: rgba(250, 250, 250, 0.7); }
.ts-nota--claro .ts-nota__valor { color: var(--negro); }
.ts-nota--claro .ts-nota__n { color: var(--gris-texto); }
.ts-nota--claro .ts-estrellas, .ts-ficha .ts-estrellas, .ts-mini .ts-estrellas { --ts-llena: var(--dorado, #c9a227); --ts-vacia: #dcd8cc; }

/* ---------- Tarjeta ---------- */
.ts-card {
  display: flex; flex-direction: column;
  background: var(--carbon, #1c1c1c);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  overflow: hidden;
  color: var(--blanco);
  transition: opacity .35s ease, transform .35s ease, border-color .25s ease;
}
.ts-card:hover { border-color: rgba(201, 162, 39, 0.45); }
.ts-card__foto { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #0f0f0f; }
.ts-card__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.ts-card__zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: default; }
.ts-card__zoom:focus-visible { outline: 2px solid var(--dorado, #c9a227); outline-offset: -2px; }
.ts-card:hover .ts-card__foto img { transform: scale(1.04); }
.ts-card__cuerpo { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.ts-card__texto { margin: 0; }
.ts-card__texto p { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
.ts-card__pie { margin-top: auto; padding-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.ts-card__nombre { font-weight: 800; font-size: 15px; }
.ts-card__compra { font-size: 13px; color: rgba(250, 250, 250, 0.6); }
a.ts-card__compra:hover { color: var(--dorado-claro, #e6c75a); text-decoration: underline; }
/* Sin foto: comilla grande y texto más protagonista */
.ts-card:not(.ts-card--foto) .ts-card__cuerpo { padding-top: 22px; }
.ts-card:not(.ts-card--foto) .ts-card__cuerpo::before {
  content: "\201C"; font-family: Georgia, serif; font-size: 72px; line-height: 0.6; color: var(--rojo); height: 28px;
}
.ts-card:not(.ts-card--foto) .ts-card__texto p { font-size: 18px; }

/* ---------- Inicio ---------- */
.ts-home { overflow: hidden; }
.ts-home__cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 26px; }
.ts-home__titulo { margin-bottom: 0; }
.ts-home__titulo h2 em { font-style: normal; color: var(--rojo); }
.ts-home .ts-nota { padding: 14px 20px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; background: rgba(255, 255, 255, 0.03); }

.ts-barra { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ts-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ts-tabs::-webkit-scrollbar { display: none; }
.ts-tab {
  flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: transparent; color: var(--blanco);
  font: 700 14px/1 var(--fuente-cuerpo); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.ts-tab:hover { border-color: var(--blanco); }
.ts-tab.activo { background: var(--rojo); border-color: var(--rojo); }
.ts-flechas { display: flex; gap: 8px; flex: none; }
.ts-flecha {
  width: 44px; height: 44px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent; color: var(--blanco); font-size: 16px; cursor: pointer; transition: background .2s ease, opacity .2s ease;
}
.ts-flecha:hover:not(:disabled) { background: var(--blanco); color: var(--negro); }
.ts-flecha:disabled { opacity: 0.3; cursor: default; }

.ts-carrusel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 290px; gap: 18px; align-items: start;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; overscroll-behavior-x: contain;
  padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.ts-carrusel:focus-visible { outline: 2px solid var(--dorado-claro, #e6c75a); outline-offset: 4px; }
.ts-carrusel .ts-card { scroll-snap-align: start; }
.ts-carrusel .ts-card__foto { aspect-ratio: 1 / 1; }
.ts-carrusel .ts-card__texto p { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.ts-carrusel .ts-card[hidden] { display: none; }
.ts-card.ts-entra { animation: tsEntra .4s ease both; }
@keyframes tsEntra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .ts-carrusel { grid-auto-columns: min(78vw, 300px); gap: 14px; }
  .ts-carrusel .ts-card__foto { aspect-ratio: 4 / 3; }
  .ts-flechas { display: none !important; }
  .ts-nota__valor { font-size: 46px; }
  .ts-home__cabecera { gap: 16px; margin-bottom: 18px; }
  .ts-home .ts-nota { width: 100%; padding: 10px 16px; }
}

/* ---------- Ficha ---------- */
.ts-ficha { border-top: 1px solid var(--gris-borde); scroll-margin-top: 80px; }
.ts-ficha__grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.ts-resumen { position: sticky; top: 96px; }
.ts-resumen h2 { font-size: clamp(26px, 3vw, 36px); margin: 6px 0 18px; }
.ts-resumen .ts-nota { margin-bottom: 18px; }
.ts-dist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.ts-dist li { display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--gris-texto); }
.ts-dist__barra { height: 8px; border-radius: 99px; background: #ebe8de; overflow: hidden; }
.ts-dist__barra span { display: block; height: 100%; background: var(--dorado, #c9a227); border-radius: 99px; }
.ts-dist__n { text-align: right; font-weight: 600; }
.ts-resumen__fuente { font-size: 14px; color: var(--gris-texto); margin: 0; }

.ts-lista { columns: 2; column-gap: 18px; }
.ts-lista .ts-card {
  break-inside: avoid; margin-bottom: 18px;
  display: grid; grid-template-columns: 1fr;
  background: #fff; color: var(--negro); border-color: var(--gris-borde);
}
.ts-lista .ts-card--foto { grid-template-columns: 116px 1fr; }
.ts-lista .ts-card__foto { aspect-ratio: auto; height: 100%; min-height: 150px; position: relative; }
.ts-lista .ts-card__zoom { position: absolute; inset: 0; cursor: zoom-in; } /* la foto no aporta alto: sin CLS al cargar */
.ts-lista .ts-card__compra { color: var(--gris-texto); }
.ts-lista .ts-card__texto p { font-size: 16px; }
.ts-lista .ts-card:not(.ts-card--foto) .ts-card__cuerpo::before { font-size: 56px; height: 20px; }
.ts-lista .ts-card[hidden] { display: none; }
.ts-mas { text-align: center; margin: 10px 0 0; }
.ts-lista__sep { column-span: all; margin: 6px 0 16px; padding-top: 14px; border-top: 1px dashed var(--gris-borde); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris-texto); }

/* Foto ampliada */
.ts-zoom { border: 0; padding: 0; background: transparent; width: min(92vw, 560px); max-width: none; max-height: 92dvh; overflow: visible; }
.ts-zoom::backdrop { background: rgba(0, 0, 0, 0.82); }
.ts-zoom img { width: 100%; height: auto; max-height: 88dvh; object-fit: contain; border-radius: 6px; }
.ts-zoom__x {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 22px; cursor: pointer;
}

@media (max-width: 960px) {
  .ts-ficha__grid { grid-template-columns: 1fr; gap: 24px; }
  .ts-resumen { position: static; }
}
@media (max-width: 640px) {
  .ts-lista { columns: 1; }
  .ts-lista .ts-card--foto { grid-template-columns: 104px 1fr; }
}

/* Nota compacta bajo el nombre del producto (no agrega alto: va en la línea del formato) */
.ts-mini { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; white-space: nowrap; color: var(--negro); font-weight: 700; font-size: 15px; vertical-align: middle; }
.ts-mini .ts-estrellas { font-size: 15px; }
.ts-mini__n { color: var(--gris-texto); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; transition: text-decoration-color .2s ease; }
.ts-mini:hover .ts-mini__n { text-decoration-color: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .ts-card, .ts-card__foto img { transition: none; }
  .ts-card.ts-entra { animation: none; }
}
