Thank you! It worked, now the only problem was that there was a space between the gallery and the product's name, but I manage to fix that by adding margin to the code:
.ProductItem-gallery .ProductItem-gallery-scroll {
display: grid;
place-items: center;
margin-bottom: -80px;
}