{% if moduleBuyLater.positionModulo %}
    <section class="products_slider">
      <div class="{{ moduleBuyLater.cart and Type_ModulePosition.Tp_ContentBottom == moduleBuyLater.positionModulo ? 'bottom-border-gray' : '' }}
       {{ moduleBuyLater.cart and Type_ModulePosition.Tp_ContentTop == moduleBuyLater.positionModulo ? 'top-border-gray' : '' }}
       vertical-margin-medium">
        <div class="product-title">
          {% if product_list_title_style == Type_ProductListTitleStyle.Left %}
            <div class="flex flex-row nowrap-xs between-xs middle-xs">
              <h2 class="heading-2 flex-1 text-break-word">{{ heading_title }}</h2>
            </div>
          {% else %}
            <div class="flex flex-row nowrap-xs center-xs middle-xs">
              <div style="width: fit-content; {{ product_list_title_style == Type_ProductListTitleStyle.CenterWithLines ? ' max-width: calc(100% - 164px) ' : '' }}" class="rel">
                <h2 class="heading-2 flex-1 text-center text-break-word">{{ heading_title }}</h2>
              </div>
            </div>
          {% endif %}
        </div>
        {% if grid %}
          <div class="grid bottom-margin-large">
            <div class="grid-on-slider js-buy-later-list" data-products-count="{{ moduleBuyLater.productsCount }}" data-position="{{ moduleBuyLater.positionModulo }}">
              {{ moduleBuyLater.html }}
            </div>
          </div>
        {% else %}
          <div class="carousel-container slide-buy-later js-load-slide" onload="productModules.push({element: this, name: 'slide-buy-later', product_id: '{{product_id}}'})">
            <div class="carousel-wrapper grid">
              <div class="carousel-list js-buy-later-list" data-products-count="{{ moduleBuyLater.productsCount }}" data-position="{{ moduleBuyLater.positionModulo }}">
                {% set boxQuantity = moduleBuyLater.productsCount < 24 ? moduleBuyLater.productsCount : 24 %}
                {% for i in 1..boxQuantity %}
                  <div class="item-column {{ config.wg24_productbox_size == 4 ? 'item-column--large' : '' }}" data-quantity="{{moduleBuyLater.productsCount}}">
                    <div class="itembox rel paper"></div>
                  </div>
                {% endfor %}
              </div>
            </div>
          </div>
        {% endif %}
      </div>
    </section>
{% else %}
  <section class="products_slider">
    <div class="js-buy-later-list" data-products-count="{{ moduleBuyLater.productsCount }}" data-position="{{ moduleBuyLater.positionModulo }}">
      <div class="bottom-border-gray vertical-padding-medium">
        <h2 class="heading-3 text-break-word">{{ heading_title }}</h2>
      </div>
      <div class="vertical-padding-medium">
        {{ moduleBuyLater.html }}
      </div>
    </div>
  </section>
{% endif %}