/* ==========================================================
   Header navigation fixes (mega menu + mobile accordion).
   Prefixed with #lc-header / #lc-mobile-menu so it wins over the
   header's inline <style> block, which is printed later in the DOM.
   ========================================================== */

/* --- Mega menu: anchored to the header container, always inside the viewport --- */
/* Positioned against the full header bar, so the menu starts exactly at its bottom edge (top and scrolled state). */
#lc-header .lc-header__main { position: relative; }
#lc-header .lc-header__container { position: static; }
#lc-header .lc-header__nav-item--mega { position: static; }

#lc-header .lc-megamenu--wide {
    left: 50%;
    right: auto;
    width: min(1100px, calc(100vw - 48px));
    transform: translateX(-50%) translateY(8px);
    top: 100%;
}
/* Small dropdowns hang from the nav item: push them down to the header edge as well. */
#lc-header .lc-megamenu--simple { top: calc(100% + 27px); }
#lc-header.lc-header--scrolled .lc-megamenu--simple { top: calc(100% + 13px); }

/* Invisible bridge so the menu does not close while the pointer moves down to it. */
#lc-header .lc-megamenu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -30px;
    height: 30px;
}

/* Open states: hover, keyboard focus, tap (.is-open). */
#lc-header .lc-header__nav-item:hover > .lc-megamenu,
#lc-header .lc-header__nav-item:focus-within > .lc-megamenu,
#lc-header .lc-header__nav-item.is-open > .lc-megamenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
#lc-header .lc-header__nav-item.is-dismissed > .lc-megamenu { opacity: 0; visibility: hidden; pointer-events: none; }
#lc-header .lc-header__nav-item:focus-within > .lc-header__nav-link svg,
#lc-header .lc-header__nav-item.is-open > .lc-header__nav-link svg { transform: rotate(180deg); }

#lc-header .lc-megamenu--wide .lc-megamenu__inner { grid-template-columns: 300px minmax(0, 1fr); min-height: 420px; }
#lc-header .lc-megamenu__categories { display: flex; flex-direction: column; }
#lc-header .lc-megamenu__content { padding: 28px 32px; display: flex; flex-direction: column; }
#lc-header .lc-megamenu__featured-panel.is-active { display: flex; flex-direction: column; flex: 1; }

/* Link list: two calm columns, generous tap targets. */
#lc-header .dc-mega__links {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 24px;
}
#lc-header .dc-mega__links .lc-megamenu__linklist-link {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--header-secondary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
#lc-header .dc-mega__links .lc-megamenu__linklist-link:hover,
#lc-header .dc-mega__links .lc-megamenu__linklist-link:focus-visible {
    background: var(--header-light-bg);
    color: var(--header-primary);
}
#lc-header .lc-megamenu__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#lc-header .lc-megamenu__footer-link { white-space: nowrap; }

#lc-header .dc-mega__all {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--header-primary);
    text-decoration: none;
}
#lc-header .dc-mega__all svg { width: 16px; height: 16px; }

/* Visible focus for keyboard users. */
#lc-header a:focus-visible,
#lc-header button:focus-visible,
#lc-mobile-menu a:focus-visible,
#lc-mobile-menu button:focus-visible {
    outline: 2px solid var(--header-primary, #C8102E);
    outline-offset: 2px;
}

@media (max-width: 1240px) {
    #lc-header .lc-megamenu--wide .lc-megamenu__inner { grid-template-columns: 260px minmax(0, 1fr); }
    #lc-header .lc-header__nav-link { padding: 12px 12px; }
}

/* --- Mobile menu: calm accordion --- */
#lc-mobile-menu {
    width: min(420px, 100vw);
    max-width: 100vw;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#lc-mobile-menu .lc-mobile-menu__item > button.lc-mobile-menu__link {
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
#lc-mobile-menu .lc-mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    box-sizing: border-box; /* links (Home, Over ons, Nieuws) were 80px tall, buttons 52px */
    padding: 14px 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--header-secondary, #0A0A0A);
    text-decoration: none;
}
#lc-mobile-menu .lc-mobile-menu__link svg { width: 16px; height: 16px; transition: transform .25s ease; flex-shrink: 0; }
#lc-mobile-menu .lc-mobile-menu__item.is-open > .lc-mobile-menu__link svg { transform: rotate(180deg); }
#lc-mobile-menu .lc-mobile-submenu { padding: 0 0 10px; }
#lc-mobile-menu .lc-mobile-submenu__link { min-height: 44px; padding: 10px 12px; font-size: 15px; }
#lc-mobile-menu .lc-mobile-submenu__link--all { font-weight: 700; color: var(--header-primary, #C8102E); }

