Variant sold out display in Capital Theme

I have tried numerous things from google search and forum codes, etc, updated code and reviewed forums but can’t target a size variant when sold out to then add css to show it’s out of stock.

Here’s an example page: https://basement.nz/collections/shop-new-balance/products/new-balance-550-white-grey

Thanks in advance.

It may be that you need to custom develop this function.

Click on the variant, get the corresponding stock, then go to display the stock and if the stock is 0, show sold out