{if $root}
   <div class="row valentine-categories">
      {foreach array_slice($sections, 0, 2) as $subCat}
         {if $subCat@index == 0}
            {$img =  "ona"}
         {elseif $subCat@index == 1}
            {$img =  "on"}
         {/if}
         <div class="col-xs-12 col-md-4">
            <a href="{url s=category IDcat=$subCat.id IDpd=$body.producer.id producerTitle=$body.producer.title}">
               <img alt="{$subCat.name}" src="/static/images/valentine/valentyn-{$img}-2023.jpg" class="img-responsive">
               {$title = explode(" ", $subCat.name_short|default:$subCat.name)}
               <p class="line"><span>{$title[0]} <strong>{$title[1]}</strong></span></p>
            </a>
         </div>
      {/foreach}
   </div>
   {if $sections|count > 2}
      <h2 class="text-center m-t-2">{t}Nebo vybírejte podle ceny{/t}</h2>
      <div class="valentine-btns m-t-2">
         {foreach array_slice($sections, 2, 7) as $subCat}
            <a class="btn btn-outlined" href="{url s=category IDcat=$subCat.id}">
               {$subCat.name_short}
            </a>
         {/foreach}
      </div>
   {/if}
{else}
   <div class="row subsections valentine-subsections">
      {foreach $sections as $subCat}
         <div class="col-xxl-2 col-lg-3 col-md-4 col-xs-6">
            <a class="subsection" href="{url s=category IDcat=$subCat.id}" title="{$subCat.title}">
               {$subCat.title}
            </a>
         </div>
      {/foreach}
      <div class="col-xxl-2 col-lg-3 col-md-4 col-xs-6">
         <a class="subsection" href="{url s=category IDcat=$body.category.parents[$body.category.parents|count - 2]}" title="{t}Zobrazit tipy na Valentýna{/t}">
            {t}Další tipy na Valentýna{/t}
         </a>
      </div>
   </div>
{/if}
