﻿/* PDP gallery — color-scoped plane, fullscreen lightbox */

.pdp-gallery {
  --pdp-gal-ratio: 4 / 5;
  --pdp-gal-radius: var(--radius-lg, 1rem);
  --pdp-gal-blush: var(--color-blush, #f0e4e0);
  --pdp-gal-line: var(--color-line, #e8ddd8);
  --pdp-gal-brand: var(--color-brand, #d0473e);
  --pdp-gal-ink: var(--color-ink, #1c1412);
  --pdp-gal-ease: var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));

  display: flex;
  flex-direction: column;
  gap: var(--space-md, 1rem);
  min-width: 0;
  position: sticky;
  top: 5.5rem;
  font-family: var(--font-body, "Gantari", system-ui, sans-serif);
}

.pdp-gallery__viewport {
  position: relative;
  width: 100%;
}

.pdp-gallery__stage,
.pdp-gallery .gallery-main,
.pdp-gallery #galleryMain {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: var(--pdp-gal-ratio);
  min-height: clamp(320px, 52vw, 560px);
  border-radius: var(--pdp-gal-radius);
  overflow: hidden;
  border: 1px solid rgba(232, 221, 216, 0.95);
  background:
    radial-gradient(120% 80% at 18% 12%, rgba(255, 255, 255, 0.85) 0%, transparent 55%),
    linear-gradient(165deg, var(--pdp-gal-blush) 0%, #fffaf8 42%, #f3e9e6 100%);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(28, 20, 18, 0.06));
  cursor: zoom-in;
}

.pdp-gallery__stage.has-img,
.pdp-gallery .gallery-main.has-img,
.pdp-gallery #galleryMain.has-img {
  background: var(--pdp-gal-blush);
}

/* Image plane wrapper (click opens lightbox; no hover zoom) */
.pdp-gallery__zoom {
  position: absolute;
  inset: 0;
}

/* Top-left stacked product labels (shipping / low stock) */
.pdp-gallery__badges {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  max-width: calc(100% - 3.5rem);
}

.pdp-gallery__badges[hidden] {
  display: none;
}

.pdp-gallery__badge {
  display: inline-block;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 0.28rem;
  font-family: var(--font-body, "Gantari", system-ui, sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(28, 20, 18, 0.16);
}

.pdp-gallery__badge[hidden] {
  display: none;
}

.pdp-gallery__badge--ship {
  background: #f27a1a;
}

.pdp-gallery__badge--low {
  background: #e11d48;
}

/* Bottom cart-discount banner (IMAGE 2) */
.pdp-gallery__cart-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #00b140;
  color: #fff;
  font-family: var(--font-body, "Gantari", system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  pointer-events: none;
}

.pdp-gallery__cart-banner-left,
.pdp-gallery__cart-banner-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.pdp-gallery__cart-banner svg {
  flex-shrink: 0;
}

.pdp-gallery.has-cart-banner .pdp-gallery__expand,
.pdp-gallery.has-cart-banner .pdp-gallery__counter {
  bottom: 2.85rem;
}

.pdp-gallery__zoom > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.pdp-gallery__stage img,
.pdp-gallery .gallery-main > img,
.pdp-gallery #galleryMainImg,
.pdp-gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  pointer-events: none;
  will-change: transform, opacity;
  transition:
    opacity 0.28s var(--pdp-gal-ease),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translate3d(0, 0, 0);
}

.pdp-gallery__img--in {
  animation: pdpGalleryFade 0.38s var(--pdp-gal-ease);
}

.pdp-gallery #galleryMainImg.is-dragging,
.pdp-gallery__img.is-dragging {
  transition: none;
  transform: translate3d(var(--gal-drag-x, 0px), 0, 0);
  opacity: var(--gal-drag-opacity, 1);
}

.pdp-gallery #galleryMainImg.is-swipe-commit,
.pdp-gallery #galleryMainImg.is-swipe-snap,
.pdp-gallery__img.is-swipe-commit,
.pdp-gallery__img.is-swipe-snap {
  transition:
    opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(var(--gal-drag-x, 0px), 0, 0);
  opacity: var(--gal-drag-opacity, 1);
}

.pdp-gallery__img--slide-out-next {
  animation: pdpGallerySlideOutNext 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.pdp-gallery__img--slide-out-prev {
  animation: pdpGallerySlideOutPrev 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.pdp-gallery__img--slide-in-next {
  animation: pdpGallerySlideInNext 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-gallery__img--slide-in-prev {
  animation: pdpGallerySlideInPrev 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdp-gallery__placeholder,
.pdp-gallery .gallery-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: inherit;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(255, 255, 255, 0.65) 0%, transparent 70%),
    linear-gradient(165deg, var(--pdp-gal-blush) 0%, #fffaf8 48%, #f3e9e6 100%);
  cursor: default;
}

.pdp-gallery__placeholder-mark {
  display: block;
  width: min(42%, 9.5rem);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md, 0.625rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 58%),
    radial-gradient(ellipse at 50% 62%, rgba(208, 71, 62, 0.08), transparent 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 8px 24px rgba(28, 20, 18, 0.04);
  opacity: 0.9;
}

.pdp-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 250, 248, 0.88);
  color: var(--pdp-gal-ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 4px 16px rgba(28, 20, 18, 0.1);
  transition:
    background var(--duration-fast, 150ms) ease,
    color var(--duration-fast, 150ms) ease,
    border-color var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) var(--pdp-gal-ease);
}

.pdp-gallery__nav:hover {
  background: var(--pdp-gal-brand);
  border-color: var(--pdp-gal-brand);
  color: #fff;
}

.pdp-gallery__nav:focus-visible {
  outline: 2px solid var(--pdp-gal-brand);
  outline-offset: 2px;
}

.pdp-gallery__nav[hidden] {
  display: none;
}

.pdp-gallery__nav--prev {
  left: 0.65rem;
}

.pdp-gallery__nav--next {
  right: 0.65rem;
}

.pdp-gallery__expand {
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill, 999px);
  background: rgba(255, 250, 248, 0.88);
  color: var(--pdp-gal-ink);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 20, 18, 0.08);
  transition:
    background var(--duration-fast, 150ms) ease,
    color var(--duration-fast, 150ms) ease,
    border-color var(--duration-fast, 150ms) ease;
}

