/* Product image viewer component: native PhotoSwipe stacking and interaction finish. */
/* Hide Astra's variation stock/availability line without changing inventory logic. */
body.single-product .ast-stock-detail {
  display: none !important;
}

/* Product gallery images open through WooCommerce's native PhotoSwipe handler. */
body.single-product .woocommerce-product-gallery__image a,
body.single-product .woocommerce-product-gallery__image img {
  cursor: zoom-in;
}

/* Hide WooCommerce's separate zoom trigger; the image itself is the PhotoSwipe control. */
body.single-product .woocommerce-product-gallery__trigger {
  display: none !important;
}

/* Product image lightbox must sit above every site navigation portal. */
#photoswipe-fullscreen-dialog.pswp,
body > .pswp {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
}

/* PhotoSwipe desktop backdrop: override WooCommerce admin-bar height reduction. */
@media (min-width: 922px) {
  #photoswipe-fullscreen-dialog.pswp,
  body > .pswp,
  body .pswp.pswp--open {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-sizing: border-box !important;
  }

  #photoswipe-fullscreen-dialog.pswp > .pswp__bg,
  body > .pswp > .pswp__bg,
  body .pswp.pswp--open > .pswp__bg {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--pssk-ui-gallery-overlay) !important;
    box-sizing: border-box !important;
  }
}

/* Larger PhotoSwipe controls: 44px native sprite cells scaled to 52px. */
body.single-product .pswp .pswp__top-bar {
  height: 52px;
}

body.single-product .pswp .pswp__button {
  width: 52px;
  height: 52px;
  background-size: 312px 104px;
}

body.single-product .pswp .pswp__button--close {
  background-position: 0 -52px;
}

body.single-product .pswp .pswp__button--share {
  background-position: -52px -52px;
}

body.single-product .pswp.pswp--fs .pswp__button--fs {
  background-position: -52px 0;
}

body.single-product .pswp .pswp__button--zoom {
  background-position: -104px 0;
}

body.single-product .pswp.pswp--zoomed-in .pswp__button--zoom {
  background-position: -156px 0;
}

body.single-product .pswp .pswp__counter {
  height: 52px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 52px;
}

body.single-product .pswp .pswp__caption {
  min-height: 52px;
}

/* Larger next/previous icon artwork and larger finger targets on pointer devices. */
body.single-product .pswp .pswp__button--arrow--left,
body.single-product .pswp .pswp__button--arrow--right {
  width: 84px;
  height: 104px;
  margin-top: -52px;
}

body.single-product .pswp .pswp__button--arrow--left:before,
body.single-product .pswp .pswp__button--arrow--right:before {
  top: 24px;
  width: 52px;
  height: 52px;
  background-size: 312px 104px;
}

body.single-product .pswp .pswp__button--arrow--left:before {
  left: 0;
  background-position: -163px -52px;
}

body.single-product .pswp .pswp__button--arrow--right:before {
  right: 0;
  background-position: -111px -52px;
}