Disabling product variants which are out of stock

Hey community,

I’ve tried to follow this guide: https://help.shopify.com/en/manual/products/inventory/hide-out-of-stock#:~:text=You%20can%20use%20automated%20collections,your%20store’s%20default%20Catalog%20collection.

I’m looking for a solution to hide a product variant completely (the images as well as the description) if it is out of stock.

While following the steps in the guide posted above, products are only disabled and not hidden, even though I followed the “Hiding out-of-stock products” option.

Maybe someone can help us out with this.

Thanks in advance!

EDIT: We are using the Minimal theme

goto your theme code section/product-template.liquid edit and update code according to your need

{% if product.available %}
{%comment%}

add here all product varients 
{%endcomment%}
{%else%}
          ##### OUT OF Stock  
 {% endif %}