/* FMX dynamic product detail hotfix
   - Restores async sections when reveal observation misses mount.
   - Converts the product gallery to one contained main image and a thumbnail rail. */
.subpage-visual-hero ~ .fade-in {
  opacity: 1 !important;
  transform: none !important;
}

.product-gallery-stack.fmx-gallery {
  display: block !important;
  width: 100%;
}

.product-gallery-stack.fmx-gallery .fmx-gallery-main {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #121212;
  border: 1px solid rgba(200, 136, 58, 0.2);
}

.product-gallery-stack.fmx-gallery .fmx-gallery-main > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #121212;
}

.product-gallery-stack.fmx-gallery .fmx-gallery-main .render-badge {
  z-index: 3;
}

.fmx-gallery-thumbs {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 136, 58, 0.7) rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
}

.fmx-gallery-thumb {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  background: #181818;
  cursor: pointer;
  opacity: 0.7;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.fmx-gallery-thumb:hover,
.fmx-gallery-thumb:focus-visible {
  opacity: 1;
  border-color: rgba(200, 136, 58, 0.75);
  outline: none;
}

.fmx-gallery-thumb[aria-current="true"] {
  opacity: 1;
  border-color: #c8883a;
  box-shadow: inset 0 0 0 1px #c8883a;
}

.fmx-gallery-thumb > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

.fmx-gallery-thumb .render-badge {
  display: none !important;
}

/* Product detail hero: product-specific visual instead of the shared AI scene */
.subpage-visual-hero.fmx-product-hero {
  min-height: 560px;
  padding: 108px 0 88px;
  background: linear-gradient(135deg, #0d0d0d 0%, #15120f 100%);
}

.subpage-visual-hero.fmx-product-hero::before,
.subpage-visual-hero.fmx-product-hero::after {
  content: none !important;
  background: none !important;
}

.subpage-visual-hero.fmx-product-hero > .container {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.fmx-product-hero-copy {
  min-width: 0;
}

.fmx-product-hero-media {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #171717;
  border: 1px solid rgba(200, 136, 58, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.fmx-product-hero-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.fmx-product-hero-disclosure {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 11px;
  color: #f3e7d7;
  background: rgba(8, 8, 8, 0.88);
  border: 1px solid rgba(200, 136, 58, 0.48);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.subpage-visual-hero.fmx-product-hero > .render-badge {
  display: none !important;
}

/* Product catalogue cards */
.product-catalog-card .product-catalog-image {
  cursor: pointer;
  outline: none;
}

.product-catalog-card .product-catalog-image > img {
  transition: transform 240ms ease, filter 240ms ease;
}

.product-catalog-card .product-catalog-image:hover > img,
.product-catalog-card .product-catalog-image:focus-visible > img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.product-catalog-card .product-catalog-image:focus-visible {
  box-shadow: inset 0 0 0 2px #c8883a;
}

.product-catalog-card .product-catalog-image .render-badge {
  pointer-events: none !important;
}

.product-catalog-card .product-catalog-content > a[href^="/outdoor-sauna-pods/"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  margin-top: 22px !important;
  padding: 12px 20px !important;
  color: #ffffff !important;
  background: #c8883a !important;
  border: 1px solid #c8883a;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.product-catalog-card .product-catalog-content > a[href^="/outdoor-sauna-pods/"]:hover,
.product-catalog-card .product-catalog-content > a[href^="/outdoor-sauna-pods/"]:focus-visible {
  color: #ffffff !important;
  background: #e1a352 !important;
  border-color: #e1a352;
  transform: translateY(-2px);
  outline: none;
}

@media (max-width: 900px) {
  .subpage-visual-hero.fmx-product-hero {
    min-height: 0;
    padding: 88px 0 64px;
  }

  .subpage-visual-hero.fmx-product-hero > .container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .fmx-product-hero-copy {
    order: 2;
  }

  .fmx-product-hero-media {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 767px) {
  .subpage-visual-hero.fmx-product-hero {
    padding: 76px 0 56px;
  }

  .subpage-visual-hero.fmx-product-hero > .container {
    gap: 30px;
  }

  .fmx-product-hero-media {
    aspect-ratio: 1 / 1;
  }

  .fmx-product-hero-disclosure {
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    font-size: 11px;
  }

  .product-gallery-stack.fmx-gallery .fmx-gallery-main {
    aspect-ratio: 1 / 1;
  }

  .fmx-gallery-thumb {
    flex-basis: 88px;
    width: 88px;
    height: 66px;
  }

  .product-catalog-card .product-catalog-content > a[href^="/outdoor-sauna-pods/"] {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fmx-gallery-thumb {
    transition: none;
  }
}
