{foreach $products as $product}
   <div class="catalog-outer"
        data-tracking-view='{get_gtm_data encode=true type='ecommerce' method='ProductsImpressions' data=['products' => $products, 'listType' => $listType, 'listId' => $listId]}'>
      <div class="catalog" {if $product.photos[0] && $product.inStore > 0} data-catalog-rotator{/if} >
         <a href="{url s=product IDproduct=$product.id TITLE=$product.title}" class="product-link"
            data-tracking-click='{get_gtm_data encode=true type='ecommerce' method='ProductClick' data=['product' => $product, 'position' => $product@iteration, 'listType' => 'menu']}'>
            <div class="img">
               <img src="{get_photo photo=$product.image image='product_catalog'}"
                    data-src="{get_photo photo=$product.image image='product_catalog'}"
                    width="{$cfg.Photo.types.product_catalog.size[0]}" height="{$cfg.Photo.types.product_catalog.size[1]}" loading="lazy"
                    class="img-responsive"
                    alt="{$product.title}" {if $product.photos[0]} data-rotator="{get_photo photo=$product.photos[0] image='product_catalog'}"{/if}>
            </div>

             {calc_product_discount product=$product assign='discount'}
            <div class="catalog-flags flags">
                {foreach $cfg.Products.Flags as $id => $flag}
                    {if $product.campaign_codes[$id] and $flag.catalog_class}
                       <span class="flag flag-{$flag.catalog_class}">{$flag.singular}</span>
                    {/if}
                {/foreach}

                {if $discount.discount->isPositive()}
                   <span class="flag flag-discount">-{$discount.discount->asFloat()|round} %</span>
                {/if}

                {if $free_delivery and $free_delivery->lowerThan($product.price_array.value_with_vat)}
                   <span class="flag flag-free-delivery">{t}Doprava zdarma{/t}</span>
                {/if}

            </div>

            <div class="review-stars">
                {if $product.reviews.rating_count}
                    {for $i=1 to 5}
                       <i class="fc {if $i > $product.reviews.rating|round}icons_star_empty{else}icons_star_full{/if}"></i>
                    {/for}
                {/if}
            </div>

            <h3 class="heading-reset title">
                {$product.title nofilter}
            </h3>

            <p class="price">
                {if $discount.priceOriginal}
                   <del class="strike-price">{$discount.priceOriginal|format_price}</del>
                {/if}

               <strong {if $product.discount->isPositive()}class="red"{/if}>
                   {if $ctrl.dealer == "Y"}
                       {$product.price_array.value_without_vat|format_price}
                   {else}
                       {$product.price_array|format_price}
                   {/if}

               </strong>
            </p>

            <p class="delivery delivery-{$product.deliveryTime}">
                {$product.deliveryTimeText}
            </p>
         </a>
      </div>
   </div>
{/foreach}
