<div {{ attributes.defaults({class: ((this.show_buyform ? ' has-buyform') ~ (this.borderless ? ' borderless') ~ (this.price_beside_title ? ' price-beside-title'))}) }}>
   {% set lineItemThis = this %}
   <a href="{{ this.url }}" title="{{ this.title }}">
      {% if this.thumbnail %}
         <twig:Picture class="img-responsive" thumbnail="{{ this.thumbnail }}" type="product-catalog-small">
            <twig:Product:DiscountLabel id_product="{{ lineItemThis.id_product }}"/>
         </twig:Picture>
      {% endif %}
      <div class="content{% if this.price_beside_title %} content-flex{% endif %}">
         <h3 class="heading-reset title">{{ this.title }}</h3>
         <div>
            <twig:Product:Price id_product="{{ this.id_product }}"/>
            <twig:Product:DeliveryTime:Availability id_product="{{ this.id_product }}" show_in_store="{{ this.show_in_store }}"/>
         </div>
      </div>
   </a>
   {% if this.show_buyform %}
      <twig:Product:BuyForm id_product="{{ this.id_product }}" price_beside_title="{{ this.price_beside_title }}">
         {% if not this.canBuy or lineItemThis.hasVariations %}
            <a role="button" data-wpj-modal="{{ path('kupshop_components_modal_modal', {template: 'submit-block-modal', id_product: this.id_product}) }}" class="btn btn-ctr btn-block">
               {% if price_beside_title %}
                  <twig:ux:icon name="cart" class="c-icon"/>
               {% else %}
                  {{ 'product.detail'|trans([], 'products') }}
               {% endif %}
            </a>
         {% else %}
            <twig:Product:AddToCartButton show_icon="true" error_text="{{ this.error_text }}" />
         {% endif %}
      </twig:Product:BuyForm>
   {% endif %}
</div>
