/* Single product gallery — nav + zoom theo chuột */

.product-single-wrap .woocommerce-product-gallery {
  position: relative;
}

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

.product-single-wrap .woocommerce-product-gallery__image {
  overflow: hidden;
  cursor: crosshair;
}

.product-single-wrap .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.12s ease-out;
  will-change: transform;
}

/* Gỡ zoom cũ (scale cố định từ style.css) */
.product-single-wrap .woocommerce-product-gallery__image:hover img {
  transform: none;
}

.product-single-wrap .woocommerce-product-gallery__image.is-vg-zooming {
  cursor: zoom-in;
}

/* Nút prev / next trên ảnh chính */
.vg-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.vg-gallery-nav i {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.vg-gallery-nav:hover {
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #222;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.vg-gallery-nav:hover i {
  filter: none;
}

.vg-gallery-nav--prev {
  left: 12px;
}

.vg-gallery-nav--next {
  right: 12px;
}

.vg-gallery-nav:focus-visible {
  outline: 2px solid #3ab54a;
  outline-offset: 2px;
}

/* Flexslider arrows mặc định (nếu bật) — ẩn, dùng nút custom */
.product-single-wrap .woocommerce-product-gallery .flex-direction-nav a {
  display: none !important;
}

@media (max-width: 991px) {
  .product-single-wrap .woocommerce-product-gallery__image {
    cursor: default;
  }

  .product-single-wrap .woocommerce-product-gallery__image img {
    transition: none;
    transform: none !important;
  }

  .vg-gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .vg-gallery-nav--prev {
    left: 8px;
  }

  .vg-gallery-nav--next {
    right: 8px;
  }
}