.pdp-gallery__expand:hover {
  background: var(--pdp-gal-brand);
  border-color: var(--pdp-gal-brand);
  color: #fff;
}

.pdp-gallery__expand:focus-visible {
  outline: 2px solid var(--pdp-gal-brand);
  outline-offset: 2px;
}

.pdp-gallery__counter {
  position: absolute;
  left: 0.75rem;
  bottom: 0.7rem;
  z-index: 3;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-pill, 999px);
  background: rgba(28, 20, 18, 0.48);
  color: #fff;
  font-size: 0.68rem;
  font-weight: var(--font-weight-medium, 500);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.pdp-gallery__thumbs,
.pdp-gallery .gallery-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0.1rem 0.15rem 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  /* Stable footprint so color swaps (0→N thumbs) don't shove the buy box / scroll */
  min-height: calc(5.35rem + 0.35rem);
}

.pdp-gallery__thumb,
.pdp-gallery .gallery-thumb {
  flex: 0 0 auto;
  width: 4.25rem;
  height: 5.35rem;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-md, 0.625rem);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(160deg, var(--pdp-gal-blush), #fffaf8);
  box-shadow: inset 0 0 0 1px var(--pdp-gal-line);
  transition:
    border-color var(--duration-fast, 150ms) ease,
    box-shadow var(--duration-fast, 150ms) ease,
    transform var(--duration-fast, 150ms) var(--pdp-gal-ease);
}

.pdp-gallery__thumb:hover,
.pdp-gallery .gallery-thumb:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px var(--pdp-gal-line),
    0 4px 12px rgba(28, 20, 18, 0.08);
}

.pdp-gallery__thumb:focus-visible,
.pdp-gallery .gallery-thumb:focus-visible {
  outline: 2px solid var(--pdp-gal-brand);
  outline-offset: 2px;
}

.pdp-gallery__thumb.is-active,
.pdp-gallery .gallery-thumb.is-active {
  border-color: var(--pdp-gal-brand);
  box-shadow:
    inset 0 0 0 1px transparent,
    0 0 0 1px rgba(208, 71, 62, 0.2);
}

