document.addEventListener('DOMContentLoaded', function() {
const productImages = document.querySelectorAll('.elementor-widget-woocommerce-products .product img');
productImages.forEach(function(image) {
const link = image.closest('.product').querySelector('a');
if (link) {
image.style.cursor = 'pointer'; // Optional: Change cursor to indicate it's clickable
image.addEventListener('click', function() {
window.location.href = link.href;
});
}
});
});