Products & Categories linked through reference field .Filter products repeater by category repeater menu

Dear community.

I have a page listing categorized products.

Main Collection: products (reference field product-categories)
Second Collection: products-categories

On the page I have:

A sidebar menu using a repeater to list all the product-categories. (Using buttons on the repater. I don’t want a select box. It should be a menu)

A main repeater that should display the products based on the category clicked by the user.

Reason I’m using reference field, is that it’s way easier for the owner of the website to define categories and select them when adding a new product with no risk of duplication or misspelling of the category.

I know that there’s a limitation with reference fields cannot be used to build URLs. That should be supported to be honest. Filtering on page will have an impact on SEO, but we decided that convenience has priority over SEO in this case.

I read about Master / Detaill page but I can’t get my head around it. I found the possibility to filter by a secondary dataset yet there’s a problem then since products-categories lists all the categories to build the menu. Not sure how to define the selected category to fillter the products once the user clicks on a category.

Otherwise I was looking to set an oncllick action to the category button.
Not sure how to connect the button onclick action to filter the products dataset and updates the page.

Hope someone can help here. Having categories and building navigation menus from it seems to be pretty standard. But I can’t find a simple implementation in editor-x / wix for it.

Thank you all in advance.
Patrick