How to create body class for product category page?

I'm pretty desperate here, as my search for an answer has led me nowhere, and none of my code seems to work the way I think it should.

I'm trying to add a custom class to the body tag whenever I'm on a product category page. I need this to be a function inside functions.php. I've tried everything from if(is_category()) to if(is_post_type('product')) and every variation I can think of, but NOTHING works. Is there anyone who can help me with this??