Designing dynamic layout for a specific case

I have this tab that I have trouble figuring out:

tab that I have trouble figuring out

The beige panel displays the inventory. It's always 5x8 items and is always the same size. It's internal structure must remain as is.

The purple panel displays the currently selected (red), or hovered over (aqua) item.

Most of the items only fill the first leftmost chunk (basic info), with the ComboBox, picture and the three Lable/TextBox combos.

However, some items have "parts" which are displayed to the right of the basic info. Number of parts can vary from five to very much.

I need some way to composite all this so it looks nice and makes sense.

What I intended to do was to add a scrollbar to the parts panel so the user can scroll horizontally through them, but having come this far, I hate the way 1.8 parts per row are displayed. I could widen the window, but then the inventory need to get centered and I have empty space around it.

Is there a way I can arrange all these items so the UI would work for every case? As long as each item's basic info and all data attached to the each part is kept together, as well as part with it's item, I am able change anything in any way. I can increase the window height/width too.