Hello!
In Magento to keep stock accurately, each associated simple product will be unique variation of attribute(s).
So for product A you will have 10 associated simple products: hat size X1, hat size X2 etc.
For product B you will have 2 attributes - size and hatband style, so in case you have 10 sizes and 3 hatband styles, you will have 30 associated simple products that represent unique combination of hat size and hatband style, like: hat size X1 style Y1, hat size X2 style Y2
hat size X1 and hat size X1 style Y1 will be different products with different inventory.