.single-product .woocommerce-product-gallery {
  --tlg-thumb-size: 70px;
  background: #fff;
}

.single-product .woocommerce-product-gallery .flex-viewport {
  overflow: hidden;
}

.single-product .woocommerce-product-gallery__image > a {
  display: block;
  background: #fff;
}

.single-product .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
}

.single-product .tlg-gallery-full-view {
  display: block;
  width: fit-content;
  margin: 8px auto;
  padding: 4px 8px;
  background: transparent;
  border: 0;
  color: #007185;
  font: inherit;
  font-size: 0.875rem;
  text-transform: none;
  cursor: pointer;
}

.single-product .tlg-gallery-full-view:hover,
.single-product .tlg-gallery-full-view:focus {
  background: transparent;
  color: #007185;
  text-decoration: underline;
}

.single-product .woocommerce-product-gallery ol.flex-control-thumbs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  gap: 10px;
  padding: 5px 5px 9px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  position: relative;
  float: none;
  flex: 0 0 var(--tlg-thumb-size);
  width: var(--tlg-thumb-size);
  margin: 0;
}

.single-product .woocommerce-product-gallery.tlg-gallery-ready .flex-control-thumbs li:nth-child(n+7) {
  display: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: var(--tlg-thumb-size);
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 12px;
  opacity: 1;
  cursor: pointer;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
  border-color: #00a8cc;
  box-shadow: 0 0 6px rgb(0 168 204 / 50%);
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img:focus-visible {
  outline: 2px solid #007185;
  outline-offset: 2px;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li[data-tlg-more]::after {
  content: attr(data-tlg-more);
  position: absolute;
  inset: 2px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgb(0 0 0 / 60%);
  color: #fff;
  font-weight: 700;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .single-product .woocommerce-product-gallery__image > a {
    cursor: zoom-in;
  }
}

@media (max-width: 768px) {
  .single-product div.product .woocommerce-product-gallery {
    width: 100%;
    float: none;
  }
}