{insert_fragment type='infoPanel'}
<div class="header-top">
   <div class="container-fluid container container-flex">
      <ul class="list-inline">
         <li>{t}Bleskové dodání kamkoliv si budete přát{/t}</li>
         {if $cheapest_delivery && $cheapest_delivery->getValue()->isPositive()}
            <li>{t escape=false cena=$cheapest_delivery|format_price}Poštovné od {cena} nebo zdarma{/t}</li>
         {else}
            <li>{t}Poštovné zdarma{/t}</li>
         {/if}
         <li>{t}Garantovaná záruka originálu{/t}</li>
      </ul>

      {block "header-currency"}
         {if $cfg.Currencies|count > 1}
            <div class="header-currency">
               {foreach $cfg.Currencies as $id => $currency}
                  <a href="{url s='currency' change={$id}}" title="{$currency.name}"
                     {if $ctrl.currency == $id}class="active"{/if}>{$id}</a>
               {/foreach}
            </div>
         {/if}
      {/block}
   </div>
</div>
<header class="header">
   <div class="container container-flex header-middle">
      <button type='button' class='header-burger' title='Menu' onclick="window.wpj.mobilemenu.open()">
         <span class='fc icons_burger'></span>
         {get_category_root assign='activeRoot' category=$activeCategory.category}
         {if $activeRoot.root}
            <span class="menu-name">{$activeRoot.root}</span>
         {/if}
      </button>

      {insert_sections template="components/header/block.sections.header-main.tpl"}

      {$index_url = {url s=index}}
      {if $activeRoot and $activeRoot.id_root}
         {$index_url = {url s=category IDcat=$activeRoot.id_root}}
      {/if}
      <a href="{$index_url}" title="{$dbcfg.index_title}" class="logo">
         {block 'header-logo'}
            <picture>
               <source srcset="/templates/images/logo-sm.svg" media="(max-width: 419px)">
               <img src="/templates/images/logo.svg" alt="{$dbcfg.shop_title}" class="img-responsive" width="263" height="37">
            </picture>
         {/block}
      </a>

      <div class="header-icons">
         {include "components/header/block.search.tpl"}

         <div class="header-icon header-search-sm">
            <a href="{url s=search}" data-toggle="search">
               <span class="fc icons_search"></span>
            </a>
         </div>

         {insert_fragment type='userAndCartInfo'}
      </div>
   </div>

   {if !$activeCategory.category}
      {insert_sections template="block.sections.top.tpl" level=1 level_max=2 selection=[1]}
   {else}
      {insert_sections template="block.sections.top.tpl" level=1 level_max=2}
   {/if}
</header>
