/* Therabody landing - estilos base
   Tipografia oficial: ABC Arizona Text (titulos) / Suisse Int'l (cuerpo),
   con Georgia/Arial como fallback si las fuentes no llegan a cargar. */

@font-face {
  font-family: "ABC Arizona Text";
  src: url("../fonts/ABCArizonaTextVariable.woff2") format("woff2"),
       url("../fonts/ABCArizonaTextVariable.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Medium-WebXL.woff2") format("woff2"),
       url("../fonts/SuisseIntl-Medium-WebXL.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}

:root {
  --black: #222222;
  --white: #ffffff;
  --cream: #fbf7f1;
  --cream-border: #e4dfd4;
  --text-secondary: #55514a;
  --text-muted: #8a8577;

  --peach: #f29c77;
  --peach-light: #fcd7b3;
  --peach-lightest: #fdf1e3;
  --peach-dark: #dd673e;
  --product-image-bg: #f8f3e9;

  --dark-gray: #52514a;
  --warm-gray: #e0ddd3;

  --performance-bg: var(--dark-gray);
  --performance-accent: var(--peach);
  --performance-text: var(--white);

  --wellness-bg: var(--warm-gray);
  --wellness-accent: var(--black);
  --wellness-dot: var(--peach-light);
  --wellness-text: var(--black);

  --beauty-bg: var(--peach-lightest);
  --beauty-accent: var(--black);
  --beauty-dot: var(--peach);
  --beauty-text: var(--black);

  --radius: 14px;
  --header-h: 56px;
  --pad: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Suisse Intl", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .headline {
  font-family: "ABC Arizona Text", Georgia, "Times New Roman", serif;
  font-weight: normal;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

img { display: block; max-width: 100%; }

/* ---------- header (home) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--pad);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  height: 20px;
  width: auto;
}

.header-link {
  font-size: 13px;
  font-weight: bold;
  color: var(--white);
  background: var(--peach-dark);
  border-radius: 20px;
  padding: 9px 20px;
  box-shadow: 0 2px 10px rgba(221, 103, 62, 0.4);
  animation: header-cta-pulse 2.6s ease-in-out infinite;
}

@keyframes header-cta-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(221, 103, 62, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 4px 18px rgba(221, 103, 62, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
  .header-link { animation: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  min-height: 424px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(160deg, #6b6a60, #454540);
}

.scroll-chevron {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: rgba(255,255,255,0.85);
  animation: bounce 1.8s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

.hero-image-placeholder {
  position: absolute;
  inset: 0;
  background: #454540;
}

.hero-image-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20,20,18,0) 30%, rgba(15,15,13,0.88) 100%);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--pad) 40px;
  color: var(--white);
}

.hero-content .brand-mark {
  margin-bottom: 18px;
}

.hero-content .brand-logo {
  height: 24px;
}

.hero-tagline {
  font-family: "ABC Arizona Text", Georgia, serif;
  font-size: 34px;
  line-height: 1.25;
  max-width: 340px;
  margin-bottom: 10px;
}

.hero-subtext {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
}

/* ---------- category sections ---------- */

.category-section {
  padding: 34px 0 8px;
}

.category-heading {
  padding: 0 var(--pad);
  margin-bottom: 14px;
}

.category-heading h2 {
  font-size: 21px;
  margin-bottom: 3px;
}

.category-heading p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- carousel / peek ---------- */

.carousel {
  display: flex;
  overflow-x: auto;
  padding: 2px 0 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

/* el padding/margin en el borde de un contenedor flex con scroll no
   siempre se respeta al cargar la pagina (bug conocido de Safari/Chrome
   mobile), asi que el espacio del borde se resuelve con un elemento
   espaciador real dentro del carrusel, no con padding ni margin.
   sin "gap" en .carousel para que el calculo sea directo: el espaciador
   ES el espacio, y cada card suma su propio margin-right como separacion. */
.carousel-spacer {
  flex: 0 0 auto;
  width: var(--pad);
}

.carousel::-webkit-scrollbar { display: none; }

.product-card {
  flex: 0 0 auto;
  width: 62%;
  max-width: 230px;
  display: block;
  margin-right: 12px;
}

.product-card:last-child { margin-right: 0; }

.product-card:active .card-image {
  transform: scale(0.97);
  background: #efe7d6;
}

.product-card .card-image {
  height: 150px;
  border-radius: 8px;
  background: var(--product-image-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 16px;
  transition: transform 0.12s ease, background 0.12s ease;
}

.product-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* La foto de SleepMask viene con crop a sangre (sin aire alrededor),
   por eso se ve mucho mas grande que el resto de los productos.
   La achicamos para que quede pareja con las demas tarjetas. */
.product-card .card-image img[alt="SleepMask"] {
  width: 56%;
  height: auto;
}

/* Misma historia con TheraFace Mask: la foto viene a sangre (sin aire
   alrededor) mientras que la de Mask Glo tiene bastante margen propio,
   asi que se ve mucho mas grande en la tarjeta. La achicamos para que
   quede del mismo tamano que Mask Glo. */
.product-card .card-image img[alt="TheraFace Mask"] {
  height: 86%;
  width: auto;
}

.product-card .card-name {
  font-size: 13.5px;
  font-weight: bold;
  color: var(--black);
  margin-bottom: 4px;
}

.product-card .card-desc {
  font-size: 11.5px;
  color: var(--black);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- footer (home) ---------- */

.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(220px, 34vw, 460px);
  padding: 0 var(--pad);
  text-align: center;
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 20px;
  background-image: url("../img/footer-spa.jpg");
  background-size: cover;
  background-position: center;
}

/* velo oscuro suave para que el logo blanco se lea sobre la foto */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.site-footer a {
  color: var(--black);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--text-muted);
}

/* Pedido: mostrar solo el logo centrado en el footer, sin borrar el texto
   ni los links (por si se reactivan mas adelante). Para reactivar: borrar
   (o comentar) la regla .footer-text de abajo. */
.footer-logo {
  position: relative;
  z-index: 1;
  height: clamp(26px, 3.2vw, 40px);
  width: auto;
}

.footer-text {
  display: none;
}

/* ==========================================================
   PRODUCT PAGE
   ========================================================== */

.back-fixed {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  background: rgba(224, 221, 211, 0.9);
  color: var(--black);
  font-size: 12.5px;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.product-video {
  position: relative;
  height: 92vh;
  min-height: 480px;
  background: linear-gradient(180deg, #5a594f, #2c2b27);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-video .video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

.product-video .video-placeholder .ph-box {
  border: 1px dashed rgba(255,255,255,0.35);
  padding: 10px 16px;
  border-radius: 10px;
  text-align: center;
  line-height: 1.6;
}

.product-video .video-placeholder.has-image {
  background-size: cover;
  background-position: center;
}

.product-video .video-placeholder.has-cutout {
  background: var(--product-image-bg);
}

.product-video .video-placeholder .ph-product-img {
  width: 68%;
  max-width: 320px;
  object-fit: contain;
}

.product-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.sound-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(20,20,18,0.55);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  color: var(--white);
}

.video-overlay-inner {
  padding: 20px var(--pad) 30px;
}

.video-overlay .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: var(--peach);
  margin-bottom: 8px;
}

.video-overlay h1 {
  font-size: 34px;
  line-height: 1.15;
}

.video-overlay .overlay-tagline {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 340px;
  margin: 10px 0 18px;
}

.video-overlay .buy-button {
  display: inline-block;
  width: auto;
  background: var(--white);
  color: var(--black);
  padding: 12px 22px;
  border-radius: 6px;
  margin-bottom: 0;
}

.product-body {
  padding: 30px var(--pad) 10px;
  max-width: 560px;
  margin: 0 auto;
}

.product-body .section-label {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.product-body .tagline {
  font-size: 18px;
  line-height: 1.55;
  color: var(--black);
  margin-bottom: 26px;
}

.feature-list {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.feature-list li .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--peach);
}

.buy-button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--peach-lightest);
  color: var(--peach-dark);
  font-size: 16px;
  font-weight: bold;
  padding: 16px;
  border-radius: 10px;
  border: none;
  margin-bottom: 14px;
  transition: transform 0.1s ease;
}

.buy-button:active { transform: scale(0.98); }

.catalog-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px;
  margin-bottom: 40px;
  border-bottom: 1px solid transparent;
}

/* category text accents on product page */
.product-body[data-cat="performance"] .feature-list .dot { background: var(--peach); }
.product-body[data-cat="wellness"] .feature-list .dot { background: var(--peach-light); }
.product-body[data-cat="beauty"] .feature-list .dot { background: var(--peach); }

@media (min-width: 640px) {
  .product-card { width: 220px; }
}

/* ---------- desktop: contener el ancho general ---------- */

@media (min-width: 900px) {
  :root { --pad: 80px; }

  .site-header-inner,
  .hero-content,
  .video-overlay-inner,
  .category-heading,
  .carousel {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tagline { max-width: 460px; }
  .video-overlay .overlay-tagline { max-width: 460px; }

  /* el boton es "fixed" al viewport, pero el texto de abajo vive adentro
     de un bloque centrado de 1440px: en pantallas mas anchas que eso hay
     que sumarle el "gutter" del centrado, si no queda mas a la izquierda
     que el texto. */
  .back-fixed { left: max(var(--pad), calc((100vw - 1440px) / 2 + var(--pad))); }

  /* en desktop no hay swipe: los productos se acomodan en grilla dentro
     de los mismos margenes que el resto del contenido (hero, titulos). */
  .carousel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    overflow: visible;
    padding: 2px var(--pad) 18px;
  }

  /* los spacers son un recurso solo para el peek/swipe de mobile */
  .carousel-spacer {
    display: none;
  }

  .product-card {
    width: auto;
    max-width: none;
    margin-right: 0;
  }

  /* pagina de producto: dos columnas en vez de texto centrado */
  .product-body {
    max-width: 1440px;
    padding: 60px var(--pad) 10px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    column-gap: 80px;
  }

  .body-col--info { grid-column: 1; grid-row: 1; }
  .body-col--features { grid-column: 2; grid-row: 1; }

  .body-col--cta {
    grid-column: 1;
    grid-row: 2;
    max-width: 460px;
    padding-top: 8px;
  }
}

/* ---------- navegacion anterior / siguiente (pagina de producto) ---------- */

.product-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--pad) 40px;
}

