/* Main gallery arrows over image */
.woocommerce div.product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery {
  position: relative;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav,
.single-product .woocommerce-product-gallery .flex-direction-nav,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav li,
.single-product .woocommerce-product-gallery .flex-direction-nav li,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav a,
.single-product .woocommerce-product-gallery .flex-direction-nav a,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav a {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(17, 24, 39, 0.72);
  color: transparent;
  overflow: hidden;
  text-indent: -9999px;
  z-index: 9;
  opacity: 0.92;
  transition: opacity .18s ease, background-color .18s ease;
  font-size: 0 !important;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav a:hover,
.single-product .woocommerce-product-gallery .flex-direction-nav a:hover,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav a:hover {
  opacity: 1;
  background: rgba(17, 24, 39, 0.88);
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav .flex-prev,
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav .flex-prev {
  left: 12px;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav .flex-next,
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav .flex-next {
  right: 12px;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav a::before,
.single-product .woocommerce-product-gallery .flex-direction-nav a::before,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  text-indent: 0;
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav .flex-prev::before,
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-prev::before,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav .flex-prev::before {
  content: '\2039';
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav .flex-next::before,
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-next::before,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav .flex-next::before {
  content: '\203A';
}

.woocommerce div.product .woocommerce-product-gallery .flex-direction-nav .flex-disabled,
.single-product .woocommerce-product-gallery .flex-direction-nav .flex-disabled,
.single-product .elementor-widget-woocommerce-product-images .flex-direction-nav .flex-disabled {
  opacity: .35;
  pointer-events: none;
}

/* Thumbs carousel */
.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-shell,
.single-product .woocommerce-product-gallery .fvd-thumbs-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  z-index: 15;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-viewport,
.single-product .woocommerce-product-gallery .fvd-thumbs-viewport {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-viewport::-webkit-scrollbar,
.single-product .woocommerce-product-gallery .fvd-thumbs-viewport::-webkit-scrollbar {
  display: none;
}

.woocommerce div.product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track,
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track,
.single-product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track,
.single-product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track,
.single-product .elementor-widget-woocommerce-product-images .flex-control-nav.fvd-thumbs-track,
.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs.fvd-thumbs-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track li,
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track li,
.single-product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track li,
.single-product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track li,
.single-product .elementor-widget-woocommerce-product-images .flex-control-nav.fvd-thumbs-track li,
.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs.fvd-thumbs-track li {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 calc((100% - 24px) / 4);
  max-width: calc((100% - 24px) / 4);
  width: calc((100% - 24px) / 4) !important;
  float: none !important;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track li img,
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track li img,
.single-product .woocommerce-product-gallery .flex-control-nav.fvd-thumbs-track li img,
.single-product .woocommerce-product-gallery .flex-control-thumbs.fvd-thumbs-track li img,
.single-product .elementor-widget-woocommerce-product-images .flex-control-nav.fvd-thumbs-track li img,
.single-product .elementor-widget-woocommerce-product-images .flex-control-thumbs.fvd-thumbs-track li img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-arrow,
.single-product .woocommerce-product-gallery .fvd-thumbs-arrow {
  width: 30px;
  height: 30px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  line-height: 1;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto !important;
}

.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-arrow[disabled],
.single-product .woocommerce-product-gallery .fvd-thumbs-arrow[disabled] {
  opacity: .35;
  cursor: pointer;
}

/* Avoid duplicated default margins in some themes */
.woocommerce div.product .woocommerce-product-gallery .fvd-thumbs-shell .flex-control-nav,
.single-product .woocommerce-product-gallery .fvd-thumbs-shell .flex-control-nav {
  margin: 0 !important;
}
