/* Custom product page zoom view: replaces lightGallery's one-slide-at-a-time
   modal with a Thule.com-style vertically stacked, scrollable view of ALL
   product images. lightGallery (2.8.0-beta.1, checked directly in
   lightgallery.min.js) has no built-in "all slides stacked" mode - its only
   "vertical" logic is swipe-to-close gesture detection, not a layout - so
   this view is hand-built rather than a lightGallery option. See
   /skripts THULE_IMAGE_GALLERY_TASK.txt (zoom section) for the investigation
   that ruled out reusing lightGallery for this.

   Reuses the exact same image.thumb source already used by the grid/carousel
   - no separate larger file is requested, matching Thule's own zoom, which
   also just CSS-stretches the same file it already loaded. */

.pdp-zoom-overlay {
  display: none;
  /* .product-info>div{position:relative} (0,1,1) otherwise beats this
     single-class rule (0,1,0) - same specificity fight already seen with
     .swiper.main-image and .product-info>div{order:5} elsewhere in this
     task, same fix. */
  position: fixed !important;
  z-index: 10000;
  inset: 0;
  background: #ffffff;
}

.pdp-zoom-overlay.is-open {
  display: block;
}

/* .product-left-wrapper and .product-right-wrapper are position:sticky with
   z-index:90 each (pre-existing Journal3 buybox/gallery sticky columns).
   Even though the overlay itself has a higher z-index and is a direct
   child of <body>, sticky elements can get their own compositing layer
   that paints above a later-shown fixed overlay regardless of z-index in
   some browsers. Explicitly demote them while the overlay is open instead
   of relying on z-index alone to win that fight. */
body.pdp-zoom-body-open .product-left-wrapper,
body.pdp-zoom-body-open .product-right-wrapper {
  z-index: 1 !important;
}

.pdp-zoom-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #000;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.pdp-zoom-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.pdp-zoom-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 64px 16px;
  box-sizing: border-box;
}

.pdp-zoom-item {
  max-width: 900px;
  margin: 0 auto 16px auto;
}

.pdp-zoom-item:last-child {
  margin-bottom: 0;
}

.pdp-zoom-item img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 991.98px) {
  .pdp-zoom-scroll {
    padding: 56px 8px;
  }

  .pdp-zoom-item {
    max-width: 100%;
    margin-bottom: 8px;
  }
}
