Skip to content document.addEventListener("DOMContentLoaded", function () {
const gallery = document.querySelector(".woocommerce-product-gallery");
const trigger = document.querySelector(".woocommerce-product-gallery__trigger");if (!gallery || !trigger) return;gallery.addEventListener("click", function (e) {
const activeImageLink = e.target.closest(".flex-active-slide a");
if (!activeImageLink) return;e.preventDefault();
trigger.click();
});
gallery.style.cursor = "zoom-in";
});document.addEventListener("DOMContentLoaded", function () {
const gallery = document.querySelector(".woocommerce-product-gallery");
if (gallery) {
gallery.style.cursor = "zoom-in";
}
});document.addEventListener('DOMContentLoaded', function() {
if (typeof PhotoSwipeLightbox === 'undefined') return;const lightbox = new PhotoSwipeLightbox({
gallery: '.woocommerce-product-gallery__wrapper', // container of gallery images
children: 'a', // each is an item
pswpModule: PhotoSwipe, // PhotoSwipe module
showHideAnimationType: 'fade', // smooth fade
padding: { top: 0, bottom: 80 }, // space for thumbnails
wheelToZoom: false // disable scroll-to-zoom
});lightbox.init();
});