
{% sw_extends '@Storefront/storefront/component/product/listing.html.twig' %}

{% block element_product_listing_row %}
    <div class="row cms-listing-row js-listing-wrapper">
        {% if page.footer.navigation.active.customFields.custom_listing_textbox_text is defined %}
            <div class="cms-listing-col col-xl-6 col-lg-8 col-12">
                <div class="card textbox d-flex justify-content-center">
                    <div class="inner">
                        {{ page.footer.navigation.active.customFields.custom_listing_textbox_text|trans|sw_sanitize }}
                    </div>
                </div>
            </div>
        {% endif %}
        {% if searchResult.total > 0 %}
            {% block element_product_listing_col %}
                {% for product in searchResult %}
                    <div class="cms-listing-col {{ listingColumns }}">
                        {% block element_product_listing_box %}
                            {% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
                                'layout': boxLayout,
                                'displayMode': displayMode
                            } %}
                        {% endblock %}
                    </div>
                {% endfor %}
            {% endblock %}
        {% else %}
            {% block element_product_listing_col_empty %}
                <div class="cms-listing-col col-12">
                    {% block element_product_listing_col_empty_alert %}
                        {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
                            type: 'info',
                            content: 'listing.emptyResultMessage'|trans|sw_sanitize
                        } %}
                    {% endblock %}
                </div>
            {% endblock %}
        {% endif %}
    </div>
{% endblock %}