Is there anyway to hide items where product.available is falsey
https://shopify.dev/docs/themes/liquid/reference/objects/product#product-available
Returns true if a product is available for purchase. Returns false if all of the products variants’ inventory_quantity values are zero or less, and their inventory_policy is not set to “Allow users to purchase this item, even if it is no longer in stock.”
The following properties are available for filtering on auto collections
Product title
Product type
Product vendor
Product price
Product tag
Compare at price
Weight
Inventory stock
Variant’s title
Compare at price
Inventory Stock > 0 doesn’t cut it as some products are marked as “Continue selling when out of stock”
It’s possible to hide the product in theme whilst iterating products in a collection
{%- for product in collection.products -%}
{%- if product.available %}
{%- include 'product-grid-item' -%}
{% endif %}
{%- else -%}
<div class="grid__item">
<p>{{ 'collections.general.no_matches' | t }}</p>
</div>
{%- endfor -%}
however that doesn’t fix the pagination or collection product counts, e.g. there could be an entire empty page as all products on that page are unavailable.