<?php if ($moduleprodutosrelacionados['exibeModule']) { ?>
  <?php if($moduleprodutosrelacionados['positionModulo']){ ?>
    <section class="products_slider">
      <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>
        </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">
            <h2 class="heading-2 flex-1 <?php echo ($product_list_title_style == Type_ProductListTitleStyle::CenterWithLines) ? ' product-title-with-lines ' : '' ?>"><?php echo $heading_title; ?></h2>
          </div>
        </div>
        <?php } ?>
      </div>
      <?php if ($grid) { ?>
        <div class="grid">
          <div class="grid-on-slider">
            <?php echo $moduleprodutosrelacionados['html']; ?>
          </div>
        </div>
      <?php } else { ?>
        <div class="carousel-container slide-produtosrelacionados js-load-slide" onload="productModules.push({element: this, name: 'slide-produtosrelacionados', product_grid_id:'<?php echo $product_grid_id;?>', product_id:'<?php echo $product_id;?>', product_name:'<?php echo $product_name;?>', category_id:'<?php echo $category_id;?>'})">
          <div class="carousel-wrapper grid">
            <div class="carousel-list">
              <?php $boxQuantity = $moduleprodutosrelacionados['productsCount'] < 24 ? $moduleprodutosrelacionados['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 $moduleprodutosrelacionados['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"><?php echo $heading_title; ?></h2>
      </div>
      <div class="vertical-padding-medium">
        <?php echo $moduleprodutosrelacionados['html'];  ?>
      </div>
    </div>
  <?php } ?>
<?php } ?>
