/* KOSHI approved gallery refresh. Native WooCommerce slides and zoom remain in control. */
body.single-product #main #content div.product > .woocommerce-product-gallery {
  --koshi-gallery-refresh: 20261113;
  --koshi-gallery-border: #e0e0e4;
  --koshi-gallery-hover: #898989;
  --koshi-gallery-focus: #c62435;
  --koshi-gallery-accent: #c62435;
  box-sizing: border-box;
  margin-bottom: 28px !important;
}
@media (min-width: 768px) {
  body.single-product #main #content div.product > .woocommerce-product-gallery {
    width: 45% !important;
  }
}
body.single-product #main #content div.product > .woocommerce-product-gallery .flex-viewport,
body.single-product #main #content div.product > .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image,
body.single-product #main #content div.product > .woocommerce-product-gallery--without-images .woocommerce-product-gallery__image--placeholder {
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--koshi-gallery-border);
  border-radius: 10px;
  background: #fff;
}
body.single-product #main #content div.product > .woocommerce-product-gallery .flex-viewport {
  margin-bottom: 0 !important;
}
body.single-product #main #content div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img:not(.zoomImg),
body.single-product #main #content div.product > .woocommerce-product-gallery .woocommerce-product-gallery__image--placeholder > img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none;
  overflow: visible;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs::before,
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs::after {
  display: none !important;
  content: none !important;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li {
  box-sizing: border-box;
  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  align-self: start;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li > img {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 44px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0 !important;
  padding: 3px !important;
  border: 2px solid var(--koshi-gallery-border) !important;
  border-radius: 7px;
  background: #fff;
  opacity: 1 !important;
  filter: none;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li > img:hover {
  border-color: var(--koshi-gallery-hover) !important;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li > img.flex-active {
  border-color: var(--koshi-gallery-accent) !important;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li > img:focus-visible,
body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger:focus-visible {
  outline: 2px solid var(--koshi-gallery-focus);
  outline-offset: 2px;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  top: 10px !important;
  right: 10px !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dedee2 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #414141 !important;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger::before {
  display: block;
  font-size: 18px;
  line-height: 1;
  text-indent: 0;
  color: inherit;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger > span {
  display: none;
}
body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger:hover {
  border-color: var(--koshi-gallery-accent) !important;
  color: var(--koshi-gallery-accent) !important;
}
html.wp-dark-mode-active body.single-product #main #content div.product > .woocommerce-product-gallery {
  --koshi-gallery-border: #454545;
  --koshi-gallery-hover: #bdbdbd;
  --koshi-gallery-focus: #e77f8b;
}
@media (max-width: 767px) {
  body.single-product #main #content div.product > .woocommerce-product-gallery {
    width: 100% !important;
    margin-bottom: 28px !important;
  }
  body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs {
    gap: 6px;
  }
  body.single-product #main #content div.product > .woocommerce-product-gallery > .flex-control-thumbs > li > img {
    padding: 2px !important;
  }
  body.single-product #main #content div.product > .woocommerce-product-gallery > .woocommerce-product-gallery__trigger {
    top: 8px !important;
    right: 8px !important;
  }
}
/* End KOSHI gallery refresh. */
