<?php if($moduleLatest['exibeModule']) { ?>
      <?php if($moduleLatest['positionModulo']){ ?>
          <section class="products_slider">
            <?php if($heading_title) { ?>
              <div class="product-title">
                <?php 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"><?php echo $heading_title; ?></h2>
                    <a href="<?php echo $link; ?>" class="text-medium">Ver todos</a>
                  </div>
                <?php } else { ?>
                  <div class="flex flex-row nowrap-xs center-xs middle-xs">
                    <div style="width: fit-content; <?php echo ($product_list_title_style == Type_ProductListTitleStyle::CenterWithLines) ? ' max-width: calc(100% - 164px) ' : '' ?>" class="rel">
                      <a class="heading-2 flex-1 <?php echo ($product_list_title_style == Type_ProductListTitleStyle::CenterWithLines) ? ' product-title-with-lines ' : '' ?>" href="<?php echo $link; ?>">
                        <h2 class="heading-2 flex-1"><?php echo $heading_title; ?></h2>
                      </a>
                    </div>
                  </div>
                <?php } ?>
              </div>
            <?php } else { ?>
              <hr class="top-padding-x-large top-margin-large">
            <?php } ?>
          <?php if ($grid) { ?>
            <div class="grid">
              <div class="grid-on-slider">
                <?php echo $moduleLatest['html'];  ?>
              </div>
            </div>
          <?php } else { ?>
              <div class="carousel-container slide-latest js-load-slide" onload="productModules.push({element: this, name: 'slide-latest'})">
                  <div class="carousel-wrapper grid">
                      <div class="carousel-list">
                        <?php $boxQuantity = $moduleLatest['productsCount'] < 24 ? $moduleLatest['productsCount'] : 24 ?>
                        <?php for ($i = 1; $i <= $boxQuantity; $i++) { ?>
                          <div class="item-column <?php echo $productbox_size == 4 ? 'item-column--large' : '' ?>" data-quantity="<?php echo $moduleLatest['productsCount'] ?>">
                            <div class="itembox rel paper"></div>
                          </div>
                        <?php } ?>
                      </div>
                  </div>
              </div>
          <?php } ?>
          </section>
      <?php }else{ ?>
        <div>
          <div class="bottom-border-gray vertical-padding-medium" >
            <h2 class="heading-3">
              <a href="<?php echo $link ?>" >
                <?php echo $heading_title; ?>
              </a>
            </h2>

          </div>
          <div class="vertical-padding-medium">
            <?php echo $moduleLatest['html']; //productaside.twig ?>
          </div>
        </div>
      <?php } ?>
<?php } ?>
