/* =========================================
   PRODUCTOS — Carrusel de Cards + Páginas
   ========================================= */

/* ─── CARRUSEL DE CARDS (index.html) ─── */
.product-carousel {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  overflow: visible;
}

.product-carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 24px 24px 44px;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 1.5%, black 98.5%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 1.5%, black 98.5%, transparent 100%);
  /* hide scrollbar but keep scroll */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-carousel__track::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(31, 28, 23, 0.14);
}

.product-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--sand);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-card__image img {
  transform: scale(1.06);
}

.product-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(31, 28, 23, 0.7) 0%,
      rgba(31, 28, 23, 0.15) 40%,
      transparent 100%);
  pointer-events: none;
}

.product-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--rust);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(141, 58, 35, 0.3);
}

.product-card__content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card__name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.2;
}

.product-card__tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  flex-grow: 1;
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rust);
  transition: gap 0.25s ease;
}

.product-card:hover .product-card__cta {
  gap: 10px;
}

/* Card especial: Disclaimers */
.product-card--disclaimer {
  background: var(--deep-green);
  border-color: var(--deep-green);
}

.product-card--disclaimer .product-card__content {
  padding: 28px 24px;
  justify-content: center;
}

.product-card--disclaimer .product-card__name {
  color: var(--sand);
  font-size: 22px;
  margin-bottom: 14px;
}

.product-card--disclaimer .product-card__tagline {
  color: rgba(253, 237, 206, 0.7);
  font-size: 12.5px;
  line-height: 1.65;
}

.product-card--disclaimer .disclaimer-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

/* Carousel navigation buttons */
.product-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sand-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--stroke);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 16px rgba(31, 28, 23, 0.12);
  transition: all 0.25s ease;
  z-index: 10;
}

.product-carousel__nav:hover {
  background: #fff;
  color: var(--rust);
  box-shadow: 0 6px 20px rgba(244, 114, 60, 0.15);
}

.product-carousel__nav--prev {
  left: -20px;
}

.product-carousel__nav--next {
  right: -20px;
}

.product-carousel__nav[disabled] {
  opacity: 0.3;
  pointer-events: none;
}

/* Bottom controls: dots + arrows on mobile */
.product-carousel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

/* Scroll indicator dots */
.product-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.product-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stroke);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-carousel__dot.is-active {
  background: var(--terracotta);
  transform: scale(1.3);
}

/* =========================================
   PÁGINAS DE PRODUCTO — Layout
   ========================================= */

/* ─── HERO  ─── */
.product-hero {
  position: relative;
  width: 100%;
  padding: 60px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-hero__inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.product-hero__image-wrapper {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #fff;
}

.product-hero__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Fix específico para Colágeno y Almohada: imagen más grande sin bordes blancos */
.product-hero__image-wrapper--colageno,
.product-hero__image-wrapper--almohada {
  background: transparent;
  box-shadow: none;
}

.product-hero__image-wrapper--colageno img,
.product-hero__image-wrapper--almohada img {
  object-fit: cover;
}

.product-hero__content {
  max-width: 640px;
  width: 100%;
}

.product-hero__eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--rust);
  background: rgba(244, 114, 60, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.product-hero__title {
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 56px);
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 16px;
}

.product-hero__subtitle {
  font-family: var(--sans);
  font-size: clamp(15px, 2.5vw, 19px);
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 50ch;
  line-height: 1.6;
}

.product-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  background: var(--terracotta);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  border: none;
  box-shadow: 0 10px 24px rgba(244, 114, 60, 0.3);
  transition: all 0.25s ease;
  text-decoration: none;
}

.product-hero__cta:hover {
  background: #E05D28;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(244, 114, 60, 0.35);
}

/* Badge Próximamente */
.product-hero__badge {
  display: inline-block;
  background: rgba(253, 237, 206, 0.2);
  color: var(--sand);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid rgba(253, 237, 206, 0.3);
}

/* ─── GALLERY STRIP (imágenes debajo del hero) ─── */
.product-gallery {
  display: flex;
  justify-content: center;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: transparent;
  max-width: 800px;
  margin: 0 auto 48px;
  padding: 12px 24px;
}

.product-gallery::-webkit-scrollbar {
  display: none;
}

.product-gallery__item {
  flex: 0 0 calc(33.333% - 11px);
  max-width: 250px;
  min-width: 160px;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: #fff;
}

.product-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-gallery__item:hover img {
  transform: scale(1.05);
}

/* ─── PRODUCT INFO SECTIONS ─── */
.product-section {
  padding: 64px 24px;
}

.product-section--alt {
  background: rgba(255, 255, 255, 0.25);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.product-section__inner {
  max-width: var(--container-width);
  margin: 0 auto;
}

.product-section__header {
  margin-bottom: 32px;
}

.product-section__eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--rust);
  margin-bottom: 8px;
}

.product-section__title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 38px);
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.15;
}

.product-section__desc {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  max-width: 55ch;
  line-height: 1.6;
}

/* Feature cards grid */
.product-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.product-feature-card {
  background: var(--card-bg);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s ease;
}

