// Shop page: remove button, make image clickable with hover effect
add_action('wp_footer', 'custom_shop_image_hover_effect');
function custom_shop_image_hover_effect() {
    if ( !is_shop() && !is_product_category() && !is_product_tag() ) return;
    ?>
    <script>
    jQuery(document).ready(function($){
        $('.products .product').each(function(){
            var $product = $(this);

            // Remove 'Select Options' or 'Add to cart' button
            $product.find('.button').remove();

            // Make sure image is clickable
            var productLink = $product.find('a.woocommerce-LoopProduct-link').attr('href');
            var $mainImg = $product.find('img:first');

            if(productLink && !$mainImg.parent().is('a')){
                $mainImg.wrap('<a href="'+productLink+'" class="hover-image"></a>');
            }
        });
    });
    </script>
    <style>
    /* Simple hover effect */
    .products .product img {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .products .product img:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        cursor: pointer;
    }
    </style>
    <?php
}
