/*
 * Product gallery containment repair — 2.4.23
 * Loaded after WoodMart's product gallery styles.
 */

html body.single-product .zr-pdp__visual,
html body.single-product .zr-pdp__visual .woocommerce-product-gallery,
html body.single-product .zr-pdp__visual .wd-gallery-images,
html body.single-product .zr-pdp__visual .wd-gallery-thumb {
  min-width: 0 !important;
  max-width: 100% !important;
}

html body.single-product .zr-pdp__visual .woocommerce-product-gallery.wd-has-thumb.thumbs-position-left {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html body.single-product .zr-pdp__visual .woocommerce-product-gallery.thumbs-position-left .wd-gallery-images {
  position: relative !important;
  inset: auto !important;
  order: 1 !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html body.single-product .zr-pdp__visual .woocommerce-product-gallery.wd-has-thumb.thumbs-position-left .wd-gallery-thumb {
  position: relative !important;
  inset: auto !important;
  order: 2 !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  height: 92px !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  transform: none !important;
}

html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-inner {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 92px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-wrap {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  align-items: center !important;
  width: max-content !important;
  min-width: 100% !important;
  height: 88px !important;
  margin: 0 !important;
  gap: 12px !important;
  transform: none !important;
}

html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  flex: 0 0 80px !important;
  width: 80px !important;
  max-width: 80px !important;
  height: 80px !important;
  padding: 0 !important;
  transform: none !important;
}

html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item img {
  display: block !important;
  width: 80px !important;
  height: 80px !important;
  margin: 0 !important;
  border: 1px solid #e2e2e2 !important;
  object-fit: contain !important;
}

html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item.wd-active img,
html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item.zr-thumb-active img {
  border-color: #222 !important;
  box-shadow: inset 0 0 0 1px #222 !important;
}

html body.single-product .zr-pdp__visual .wd-gallery-images .wd-carousel-wrap {
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

html body.single-product .zr-pdp__visual .zr-gallery-enhanced .wd-gallery-images .wd-carousel-item {
  display: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

html body.single-product .zr-pdp__visual .zr-gallery-enhanced .wd-gallery-images .wd-carousel-item.zr-gallery-active {
  display: block !important;
}

@media (max-width: 767px) {
  html body.single-product .zr-pdp__visual .woocommerce-product-gallery.wd-has-thumb.thumbs-position-left .wd-gallery-thumb,
  html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-inner {
    height: 80px !important;
  }

  html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-wrap {
    height: 76px !important;
    gap: 10px !important;
  }

  html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item,
  html body.single-product .zr-pdp__visual .wd-gallery-thumb .wd-carousel-item img {
    flex-basis: 72px !important;
    width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
  }
}
