<div {{ attributes }}>
   {% if this.id_products|length > 1 %}
      <div class="product-tabs">
         {% for id_product in this.id_products %}
            <a class="product-tab {% if (this.active_product_id is null and loop.index == 1) or (this.active_product_id == id_product) %}active{% endif %}" role="button" {{ live_action('setActiveProductId', {id: id_product}) }}>
               {% if this.getProductThumbnail(id_product) %}
                  <twig:Picture class="img-responsive" thumbnail="{{ this.getProductThumbnail(id_product) }}" type="product_cart"></twig:Picture>
               {% endif %}
               <div class="text-wrapper">
                  <p class="h5">{{ this.getProductTitle(id_product) }}</p>
                  <p class="product-price">{{ this.getProductPrice(id_product)|formatPrice(withVat: true, ceil: true) }}</p>
               </div>
            </a>
         {% endfor %}
      </div>
   {% endif %}

   <twig:block name="content">
      <twig:Product:ModalLayout id_product="{{ this.active_product_id|default(this.id_products[0]) }}">
         <twig:Product:Description id_product="{{ this.id_product }}" show_title="{{ false }}" />
         {# Potřeba použít key, aby se nám buy form správně přerenderoval #}
         <twig:Product:BuyForm id_product="{{ this.id_product }}" key="{{ this.id_product }}">
            <twig:Product:Variations id_product="{{ this.id_product }}" size_table="{{ false }}" id="vars">
               <twig:block name="labels">
                  <div class="variations-header">
                     <p class="title-default">{{ 'variations.select'|trans([], 'products') }}</p>
                  </div>
                  <twig:Product:Variations:CellLarge id_product="{{ this.id_product }}"></twig:Product:Variations:CellLarge>
               </twig:block>
            </twig:Product:Variations>
            <twig:Product:Price id_product="{{ this.id_product }}" id_variation="{{ this.id_variation }}"
                                show_original_price_info_text="{{ true }}"></twig:Product:Price>
            <twig:Product:SubmitBlock>
               <twig:Product:BuyCount
                     id_product="{{ outerScope.this.id_product }}"
                     id_variation="{{ outerScope.this.id_variation }}"
               />
               <twig:Product:AddToCartButton show_icon="{{ true }}" />
            </twig:Product:SubmitBlock>
         </twig:Product:BuyForm>
      </twig:Product:ModalLayout>
   </twig:block>
</div>
