I'm having trouble figuring out how to make this part look right. I've tried using flexWrap, but the items are stacking vertically instead of aligning horizontally.
<Box sx={{display: {xs: 'flex'},
gap: {xs: '0px', md:'20px',
flexWrap: 'wrap',
alignItems: 'center' }}}
>
{products.map((product) => (
<CardProduct key={product._id} product={product}/>
))}
</Box>
I want the first and second products to align and have some spacing between them, with the third product wrapping automatically. I've tried setting flexWrap:'wrap' but it didn't work. Should I adjust the height or is it because of the button size?
Click here to see what I'm aiming for
This is how it looks when there are only two products: