/* V108 full-frame product imagery with separate, uncropped thumbnail controls. */
.product-gallery > img,
.product-gallery.product-isolated > img,
.product-gallery.product-lifestyle > img,
.product-gallery-carousel .product-gallery-slide > img,
.product-gallery-carousel.product-isolated .product-gallery-slide > img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  background: #f7faf8;
}

.product-gallery.product-gallery-carousel {
  height: auto;
  min-height: 0;
  grid-template-rows: auto auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.product-gallery-carousel .product-gallery-frame {
  height: min(620px, 62vw);
  min-height: 480px;
  overflow: hidden;
  border: 1px solid #d9e4df;
  border-radius: 8px;
  background: #eef3f1;
}

.product-gallery-carousel .product-gallery-slide:not([hidden]) {
  animation: product-gallery-fade 180ms ease-out;
}

.product-gallery-carousel .product-gallery-controls {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 4px 8px;
  overflow-x: auto;
  border: 0;
  background: transparent;
  scrollbar-width: thin;
}

.product-gallery-carousel .product-gallery-thumbnail {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 74px;
  padding: 0;
  overflow: hidden;
  border: 2px solid #c7d6d0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 32, 42, 0.1);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-gallery.product-gallery-carousel .product-gallery-controls .product-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  background: #fff;
  transition: filter 160ms ease, transform 160ms ease;
}

.product-gallery-carousel .product-gallery-thumbnail::after {
  content: "View photo";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(23, 32, 42, 0.78);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.product-gallery-carousel .product-gallery-thumbnail.is-active {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px var(--gold), 0 5px 14px rgba(23, 32, 42, 0.14);
}

.product-gallery-carousel .product-gallery-thumbnail:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .product-gallery-carousel .product-gallery-thumbnail:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 18px rgba(23, 32, 42, 0.2);
    transform: translateY(-3px);
  }

  .product-gallery-carousel .product-gallery-thumbnail:hover img {
    filter: saturate(0.85) brightness(0.78);
    transform: scale(0.96);
  }

  .product-gallery-carousel .product-gallery-thumbnail:hover::after {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes product-gallery-fade {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@media (max-width: 900px) {
  .product-gallery-carousel .product-gallery-frame {
    height: min(680px, 82vw);
    min-height: 430px;
  }
}

@media (max-width: 680px) {
  .product-gallery-carousel .product-gallery-frame {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .product-gallery-carousel .product-gallery-controls {
    gap: 10px;
    padding: 12px 4px 7px;
  }

  .product-gallery-carousel .product-gallery-thumbnail {
    flex-basis: 74px;
    width: 74px;
    height: 64px;
    border-radius: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-gallery-carousel .product-gallery-slide:not([hidden]) {
    animation: none;
  }

  .product-gallery-carousel .product-gallery-thumbnail,
  .product-gallery-carousel .product-gallery-thumbnail img,
  .product-gallery-carousel .product-gallery-thumbnail::after {
    transition: none;
  }
}
