<div class="list-collections container">

    <h1>{{ 'general.list_collections.header' | t }}</h1>

    <div class="list-collections-grid">
    {% for collection in collections %}

        <a href="{{ collection.url }}" class="list-collections-grid-card no-link-style">
            <h2>{{ collection.title | escape }}</h2>

            {%- if collection.featured_image.src != blank -%}
                {% render 'image', image: collection.featured_image.src %}
            {%- else -%}
                {% for product in collection.products limit:1 %}
                    {% render 'image', image: product.featured_image.src %}
                {% endfor %}
            {%- endif -%}
            
        </a>

    {% endfor %}
    </div>

</div>