Zend certified PHP/Magento developer

Separate carts by store group

I’ve been operating a multi store group website for the past two years (Magento 2.4.1). Each store group has 2 store views (one in our native language and another in english).

Store Group 1

— Store View PT

— Store View EN

Store Group 2

— Store View PT

— Store View EN

What I’m trying to accomplish is to have separate carts for each store group. meaning that a customer could not buy a product from the store group 1 in the store group 2.

We already have a script that will make the products visible/invisible in each store according to our needs but at the moment a customer can add a product in the store goup 1, navigate to store group 2 add another and do the checkout.

Sorry if I didn’t make myself clear…Is this possible? If so can anyone point me in the right direction on how to do it?

Thanks !