A product page that says 'in stock' is lying a little. A child's dress exists as a size and a colour, and only some of those pairs are on the shelf. The Size-Stock Serpent was the point where I stopped modelling a product with a quantity and started modelling a product with variants.
In PostgreSQL that is a product table, a variant table with one row for each size and colour, and a stock count on the variant. The endpoint returns the variants together with the product, so the app can disable what cannot be bought before the parent taps it. Price lives on the product, and a scheduled discount is applied on the server, so the number on the page is already the number at checkout.
The catalog filters use the same columns, which is the quiet payoff: price, size and colour are fields of one table, so a filter and a size picker can never disagree about what exists. What I would add next is a short hold when an item enters a cart, so two parents do not race for the last size 104.