/* ==========================================================================
   PEPTIK — Componentes
   ========================================================================== */

/* --- Barra de anuncios --------------------------------------------------- */

.ticker {
  background: var(--sky);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  overflow: hidden;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.ticker__track {
  display: flex;
  gap: var(--sp-7);
  width: max-content;
  padding-block: 0.65rem;
  animation: ticker 38s linear infinite;
}

.ticker:hover .ticker__track { animation-play-state: paused; }

.ticker__item {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
  white-space: nowrap;
}

.ticker__item::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* --- Header -------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 74px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-1);
  font-weight: var(--w-strong);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.logo__mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.nav {
  display: flex;
  gap: var(--sp-5);
}

.nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-0);
  padding-block: 0.35rem;
}

/* Subrayado que crece desde el centro: detalle chico, se siente caro. */
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--ink);
  transition: width var(--dur) var(--ease), left var(--dur) var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: 100%;
  left: 0;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}

.icon-btn:hover { background: var(--surface-1); }

.cart-btn { position: relative; }

.cart-btn__count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 0.68rem;
  font-weight: var(--w-strong);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}

.cart-btn__count[data-has] { transform: scale(1); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 74px 0 auto;
    flex-direction: column;
    gap: 0;
    padding: var(--sp-4) 1.25rem var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform var(--dur) var(--ease);
  }
  .nav[data-open] { transform: none; }
  .nav a { padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: grid; }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: var(--sp-7);
  min-height: min(78vh, 720px);
  background: linear-gradient(160deg, var(--surface-1) 0%, var(--surface-violet) 100%);
  overflow: clip;
}

.hero__copy {
  padding: var(--sp-8) clamp(1.25rem, 5vw, 5rem);
  max-width: 44rem;
  margin-left: auto;
}

.hero h1 {
  font-size: var(--step-5);
  margin-bottom: var(--sp-4);
}

/* La palabra clave en oro: un solo acento por pantalla, y pesa. */
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero__media {
  position: relative;
  height: 100%;
  min-height: 380px;
}

/* contain, no cover: son packshots con texto impreso — recortarlos corta la etiqueta */
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(1rem, 3vw, 2.5rem);
}

/* Cifras del hero: 99% PURITY / 24/7 SUPPORT */
.hero__stats {
  display: flex;
  gap: var(--sp-6);
  margin-bottom: var(--sp-5);
}

.hero__stats div {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hero__stats span {
  font-size: var(--step-2);
  font-weight: var(--w-strong);
  color: var(--ink);
}

.hero__stats small {
  margin-top: 0.35rem;
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  color: var(--muted-soft);
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.hero__proof li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--ink-70);
}

.hero__proof svg { color: var(--gold); flex: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__copy { padding-block: var(--sp-7) var(--sp-6); margin-inline: 0; }
  .hero__media { min-height: 320px; }
}

/* --- Rejilla de formatos ------------------------------------------------- */

.formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4);
}

.format-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.format-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.format-card img {
  width: 76px;
  flex: none;
  object-fit: contain;
}

.format-card h3 { font-size: var(--step-1); margin-bottom: 0.15rem; }

/* --- Filtros ------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  padding: 0.55em 1.15em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--step--1);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.chip:hover { background: var(--surface-1); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* --- Tarjeta de producto ------------------------------------------------- */

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 26vw, 300px), 1fr));
  gap: var(--sp-5) var(--sp-4);
}

.pcard {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.pcard__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  overflow: hidden;
  margin-bottom: var(--sp-3);
}

.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
  transition: transform 0.6s var(--ease);
}

.pcard:hover .pcard__media img { transform: scale(1.06); }

.pcard__flags {
  position: absolute;
  inset: var(--sp-3) var(--sp-3) auto;
  display: flex;
  gap: var(--sp-2);
  pointer-events: none;
}

.pcard__fmt {
  font-size: var(--step--1);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 0.2rem;
}

.pcard__title {
  font-size: var(--step-1);
  font-weight: var(--w-body);
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.pcard__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-2);
}

.price {
  font-size: var(--step-1);
  font-weight: var(--w-strong);
  color: var(--ink);
}

.price__was {
  margin-left: 0.5rem;
  font-size: var(--step--1);
  font-weight: var(--w-body);
  color: var(--muted-soft);
  text-decoration: line-through;
}

/* --- Ficha de producto --------------------------------------------------- */