.product-feature-card:hover {
  background: #fff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.product-feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--olive-light);
  color: var(--olive);
  margin-bottom: 16px;
  font-size: 22px;
}

.product-feature-card__title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 8px;
}

.product-feature-card__text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Bullet list style */
.product-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}

.product-bullets li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
  margin-top: 7px;
}

/* ─── TWO COLUMN LAYOUT ─── */
.product-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ─── FAQ ACCORDION ─── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
}

.faq-item {
  border-bottom: 1px solid var(--stroke);
}

.faq-item:first-child {
  border-top: 1px solid var(--stroke);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: color 0.25s ease;
  gap: 16px;
}

.faq-question:hover {
  color: var(--rust);
}

.faq-question__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--olive-light);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--olive);
  transition: transform 0.3s ease, background 0.3s ease;
}

.faq-item.is-open .faq-question__icon {
  transform: rotate(45deg);
  background: rgba(244, 114, 60, 0.12);
  color: var(--terracotta);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.4s ease;
}

.faq-answer__inner {
  padding: 0 0 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.faq-item.is-open .faq-answer {
  max-height: 300px;
}

/* ─── DISCLAIMER BANNER ─── */
.product-disclaimer {
  background: var(--deep-green);
  padding: 40px 24px;
}

.product-disclaimer__inner {
  max-width: var(--container-width);
  margin: 0 auto;
}

.product-disclaimer__title {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--sand);
  margin: 0 0 16px;
}

.product-disclaimer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-disclaimer__list li {
  font-size: 13px;
  color: rgba(253, 237, 206, 0.65);
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.product-disclaimer__list li::before {
  content: '⚠';
  flex-shrink: 0;
  font-size: 12px;
  margin-top: 1px;
}

/* ─── PRODUCT CTA SECTION ─── */
.product-cta {
  text-align: center;
  padding: 72px 24px 88px;
  background: rgba(255, 255, 255, 0.25);
  border-top: 1px solid var(--stroke);
}

.product-cta__heading {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 42px);
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.15;
}

.product-cta__text {
  font-size: 17px;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 50ch;
  line-height: 1.6;
}

/* ─── VARIANT TABS (gotas.html) ─── */
.variant-tabs {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  max-width: 500px;
  margin: 0 auto 40px;
}

.variant-tab {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.25s ease;
  text-align: center;
}

.variant-tab:not(:last-child) {
  border-right: 1px solid var(--stroke);
}

.variant-tab.is-active {
  background: var(--terracotta);
  color: #fff;
}

.variant-tab:hover:not(.is-active) {
  background: var(--olive-light);
  color: var(--ink);
}

.variant-panel {
  display: none;
}

.variant-panel.is-active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── PRODUCT PAGE ANIMATIONS ─── */
.product-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .product-card {
    flex: 0 0 260px;
    scroll-snap-align: center;
  }

  .product-carousel__track {
    scroll-padding: 0;
    padding-left: calc(50% - 130px);
    padding-right: calc(50% - 130px);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  }

  /* Hide desktop nav arrows */
  .product-carousel__nav--desktop {
    display: none;
  }

  /* Show mobile nav arrows beside dots */
  .product-carousel__nav--mobile {
    display: flex;
    position: static;
    transform: none;
    width: 36px;
    height: 36px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .product-two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-hero__inner {
    padding: 20px 0;
  }

  .product-gallery {
    justify-content: flex-start;
  }

  .product-gallery__item {
    flex: 0 0 calc(50% - 8px);
    min-width: 140px;
  }
}

@media (max-width: 600px) {
  .product-card {
    flex: 0 0 220px;
    scroll-snap-align: center;
  }

  .product-carousel__track {
    padding-left: calc(50% - 110px);
    padding-right: calc(50% - 110px);
  }

  .product-section {
    padding: 48px 20px;
  }

  .product-hero__content {
    padding: 32px 20px;
  }

  .product-features {
    grid-template-columns: 1fr;
  }

  .variant-tabs {
    flex-direction: column;
    max-width: 100%;
  }

  .variant-tab:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--stroke);
  }

  .product-gallery__item {
    flex: 0 0 calc(65% - 8px);
  }
}

@media (min-width: 901px) {
  /* Hide mobile nav arrows on desktop */
  .product-carousel__nav--mobile {
    display: none;
  }

  .product-carousel__nav--desktop {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .product-carousel__nav--prev {
    left: -44px;
  }

  .product-carousel__nav--next {
    right: -44px;
  }

  .product-hero {
    padding: 80px 24px 60px;
  }
}

/* =========================================
   LIGHTBOX GALLERY
   ========================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 13, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.lightbox__content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox__image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: lbZoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes lbZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox__close:hover {
  color: var(--terracotta, #D96941);
  transform: scale(1.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.3s ease;
}

.lightbox__nav:hover {
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev {
  left: 24px;
}

.lightbox__nav--next {
  right: 24px;
}

@media (max-width: 768px) {
  .lightbox__content {
    padding: 16px 50px;
  }
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  
  .lightbox__close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}