Is there a way to see the sub site products in a different layout on the main site?

I have a multisite setup. So the sub sites can create their own products.
The main site list the products of the all sub sites.
Is there a way to, when the client finds the product that he wants through the mais set, the layout used to see the product inherit the MAIN site. And when the client finds through a sub site, the layout inherit the sub site's layout?