{{ header }}
<!-- O data é uma adaptação tecnica para funcionar o limpar todos do modulo de filtros selecionados -->
<section class="container-fluid" id="data-selected-url" data-pagination='{{ (paginationajax) ? pagination : "" }}'>
  {{ breadcrumbs }}
  <div class="row">
    {{ column_refinar }}

    {% if config.exist_content_left and fidelitygrid %}
      <aside class="col-xs-3 hidden-md-down">
        <div class="content-box js-aside-filter-container">
          {{ column_left }}
        </div>
      </aside>
    {% endif %}

    <div class="col-xs-12{% if config.exist_content_left and fidelitygrid %} col-md-9{% endif %}">
      <div class="content-box">
        {{ content_top }}

        {% if fidelitygrid %}

          <div class="row middle-xs x-small-space-xs medium-space-sm bottom-margin-medium">
            <div class="col-xs-12 col-sm">
              <h1 class="heading-1">{{ heading_title }}</h1>
            </div>
            <div class="col-xs-12 col-sm-width-auto">
              <div class="flex nowrap-xs">
                <select class="field-entry field-entry-medium right-margin-small" onchange="location = this.value;"
                        style="width:180px;">
                  {% for sorts in sorts %}
                    <option value="{{ sorts.href }}"
                            {% if sorts.value == sort ~ '-' ~ order %}selected{% endif %}>{{ sorts.text }}</option>
                  {% endfor %}
                </select>
                <button id="change-view"
                        class="btn-default {% if gridOrList != 'list' %}btn-outline{% endif %} btn-medium-square"
                        title="Visualizar em lista">
                  <i class="fas fa-list-ul"></i>
                </button>
              </div>
            </div>
          </div>

          {% if cartlists %}
            {% for keyTipo, cartTipo in cartlists %}
              {% for keyLista, lista in cartTipo %}
                <div class="row no-space-xs bottom-margin-medium">
                  <a href="{{ go_to_fidelity_cart }}" class="btn-default btn-large btn-full btn-outline">
                    <i class="{{ icon_cart }}"></i>
                    <span>{{ lista.products|length }} {{ text_items }} {{ total_points }} {{ text_info_points }}</span>
                  </a>
                </div>
              {% endfor %}
            {% endfor %}
          {% endif %}

          <div class="products-view {{ gridOrList }}">
            {{ fidelitygrid }}
          </div>

          <div class="bottom toolbar">
            {% if paginationajax == false %}
              <div class="top-border-gray top-padding-medium top-margin-medium">
                {{ pagination }}
              </div>
            {% else %}
              <div class="flex center-xs">
                <button type="button" class="btn-default btn-medium btn-outline margin-large js-more-products" disabled>
                  <span>{{ text_show_more }}</span>
                </button>
              </div>
            {% endif %}
          </div>

        {% else %}
          <div class="row">
            <div class="col-xs-12">
              <div class="content-box border-gray text-center padding-x-large">
                <i class="far fa-meh bigger-text-medium visible-block bottom-margin-x-small" aria-hidden="true"></i>
                <span class="text-x-large visible-block left-margin-small">{{ text_empty }}</span>
                <a href="{{ continue }}" class="btn-default btn-medium top margin-medium">
                  <span>{{ button_continue }}</span>
                </a>
              </div>
            </div>
          </div>
        {% endif %}
      </div>
    </div>
    {% if content_bottom %}
      <div class="col-xs-12">
        {{ content_bottom }}
      </div>
    {% endif %}
  </div>
</section>
{{ footer }}