.pnav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--cream-border);
  border-radius: 10px;
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pnav--next {
  flex-direction: row-reverse;
  text-align: right;
}

.pnav-arrow {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pnav-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--product-image-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pnav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pnav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pnav-label {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pnav-name {
  font-family: "ABC Arizona Text", Georgia, serif;
  font-size: 15px;
  line-height: 1.25;
  color: var(--black);
}

/* en celular: sin flecha suelta y foto mas chica, para que entre el nombre */
@media (max-width: 639px) {
  .pnav { gap: 8px; padding: 8px; }
  .pnav-arrow { display: none; }
  .pnav-thumb { width: 44px; height: 44px; }
  .pnav-name { font-size: 14px; }
  .pnav--prev .pnav-label::before { content: "\2190  "; }
  .pnav--next .pnav-label::after { content: "  \2192"; }
}

@media (min-width: 900px) {
  .product-nav {
    max-width: 1440px;
    gap: 20px;
    padding-bottom: 60px;
  }

  .pnav { padding: 14px 18px; gap: 16px; }
  .pnav-thumb { width: 72px; height: 72px; }
  .pnav-name { font-size: 19px; }
}

/* ---------- aparicion suave al scrollear (home) ---------- */

.category-section.reveal .category-heading,
.category-section.reveal .product-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.category-section.reveal.is-visible .category-heading,
.category-section.reveal.is-visible .product-card {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .category-section.reveal .category-heading,
  .category-section.reveal .product-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- hover sutil (solo dispositivos con mouse real) ---------- */

@media (hover: hover) and (pointer: fine) {
  a:hover,
  button:hover {
    opacity: 0.9;
  }

  .pnav:hover {
    opacity: 1;
    border-color: var(--black);
  }
}
