can this layout use a flex wrap rather than a media query?

Hey, i made this example for someone with my go to method being that the flex container's flex-direction changes to row in a media query. However i feel like that can be simplified using a flex wrap which i'm trying to learn the in depths of. How would i go about doing this? My first thought was to limit how small the cards can get with width or flex-basis but i'm not entirely sure of the most efficient way to go about it. I'd prefer that the cards don't individually wrap but rather all wrap at once so they can all either be all in a row or all in a column. Or is a media query the most efficient way? Thanks in advance.

https://codepen.io/deerCabin/pen/qBzEWKe
Was this page helpful?