{% if redirect is not defined %}
	{% if text_link_account %}
		<div class="warning">
      <span>{{ text_link_account }}</span>
    </div>
	{% endif %}

  <div class="ftr-container ftr-in-space--n">
    <div class="ftr-shipping">
      <span class="ftr-text--l ftr-out-space--l">{{ text_checkout_confirm }}</span>
      <hr>
      <div class="ftr-grid ftr-grid--start ftr-in-space--t-l ftr-in-space--n">
        {% for total in totals|slice(0, totals|length - 1) %}
          <div class="ftr-out-space--h-l ftr-out-space--b-l">
            <span class="ftr-text--s ftr-block ftr-text--dark">{{ total.title }}</span>
            <span class="ftr-text--s ftr-block ftr-text--grey">{{ total.text }}</span>
          </div>
        {% endfor %}
        <hr>
        <div class="ftr-out-space--l">
          {% for total in totals|slice(totals|length - 1, 1) %}
            <span class="ftr-text--l ftr-text--secondary">{{ total.title }} {{ total.text }}</span>
          {% endfor %}
        </div>
      </div>
    </div>
  </div>

  <div class="ftr-grid">
    {% for product in products %}
      <div class="ftr-grid__card ftr-product-card">
        <div class="ftr-dropdown ftr-js-display-more-information">
          <i class="material-icons ftr-text--primary ftr-more-information-hide ftr-hidden">&#xE5CE;</i>
          <i class="material-icons ftr-text--primary ftr-more-information-display">&#xE313;</i>
        </div>

        <div class="ftr-product-card__content">
          {% if product.thumb %}
            <div class="ftr-product-card__image">
              <img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}">
            </div>
          {% endif %}
          <div class="ftr-product-card__info">
            <span>{{ product.name }}</span>
            <div>
              <span class="ftr-js-swipe-content-display__text"><b>{{ product.quantity }} unidades</b></span>
            </div>
            <div>
              <span class="ftr-text--secondary"><b>{{ column_total }}: {{ product.total }}</b></span>
            </div>
          </div>
        </div>
        <div class="ftr-more-information-content">
          <hr class="ftr-out-space--v-l">
          {% for option in product.option %}
            <span>{{ option.name }}: {{ option.value }}</span>
          {% endfor %}
          <div>
            <span class="ftr-text--s ftr-block ftr-text--grey">{{ column_model ~ ' ' ~ product.model }}</span>
            {% if futuragrade_status is defined and futuragrade_status %}
              {% if product.color_description is defined %}
                <span class="ftr-text--s ftr-block ftr-text--grey">{{ (product.color_description) ? product.color_template_description  ~ product.color_description : '' }}</span>
              {% endif %}
              {% if product.size_description is defined %}
                <span class="ftr-text--s ftr-block ftr-text--grey">{{ (product.size_description) ? product.size_template_description ~ product.size_description : '' }}</span>
              {% endif %}
              {% if product.specification_description is defined %}
                <span class="ftr-text--s ftr-block ftr-text--grey">{{ (product.specification_description) ? product.specification_template_description ~ ' ' ~ product.specification_description : '' }}</span>
              {% endif %}
            {% endif %}
          </div>
          <hr class="ftr-out-space--v-l">
          <div class="ftr-modify-value ftr-in-space--b-l">
            {% if exibe_impostos %}
              <p class="ftr-text--s ftr-block ftr-text--grey">{{ value_st }}: {{ (not product.st_valor == 'N') ? product.st_valor : '' }}</p>
              <p class="ftr-text--s ftr-block ftr-text--grey">{{ value_ipi }}: {{ (not product.ipi_valor == 'N') ? product.ipi_valor : '' }}</p>
              <p class="ftr-text--s ftr-block ftr-text--grey">{{ value_fcpst }}: {{ (not product.fcpst_valor == 'N') ? product.fcpst_valor : '' }}</p>
            {% endif %}
            <p class="ftr-text--s ftr-block ftr-text--grey">{{ column_price }}: {{ product.price }}</p>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>

  <div class="payment">{{ payment }}</div>

{% else %}
  <script>
    window.location = '{{ redirect }}';
  </script>
{% endif %}
