Mobile CSS: item keeps hover color when clicked

Hi, If you select a product here by clicking on it and you deselect it, it should have no background, but still the property of hover is used (on desktop it should change the background color on hover). How I can fix it? On mobile it's misleading.