<div class="special-carousel products-list">
<div class="homebg-main">
  <div class="container bottom-to-top hb-animate-element">
    <div class="row">
      <div class="box-heading heading">
        <h3>{{ heading_title }}</h3>
      </div>
      <div class="special-items products-carousel"> {% for product in products %}
        <div class="product-layouts">
          <div class="product-thumb transition">
            <div class="image"> {% if product.thumb_swap %} <a href="{{ product.href }}"> <img class="image_thumb" src="{{ product.thumb }}" title="{{ product.name }}" alt="{{ product.name }}" /> <img class="image_thumb_swap" src="{{ product.thumb_swap }}" title="{{ product.name }}" alt="{{ product.name }}" /> </a> {% else %} <a href="{{ product.href }}"> <img class="img-responsive" src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" /> </a> {% endif %}
              {% if product.special %}
              <div class="sale-icon">Sale</div>
              <span class="percent">-{{ product.percent }}%</span> {% endif %}
              
              {% if product.to_date and product.to_date  !=  '0000-00-00' %}
              {% set date_time = product.to_date|date('Y-m-d') %}
              <div class="product-countdown">
                <div id="countdown4_{{ product.product_id }}" class="item-countdown" data-date="{{ date_time }}"></div>
              </div>
              {% endif %}
			  
		<div class="button-group">
					<button class="btn-cart {% if product.product_quantity <= 0 %}{{ "disabled" }}{% endif %}" type="button" title="{% if product.product_quantity <=0 %}{{ product.product_stock }}{% else %}{{ button_cart }}{% endif %}" onclick="{% if product.product_quantity <=0 %}{% else %}cart.add('{{ product.product_id }}'){% endif %}"{% if product.product_quantity <=0 %}{{ "" }} {% endif %}>
                        {% if product.product_quantity <=0 %}
                        {{ "<i class=\"fa fa-shopping-cart\"></i><span class=\"out of stock\">"~product.product_stock }}
                        {% else %} 
                        {{ "<i class=\"fa fa-shopping-cart\"></i> <span class=\"hidden-xs hidden-sm hidden-md\">"~button_cart }}
                        {% endif %} </span>
                        </button>
				   <button class="btn-wishlist" title="{{ button_wishlist }}"  onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i> <span title="{{ button_wishlist }}">{{ button_wishlist }}</span> </button>
                  <button class="btn-compare" title="{{ button_compare }}"  onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i> <span title="{{ button_compare }}">{{ button_compare }}</span> </button>
				  <button class="btn-quickview" type="button" title="{{ button_quickview }}" onclick="tt_quickview.ajaxView('{{ product.href }}')"><i class="fa fa-eye"></i> <span title="{{ button_quickview }}">{{ button_quickview }}</span> </button>
                </div>
	  
            </div>
            <div class="thumb-description">
              <div class="caption">
                <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
                {% if product.rating %}
                <div class="rating"> {% else %}
                  <div class="rating no-rating"> {% endif %}
                    {% for i in 1..5 %}
                    {% if product.rating < i %} <span class="fa fa-stack"><i class="fa fa-star off fa-stack-2x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i></span> {% endif %}
                    {% endfor %} </div>
                {% if product.price %}
                <div 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 %} </div>
                {% endif %}                    
 </div>
            </div>
          </div>
        </div>
        {% endfor %}

      </div>
    </div>
  </div>
  </div>
</div>

<script>
// product Carousel

  var ttspecialproduct = $('.special-items.products-carousel').owlCarousel({
				items : 4, //1 items above 1000px browser width
				nav :true,
				dots : false,
				loop: false,
				autoplay:false,	
				rtl:false,
				responsive: {
					0:{
						items:1
					},
					481:{
						items:2
					},
					768:{
						items:3
					},
					1200:{
						items:4
					},
					1200:{
						items:4
					}
				}
			});

</script>