/* Never let the off-canvas menu or the header widen the page. */
html, body { overflow-x: clip; }

/* Hover fix: the theme set overflow:hidden on .lc-megamenu, which clipped the hover bridge (::before above
   the menu), so the menu closed while the pointer crossed the gap. Round the inner layer instead. */
#lc-header .lc-megamenu { overflow: visible; }
#lc-header .lc-megamenu > .lc-megamenu__inner { border-radius: inherit; overflow: hidden; }
/* Hover intent: close with a short delay so a diagonal pointer movement does not close the menu. */
#lc-header .lc-megamenu {
    transition: opacity .2s ease .15s, transform .2s ease .15s, visibility 0s linear .35s;
}
#lc-header .lc-header__nav-item:hover > .lc-megamenu,
#lc-header .lc-header__nav-item:focus-within > .lc-megamenu,
#lc-header .lc-header__nav-item.is-open > .lc-megamenu {
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
}

/* Header search: clearly visible field (it had the same cream colour as the page) */
#lc-header .lc-header__search {
    background: #fff;
    box-shadow: inset 0 0 0 1.5px #e3d6c3, 0 6px 18px -12px rgba(92, 52, 14, .35);
    border-radius: 100px;
    transition: box-shadow .25s ease, background .25s ease;
}
#lc-header .lc-header__search:hover { box-shadow: inset 0 0 0 1.5px #cdbca4, 0 6px 18px -12px rgba(92, 52, 14, .35); }
#lc-header .lc-header__search:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--header-secondary, #0A0A0A), 0 0 0 4px rgba(200, 16, 46, .12); }
#lc-header .lc-header__search-input { color: var(--header-secondary, #0A0A0A); }
#lc-header .lc-header__search-input::placeholder { color: #8a8378; }
#lc-header .lc-header__search-btn { color: var(--header-secondary, #0A0A0A); }
#lc-mobile-menu .lc-mobile-menu__search { background: #fff; box-shadow: inset 0 0 0 1.5px #e3d6c3; }

/* Smooth header shrink: collapse the top bar instead of switching it off with display:none (that jumped while scrolling) */
#lc-header .lc-topbar { max-height: 48px; overflow: hidden; transition: max-height .35s ease, padding .35s ease, opacity .25s ease; }
#lc-header.lc-header--scrolled .lc-topbar { display: block !important; max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
@media (max-width: 1024px) { #lc-header.lc-header--scrolled .lc-topbar, #lc-header .lc-topbar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { #lc-header .lc-topbar, #lc-header .lc-megamenu { transition: none !important; } }

/* Scrolled header gets a solid surface (it stayed transparent, so page content showed through it) */
#lc-header { transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease; }
#lc-header.lc-header--scrolled {
    background: rgba(255, 248, 238, .94);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 #eadfce, 0 12px 30px -24px rgba(92, 52, 14, .45);
}
/* Non-Elementor pages (shop, product, account …) start on cream: give the header that surface from the start too */
body.dc-has-offset #lc-header { background: rgba(255, 248, 238, .96); }

/* Login / register clearly visible in the header */
#lc-header .lc-header__login-btn { width: auto; padding: 0 16px 0 12px; gap: 8px; border-radius: 100px; background: #0A0A0A; color: #fff; box-shadow: 0 12px 28px -16px rgba(0, 0, 0, .55); }
#lc-header .lc-header__login-btn svg { width: 18px; height: 18px; }
#lc-header .lc-header__login-btn:hover { background: #C8102E; color: #fff; }
#lc-header .lc-header__login-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
#lc-header .lc-header__icon-wrap:focus-within .lc-header__account-dropdown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
#lc-header .lc-header__account-dropdown--guest { min-width: 250px; padding: 10px; }
#lc-header .lc-header__account-intro { margin: 4px 8px 8px; font-size: 12px; line-height: 1.4; color: #8a8378; }
#lc-header .lc-header__account-link--primary { background: #0A0A0A; color: #fff !important; border-radius: 10px; font-weight: 700; }
#lc-header .lc-header__account-link--primary:hover { background: #C8102E; }
@media (max-width: 1280px) { #lc-header .lc-header__login-label { display: none; } #lc-header .lc-header__login-btn { padding: 0; width: 44px; justify-content: center; } }
#lc-mobile-menu .lc-mobile-menu__register { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 24px 18px; padding: 14px 16px; border-radius: 14px; background: #0A0A0A; color: #fff; font-size: 14px; text-decoration: none; }
#lc-mobile-menu .lc-mobile-menu__register strong { display: block; font-size: 13px; color: #fff; }
#lc-mobile-menu .lc-mobile-menu__register svg { width: 18px; height: 18px; flex: 0 0 auto; }