.pdp-gallery__thumb img,
.pdp-gallery .gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.pdp-gallery.is-empty .pdp-gallery__stage,
.pdp-gallery.is-empty #galleryMain {
  min-height: clamp(280px, 48vw, 480px);
  cursor: default;
}

@keyframes pdpGalleryFade {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

@keyframes pdpGallerySlideOutNext {
  from { transform: translate3d(0, 0, 0); opacity: 1; }
  to { transform: translate3d(-28%, 0, 0); opacity: 0; }
}

@keyframes pdpGallerySlideOutPrev {
  from { transform: translate3d(0, 0, 0); opacity: 1; }
  to { transform: translate3d(28%, 0, 0); opacity: 0; }
}

@keyframes pdpGallerySlideInNext {
  from { transform: translate3d(32%, 0, 0); opacity: 0.2; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes pdpGallerySlideInPrev {
  from { transform: translate3d(-32%, 0, 0); opacity: 0.2; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}

/* —— Fullscreen lightbox —— */
.pdp-lightbox {
  --pdp-lb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pdp-lb-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --pdp-lb-swap: 0.28s;
  --pdp-lb-ctrl: rgba(255, 255, 255, 0.78);
  --pdp-lb-ctrl-hover: rgba(255, 255, 255, 0.96);
  --pdp-lb-ink: #1c1412;
  --lb-bg-opacity: 1;

  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 0;
  background: rgba(18, 12, 10, calc(0.9 * var(--lb-bg-opacity, 1)));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition:
    opacity 0.28s var(--pdp-lb-ease),
    background 0.2s linear;
}

.pdp-lightbox.is-open {
  display: flex;
  opacity: 1;
  animation: pdpLightboxIn 0.32s var(--pdp-lb-ease);
}

@keyframes pdpLightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pdp-lightbox__close,
.pdp-lightbox__nav {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: var(--pdp-lb-ctrl);
  color: var(--pdp-lb-ink);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 2px 4px rgba(18, 12, 10, 0.08),
    0 10px 28px rgba(18, 12, 10, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s var(--pdp-lb-ease);
}

.pdp-lightbox__close {
  top: 0.9rem;
  right: 0.9rem;
  font-size: 1.55rem;
}

.pdp-lightbox__nav {
  top: calc(50% - 2.75rem);
  font-size: 1.85rem;
  transform: translateY(-50%);
}

.pdp-lightbox__nav[hidden] {
  display: none;
}

.pdp-lightbox__nav--prev {
  left: 0.9rem;
}

.pdp-lightbox__nav--next {
  right: 0.9rem;
}

.pdp-lightbox__close:hover,
.pdp-lightbox__nav:hover {
  background: var(--pdp-lb-ctrl-hover);
  border-color: rgba(255, 255, 255, 0.95);
  color: var(--pdp-gal-brand);
  box-shadow:
    0 2px 6px rgba(18, 12, 10, 0.1),
    0 14px 32px rgba(18, 12, 10, 0.28);
}

.pdp-lightbox__close:hover {
  transform: scale(1.04);
}

.pdp-lightbox__nav:hover {
  transform: translateY(-50%) scale(1.05);
}

.pdp-lightbox__close:focus-visible,
.pdp-lightbox__nav:focus-visible,
.pdp-lightbox__thumb:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.pdp-lightbox__close:active,
.pdp-lightbox__nav:active {
  transform: scale(0.97);
}

.pdp-lightbox__nav:active {
  transform: translateY(-50%) scale(0.97);
}

.pdp-lightbox__stage {
  flex: 1 1 auto;
  width: min(52rem, calc(100vw - 2rem));
  max-height: calc(100vh - 9.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.pdp-lightbox__zoom {
  width: 100%;
  height: min(78vh, 52rem);
  max-height: calc(100vh - 9.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md, 0.625rem);
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: contain;
  cursor: default;
  touch-action: none;
  will-change: opacity, transform;
  transition:
    opacity var(--pdp-lb-swap) var(--pdp-lb-ease),
    transform var(--pdp-lb-swap) var(--pdp-lb-ease);
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.pdp-lightbox__zoom-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  transform: scale(1);
  transform-origin: 50% 50%;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  will-change: transform;
}

.pdp-lightbox__zoom.is-zooming {
  cursor: grab;
}

.pdp-lightbox__zoom.is-dragging {
  transition: none;
}

.pdp-lightbox__zoom.is-dragging-x {
  transform: translate3d(var(--lb-drag-x, 0px), 0, 0);
  opacity: var(--lb-drag-opacity, 1);
}

.pdp-lightbox__zoom.is-dragging-y {
  transform:
    translate3d(0, var(--lb-drag-y, 0px), 0)
    scale(var(--lb-drag-scale, 1));
  opacity: var(--lb-drag-opacity, 1);
}

.pdp-lightbox__zoom.is-swipe-commit,
.pdp-lightbox__zoom.is-swipe-snap,
.pdp-lightbox__zoom.is-dismissing {
  transition:
    opacity 0.22s var(--pdp-lb-spring),
    transform 0.26s var(--pdp-lb-spring);
  transform:
    translate3d(var(--lb-drag-x, 0px), var(--lb-drag-y, 0px), 0)
    scale(var(--lb-drag-scale, 1));
  opacity: var(--lb-drag-opacity, 1);
}

.pdp-lightbox.is-dismissing {
  transition:
    opacity 0.26s var(--pdp-lb-spring),
    background 0.26s linear;
  pointer-events: none;
}

.pdp-lightbox.is-dismissing .pdp-lightbox__close,
.pdp-lightbox.is-dismissing .pdp-lightbox__nav,
.pdp-lightbox.is-dismissing .pdp-lightbox__footer {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.pdp-lightbox__zoom.is-swap-out {
  opacity: 0;
}

.pdp-lightbox__zoom.is-swap-out--next {
  transform: translate3d(-22px, 0, 0);
}

.pdp-lightbox__zoom.is-swap-out--prev {
  transform: translate3d(22px, 0, 0);
}

.pdp-lightbox__zoom.is-swap-in {
  opacity: 0;
  transition: none;
}

.pdp-lightbox__zoom.is-swap-in--next {
  transform: translate3d(22px, 0, 0);
}

.pdp-lightbox__zoom.is-swap-in--prev {
  transform: translate3d(-22px, 0, 0);
}

.pdp-lightbox__footer {
  flex: 0 0 auto;
  width: min(52rem, calc(100vw - 2rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0 1.15rem;
}

.pdp-lightbox__counter {
  font-size: 0.72rem;
  font-weight: var(--font-weight-medium, 500);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.78);
}

.pdp-lightbox__thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.2rem 0.35rem 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
}

.pdp-lightbox__thumbs[hidden] {
  display: none;
}

.pdp-lightbox__thumb {
  flex: 0 0 auto;
  width: 3.15rem;
  height: 3.95rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.55rem;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.62;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition:
    opacity 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s var(--pdp-lb-ease);
}

.pdp-lightbox__thumb:hover {
  opacity: 0.92;
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.pdp-lightbox__thumb.is-active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.28);
}

.pdp-lightbox__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

@media (max-width: 900px) {
  .pdp-gallery {
    --pdp-gal-ratio: 3 / 4;
    position: static;
    top: auto;
  }

  .pdp-gallery__stage,
  .pdp-gallery .gallery-main,
  .pdp-gallery #galleryMain {
    aspect-ratio: var(--pdp-gal-ratio);
    min-height: clamp(360px, 88vw, 520px);
    border-radius: var(--radius-md, 0.625rem);
    touch-action: pan-y;
  }

  /* Swipe handles image browsing on mobile — hide thumb strip */
  .pdp-gallery__thumbs,
  .pdp-gallery .gallery-thumbs {
    display: none;
  }

  .pdp-gallery__badges {
    top: 0.55rem;
    left: 0.55rem;
    gap: 0.28rem;
    max-width: calc(100% - 2.75rem);
  }

  .pdp-gallery__badge {
    font-size: 0.58rem;
    padding: 0.24rem 0.48rem;
  }

  .pdp-gallery__cart-banner {
    padding: 0.45rem 0.55rem;
    font-size: 0.68rem;
    gap: 0.35rem;
  }

  .pdp-gallery.has-cart-banner .pdp-gallery__expand,
  .pdp-gallery.has-cart-banner .pdp-gallery__counter {
    bottom: 2.55rem;
  }

  .pdp-gallery__thumb,
  .pdp-gallery .gallery-thumb {
    width: 3.75rem;
    height: 4.75rem;
  }

  .pdp-gallery__nav {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.25rem;
  }

  /* —— Mobile lightbox: full-bleed stage, notch-safe controls —— */
  .pdp-lightbox {
    padding:
      max(0.35rem, env(safe-area-inset-top, 0px))
      max(0.35rem, env(safe-area-inset-right, 0px))
      max(0.35rem, env(safe-area-inset-bottom, 0px))
      max(0.35rem, env(safe-area-inset-left, 0px));
    background:
      radial-gradient(120% 70% at 50% 18%, rgba(48, 32, 28, calc(0.35 * var(--lb-bg-opacity, 1))) 0%, transparent 58%),
      rgba(10, 7, 6, calc(0.94 * var(--lb-bg-opacity, 1)));
    backdrop-filter: blur(16px) saturate(1.05);
    -webkit-backdrop-filter: blur(16px) saturate(1.05);
  }

  .pdp-lightbox__stage {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
  }

  .pdp-lightbox__zoom {
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: min(72vh, calc(100vh - 7.5rem));
    min-height: min(72dvh, calc(100dvh - 7.5rem));
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
  }

  .pdp-lightbox__zoom-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .pdp-lightbox__close,
  .pdp-lightbox__nav {
    width: 2.85rem;
    height: 2.85rem;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.12),
      0 10px 28px rgba(0, 0, 0, 0.28);
  }

  .pdp-lightbox__close {
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    font-size: 1.65rem;
  }

  .pdp-lightbox__nav {
    top: 46%;
    width: 2.95rem;
    height: 2.95rem;
    font-size: 1.85rem;
    background: rgba(255, 255, 255, 0.9);
  }

  .pdp-lightbox__nav--prev {
    left: max(0.45rem, env(safe-area-inset-left, 0px));
  }

  .pdp-lightbox__nav--next {
    right: max(0.45rem, env(safe-area-inset-right, 0px));
  }

  .pdp-lightbox__footer {
    width: 100%;
    max-width: none;
    gap: 0.5rem;
    padding:
      0.55rem
      max(0.65rem, env(safe-area-inset-right, 0px))
      max(0.85rem, env(safe-area-inset-bottom, 0px))
      max(0.65rem, env(safe-area-inset-left, 0px));
  }

  .pdp-lightbox__counter {
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.88);
  }

  .pdp-lightbox__thumbs {
    gap: 0.45rem;
    padding: 0.15rem 0.25rem 0.25rem;
    mask-image: none;
  }

  .pdp-lightbox__thumb {
    width: 2.85rem;
    height: 3.55rem;
    border-radius: 0.45rem;
    opacity: 0.7;
  }

  .pdp-lightbox__thumb.is-active {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-gallery__stage img,
  .pdp-gallery #galleryMainImg,
  .pdp-gallery__img,
  .pdp-gallery__thumb,
  .pdp-gallery .gallery-thumb,
  .pdp-lightbox,
  .pdp-lightbox__zoom,
  .pdp-lightbox__zoom-img,
  .pdp-lightbox__close,
  .pdp-lightbox__nav,
  .pdp-lightbox__thumb {
    animation: none;
    transition: none;
  }

  .pdp-lightbox.is-open {
    animation: none;
  }

  .pdp-gallery__img--slide-out-next,
  .pdp-gallery__img--slide-out-prev,
  .pdp-gallery__img--slide-in-next,
  .pdp-gallery__img--slide-in-prev {
    animation: none;
  }

  .pdp-lightbox__zoom.is-swap-out,
  .pdp-lightbox__zoom.is-swap-in,
  .pdp-lightbox__zoom.is-swap-out--next,
  .pdp-lightbox__zoom.is-swap-out--prev,
  .pdp-lightbox__zoom.is-swap-in--next,
  .pdp-lightbox__zoom.is-swap-in--prev {
    opacity: 1;
    transform: none;
  }
}
