/* Main slide gutters differ from thumbnail spacing in the source gallery. */
body.single-product.primeindustrial-replica .wd-gallery-images .woocommerce-product-gallery__wrapper.wd-carousel {
  --wd-gap: 0px;
}
/* Empire switches from 60px to75px thumbnails at1080px, not1024px. */
@media (min-width:1024px) and (max-width:1079px) {
  body.single-product.primeindustrial-replica .wd-gallery-thumb { height:81px; }
  body.single-product.primeindustrial-replica .wd-gallery-thumb .wd-carousel-item { width:64px !important; }
  body.single-product.primeindustrial-replica .wd-gallery-thumb img { width:60px; height:60px; }
}

/* Source Empire lightbox geometry, scoped to the existing native instance. */
body.single-product .pswp.pir-source-zoom .pswp__bg { background: #fff !important; }
body.single-product .pswp.pir-source-zoom .pswp__preloader { display: none !important; pointer-events: none !important; }
body.single-product .pswp.pir-source-zoom .pswp__top-bar { background: transparent !important; opacity: 1 !important; }
body.single-product .pswp.pir-source-zoom .pswp__button--share,
body.single-product .pswp.pir-source-zoom .pswp__button--fs,
body.single-product .pswp.pir-source-zoom .pswp__button--zoom,
body.single-product .pswp.pir-source-zoom .pswp__button--arrow--left,
body.single-product .pswp.pir-source-zoom .pswp__button--arrow--right,
body.single-product .pswp.pir-source-zoom .pswp__counter,
body.single-product .pswp.pir-source-zoom .pswp__caption,
body.single-product .pswp.pir-source-zoom .pswp__share-modal { display: none !important; }
body.single-product .pswp.pir-source-zoom .pswp__button--close {
  position: absolute !important; top: 0 !important; right: 0 !important;
  width: 40px !important; height: 40px !important; margin: 12px !important; padding: 0 !important;
  color: #000 !important; background: #fff !important; background-image: none !important;
  border: 0 !important; border-radius: 100% !important; opacity: 1 !important;
  box-shadow: 0 0 0 1px rgba(127,127,127,.03), 0 2px 5px rgba(127,127,127,.3) !important;
}
body.single-product .pswp.pir-source-zoom .pswp__button--close::before,
body.single-product .pswp.pir-source-zoom .pswp__button--close::after { content: none !important; }
body.single-product .pswp.pir-source-zoom .pswp__button--close .pir-zoom-close-icon {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; opacity: .6; pointer-events: none;
}
body.single-product .pswp.pir-source-zoom .pswp__button--close svg { width: 18px; height: 18px; pointer-events: none; }
body.single-product .pswp.pir-source-zoom .pswp__button--close:hover { box-shadow: 0 0 0 1px rgba(127,127,127,.04), 0 3px 10px rgba(127,127,127,.4) !important; transform: scale(1.125); }
body.single-product .pswp.pir-source-zoom .pswp__button--close:hover .pir-zoom-close-icon { opacity: .8; transition: opacity 150ms cubic-bezier(.4,0,.2,1); }
body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnails {
  position: absolute; bottom: 0; left: 0; width: 100%; box-sizing: border-box;
  margin: 9px 0; padding: 4.5px 9px; background: #fff; z-index: 2;
}
body.single-product .pswp.pir-source-zoom .pir-zoom-thumb-scroller {
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; padding: 2px 0;
  line-height: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
body.single-product .pswp.pir-source-zoom .pir-zoom-thumb-scroller::-webkit-scrollbar { display: none; }
body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail {
  display: inline-block !important; vertical-align: middle; box-sizing: border-box;
  width: 64px !important; height: 64px !important; padding: 2px !important; margin: 0 3px !important;
  color: #000; background: transparent !important; border: 0 !important; border-radius: 2px !important;
  box-shadow: 0 0 2px transparent; cursor: pointer; line-height: 0;
}
body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail[aria-current="true"] { box-shadow: 0 0 0 1.5px #818181; }
body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail:focus-visible { outline: 2px solid #818181; outline-offset: 2px; }
body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media screen and (min-width: 720px) {
  body.single-product .pswp.pir-source-zoom .pswp__button--close { width: 48px !important; height: 48px !important; margin: 25px !important; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnails { top: 0; bottom: auto; width: auto; margin: 25px; padding: 0 0 3px; background: transparent; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumb-scroller { display: flex; flex-direction: column; flex-wrap: wrap; padding: 0; max-height: 500px; overflow: visible; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail { flex: none; width: 51px !important; height: auto !important; margin-top: 6px !important; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail img { width: 100%; height: auto; }
}

/* Native source-verified PDP galleries: natural selected-image height and thumbnails. */
body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-images .wd-carousel-wrap {
  align-items: flex-start;
  height: var(--pir-gallery-active-height, auto) !important;
}
body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-images .wd-carousel-item {
  height: auto;
}
body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb .wd-carousel-item {
  width: auto !important;
  height: auto;
  padding: 2px;
  flex: none;
}
body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb img {
  width: auto !important;
  max-width: none;
  height: 60px;
  object-fit: contain;
}
@media (min-width:1080px) {
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb img { height: 75px; }
}
@media (min-width:720px) {
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb { height: auto; }
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb .wd-carousel { overflow: visible; }
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb .wd-carousel-wrap {
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb .wd-nav-arrows { display: none; }
}
@media (max-width:719px) {
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail { width: auto !important; height: 64px !important; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail img { width: auto; max-width: none; height: 60px; object-fit: contain; }
}

/* Match the rounded source75px bitmap ratio, rather than derivative rounding. */
body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb img[data-pir-thumb-ratio] {
  width: calc(60px * var(--pir-thumb-ratio)) !important;
  height: 60px;
  object-fit: cover;
  object-position: center;
}
@media (min-width:1080px) {
  body.single-product.primeindustrial-replica .woocommerce-product-gallery.pir-adaptive-gallery .wd-gallery-thumb img[data-pir-thumb-ratio] {
    width: calc(75px * var(--pir-thumb-ratio)) !important;
    height: 75px;
  }
}
/* The zoom adapter copies the same validated ratio to its generated image/button. */
@media (max-width:719px) {
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail[data-pir-thumb-ratio] { width: calc(60px * var(--pir-thumb-ratio) + 4px) !important; }
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail img[data-pir-thumb-ratio] { width: calc(60px * var(--pir-thumb-ratio)) !important; height: 60px; object-fit: cover; object-position: center; }
}
@media (min-width:720px) {
  body.single-product .pswp.pir-source-zoom .pir-zoom-thumbnail img[data-pir-thumb-ratio] { width: 47px !important; height: calc(47px / var(--pir-thumb-ratio)); object-fit: cover; object-position: center; }
}

/* Native PDP thumbnail arrows only; the main gallery/players keep their controls. */
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-nav-arrows {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  pointer-events: none;
}
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow {
  position: absolute !important;
  top: 0 !important;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px !important;
  min-width: 0;
  height: 100% !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: #1d1d1d !important;
  background: #fff !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
  transform: none !important;
  pointer-events: auto;
}
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow::before,
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow::after { content: none !important; }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-prev,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow.scroll-left { left: 0 !important; right: auto !important; border-right: 1px solid rgba(128,128,128,.3); }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-next,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow.scroll-right { left: auto !important; right: 0 !important; border-left: 1px solid rgba(128,128,128,.3); }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow svg,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow svg { display: block; width: 14px !important; height: 8px !important; pointer-events: none; }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-prev svg,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow.scroll-left svg { transform: rotate(90deg); }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-next svg,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow.scroll-right svg { transform: rotate(270deg); }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow.wd-disabled,
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-btn-arrow.wd-lock,
body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow[hidden] { display: none !important; }
body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .pir-video-thumb .icon-play-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  bottom: auto;
  left: auto;
  z-index: 1;
  width: 20px;
  height: 20px;
  color: #1d1d1d;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(29,29,29,.05);
  pointer-events: none;
}
@media (min-width:720px) {
  body.single-product.primeindustrial-replica .woocommerce-product-gallery .wd-gallery-thumb .wd-nav-arrows,
  body.single-product .pswp.pir-source-zoom .pir-zoom-scroll-arrow { display: none !important; }
}
