/* Product gallery: one native thumbnail row, placed directly below the active image. */
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .flex-viewport {
  order: 1 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: transparent !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 600px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  vertical-align: top !important;
}

body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs {
  order: 2 !important;
  position: static !important;
  inset: auto !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 8px !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 90px;
  margin: 0 !important;
  padding: 0 2px 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  list-style: none !important;
  scrollbar-width: thin;
  scrollbar-color: var(--pssk-ui-gallery-scrollbar) transparent;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs > li {
  display: block !important;
  position: relative !important;
  flex: 0 0 72px !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 90px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  list-style: none !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs > li img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 3px !important;
  border: 1px solid var(--pssk-ui-border) !important;
  border-radius: var(--pssk-ui-radius-form-button) !important;
  background: var(--pssk-ui-card) !important;
  object-fit: contain !important;
  opacity: .72 !important;
  cursor: pointer;
  box-sizing: border-box !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs > li img.flex-active,
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs > li img:hover {
  border: 2px solid var(--pssk-ui-primary) !important;
  padding: 2px !important;
  opacity: 1 !important;
}
@media (max-width: 700px) {
  body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery {
    gap: 10px !important;
  }
  body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs {
    gap: 7px !important;
    min-height: 74px;
  }
  body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery > .flex-control-nav.flex-control-thumbs > li {
    flex-basis: 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 74px !important;
  }
}


body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
/* FlexSlider owns slide widths; constrain only its viewport to the gallery column. */
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .flex-viewport {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  contain: paint;
}
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image {
  box-sizing: border-box !important;
  max-width: none !important;
}

/* Gallery images fill the available slider width while preserving their proportions. */
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image img,
body.single-product .pssk-product-primary-layout > .woocommerce-product-gallery .woocommerce-product-gallery__image a img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  vertical-align: top !important;
}

