{block name='layout-header'}
    {block name='layout-header-doctype'}<!DOCTYPE html>{/block}
    {et_getFontSettings assign="etFontSettings"}
    {et_isShopVersionAtLeast value="5.2.0-beta" assign='shopIsAtLeast52'}
    {et_isShopVersionAtLeast value="5.3.0-rc.3" assign='shopIsAtLeast53'}
    {et_isShopVersionAtLeast value="5.4.0-rc.1" assign='shopIsAtLeast54'}
    {et_isShopVersionAtLeast value="5.5.0-rc.1" assign='shopIsAtLeast55'}
    <html {block name='layout-header-html-attributes'}lang="{$meta_language}" itemscope {if $nSeitenTyp === $smarty.const.URLART_ARTIKEL}itemtype="https://schema.org/ItemPage"
          {elseif $nSeitenTyp === $smarty.const.URLART_KATEGORIE}itemtype="https://schema.org/CollectionPage"
          {else}itemtype="https://schema.org/WebPage"{/if}{block name="et-layout-header-html-class"}class="{if isset($etFontSettings.webfontLoading) && $etFontSettings.webfontLoading === 'disabled'}wf-disabled{/if}"{/block}{/block}>
    {block name='layout-header-head'}
    <head>
        {et_getGlobalSettings assign="etGlobalSettings"}
        {block name='layout-header-head-meta'}
            <meta http-equiv="content-type" content="text/html; charset={$smarty.const.JTL_CHARSET}">
            <meta name="description" itemprop="description" content={block name='layout-header-head-meta-description'}"{$meta_description|truncate:1000:"":true}{/block}">
            {if !empty($meta_keywords)}
                <meta name="keywords" itemprop="keywords" content="{block name='layout-header-head-meta-keywords'}{$meta_keywords|truncate:255:'':true}{/block}">
            {/if}
            <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            {$noindex = $bNoIndex === true  || (isset($Link) && $Link->getNoFollow() === true)}
            <meta name="robots" content="{if $robotsContent}{$robotsContent}{elseif $noindex}noindex{else}index, follow{/if}">

            <meta itemprop="url" content="{$cCanonicalURL}"/>
            {block name='layout-header-head-theme-color'}
                {* Theme color *}
                <meta name="theme-color" content="{if $Einstellungen.template.theme.theme_default === 'default'}#ffffff{else}#ffffff{/if}">
                <meta name="msapplication-TileColor" content="{if $Einstellungen.template.theme.theme_default === 'default'}#ffffff{else}#ffffff{/if}">
            {/block}
            <meta property="og:type" content="website" />
            <meta property="og:site_name" content="{$meta_title}" />
            <meta property="og:title" content="{$meta_title}" />
            <meta property="og:description" content="{$meta_description|truncate:1000:"":true}" />
            <meta property="og:url" content="{$cCanonicalURL}"/>

            {if $nSeitenTyp === $smarty.const.PAGE_ARTIKEL && !empty($Artikel->Bilder) && (!isset($etGlobalSettings.ogImageOverrideProductDetail) || !$etGlobalSettings.ogImageOverrideProductDetail)}
                <meta itemprop="image" content="{$Artikel->Bilder[0]->cURLGross}" />
                <meta property="og:image" content="{$Artikel->Bilder[0]->cURLGross}">
            {elseif $nSeitenTyp === $smarty.const.PAGE_NEWSDETAIL && !empty($newsItem->getPreviewImage()) && (!isset($etGlobalSettings.ogImageOverrideNewsDetail) || !$etGlobalSettings.ogImageOverrideNewsDetail)}
                <meta itemprop="image" content="{$imageBaseURL}{$newsItem->getPreviewImage()}" />
                <meta property="og:image" content="{$imageBaseURL}{$newsItem->getPreviewImage()}" />
            {else}
                {if isset($etGlobalSettings.ogImage) && !empty($etGlobalSettings.ogImage.src)}
                    <meta itemprop="image" content="{$etGlobalSettings.ogImage.src}" />
                    <meta property="og:image" content="{$etGlobalSettings.ogImage.src}" />
                {else}
                    <meta itemprop="image" content="{$ShopLogoURL}" />
                    <meta property="og:image" content="{$ShopLogoURL}" />
                {/if}
            {/if}
        {/block}

        <title itemprop="name">{block name='layout-header-head-title'}{$meta_title}{/block}</title>
        {block name='layout-header-head-meta-alternate-name'}
            {if $nSeitenTyp === $smarty.const.PAGE_STARTSEITE && !empty($Einstellungen.global.global_shopname)}
                <meta itemprop="alternateName" content="{$Einstellungen.global.global_shopname|strip_tags|escape:'html'}">
            {/if}
        {/block}

        {block name='layout-header-head-canonical'}
            {if !empty($cCanonicalURL) && !$noindex}
                <link rel="canonical" href="{$cCanonicalURL}">
            {/if}
        {/block}

        {block name='layout-header-head-base'}{/block}

        {block name='layout-header-head-icons'}
            {et_getFavicon assign='etFavicon'}
            {if !empty($etFavicon) && isset($etFavicon.src) && $etFavicon.src !== ''}
                <link type="image/x-icon" href="{$etFavicon.src}" rel="icon">
            {else}
                {if $shopIsAtLeast53}
                    {* The links here will be caught by the 5.3.0 FaviconFileCheckMiddleware and will generate the respective files if they do not exist *}
                    <link rel="icon" href="{$ShopURL}/favicon.ico" sizes="48x48" >
                    <link rel="icon" href="{$ShopURL}/favicon.svg" sizes="any" type="image/svg+xml">
                    <link rel="apple-touch-icon" href="{$ShopURL}/apple-touch-icon.png"/>
                    <link rel="manifest" href="{$ShopURL}/site.webmanifest" />
                    <meta name="msapplication-TileImage" content="{$ShopURL}/mstile-144x144.png">
                {else}
                    <link type="image/x-icon" href="{$shopFaviconURL}" rel="icon">
                {/if}
            {/if}
        {/block}



        {block name='layout-header-head-resources'}
            {if empty($parentTemplateDir)}
                {$templateDir = $currentTemplateDir}
            {else}
                {$templateDir = $parentTemplateDir}
            {/if}
            {* css *}
            {et_isPreviewMode assign='etIsPreviewMode'}
            <style id="criticalCSS">
                {block name='layout-header-head-resources-crit'}
                {if !$etIsPreviewMode}
                    {if file_exists("{$currentThemeDir}css/theme-crit.css")}
                        {file_get_contents("{$currentThemeDir}css/theme-crit.css")}
                    {elseif !empty($parentTemplateDir)}
                        {file_get_contents("{$parentTemplateDir}themes/default/css/theme-crit.css")}
                    {/if}
                {else}
                    {if file_exists("{$currentThemeDir}css/theme-crit-preview.css")}
                        {file_get_contents("{$currentThemeDir}css/theme-crit-preview.css")}
                    {elseif !empty($parentTemplateDir)}
                        {file_get_contents("{$parentTemplateDir}themes/default/css/theme-crit-preview.css")}
                    {/if}
                {/if}
                {/block}
            </style>
            {if $Einstellungen.template.general.use_minify === 'N' || $etIsPreviewMode}
                {foreach $cCSS_arr as $cCSS}
                    <link rel="preload" href="{$ShopURL}/{if !$etIsPreviewMode}{$cCSS}{else}{$cCSS|replace:'theme.css':'theme-preview.css'}{/if}?v={$nTemplateVersion}&ts={et_getCompilationTimestamp}" as="style"
                          onload="this.onload=null;this.rel='stylesheet'">
                {/foreach}
                {if isset($cPluginCss_arr)}
                    {foreach $cPluginCss_arr as $cCSS}
                        <link rel="preload" href="{$ShopURL}/{$cCSS}?v={$nTemplateVersion}" as="style"
                              onload="this.onload=null;this.rel='stylesheet'">
                    {/foreach}
                {/if}

                <noscript>
                    {foreach $cCSS_arr as $cCSS}
                        <link rel="stylesheet" href="{$ShopURL}/{if !$etIsPreviewMode}{$cCSS}{else}{$cCSS|replace:'theme.css':'theme-preview.css'}{/if}?v={$nTemplateVersion}&ts={et_getCompilationTimestamp}">
                    {/foreach}
                    {if isset($cPluginCss_arr)}
                        {foreach $cPluginCss_arr as $cCSS}
                            <link href="{$ShopURL}/{$cCSS}?v={$nTemplateVersion}" rel="stylesheet">
                        {/foreach}
                    {/if}
                </noscript>
            {else}
                <link rel="preload" href="{$ShopURL}/{$combinedCSS}{if $Einstellungen.template.general.use_minify !== 'static'}{if !empty($combinedCSS) && strpos($combinedCSS, '?') !== false}&{else}?{/if}v={$nTemplateVersion}&ts={et_getCompilationTimestamp}{/if}" as="style" onload="this.onload=null;this.rel='stylesheet'">
                <noscript>
                    <link href="{$ShopURL}/{$combinedCSS}{if $Einstellungen.template.general.use_minify !== 'static'}{if !empty($combinedCSS) && strpos($combinedCSS, '?') !== false}&{else}?{/if}v={$nTemplateVersion}&ts={et_getCompilationTimestamp}{/if}" rel="stylesheet">
                </noscript>
            {/if}

            {if !$isMobile && !$opc->isEditMode() && !$opc->isPreviewMode() && JTL\Shop::isAdmin(true)}
                <link rel="preload" href="{$ShopURL}/admin/opc/css/startmenu.css" as="style"
                      onload="this.onload=null;this.rel='stylesheet'">
                <noscript>
                    <link type="text/css" href="{$ShopURL}/admin/opc/css/startmenu.css" rel="stylesheet">
                </noscript>
            {/if}
            {foreach $opcPageService->getCurPage()->getCssList($opc->isEditMode()) as $cssFile => $cssTrue}
                <link rel="preload" href="{$cssFile}" as="style" data-opc-portlet-css-link="true"
                      onload="this.onload=null;this.rel='stylesheet'">
                <noscript>
                    <link rel="stylesheet" href="{$cssFile}">
                </noscript>
            {/foreach}
            <script>
                window.jtlShopBaseUrl = '{$ShopURL}';
                /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
                (function (w) {
                    "use strict";
                    if (!w.loadCSS) {
                        w.loadCSS = function (){};
                    }
                    var rp = loadCSS.relpreload = {};
                    rp.support                  = (function () {
                        var ret;
                        try {
                            ret = w.document.createElement("link").relList.supports("preload");
                        } catch (e) {
                            ret = false;
                        }
                        return function () {
                            return ret;
                        };
                    })();
                    rp.bindMediaToggle          = function (link) {
                        var finalMedia = link.media || "all";

                        function enableStylesheet() {
                            if (link.addEventListener) {
                                link.removeEventListener("load", enableStylesheet);
                            } else if (link.attachEvent) {
                                link.detachEvent("onload", enableStylesheet);
                            }
                            link.setAttribute("onload", null);
                            link.media = finalMedia;
                        }

                        if (link.addEventListener) {
                            link.addEventListener("load", enableStylesheet);
                        } else if (link.attachEvent) {
                            link.attachEvent("onload", enableStylesheet);
                        }
                        setTimeout(function () {
                            link.rel   = "stylesheet";
                            link.media = "only x";
                        });
                        setTimeout(enableStylesheet, 3000);
                    };

                    rp.poly = function () {
                        if (rp.support()) {
                            return;
                        }
                        var links = w.document.getElementsByTagName("link");
                        for (var i = 0; i < links.length; i++) {
                            var link = links[i];
                            if (link.rel === "preload" && link.getAttribute("as") === "style" && !link.getAttribute("data-loadcss")) {
                                link.setAttribute("data-loadcss", true);
                                rp.bindMediaToggle(link);
                            }
                        }
                    };

                    if (!rp.support()) {
                        rp.poly();

                        var run = w.setInterval(rp.poly, 500);
                        if (w.addEventListener) {
                            w.addEventListener("load", function () {
                                rp.poly();
                                w.clearInterval(run);
                            });
                        } else if (w.attachEvent) {
                            w.attachEvent("onload", function () {
                                rp.poly();
                                w.clearInterval(run);
                            });
                        }
                    }

                    if (typeof exports !== "undefined") {
                        exports.loadCSS = loadCSS;
                    }
                    else {
                        w.loadCSS = loadCSS;
                    }
                }(typeof global !== "undefined" ? global : this));
            </script>
            {* RSS *}
            {if isset($Einstellungen.rss.rss_nutzen) && $Einstellungen.rss.rss_nutzen === 'Y'}
                <link rel="alternate" type="application/rss+xml" title="Newsfeed {$Einstellungen.global.global_shopname}"
                      href="{$ShopURL}/rss.xml">
            {/if}
            {* Languages *}
            {$languages = JTL\Session\Frontend::getLanguages()}
            {if count($languages) > 1}
                {foreach $languages as $language}
                    <link rel="alternate"
                          hreflang="{$language->getIso639()}"
                          href="{if $language->getShopDefault() === 'Y' && isset($Link) && $Link->getLinkType() === $smarty.const.LINKTYP_STARTSEITE}{$ShopURL}/{else}{$language->getUrl()}{/if}">
                {if $language->getShopDefault() === 'Y'}
                    <link rel="alternate"
                          hreflang="x-default"
                          href="{if isset($Link) && $Link->getLinkType() === $smarty.const.LINKTYP_STARTSEITE}{$ShopURL}/{else}{$language->getUrl()}{/if}">
                {/if}
                {/foreach}
            {/if}
        {/block}

        {if isset($Suchergebnisse) && $Suchergebnisse->getPages()->getMaxPage() > 1}
            {block name='layout-header-prev-next'}
                {if $Suchergebnisse->getPages()->getCurrentPage() > 1}
                    <link rel="prev" href="{$filterPagination->getPrev()->getURL()}">
                {/if}
                {if $Suchergebnisse->getPages()->getCurrentPage() < $Suchergebnisse->getPages()->getMaxPage()}
                    <link rel="next" href="{$filterPagination->getNext()->getURL()}">
                {/if}
            {/block}
        {/if}
        {$dbgBarHead}

        {block name="et-layout-header-scripts"}
            {if $smarty.const.ET360_DEBUG_JS}
                <script>
                    {literal}
                        window.easytemplate = window.easytemplate || {};
                        window.easytemplate.debug = true;
                    {/literal}
                </script>
            {/if}

            <script>
                {literal}
                    window.lazySizesConfig = window.lazySizesConfig || {};
                    window.lazySizesConfig.expand  = 50;
                {/literal}
            </script>
            {block name="et-layout-header-scripts-jquery"}
                <script src="{$ShopURL}/{$templateDir}js/jquery-3.7.1.min.js"></script>
            {/block}
            {if $Einstellungen.template.general.use_minify === 'N'}
                {if isset($cPluginJsHead_arr)}
                    {foreach $cPluginJsHead_arr as $cJS}
                        <script defer src="{$ShopURL}/{$cJS}?v={$nTemplateVersion}"></script>
                    {/foreach}
                {/if}
                {foreach $cJS_arr as $cJS}
                    <script defer src="{$ShopURL}/{$cJS}?v={$nTemplateVersion}"></script>
                {/foreach}
                {foreach $cPluginJsBody_arr as $cJS}
                    <script defer src="{$ShopURL}/{$cJS}?v={$nTemplateVersion}"></script>
                {/foreach}
            {else}
                {foreach $minifiedJS as $item}
                    <script defer src="{$ShopURL}/{$item}"></script>
                {/foreach}
            {/if}

            {if $shopIsAtLeast53}
                {foreach $opcPageService->getCurPage()->getJsList() as $jsFile => $jsTrue}
                    <script defer src="{$jsFile}"></script>
                {/foreach}
            {/if}

            {if file_exists($currentTemplateDirFullPath|cat:'js/custom.js')}
                <script defer src="{$ShopURL}/{$currentTemplateDir}js/custom.js?v={$nTemplateVersion}"></script>
            {/if}

            {getUploaderLang iso=$smarty.session.currentLanguage->getIso639()|default:'' assign='uploaderLang'}
            {if !empty($oUploadSchema_arr)}
                <script defer src="{$ShopURL}/{$templateDir}js/fileinput/fileinput.min.js?v={$nTemplateVersion}"></script>
                <script defer src="{$ShopURL}/{$templateDir}js/fileinput/themes/et360/theme.min.js?v={$nTemplateVersion}"></script>
                <script defer src="{$ShopURL}/{$templateDir}js/fileinput/locales/{$uploaderLang}.js?v={$nTemplateVersion}"></script>
            {/if}
            {if $Einstellungen.preisverlauf.preisverlauf_anzeigen === 'Y' && !empty($bPreisverlauf)}
                <script defer src="{$ShopURL}/{$templateDir}js/Chart.bundle.min.js"></script>
            {/if}
        {/block}

        {block name='layout-header-head-resources-preload'}
            {* Empty in ET360 - see below for custom ET360 logic *}
        {/block}

        {block name='layout-header-head-resources-modulepreload'}
            {* Empty in ET360 - ET360 does not use modules the way NOVA does *}
        {/block}

        {block name="et-layout-header-fonts"}
            {block name="et-layout-header-fonts-icon-fonts"}
                {* DO NOT remove the crossorigin attribute here - see https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/preload#cors-enabled_fetches *}
                <link rel="preload" href="{$ShopURL}/{$templateDir}themes/default/webfonts/fa-solid-900.woff2?v={$nTemplateVersion}" as="font" crossorigin="anonymous">
                <link rel="preload" href="{$ShopURL}/{$templateDir}themes/default/webfonts/fa-regular-400.woff2?v={$nTemplateVersion}" as="font" crossorigin="anonymous">
            {/block}
            {block name="et-layout-header-fonts-web-fonts"}
                {et_getFontSettings assign="etFontSettings"}
                {if !isset($etFontSettings.webfontLoading) || $etFontSettings.webfontLoading !== 'disabled'}
                    {et_hasConsent key="webfonts" assign="etWebfontConsentActive"}
                    {if !isset($etFontSettings.webfontLoading) || (isset($etFontSettings.webfontLoading) && $etFontSettings.webfontLoading === 'auto') || $etWebfontConsentActive}
                        {* Preconnect to fonts.gstatic.com - that's where fonts will be loaded from *}
                        <link rel="dns-prefetch" href="//fonts.googleapis.com">
                        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
                    {/if}
                    {* @see https://css-tricks.com/loading-web-fonts-with-the-web-font-loader/ - this minimizes font loading effects *}
                    <script type="text/javascript">
                        (function() {
                            if (sessionStorage && sessionStorage.fonts) {
                                document.documentElement.classList.add('wf-active');
                            }
                        })();
                    </script>
                    {* Webfont Loader, async *}
                    {et_getFonts assign="etFonts"}
                    {block name="et-layout-header-fonts-web-fonts-config"}
                    {block name="et-layout-header-fonts-web-fonts-confg"}{* DEPRECATED - TYPO IN NAME *}
                        <script type="text/javascript">
                            WebFontConfig = {
                                custom: {
                                    families: [
                                        {if count($etFonts) > 0}
                                            {block name="et-layout-header-fonts-web-fonts-config-families-configured"}
                                                {foreach $etFonts as $etFont}
                                                    {if !isset($etFont.loading) || $etFont.loading === 'google'}
                                                    '{$etFont.family}:{if empty($etFont.webfontStylesShort)}n4,i4,n6,i6,n7,i7{else}{$etFont.webfontStylesShort}{/if}',
                                                    {/if}
                                                {/foreach}
                                            {/block}
                                        {else}
                                            {block name="et-layout-header-fonts-web-fonts-config-families-default"}
                                                {* load default fonts *}
                                                'Montserrat:n4,i4,n6,i6,n7,i7',
                                                'Archivo Black:n4,i4,n6,i6,n7,i7'
                                            {/block}
                                        {/if}
                                    ],
                                    urls: [
                                        {if count($etFonts) > 0}
                                            {block name="et-layout-header-fonts-web-fonts-config-urls-configured"}
                                                {foreach $etFonts as $etFont}
                                                    {if !isset($etFont.loading) || $etFont.loading === 'google'}
                                                    '{$etFont.url|replace:'css?':'css2?'}:ital,wght@{if empty($etFont.webfontStylesLong)}0,400;0,600;0,700;1,400;1,600;1,700{else}{$etFont.webfontStylesLong}{/if}&display=swap',
                                                    {/if}
                                                {/foreach}
                                            {/block}
                                        {else}
                                            {block name="et-layout-header-fonts-web-fonts-config-urls-default"}
                                                {* load default fonts *}
                                                'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap',
                                                'https://fonts.googleapis.com/css2?family=Archivo+Black:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap'
                                            {/block}
                                        {/if}
                                    ]
                                },
                                {* @see https://css-tricks.com/loading-web-fonts-with-the-web-font-loader/ *}
                                active: function () {
                                    if (sessionStorage) {
                                        sessionStorage.fonts = true;
                                    }
                                }
                            }
                        </script>

                        {$etWebfontsWaitForConsent = true}
                        {if !isset($etFontSettings.webfontLoading) || (isset($etFontSettings.webfontLoading) && $etFontSettings.webfontLoading === 'auto') || $etWebfontConsentActive}
                            {$etWebfontsWaitForConsent = false}
                        {/if}

                        {* WebFonts will be loaded on consent - only prepare the src location, but load it when consent is determined - the actual consent handling is done in consent.webfonts.js *}
                        {if file_exists("{$currentTemplateDirFullPath}js/webfontloader/webfontloader.min.js")}
                            <script {if $etWebfontsWaitForConsent}data-consent="webfonts" data-{/if}src="{$ShopURL}/{$currentTemplateDir}js/webfontloader/webfontloader.min.js?v={$nTemplateVersion}" async="async"></script>
                        {elseif !empty($parentTemplateDir)}
                            <script {if $etWebfontsWaitForConsent}data-consent="webfonts" data-{/if}src="{$ShopURL}/{$parentTemplateDir}js/webfontloader/webfontloader.min.js?v={$nTemplateVersion}" async="async"></script>
                        {/if}
                    {/block}
                    {/block}
                {/if}
            {/block}
        {/block}

        {if !empty($etGlobalSettings.customHeadContent)}
            {$etGlobalSettings.customHeadContent}
        {/if}
    </head>
    {/block}
    {block name='layout-header-body-tag'}
        <body class="{block name="layout-header-body-tag-class"}{if $isMobile}is-mobile {/if}{if $isTablet}is-tablet {/if}{if $nSeitenTyp === $smarty.const.PAGE_BESTELLVORGANG}is-checkout {/if}is-et360 et-text-hyphens{/block}"
                data-page="{$nSeitenTyp}"
                data-device="{et_getDevice}"
                {if $etGlobalSettings.backgroundImageEnabled && !empty($etGlobalSettings.backgroundImage.src)}
                    style="background-image:url('{if !empty($etGlobalSettings.backgroundImage.srcWebP)}{$etGlobalSettings.backgroundImage.srcWebP}{else}{$etGlobalSettings.backgroundImage.src}{/if}');"
                    {elseif $etGlobalSettings.backgroundColor !== ''}
                    style="background-color:{$etGlobalSettings.backgroundColor};"
                {/if}
                {if isset($Link) && !empty($Link->getIdentifier())} id="{$Link->getIdentifier()}"{/if}>
    {/block}
    {if !$bExclusive}

        {block name="layout-header-skip-to-links"}
            {if $shopIsAtLeast55}
                <a href="#main-wrapper" class="btn-skip-to" data-nosnippet>
                    {lang key='skipToContent'}
                </a>
                {et_getMenuSettings assign='etMenuSettings'}
                {if $nSeitenTyp !== $smarty.const.PAGE_BESTELLVORGANG || $etMenuSettings.showDuringCheckout}
                    {if !$isMobile}
                        <a href="#search" class="btn-skip-to" data-nosnippet>
                            {lang key='skipToSearch'}
                        </a>
                        <a href="#shop-nav" class="btn-skip-to" data-nosnippet>
                            {lang key='skipToNav'}
                        </a>
                    {else}
                        <a href="#" onclick="$(document).trigger('toggle-mobile-menu.et');return false;" aria-controls="et-menu-mobile-wrapper" aria-expanded="false" class="btn-skip-to" data-nosnippet>
                            {lang key='skipToNav'}
                        </a>
                    {/if}
                {/if}
            {/if}
        {/block}
        {block name='header-footer-consent-manager'}
            {if $shopIsAtLeast55 && $Einstellungen.consentmanager.consent_manager_active === 'Y' && !$isAjax && $consentItems->isNotEmpty()}
                <input id="consent-manager-show-banner" type="hidden" value="{$Einstellungen.consentmanager.consent_manager_show_banner}">
                {include file='snippets/consent_manager.tpl'}
                {inline_script}
                    <script>
                        setTimeout(function () {
                            $('#consent-manager, #consent-settings-btn').removeClass('d-none');
                        }, 100);
                        document.addEventListener('consent.updated', function(e) {
                            $.post('{$ShopURLSSL}/{if $shopIsAtLeast52}_updateconsent{/if}', {
                                    'action': 'updateconsent',
                                    'jtl_token': '{$smarty.session.jtl_token}',
                                    'data': e.detail
                            });
                        });
                        {if !isset($smarty.session.consents)}
                        document.addEventListener('consent.ready', function(e) {
                            document.dispatchEvent(new CustomEvent('consent.updated', { detail: e.detail }));
                        });
                        {/if}
                        window.CM = new ConsentManager({
                            version: {$smarty.session.consentVersion|default:1}
                        });
                        var triggerCall = function(e) {
                            e.preventDefault();
                            const type = (e.currentTarget && e.currentTarget.dataset) ? e.currentTarget.dataset.consent : undefined;
                            if (!type) return;

                            if (window.CM && window.CM.getSettings(type) === false) {
                                window.CM.openConfirmationModal(type, function () {
                                    let data = window.CM._getLocalData();
                                    if (data === null) {
                                        data = { settings: { } };
                                    }
                                    data.settings[type] = true;
                                    document.dispatchEvent(new CustomEvent('consent.updated', { detail: data.settings }));
                                });
                            }
                        };
                        $(document)
                            .off('click.consentTrigger')
                            .on('click.consentTrigger', '.trigger', triggerCall);
                    </script>
                {/inline_script}
            {/if}
        {/block}

        {if !$isMobile}
            {include file=$opcDir|cat:'tpl/startmenu.tpl'}
        {/if}

        {if $bAdminWartungsmodus}
            {block name='layout-header-maintenance-alert'}
                <div role="alert" class="alert alert-warning alert-dismissible" id="maintenance-mode">
                    <button type="button" aria-label="{if $shopIsAtLeast55}{lang key="close" section="aria"}{else}Close{/if}" class="close" data-dismiss="alert">
                        <i class="{et_getIcon key="close"}"></i>
                    </button>
                    <div class="sr-only">x</div>
                    {lang key='adminMaintenanceMode'}
                </div>
            {/block}
        {/if}
        {if $smarty.const.SAFE_MODE === true}
            {block name='layout-header-safemode-alert'}
                <div role="alert" class="alert alert-warning alert-dismissible" id="safe-mode">
                    <button type="button" aria-label="{if $shopIsAtLeast55}{lang key="close" section="aria"}{else}Close{/if}" class="close" data-dismiss="alert">
                        <i class="{et_getIcon key="close"}"></i>
                    </button>
                    <div class="sr-only">x</div>
                    {lang key='safeModeActive'}
                </div>
            {/block}
        {/if}
        {block name='layout-header-header'}
            {* Header *}
            {* Note: jtl-nav-wrapper is NOVA's default for the header - our actual nav is NOT within the header in ET360 but a separate nav tag with id shop-nav (also NOVA default). *}
            <header id="jtl-nav-wrapper" class="d-print-none et-header et-header-{if $nSeitenTyp === $smarty.const.PAGE_BESTELLVORGANG}checkout{else}main{/if}" role="banner">
                {if $nSeitenTyp === $smarty.const.PAGE_BESTELLVORGANG}
                    {et_renderGrid id="header_checkout" fallbackId="header_main"}
                {else}
                    {et_renderGrid id="header_main"}
                {/if}
            </header>
            {* Main Menu *}
            {et_getMenuSettings assign='etMenuSettings'}
            {if $nSeitenTyp !== $smarty.const.PAGE_BESTELLVORGANG || $etMenuSettings.showDuringCheckout}
                {block name="et-layout-header-menu"}
                    <nav id="shop-nav" class="d-print-none" tabindex="-1" role="navigation">
                        {include file='widgets/wrapper/menu_wrapper.tpl' etMenuSettings=$etMenuSettings}
                    </nav>
                {/block}
            {/if}
        {/block}
    {/if}

    {block name='layout-header-main-wrapper-starttag'}
        {* See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main on the usage of role="main" *}
        <main id="main-wrapper" tabindex="-1" class="{if $bExclusive}exclusive{/if}" role="main">
        {opcMountPoint id='opc_before_main' inContainer=false}
    {/block}

    {block name='layout-header-fluid-banner'}{/block}

    {block name='layout-header-content-all-starttags'}
        {block name='layout-header-content-wrapper-starttag'}
            <div id="content-wrapper"
                 class="{if $smarty.const.PAGE_ARTIKELLISTE === $nSeitenTyp}is-item-list{/if}">
        {/block}

        {block name='layout-header-breadcrumb'}
            {if $etGlobalSettings.breadCrumbSize !== 'disabled'}
                <div class="et-breadcrumb bg{if $etGlobalSettings.breadCrumbSize === 'fullsizeBoxed' || $etGlobalSettings.breadCrumbSize === 'fullsize'}-fullsize{else}-boxed{/if}{if $etGlobalSettings.breadCrumbSize === 'hidden'} d-none{/if}">
                    <div class="breadcrumb-container container{if $etGlobalSettings.breadCrumbSize === 'fullsize'}-fluid{/if}">
                        {include file='layout/breadcrumb.tpl'}
                    </div>
                </div>
            {/if}
        {/block}

        {block name='layout-header-content-starttag'}
            <div id="content">
        {/block}

        {block name='layout-header-alert'}
            {include file='snippets/alert_list.tpl'}
        {/block}

    {/block}{* /content-all-starttags *}
{/block}
