Supermarket Simulator Shelf Mechanics

Sorry, but in English the same word “shelf” is used to mean several things. I have a shelf and in the shelf there are compartments. i want the compartments to accept all kinds of products but if i put one in i have to keep using that to fill it all. However, I want to make sure that for each product I have a different grid that is adapted to the type of product and its size so that smaller products are not too detached in case I use the same grid for everything. To understand better what I mean there are many gameplays of “Supermakert Simulator” where you see these mechanics.