<div class="header-cart invisible" data-header-cart='{{ shop.money_format }}'>
  <div class="mobile_cart_close" style="display: none;">
        <span>{{ settings.cart_header_text }} 
          {% if settings.cart_slider_link_back_enable == false %}
          	<i><svg version="1.1" id="Calque_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <g> <path fill="#FFFFFF" d="M559.977,718.547c-9.408,0-18.262-3.665-24.921-10.324l-225.23-225.229 c-3.363-3.364-7.768-5.045-12.174-5.045c-4.406,0-8.812,1.681-12.175,5.045L60.247,708.223 c-6.659,6.659-15.512,10.324-24.921,10.324s-18.263-3.665-24.922-10.324c-13.73-13.738-13.73-36.103,0-49.842l225.23-225.229 c6.727-6.727,6.727-17.623,0-24.35L10.405,183.572c-13.73-13.739-13.73-36.104,0-49.842c6.659-6.659,15.513-10.324,24.922-10.324 s18.262,3.665,24.921,10.324l225.23,225.229c3.363,3.364,7.769,5.045,12.175,5.045c4.406,0,8.811-1.681,12.174-5.045 l225.23-225.229c6.659-6.659,15.512-10.324,24.921-10.324c9.408,0,18.263,3.665,24.922,10.324c13.73,13.738,13.73,36.103,0,49.842 l-225.23,225.229c-6.727,6.727-6.727,17.623,0,24.35l225.23,225.229c13.73,13.739,13.73,36.104,0,49.842 C578.24,714.882,569.385,718.547,559.977,718.547z"/> </g> </svg></i>
          {% else %}
          	<i class="cart_slider_back_link">{{ settings.cart_slider_link_back_text }}</i>
          {% endif %}
    </span>
      </div>
  <div class="header-cart-items" data-header-cart-items>
    {% assign totalDiscountAmount = 0 %}
    {% assign totalAmountWithoutDiscount = 0 %}
    {% for item in cart.items %}
      {% assign maxQuantity = 0 %}
      {% if item.variant.inventory_management == 'shopify' and item.variant.inventory_policy == 'deny' %}
        {% assign maxQuantity = item.variant.inventory_quantity %}
      {% endif %}
      
      <article class="header-cart-item" data-header-cart-item="{{ item.id }}">
        {% assign imageSize = "80x" %}
        <a class="header-cart-item-image" href="{{ item.url }}">
          <img src="{{ item | img_url: imageSize }}"
               srcset="{{ item | img_url: imageSize }} 1x, {{ item | img_url: imageSize, scale: 2 }} 2x"
               alt="{{ item.title | escape }}">
        </a>
        <div class="header-cart-item-info">
          <h3>
            
            {% if settings.cart_enable_product_link %}
            <a href="{{ item.url }}">
            {%endif%}
              {{ item.product.title }}
            {% if settings.cart_enable_product_link %}
            </a>
            {%endif%}
          	</h3>
          <span class="money">{{ item.price | money }}
            
          </span>
          	{% assign totalDiscountAmountItem = 0 %}
          	{% if item.variant.compare_at_price %}
          	{% assign totalAmountWithoutDiscount = item.variant.compare_at_price | times: item.quantity | plus : totalAmountWithoutDiscount %}
          	{% assign totalDiscountAmountItem = item.variant.compare_at_price | minus: item.price | times: item.quantity %}
          	{% assign totalDiscountAmountItemTmp = item.variant.compare_at_price | minus: item.price %}
          	{% assign totalDiscountAmount = totalDiscountAmount | plus: totalDiscountAmountItem %}
         
              

             {% if item.variant.compare_at_price > 0 %}
              <span class="money strip">
                  {{ item.variant.compare_at_price | money }}
              </span>
             {% endif %}
             
            {%else%}
          
          		{% assign totalAmountWithoutDiscount = item.variant.price | times: item.quantity | plus : totalAmountWithoutDiscount %}
          
            {% endif %}
         
          <span class="cart_offer_amount" data-amount="{{ totalDiscountAmountItemTmp }}" data-without-discount="{{ item.variant.compare_at_price }}"></span>

          <div class="header-cart-item-options" data-header-cart-options>


            {% unless item.variant.options.size == 1 and item.variant.options[0] == "Default Title" %}
              {% for variant in item.variant.options %}
            	{% if item.product.options[forloop.index0] != 'Options' and item.product.options[forloop.index0] != 'from' %}
                <span> <strong>{{ variant }}</strong></span>
            	{% endif %}
              {% endfor %}
            {% endunless %}
         
            <span class="side_cart_qty">
             
             <button class="slide_card_minus" type="button" data-header-cart-quantity-decrease="{{ item.id }}">
                {% if settings.qty_icon_type == icon1 %}
                	<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Calque_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <g id="XMLID_3_"> <polygon id="XMLID_35_" fill="#FFFFFF" points="595.187,388.098 330.479,388.098 264.785,388.098 0.078,388.098 0.078,453.792 264.785,453.792 330.479,453.792 595.187,453.792 "/> </g> </svg>
              	{% else %}
                	<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Calque_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <path fill="#FFFFFF" d="M572.401,398.176H22.85c-12.591,0-22.8,10.209-22.8,22.8c0,12.591,10.209,22.8,22.8,22.8h549.55 c12.591,0,22.8-10.209,22.8-22.8C595.201,408.385,584.992,398.176,572.401,398.176z"/> </svg>
                {% endif %}
              </button>
              <strong>
              	<input type="text" min="0" {% if maxQuantity > 0 %}max="{{ maxQuantity }}"{% endif %} value="{{ item.quantity }}" readonly>
              </strong>
              <button class="slide_card_plus" type="button" data-header-cart-quantity-increase="{{ item.id }}"><?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
              	{% if settings.qty_icon_type == icon1 %}
                	<svg version="1.1" id="Calque_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <g id="XMLID_5_"> <polygon id="XMLID_39_" fill="#FFFFFF" points="595.04,388.16 330.58,388.16 330.58,123.7 264.948,123.7 264.948,388.16 0.488,388.16 0.488,453.792 264.948,453.792 264.948,718.252 330.58,718.252 330.58,453.792 595.04,453.792 "/> </g> </svg>
              	{% else %}
                	<?xml version="1.0" encoding="utf-8"?> <!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Calque_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve"> <path fill="#FFFFFF" d="M572.439,398.175H320.452V146.188c0-12.592-10.209-22.801-22.801-22.801 c-12.592,0-22.801,10.209-22.801,22.801v251.987H22.862c-12.592,0-22.801,10.21-22.801,22.801c0,12.592,10.21,22.801,22.801,22.801 h251.987v251.987c0,12.592,10.21,22.801,22.801,22.801c12.592,0,22.801-10.209,22.801-22.801V443.777h251.987 c12.592,0,22.801-10.209,22.801-22.801C595.24,408.384,585.031,398.175,572.439,398.175z"/> </svg>
                {% endif %}
                
              </button>
              
            </span>
          </div>
        </div>
      </article>
    {% endfor %}
    <p class="header-cart-empty {% if cart.item_count > 0 %}hidden{% endif %}">{{ 'products.product.empty_cart' | t }}</p>
  </div>
  <div class="header-cart-footer">
    <span>{{ 'layout.cart.subtotal' | t }}</span>
    
  	{% if settings.total_saving_croessed %}
      <div class="header-cart-footer-same-line header-cart-footer-saving" {% if totalDiscountAmount == 0 %}style="display:none;"{%endif%}>
      
      <span class="money" data-header-cart-total-wo-discount>{{ totalAmountWithoutDiscount | money }}</span>
    </div>
   {% endif %}
    <span class="money" data-header-cart-total>{{ cart.total_price | money }}</span>
  </div>
  	{% if settings.enable_total_saving %}
  	<div class="header-cart-footer header-cart-footer-saving" {% if totalDiscountAmount == 0 %}style="display:none;"{%endif%}>
  	<span>{{ settings.cart_total_saving_text }}</span>
    <span class="money" data-header-cart-saving>{{ totalDiscountAmount | money }}</span>
  </div>
	{% endif %}
  {% if settings.cart_enble_rgpd %}
          <div class="tac_wrapper">
            <input type="checkbox" id="agree" />
            <label for="agree">
              {{ settings.cart_terms_text }}
              <a href="#" data-getPopout="#termsPopup" class="hasPop terms_popup_trigger">
          		{{ settings.cart_terms_link_text }}
        	  </a>
            </label>
            <div class="cart_term_error" style="display:none;">
            	{{ settings.cart_terms_warning }}
            </div>
          </div>
          {% endif %}
  {%if settings.cart_enable_checkout_btn %}
  
  <a class="button fullSpan cart_button_checkout" href="/cart">{% if settings.add_cart_icon_type_enable %}<span class="AddCarticons">{% include 'add_cart_icon_type' %}</span>{% endif %}<span>{{ settings.cart_checkout_button_text }}</span></a>
  	{%endif%}	
  	{%- assign showUpsell = false -%}
  	{%if settings.upsell_enable == true %}
  		{%- assign UpsellProduct = all_products[settings.cart_popup_product_1] -%}
  		{% if UpsellProduct.available == true %}
             {% assign showUpsell = true %}
        {% endif %}
  	{% endif %}
  
  	{% if settings.cart_enable_secure_button %}
  		
  		<a class="button fullSpan cart_button_secure" href="{%if showUpsell == true %}/cart#upsell{% else %}/checkout{% endif %}">{% if settings.cart_enable_secure_lock_icon %}<span class="SecurityIcon">{% include 'security_icon_type' %}</span>{% endif %}<span>{{ settings.cart_secure_button_text }}</span></a>
	{% endif %}
  	
  	{% if settings.cart_enable_checkout_icon %}
  	  	<img src="{{ 'cart_checkout_icon.png' | asset_url }}" alt="" class="cart_payment_icon" />
    
    {% endif %}
  	<span class="cart_extra_text">{{ settings.cart_checkout_extra_text }}</span>
  	{% if settings.cart_enable_extra_text %}
  		<span class="cart_extra_text shipping_bar_top">{{ settings.cart_checkout_extra_text }}</span>
  	{% endif %}
  
</div>
