/*
 - All of the CSS for your public-facing functionality should be
 - included in this file.
 */

/* Video Gallery Wrapper - Common Styles */
.product-video-gallery-for-wc-wrapper,
div[class*="product-video-gallery-variable-for-wc-wrapper"] {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  margin: auto !important;
  aspect-ratio: 1 / 1;
}

div[class*="product-video-gallery-variable-for-wc-wrapper"] {
  display: none;
}

.product-video-gallery-for-wc-wrapper img,
div[class*="product-video-gallery-variable-for-wc-wrapper"] img {
  width: 100% !important;
  height: 100% !important;
  margin: auto !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.product-video-gallery-for-wc-wrapper span,
div[class*="product-video-gallery-variable-for-wc-wrapper"] span {
  font-size: 24px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.product-video-gallery-for-wc-wrapper span,
div[class*="product-video-gallery-variable-for-wc-wrapper"] span.dashicons {
  pointer-events: none !important;
}

/* Thumbnail Video Wrapper States */

.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  .product-video-gallery-for-wc-wrapper,
.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  div[class*="product-video-gallery-variable-for-wc-wrapper"] {
  cursor: pointer;
  opacity: 0.5;
  margin: 0;
}

.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  .product-video-gallery-for-wc-wrapper:hover,
.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  .product-video-gallery-for-wc-wrapper.flex-active,
.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  div[class*="product-video-gallery-variable-for-wc-wrapper"]:hover,
.woocommerce
  div.product
  div.images
  .flex-control-thumbs
  li
  div[class*="product-video-gallery-variable-for-wc-wrapper"].flex-active {
  opacity: 1;
}

/* Flex Control Thumbs */

.flex-control-thumbs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.flex-control-thumbs::-webkit-scrollbar {
  display: none;
}

.flex-control-thumbs li {
  flex: 0 0 auto;
}

/* Ensure all thumbnail images maintain 1:1 ratio */

.flex-control-thumbs li img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Thumbnail Navigation Wrapper */

.flex-thumbs-wrapper {
  position: relative;
}

/* Navigation Buttons */

.flex-thumbs-btn {
  position: absolute;
  z-index: 10;
  top: 0;
  height: 100%;
  padding: 0 8px;
  border: none;
  cursor: pointer;
  display: flex !important;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition:
    opacity 0.25s ease,
    color 0.25s linear,
    transform 0.25s ease,
    visibility 0.25s ease;
}

.flex-thumbs-btn.prev {
  left: 0;
}

.flex-thumbs-btn.next {
  right: 0;
  transform: translateX(6px);
}

.flex-thumbs-wrapper:hover .flex-thumbs-btn {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Gallery Image */

.woocommerce-product-gallery__image {
  max-height: min-content;
}

/* Mobile Responsive Adjustments */

@media (max-width: 425px) {
  .flex-thumbs-btn {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    width: 20px;
  }
}

@media (max-width: 768px) {
  .flex-thumbs-btn {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    width: 40px;
  }
}