.pdp {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.gallery__main {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  overflow: hidden;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
}

.gallery__thumbs {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.gallery__thumb {
  width: 74px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-1);
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}

.gallery__thumb[aria-current="true"] { border-color: var(--ink); }

.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

.pdp__buy {
  position: sticky;
  top: 100px;
}

.pdp h1 {
  font-size: var(--step-3);
  margin-bottom: var(--sp-2);
}

.pdp__price {
  font-size: var(--step-2);
  font-weight: var(--w-strong);
  color: var(--ink);
  margin-block: var(--sp-4) var(--sp-5);
}

.variants {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.variant {
  padding: 0.7em 1.2em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--step--1);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.variant[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.variant[disabled] {
  opacity: 0.4;
  text-decoration: line-through;
  cursor: not-allowed;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.qty button {
  width: 44px;
  height: 48px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--step-1);
  cursor: pointer;
}

.qty button:hover { background: var(--surface-1); }

.qty input {
  width: 48px;
  height: 48px;
  border: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: none;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.buy-row {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* Ficha tecnica: la tabla de datos ES la estetica de una marca de investigacion */
.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: var(--sp-6);
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.spec__row:last-child { border-bottom: 0; }
.spec__row:nth-child(odd) { background: var(--surface-1); }

.spec__k {
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--muted-soft);
}

.spec__v { color: var(--ink); }

@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__buy { position: static; }
}

/* --- Reviews ------------------------------------------------------------- */

/* Masonry por columnas CSS: las resenas con foto tienen alturas dispares y
   un grid rigido dejaria huecos. `columns` las acomoda sin JS. */
.reviews-masonry {
  columns: 3 clamp(260px, 26vw, 330px);
  column-gap: var(--sp-4);
}

@media (max-width: 720px) {
  .reviews-masonry { columns: 1; }
}

.review {
  break-inside: avoid;
  margin: 0 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.review__photo {
  background: var(--surface-1);
  line-height: 0;
}

.review__photo img {
  width: 100%;
  height: auto;
}

.review__body { padding: var(--sp-5); }

.review__stars {
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: var(--step-0);
  line-height: 1;
}

/* Las estrellas no ganadas se apagan en vez de desaparecer: se lee la nota de un vistazo */
.review__stars span { color: var(--line-strong); }

.review blockquote {
  margin: var(--sp-3) 0;
  padding: 0;
  color: var(--ink-70);
  line-height: 1.6;
  font-size: var(--step-0);
}

.review figcaption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--step--1);
  color: var(--ink);
}

.review__author { font-weight: var(--w-strong); }

.review__verified {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: var(--gold);
  font-weight: var(--w-strong);
  letter-spacing: 0.04em;
}

.review__product {
  margin: var(--sp-2) 0 0;
  font-size: var(--step--1);
  color: var(--muted-soft);
  line-height: 1.4;
}

.review__summary {
  margin: var(--sp-2) 0 0;
  font-size: var(--step-0);
  color: var(--gold);
  font-weight: var(--w-strong);
}

/* Estado vacio honesto: mejor decir que faltan los datos reales que
   rellenar con testimonios inventados. */
.review-empty {
  padding: var(--sp-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-violet);
}

.review-empty code {
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
  background: rgb(16 0 62 / 0.07);
  font-size: 0.9em;
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  background: var(--ink-deep);
  color: color-mix(in srgb, white 68%, var(--ink));
  padding-block: var(--sp-8) var(--sp-6);
}

.footer a {
  color: color-mix(in srgb, white 80%, var(--ink));
  text-decoration: none;
}

.footer a:hover { color: #fff; text-decoration: underline; }

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}

.footer h4 {
  color: #fff;
  font-size: var(--step--1);
  font-weight: var(--w-strong);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: var(--sp-2); }

.footer .logo { color: #fff; }

.footer__legal {
  margin-top: var(--sp-5);
  font-size: var(--step--1);
  color: color-mix(in srgb, white 45%, var(--ink));
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
}

/* Aviso RUO: legalmente necesario y visualmente distinto del resto. */
.ruo-note {
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-left: 2px solid var(--gold);
  background: rgb(255 255 255 / 0.04);
  font-size: var(--step--1);
  line-height: 1.6;
}

/* Wordmark de uu.life: mas ancho que el mark cuadrado de peptik (1080x595).
   28px de alto = el mismo slot visual que usaba el logo original. */
.logo__mark.logo__wordmark {
  width: auto;
  height: 28px;
}
