Collection - Add a hover effect to product images on your collection pages

Hi, great tutorial. I could find these files and lines in my theme. However, what I am looking for is solution for my products. My mockups use transparent background and when I hover over them I can still see the first image. This is very disturbing. Any solution for this? Thank you. Much appreciated.