@if (normalizedCollections.length > 0) {
  @for (collection of normalizedCollections; track collection.id) {
    <section class="related-products">
      <h2>{{ collection.title | translate }}</h2>
      <div class="related-grid">
        @for (product of collection.products; track trackByItemId($index, product)) {
          <app-product-card
            [item]="product"
            [title]="productTitle(product)"
            appearance="compact"
            [addToCartLabel]="'itemDetail.addToCart' | translate"
            (selected)="productSelected.emit(product)"
            (addToCart)="addToCart.emit({ product, event: $event.event })"
          />
        }
      </div>
    </section>
  }
}
