{{ header }}
<div id="product-search" class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  <div class="row">{{ column_left }}
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">{{ content_top }}
      {% if products %}
      <div class="jcate-filters">
        <div class="row">
          <div class="col-md-2 col-sm-2 hidden-xs">
            <div class="j-gird-list">
              <button type="button" id="list-view" data-toggle="tooltip" title="{{ button_list }}"><i class="fa fa-th-list"></i></button>
              <button type="button" id="grid-view" data-toggle="tooltip" title="{{ button_grid }}"><i class="fa fa-th"></i></button>
            </div>
          </div>
          <div class="col-md-5 col-sm-6 hidden-xs hidden-sm">
            <div class="form-group"><a href="{{ compare }}" id="compare-total" class="btn btn-default">{{ text_compare }}</a></div>
          </div>
          <div class="col-md-3 col-sm-4 col-xs-12">
            <div class="form-group">
              <span for="input-sort" class="hidden-xs hidden-sm">{{ text_sort }}</span>
              <select id="input-sort" class="form-control" onchange="location = this.value;">
                {% for sorts in sorts %}
                {% if sorts.value == '%s-%s'|format(sort, order) %}
                <option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
                {% else %}
                <option value="{{ sorts.href }}">{{ sorts.text }}</option>
                {% endif %}
                {% endfor %}
              </select>
            </div>
          </div>
          <div class="col-md-2 col-sm-2 col-xs-6 text-right hidden-xs">
            <div class="form-group">
              <span for="input-limit" class="hidden-xs hidden-sm">{{ text_limit }}</span>
              <select id="input-limit" class="form-control" onchange="location = this.value;">
                {% for limits in limits %}
                {% if limits.value == limit %}
                <option value="{{ limits.href }}" selected="selected">{{ limits.text }}</option>
                {% else %}
                <option value="{{ limits.href }}">{{ limits.text }}</option>
                {% endif %}
                {% endfor %}
              </select>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        {% for product in products %}
        <div class="product-layout product-list col-xs-12">
          <div class="product-thumb transition">
            <div class="image">
              <a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" />
                {% if product.additional_image %}
                <img class="hover-img" src="{{ product.additional_image }}" class="img-responsive">
                {% endif %}
              </a>
            </div>
            <div class="caption">
              <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
              <div class="rating">
                {% for i in 1..5 %}
                {% if product.rating < i %}
                <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
                {% else %}
                <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
                {% endif %}
                {% endfor %}
              </div>
              <p class="description">{{ product.description }}</p>
              {% if product.price %}
                <p class="price">
                  {% if not product.special %}
                  {{ product.price }}
                  {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
                  {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
                  {% endif %}
                </p>
              {% endif %}
              <div class="exbutton-group">
                <button class="btn cartbtn" data-placement="top" type="button" data-toggle="tooltip" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i></button>
                <button class="btn wishbtn" data-placement="top" type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
                <button class="btn combtn" data-placement="top" type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
              </div>
            </div>
          </div>
        </div>
        {% endfor %}
      </div>
      <div class="pagination-wrap">
        <div class="row">
          <div class="col-sm-6 text-left">{{ pagination }}</div>
          <div class="col-sm-6 text-right">{{ results }}</div>
        </div>
      </div>
      {% else %}
      <p>{{ text_empty }}</p>
      <div class="buttons">
        <div class="pull-right"><a href="{{ continue }}" class="btn btn-primary">{{ button_continue }}</a></div>
      </div>
      {% endif %}
      {{ content_bottom }}</div>
    {{ column_right }}</div>
</div>
{{ footer }}