Does anyone know how to collapse woocommerce categories

Typically, when one clicks on Shop in the nav bar, they end up on the shop page which shows the shop category images.

We have categories with sub categories and I would like to display the main categories on the page with an accordion (collapsible) style arrangement so that when people click on a main product category, the sub categories slide out and the sub sub categories.

Please note, this is not in the side bar, it is needed on the actual page that displays the shop categories and the images of those shop categories.