How can I hide zero dollar item prices on collection and product pages?

Topic summary

Goal: Hide $0 prices on collection and product pages.

Context: Store uses the Warehouse theme, version 5.1.0, and is not live. A previous live setup on version 1.16 had a working fix, but the code in 5.1.0 differs, preventing a direct reuse.

Attempt: Tried replicating the earlier solution; encountered differences in theme code structure.

Status: No solution provided yet; seeking guidance for version 5.1.0.

Open questions: How to conditionally hide zero-price display in the updated theme (likely via Liquid/HTML/CSS changes). Which template or snippet files to edit for collection and product pages in Warehouse 5.1.0.

Notes: No code snippets or attachments are included; tags indicate focus on collection-page, product-page, CSS, and HTML. Discussion remains open.

Summarized with AI on January 5. AI used: gpt-5.

I have items listed at $0. I would like to hide the price on collection pages and on product pages. I use Warehouse, latest version 5.1.0, not live yet.

I tried replicating the fix that was done on the current live version 1.16, but the code is different.