/* ── Mega Menu v9.1.6 — animation pass C + dark-mode logo swap ── */

:root {
    --jyl-z-menu: 90;
    --jyl-menu-thumb: 40px;

    /* Menu easing tokens.
     * --jyl-ease-out: enter-side curve, snaps out quickly and settles.
     * --jyl-ease-in : exit-side curve, eases off slowly then accelerates.
     * Reduced motion users get a near-linear ease via the override below.    */
    --jyl-menu-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --jyl-menu-ease-in:  cubic-bezier(0.55, 0, 0.65, 0.2);
    --jyl-menu-dur-fast: 150ms;
    --jyl-menu-dur:      300ms;
    --jyl-menu-dur-slow: 400ms;
}
@media (prefers-reduced-motion: reduce) {
    :root {
        --jyl-menu-ease-out: linear;
        --jyl-menu-ease-in:  linear;
        --jyl-menu-dur-fast: 0ms;
        --jyl-menu-dur:      0ms;
        --jyl-menu-dur-slow: 0ms;
    }
}

/* ── Overlay ──
 * Transparent container only. The visible scrim is on ::before
 * so it starts below the header and never covers it.
 */
.jyl-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--jyl-z-menu);
    background: transparent;
    pointer-events: none;
}
.jyl-menu-overlay.is-open {
    pointer-events: none;
}

/* ── Hide Rey submenu indicator (the dot/arrow after parent items) ──
 * Rey appends <i class="--submenu-indicator --submenu-indicator-circle"> to
 * every parent menu item. Since the jyl mega menu replaces Rey's native
 * dropdowns entirely, the indicator is misleading and should be hidden.
 */
.rey-mainMenu--desktop .--submenu-indicator { display: none !important; }

/* ── Suppress Rey header overlay on hover ──
 * Rey's JS sets opacity via inline style on hover, so display:none is
 * overridden. Use opacity + pointer-events to suppress it instead.
 */
.rey-overlay--header,
.rey-overlay--header-top {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ── Suppress Rey header-top-overlay system entirely ──
 * Rey triggers `body.header-top-overlay--is-opened` (plus --no-x / --src-menu /
 * --o-src-menu) on hover of top-level menu items that have children. This was
 * Rey's native dropdown affordance — we override it with the jyl mega menu, so
 * the entire visual side-effect must be neutralised.
 *
 * JS removes these classes the moment they appear, but the CSS below is a
 * defensive belt-and-braces layer so even a 1-frame flash is invisible.
 *
 * Important: these rules only apply when our menu is NOT open
 * (body:not(.jyl-menu-open)). When jyl-menu-open is set, the rules above this
 * comment take over and intentionally repaint the header.
 */
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-header-top,
body.header-top-overlay--is-opened:not(.jyl-menu-open) #top-header,
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-siteHeader__inner,
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-siteHeader {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-overlay,
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-overlay--header,
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-overlay--header-top,
body.header-top-overlay--is-opened:not(.jyl-menu-open) .rey-siteHeader__overlay,
body.--src-menu:not(.jyl-menu-open) .rey-overlay,
body.--o-src-menu:not(.jyl-menu-open) .rey-overlay {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ── Header background + text colour when menu is open ──
 * body.jyl-menu-open is toggled by JS openMenu/closeMenu.
 * Background matches P0 panel (--jyl-beige-light).
 * Text colour forced dark to match sticky/scrolled state.
 * .jyl-sticky-forced on .rey-stickyContent activates Rey sticky CSS
 * for the clone header colour scheme.
 */
body.jyl-menu-open .rey-header-top,
body.jyl-menu-open #top-header,
body.jyl-menu-open .rey-siteHeader__inner {
    background: var(--jyl-beige-light, #F5F4F4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: var(--jyl-beige-dark, #BDB6AE);
    transition: background var(--jyl-t300) var(--jyl-ease);
}
body.jyl-menu-open .rey-siteHeader .rey-mainMenu--desktop > li > a,
body.jyl-menu-open .rey-siteHeader .rey-headerIcon,
body.jyl-menu-open .rey-siteHeader .rey-headerAccount-btnText,
body.jyl-menu-open .jyl-menu-trigger {
    color: var(--jyl-black, #222) !important;
}
/* Dark mode: header text must remain WHITE when the menu is open. The
 * generic rule above forces black for the light-mode beige header; in dark
 * mode the header background remaps to dark (via --jyl-beige-light override
 * in dark-mode.css), so black text becomes invisible against it.            */
.jyl-dark body.jyl-menu-open .rey-siteHeader .rey-mainMenu--desktop > li > a,
.jyl-dark body.jyl-menu-open .rey-siteHeader .rey-headerIcon,
.jyl-dark body.jyl-menu-open .rey-siteHeader .rey-headerAccount-btnText,
.jyl-dark body.jyl-menu-open .jyl-menu-trigger,
body.jyl-dark.jyl-menu-open .rey-siteHeader .rey-mainMenu--desktop > li > a,
body.jyl-dark.jyl-menu-open .rey-siteHeader .rey-headerIcon,
body.jyl-dark.jyl-menu-open .rey-siteHeader .rey-headerAccount-btnText,
body.jyl-dark.jyl-menu-open .jyl-menu-trigger {
    color: var(--jyl-white, #ffffff) !important;
}
.rey-stickyContent.jyl-sticky-forced > .elementor {
    transform: translateY(0) !important;
    transition: transform var(--jyl-t300) var(--jyl-ease);
}

/* ── Scrim ──
 * position:fixed with top = header height so the dark background
 * begins below the header. --jyl-hdr-h is already defined in jyl-tokens
 * (56px mobile, overridden to 80px at ≥898px).
 * JS sets wrap.style.top to the live header bottom — in sync with this.
 */
.jyl-menu-overlay::before {
    content: '';
    position: fixed;
    top: var(--jyl-hdr-h, 56px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    /* Default state (closing): scrim fades out AFTER panels finish leaving.   */
    transition: opacity var(--jyl-menu-dur) var(--jyl-menu-ease-in) 60ms;
}
.jyl-menu-overlay.is-open::before {
    opacity: 1;
    /* Open state: scrim is the first thing to appear, no delay.              */
    transition: opacity 200ms var(--jyl-menu-ease-out) 0ms;
}
@media (min-width: 898px) {
    .jyl-menu-overlay::before {
        top: var(--jyl-hdr-h-desk, 80px);
    }
}

/* ── Wrap — positioned by JS below .rey-siteHeader ── */
.jyl-menu-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}
.jyl-menu-overlay.is-open .jyl-menu-wrap {
    pointer-events: auto;
}

/* ── Curtain — transparent click-catcher on the exposed right area ──
 * Width and pointer-events are set entirely by JS (setCurtain).
 * Position: right edge of wrap, full height.
 * z-index sits above panels (7) so it captures clicks before anything else.
 * cursor: default so the user gets no visual hint of a clickable zone.
 */
.jyl-menu-curtain {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 0;
    z-index: 7;
    background: transparent;
    cursor: default;
    pointer-events: none;
}

/* ── Desktop back-to-P0 button ──
 * Legacy element kept in the DOM for backwards compatibility. P2's desktop
 * back-header is now rendered via .jyl-menu-panel-head (matching NAV / P3-P5
 * styling), so this button is hidden on every viewport.
 */
.jyl-menu-back-to-p0-desk { display: none; }
@media (min-width: 898px) {
    .jyl-menu-back-to-p0-desk { display: none; }
}

/* ── Panel base ── */
.jyl-menu-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--jyl-beige-light);
    padding: 20px 16px;
    /* Default = exit transition (faster ease-in for crisp dismissal).       */
    transition: transform var(--jyl-menu-dur) var(--jyl-menu-ease-in),
                opacity   var(--jyl-menu-dur) var(--jyl-menu-ease-in);
    will-change: transform, opacity;
}
/* Enter transition: when overlay is open, panels use ease-out for the
 * arrival, with a small delay so the scrim shows first. The delay below
 * stacks per panel depth in P2~P5 (set on each panel block).               */
.jyl-menu-overlay.is-open .jyl-menu-panel {
    transition: transform var(--jyl-menu-dur)      var(--jyl-menu-ease-out),
                opacity   var(--jyl-menu-dur)      var(--jyl-menu-ease-out);
}
.jyl-dark .jyl-menu-panel { background: var(--jyl-black); }
@media (min-width: 898px) {
    .jyl-menu-panel {
        width: 25%;
        padding: 32px 28px;
        border-right: 1px solid var(--jyl-beige-dark);
    }
    .jyl-dark .jyl-menu-panel { border-right-color: var(--jyl-grey-medium); }
    .jyl-menu-panel--p5 { border-right: none; }
}

/* ── Panel head ──
 * The head is a passive container. The interactive target is the inner
 * .jyl-menu-head-hit pill, which wraps the back icon + label. Clicking the
 * pill is the only way to go back via the head row — blank space inside
 * .jyl-menu-panel-head is NOT a click target.
 */
.jyl-menu-panel-head {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

/* Interactive pill that contains the back icon + label.
 * - inline-flex so it sizes to content; blank space around it is non-clickable
 * - cursor:pointer + :active tint per spec; no hover background
 * - keyboard-focusable: outline ring via :focus-visible
 */
.jyl-menu-head-hit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    margin-left: -10px;             /* visually align the icon with column edge */
    border-radius: var(--jyl-radius-sm);
    cursor: pointer;
    user-select: none;
    color: var(--jyl-black);
    transition: background var(--jyl-t200) var(--jyl-ease);
}
.jyl-dark .jyl-menu-head-hit { color: var(--jyl-white); }
.jyl-menu-head-hit:active {
    background: var(--jyl-beige-medium);
}
.jyl-dark .jyl-menu-head-hit:active {
    background: var(--jyl-grey-medium);
}
.jyl-menu-head-hit:focus { outline: none; }
.jyl-menu-head-hit:focus-visible {
    outline: 2px solid var(--jyl-blue, #2266ff);
    outline-offset: 2px;
}

/* Inside the pill: strip the back button down to a bare icon (no circle bg,
 * no fixed dimensions). It inherits colour from the pill.                    */
.jyl-menu-head-hit .jyl-menu-back,
.jyl-menu-head-hit .jyl-menu-nav-back {
    background: none;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 0;
    color: inherit;
    cursor: inherit;
    pointer-events: none;           /* pill owns the click                    */
    transition: none;
}
.jyl-menu-head-hit .jyl-menu-back:hover,
.jyl-menu-head-hit .jyl-menu-nav-back:hover { background: none; }
.jyl-menu-head-hit .jyl-menu-back svg,
.jyl-menu-head-hit .jyl-menu-nav-back svg {
    width: 16px; height: 16px; display: block; flex-shrink: 0;
}

.jyl-menu-panel-title {
    font-family: var(--jyl-font);
    font-size: 1.25rem;
    font-weight: var(--jyl-fw-medium);
    color: var(--jyl-black);
    line-height: 1.2;
}
.jyl-dark .jyl-menu-panel-title { color: var(--jyl-white); }

/* ── P0 ──
 * Mobile: slides in from the left edge (full-screen panel).
 * Desktop: drops from above with a 12px Y offset and fades in. The horizontal
 *          slide is replaced because the panel already occupies its column —
 *          a vertical drop reads as "menu appears" without disturbing layout.
 */
.jyl-menu-panel--p0 {
    left: 0; z-index: 1;
    transform: translateX(-100%);
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p0 { transform: translateX(0); }
.jyl-menu-overlay.is-open .jyl-menu-panel--p0.is-hidden {
    transform: translateX(-100%);
    pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p0 {
        transform: translateY(-12px);
        opacity: 0;
    }
    .jyl-menu-overlay.is-open .jyl-menu-panel--p0 {
        transform: translateY(0);
        opacity: 1;
    }
    .jyl-menu-overlay.is-open .jyl-menu-panel--p0.is-hidden {
        transform: translateX(-16px);
        opacity: 0;
    }
}

/* ── P0 list ── */
.jyl-menu-list--p0 { margin-top: 0; gap: 0; }
.jyl-menu-p0-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: var(--jyl-black);
    font-family: var(--jyl-font);
    font-size: 1.5rem;
    font-weight: var(--jyl-fw-medium);
    line-height: 1.2;
    transition: opacity var(--jyl-t200) var(--jyl-ease);
}
.jyl-dark .jyl-menu-p0-btn { color: var(--jyl-white); }
.jyl-menu-p0-btn:hover { opacity: 0.6; }
.jyl-menu-p0-label { flex: 1; min-width: 0; }
.jyl-menu-p0-btn .jyl-menu-arrow {
    width: 20px; height: 20px;
    margin-left: 0; flex-shrink: 0; opacity: 0.4;
}
.jyl-menu-p0-btn .jyl-menu-arrow::before { background: transparent; }
.jyl-menu-p0-btn:hover .jyl-menu-arrow::before { background: transparent; width: 20px; height: 20px; }
.jyl-menu-p0-btn .jyl-menu-arrow svg { width: 12px; height: 12px; }

/* ── NAV — WP submenu replace-stack ──
 * Occupies the same column as P0 (desktop left:0 25%, mobile full width).
 * Slides in from the right like P2; only one nav column is ever visible,
 * swapped in-place by JS. Footer (with dark toggle) is rendered once at
 * the panel level and stays pinned at the bottom regardless of column.
 */
.jyl-menu-panel--nav {
    left: 0; z-index: 2;
    transform: translateX(100%); opacity: 0; pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--nav { left: 0; transform: translateX(-32px); }
}
.jyl-menu-overlay.is-open .jyl-menu-panel--nav.is-visible {
    transform: translateX(0); opacity: 1; pointer-events: auto;
}

/* Column stack: grows to fill so the footer (margin-top:auto) sinks down. */
.jyl-menu-nav-cols {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}
/* Each column is hidden by default; JS sets display on the active one. */
.jyl-menu-nav-col {
    flex-direction: column;
    width: 100%;
}
.jyl-menu-nav-col[style*="display: none"] { display: none; }

/* Back button inside a nav column reuses the round back-button styling. */
.jyl-menu-nav-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: var(--jyl-beige-medium);
    border: none;
    border-radius: var(--jyl-radius-full);
    cursor: pointer;
    color: var(--jyl-black);
    transition: background var(--jyl-t200) var(--jyl-ease);
}
.jyl-menu-nav-back:hover { background: var(--jyl-beige-dark); }
.jyl-menu-nav-back svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }
.jyl-dark .jyl-menu-nav-back { background: var(--jyl-grey-medium); color: var(--jyl-white); }
.jyl-dark .jyl-menu-nav-back:hover { background: var(--jyl-grey-light); }

/* P2 ── */
.jyl-menu-panel--p2 {
    left: 0; z-index: 3;
    transform: translateX(100%); opacity: 0; pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p2 { left: 0; transform: translateX(-32px); }
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p2.is-visible {
    transform: translateX(0); opacity: 1; pointer-events: auto;
}

/* ── P3 ── */
.jyl-menu-panel--p3 {
    left: 0; z-index: 4;
    transform: translateX(100%); opacity: 0; pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p3 { left: 25%; transform: translateX(-32px); }
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p3.is-visible {
    transform: translateX(0); opacity: 1; pointer-events: auto;
}

/* ── P4 ── */
.jyl-menu-panel--p4 {
    left: 0; z-index: 5;
    transform: translateX(100%); opacity: 0; pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p4 { left: 50%; transform: translateX(-32px); }
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p4.is-visible {
    transform: translateX(0); opacity: 1; pointer-events: auto;
}

/* ── P5 ── */
.jyl-menu-panel--p5 {
    left: 0; z-index: 6;
    transform: translateX(100%); opacity: 0; pointer-events: none;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p5 { left: 75%; transform: translateX(-32px); }
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p5.is-visible {
    transform: translateX(0); opacity: 1; pointer-events: auto;
}

/* ── Trigger ──
 * JS injects the trigger into a Rey header column (see moveTriggerIntoHeader).
 *
 *   Desktop ≥898px: trigger is appended into the logo column's widget-wrap,
 *                   which gets the helper class .jyl-trigger-host. The host
 *                   becomes position:relative and the trigger absolutely
 *                   positions itself at the left edge. Logo's text-align
 *                   centering is unaffected.
 *
 *   Mobile <898px:  trigger is appended into the right column's widget-wrap
 *                   (after Account). Static inline-flex flow, sits at the
 *                   far right of the header.
 *
 * The default styles below are the mobile/static form. The .jyl-trigger-host
 * descendant rules override for desktop only.
 */
.jyl-menu-trigger {
    position: relative;             /* anchor for absolutely-stacked icons   */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    margin: 0 0 0 8px;              /* small gap from Account widget          */
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-14);
    font-weight: var(--jyl-fw-medium);
    letter-spacing: var(--jyl-ls-md);
    color: inherit;
    border-radius: var(--jyl-radius-sm);
    white-space: nowrap;
    vertical-align: middle;
    transition: background var(--jyl-t200) var(--jyl-ease),
                color var(--jyl-t200) var(--jyl-ease);
}
.jyl-menu-trigger:hover { background: #efeeec; color: inherit; }
.jyl-dark .jyl-menu-trigger:hover,
body.jyl-dark .jyl-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}
.jyl-menu-trigger svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }

/* ── Desktop placement: logo-column-left ──
 * .jyl-trigger-host is the logo widget's elementor-widget-wrap. Trigger sits
 * absolutely at its left edge, vertically centred. Logo content (centered
 * via the column's own rules) is unaffected by the absolute child.
 */
@media (min-width: 898px) {
    .jyl-trigger-host { position: relative; }
    .jyl-trigger-host .jyl-menu-trigger {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        z-index: 2;
    }
}

/* ── Trigger state spans ──
 * The two icons (☰ menu / ✕ close) are stacked at the same coordinate via
 * position:relative on a fixed-size hit area. Toggling aria-expanded
 * cross-fades them and rotates each by 90° — a smoother shift than a hard
 * display swap, and gives the click a satisfying micro-confirmation.
 *
 * Labels (--menu / --close) still hard-swap via display since they sit
 * inline next to the icon and don't share the same coordinate.
 */
.jyl-menu-trigger__state--menu,
.jyl-menu-trigger__state--close {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.jyl-menu-trigger__state--close {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
/* Icons inside the stacked container fade + rotate. Set initial state on
 * the spans themselves so transitions work both ways.                       */
.jyl-menu-trigger__state--menu,
.jyl-menu-trigger__state--close {
    transition: opacity   var(--jyl-menu-dur-fast) var(--jyl-menu-ease-out),
                transform var(--jyl-menu-dur-fast) var(--jyl-menu-ease-out);
}
/* Closed (default): menu icon visible, close icon hidden + rotated -90°.   */
.jyl-menu-trigger[aria-expanded="false"] .jyl-menu-trigger__state--menu  {
    opacity: 1;
    transform: rotate(0deg);
}
.jyl-menu-trigger[aria-expanded="false"] .jyl-menu-trigger__state--close {
    opacity: 0;
    transform: translateY(-50%) rotate(-90deg);
    pointer-events: none;
}
/* Open: close icon visible, menu icon hidden + rotated 90°.                */
.jyl-menu-trigger[aria-expanded="true"]  .jyl-menu-trigger__state--menu  {
    opacity: 0;
    transform: rotate(90deg);
    pointer-events: none;
}
.jyl-menu-trigger[aria-expanded="true"]  .jyl-menu-trigger__state--close {
    opacity: 1;
    transform: translateY(-50%) rotate(0deg);
}

/* Labels still hard-swap (no shared coordinate). */
.jyl-menu-trigger__label--menu,
.jyl-menu-trigger__label--close { display: none; }
@media (min-width: 898px) {
    .jyl-menu-trigger { padding: 6px 16px; }
    .jyl-menu-trigger[aria-expanded="false"] .jyl-menu-trigger__label--menu  { display: inline; }
    .jyl-menu-trigger[aria-expanded="true"]  .jyl-menu-trigger__label--close { display: inline; }
}

/* The trigger needs to be a positioned context so the absolute close-icon
 * span anchors to it correctly. The desktop rule above already does this on
 * .jyl-trigger-host; for mobile we keep the trigger as a flex item but its
 * inner icon-stacking still works because the icon container has its own
 * width:20px / height:20px. No extra rule needed.                           */

/* Back button (used inside .jyl-menu-head-hit) ──
 * The .jyl-menu-head-hit rules above already strip the back button's bg /
 * border-radius / dimensions when it sits inside a hit pill. The rules below
 * remain as the standalone default in case the button is ever used outside
 * a hit pill (none currently; defensive).
 */
.jyl-menu-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    flex-shrink: 0;
    background: var(--jyl-beige-medium);
    border: none;
    border-radius: var(--jyl-radius-full);
    cursor: pointer;
    color: var(--jyl-black);
    transition: background var(--jyl-t200) var(--jyl-ease);
}
.jyl-menu-back:hover { background: var(--jyl-beige-dark); }
.jyl-menu-back svg { width: 14px; height: 14px; display: block; flex-shrink: 0; }
.jyl-dark .jyl-menu-back { background: var(--jyl-grey-medium); color: var(--jyl-white); }
.jyl-dark .jyl-menu-back:hover { background: var(--jyl-grey-light); }

.jyl-menu-back-label {
    font-family: var(--jyl-font);
    font-size: 1.25rem;
    font-weight: var(--jyl-fw-medium);
    color: var(--jyl-black);
    line-height: 1.2;
}
.jyl-dark .jyl-menu-back-label { color: var(--jyl-white); }
@media (min-width: 898px) {
    /* P3/P4/P5 hide their in-panel back button on desktop — they are stacked
     * to the right of P2 and use the global Back-to-P0 affordance instead.
     * P2 keeps its back button visible on desktop so it can return to P0.   */
    .jyl-menu-panel--p3 .jyl-menu-back,
    .jyl-menu-panel--p4 .jyl-menu-back,
    .jyl-menu-panel--p5 .jyl-menu-back { display: none; }
    .jyl-menu-panel--p2 .jyl-menu-back-label,
    .jyl-menu-panel--p3 .jyl-menu-back-label,
    .jyl-menu-panel--p4 .jyl-menu-back-label,
    .jyl-menu-panel--p5 .jyl-menu-back-label { font-size: 1.5rem; }
    /* NAV keeps its back button + label on desktop (it is the P0 column,
     * not a stacked product panel — its only way back is via this header). */
    .jyl-menu-panel--nav .jyl-menu-back-label { font-size: 1.5rem; }
}

/* ── Subgroup title ── */
.jyl-menu-subgroup-title { display: none; }
@media (min-width: 898px) {
    .jyl-menu-subgroup-title {
        display: block;
        font-size: 1.5rem;
        font-weight: var(--jyl-fw-medium);
        color: var(--jyl-black);
        margin: 0 0 4px;
        line-height: 1.2;
        flex-shrink: 0;
    }
    .jyl-dark .jyl-menu-subgroup-title { color: var(--jyl-white); }
    .jyl-menu-panel-head { display: none; }
    .jyl-menu-panel--p0 .jyl-menu-panel-head { display: flex; }
    /* NAV columns must keep their head visible on desktop too. */
    .jyl-menu-panel--nav .jyl-menu-panel-head { display: flex; }
    /* P2 shows the unified back-header on desktop too (parity with NAV).   */
    .jyl-menu-panel--p2 .jyl-menu-panel-head { display: flex; }
}

/* ── See all ── */
.jyl-menu-see-all {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 4px 14px;
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-13, 0.8125rem);
    letter-spacing: var(--jyl-ls-sm);
    color: var(--jyl-black);
    background: var(--jyl-white);
    border: 1px solid var(--jyl-beige-medium);
    border-radius: var(--jyl-radius-sm);
    text-decoration: none;
    align-self: flex-start;
    flex-shrink: 0;
    transition: border-color var(--jyl-t200) var(--jyl-ease),
                background var(--jyl-t200) var(--jyl-ease);
}
.jyl-menu-see-all:hover {
    border-color: var(--jyl-beige-dark);
    background: var(--jyl-beige-medium);
}
.jyl-dark .jyl-menu-see-all {
    color: var(--jyl-white);
    background: var(--jyl-black);
    border-color: var(--jyl-grey-medium);
}
.jyl-dark .jyl-menu-see-all:hover {
    border-color: var(--jyl-grey-light);
    background: var(--jyl-grey-medium);
}
@media (min-width: 898px) { .jyl-menu-see-all { margin-top: 20px; } }

/* ── Nav list ── */
.jyl-menu-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    flex-shrink: 0;
}
@media (min-width: 898px) { .jyl-menu-list { margin-top: 24px; } }

/* ── Staggered content reveal ──
 * List items and product cards inside an OPEN panel rise up + fade in. Each
 * item is delayed by ~30ms relative to the previous (capped at 10 stops so
 * a long list doesn't end up with a multi-second delay on the last item).
 *
 * Default state (panel closed or this panel not active): items are slightly
 * dropped + transparent so the in-transition animates back to neutral.
 *
 * Active state: triggered by .is-visible on P2~P5 / NAV, or by .is-open
 * (without .is-hidden) on P0. Selectors below cover both.
 */
.jyl-menu-list > li,
.jyl-menu-prod-card {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity   var(--jyl-menu-dur-slow) var(--jyl-menu-ease-out),
                transform var(--jyl-menu-dur-slow) var(--jyl-menu-ease-out);
}
.jyl-menu-overlay.is-open .jyl-menu-panel--p0:not(.is-hidden) .jyl-menu-list > li,
.jyl-menu-overlay.is-open .jyl-menu-panel--nav.is-visible .jyl-menu-list > li,
.jyl-menu-overlay.is-open .jyl-menu-panel--nav.is-visible .jyl-menu-prod-card,
.jyl-menu-overlay.is-open .jyl-menu-panel--p2.is-visible .jyl-menu-list > li,
.jyl-menu-overlay.is-open .jyl-menu-panel--p3.is-visible .jyl-menu-list > li,
.jyl-menu-overlay.is-open .jyl-menu-panel--p3.is-visible .jyl-menu-prod-card,
.jyl-menu-overlay.is-open .jyl-menu-panel--p4.is-visible .jyl-menu-list > li,
.jyl-menu-overlay.is-open .jyl-menu-panel--p4.is-visible .jyl-menu-prod-card,
.jyl-menu-overlay.is-open .jyl-menu-panel--p5.is-visible .jyl-menu-prod-card {
    opacity: 1;
    transform: translateY(0);
}
/* Stagger via nth-child up to 10 stops. Beyond that, items animate together
 * (acceptable: typical menus rarely exceed 10 items per panel).             */
.jyl-menu-list > li:nth-child(1),  .jyl-menu-prod-card:nth-child(1)  { transition-delay: 60ms;  }
.jyl-menu-list > li:nth-child(2),  .jyl-menu-prod-card:nth-child(2)  { transition-delay: 90ms;  }
.jyl-menu-list > li:nth-child(3),  .jyl-menu-prod-card:nth-child(3)  { transition-delay: 120ms; }
.jyl-menu-list > li:nth-child(4),  .jyl-menu-prod-card:nth-child(4)  { transition-delay: 150ms; }
.jyl-menu-list > li:nth-child(5),  .jyl-menu-prod-card:nth-child(5)  { transition-delay: 180ms; }
.jyl-menu-list > li:nth-child(6),  .jyl-menu-prod-card:nth-child(6)  { transition-delay: 210ms; }
.jyl-menu-list > li:nth-child(7),  .jyl-menu-prod-card:nth-child(7)  { transition-delay: 240ms; }
.jyl-menu-list > li:nth-child(8),  .jyl-menu-prod-card:nth-child(8)  { transition-delay: 270ms; }
.jyl-menu-list > li:nth-child(9),  .jyl-menu-prod-card:nth-child(9)  { transition-delay: 300ms; }
.jyl-menu-list > li:nth-child(n+10), .jyl-menu-prod-card:nth-child(n+10) { transition-delay: 330ms; }

/* ── Nav item button / link ── */
.jyl-menu-item-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 4px 20px 4px 4px;
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-14);
    letter-spacing: var(--jyl-ls-sm, 0.3px);
    color: var(--jyl-black);
    background: var(--jyl-white);
    border: 1px solid transparent;
    border-radius: var(--jyl-radius-sm);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    overflow: hidden;
    opacity: 0.5;
    transition: border-color var(--jyl-t300) var(--jyl-ease),
                background var(--jyl-t300) var(--jyl-ease),
                opacity var(--jyl-t300) var(--jyl-ease);
}
.jyl-dark .jyl-menu-item-btn {
    color: var(--jyl-white);
    background: var(--jyl-grey-dark);
}
.jyl-menu-item-btn.is-inactive {
    opacity: 0.5;
}
.jyl-menu-item-btn:hover {
    background: var(--jyl-beige-medium);
    border-color: var(--jyl-beige-dark);
    opacity: 1;
}
.jyl-dark .jyl-menu-item-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--jyl-grey-medium);
}
.jyl-menu-item-btn.is-selected {
    background: var(--jyl-beige-medium);
    border-color: var(--jyl-beige-dark);
    opacity: 1;
}
.jyl-dark .jyl-menu-item-btn.is-selected {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--jyl-grey-medium);
}
.jyl-menu-panel--p2 .jyl-menu-item-btn { padding: 16px 20px 16px 20px; }
@media (min-width: 898px) {
    .jyl-menu-panel--p2 .jyl-menu-item-btn { padding: 12px 20px 12px 16px; }
}

/* NAV items: larger touch target, full opacity (no inactive-dim drilldown
 * affordance needed since replace-stack always shows a single live column). */
.jyl-menu-nav-item { padding: 16px 20px 16px 20px; opacity: 1; }
.jyl-menu-nav-item.is-inactive { opacity: 1; }
@media (min-width: 898px) {
    .jyl-menu-nav-item { padding: 12px 20px 12px 16px; }
}

/* ── Thumbnails ── */
.jyl-menu-cat-thumb,
.jyl-menu-prod-thumb {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: var(--jyl-menu-thumb);
    height: var(--jyl-menu-thumb);
    overflow: hidden;
    border-radius: var(--jyl-radius-sm);
    background: var(--jyl-beige-medium);
}
.jyl-dark .jyl-menu-cat-thumb,
.jyl-dark .jyl-menu-prod-thumb { background: var(--jyl-grey-dark); }
.jyl-menu-cat-thumb img,
.jyl-menu-prod-thumb img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* ── Item label ── */
.jyl-menu-item-label {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Arrow ── */
.jyl-menu-arrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    flex-shrink: 0;
    margin-left: auto;
    color: var(--jyl-black);
    transition: color var(--jyl-t300) var(--jyl-ease);
}
.jyl-dark .jyl-menu-arrow { color: var(--jyl-white); }
.jyl-menu-arrow::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 24px; height: 24px;
    transform: translate(-50%, -50%);
    border-radius: var(--jyl-radius-full);
    background: var(--jyl-beige-medium);
    transition: width var(--jyl-t300) var(--jyl-ease),
                height var(--jyl-t300) var(--jyl-ease),
                background var(--jyl-t300) var(--jyl-ease);
}
.jyl-dark .jyl-menu-arrow::before { background: var(--jyl-grey-medium); }
.jyl-menu-arrow svg {
    position: relative; z-index: 1;
    width: 14px; height: 14px; display: block; flex-shrink: 0;
}
.jyl-menu-item-btn:hover .jyl-menu-arrow,
.jyl-menu-item-btn.is-selected .jyl-menu-arrow { color: var(--jyl-white); }
.jyl-menu-item-btn:hover .jyl-menu-arrow::before,
.jyl-menu-item-btn.is-selected .jyl-menu-arrow::before {
    width: 32px; height: 32px;
    background: var(--jyl-blue);
}

/* ── Tag badges ── */
.jyl-menu-tags { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.jyl-menu-tag {
    display: inline-block;
    text-align: center;
    padding: 4px 8px;
    font-size: var(--jyl-fs-12);
    font-weight: var(--jyl-fw-medium);
    letter-spacing: var(--jyl-ls-md);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    border-radius: var(--jyl-radius-full);
    color: var(--jyl-blue);
    background: #9ee193;
    border: none;
}
@media (min-width: 898px) { .jyl-menu-tag { padding: 5px 16px; font-size: var(--jyl-fs-14); } }
.jyl-menu-tag--new { color: var(--jyl-blue); background: var(--jyl-blue-xlight, #d6e6ff); }
.jyl-dark .jyl-menu-tag--new { color: var(--jyl-blue-xlight, #d6e6ff); background: var(--jyl-blue); }

/* ── Product cards ── */
.jyl-menu-prod-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 4px;
}
@media (min-width: 898px) { .jyl-menu-prod-list { margin-top: 20px; } }

.jyl-menu-prod-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.jyl-menu-prod-card__img {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--jyl-radius-sm);
    background: var(--jyl-beige-medium);
    flex-shrink: 0;
    text-decoration: none;
}
.jyl-dark .jyl-menu-prod-card__img { background: var(--jyl-grey-dark); }
.jyl-menu-prod-card__img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform var(--jyl-t300) var(--jyl-ease);
}
.jyl-menu-prod-card__img:hover img { transform: scale(1.04); }

.jyl-menu-prod-card__name {
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-14);
    font-weight: var(--jyl-fw-medium);
    color: var(--jyl-black);
    text-decoration: none;
    line-height: 1.3;
    flex-shrink: 0;
    transition: opacity var(--jyl-t200) var(--jyl-ease);
}
.jyl-dark .jyl-menu-prod-card__name { color: var(--jyl-white); }
.jyl-menu-prod-card__name:hover { opacity: 0.7; }

.jyl-menu-prod-card__desc {
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-12);
    color: var(--jyl-grey-light);
    line-height: 1.5;
    margin: 0;
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jyl-dark .jyl-menu-prod-card__desc { color: var(--jyl-grey-extra-light, #bebebe); }

.jyl-menu-prod-card__seeall {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 4px 14px;
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-12);
    letter-spacing: var(--jyl-ls-sm);
    color: var(--jyl-black);
    background: var(--jyl-white);
    border: 1px solid var(--jyl-beige-medium);
    border-radius: var(--jyl-radius-sm);
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color var(--jyl-t200) var(--jyl-ease),
                background var(--jyl-t200) var(--jyl-ease);
}
.jyl-menu-prod-card__seeall:hover {
    border-color: var(--jyl-beige-dark);
    background: var(--jyl-beige-medium);
}
.jyl-dark .jyl-menu-prod-card__seeall {
    color: var(--jyl-white);
    background: var(--jyl-black);
    border-color: var(--jyl-grey-medium);
}
.jyl-dark .jyl-menu-prod-card__seeall:hover {
    border-color: var(--jyl-grey-light);
    background: rgba(255, 255, 255, 0.08);
}

.jyl-menu-prod-card + .jyl-menu-prod-card {
    padding-top: 16px;
    border-top: 1px solid var(--jyl-beige-dark);
}
.jyl-dark .jyl-menu-prod-card + .jyl-menu-prod-card { border-top-color: var(--jyl-grey-medium); }

/* ── Footer ── */
.jyl-menu-footer {
    margin-top: auto;
    padding-top: 64px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}
@media (min-width: 898px) {
    .jyl-menu-panel--p3 .jyl-menu-footer,
    .jyl-menu-panel--p4 .jyl-menu-footer,
    .jyl-menu-panel--p5 .jyl-menu-footer { display: none; }
    .jyl-menu-footer { padding-top: 48px; }
}
.jyl-menu-footer-divider {
    width: 100%; height: 1px;
    background: var(--jyl-beige-dark);
    margin-bottom: 20px;
}
.jyl-dark .jyl-menu-footer-divider { background: rgba(255,255,255,0.15); }

/* ── Contact CTA (mobile only) ── */
.jyl-menu-cta { width: 100%; margin-top: 16px; }
@media (min-width: 898px) { .jyl-menu-cta { display: none; } }

/* ── Dark mode toggle ── */
.jyl-menu-dark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 4px 14px;
    border-radius: var(--jyl-radius-sm);
    background: var(--jyl-beige-medium);
    border: none;
    cursor: pointer;
    font-family: var(--jyl-font);
    font-size: var(--jyl-fs-12);
    font-weight: var(--jyl-fw-medium);
    letter-spacing: var(--jyl-ls-md);
    text-transform: uppercase;
    color: var(--jyl-black);
    transition: background var(--jyl-t200) var(--jyl-ease);
}
.jyl-dark .jyl-menu-dark-toggle { background: var(--jyl-grey-medium); color: var(--jyl-white); }
.jyl-menu-dark-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: var(--jyl-radius-full);
    background: var(--jyl-white);
    color: var(--jyl-black);
}
.jyl-dark .jyl-menu-dark-toggle-icon { background: var(--jyl-grey-dark); color: var(--jyl-white); }
.jyl-menu-dark-toggle-icon svg { width: 14px; height: 14px; display: block; }

/* ── Dark-mode logo swap ──
 *
 * The Rey customizer doesn't expose a dark-mode logo field. We add one in
 * jyl-dark-logo.php (Customizer registration) which outputs two CSS vars
 * into <head>:
 *     --jyl-logo-dark         desktop dark logo URL
 *     --jyl-logo-dark-mobile  mobile dark logo URL (falls back to desktop)
 *
 * In dark mode we hide the original Rey <img> (with `visibility:hidden` so
 * its dimensions are preserved — the logo's width/height are inherited from
 * the link box) and paint the dark logo as a background on the parent link.
 *
 * If the vars are not defined (customizer field empty), the original logo
 * stays visible — graceful degradation, no broken layout.
 */
.jyl-dark .rey-siteLogo a.custom-logo-link {
    position: relative;
}
.jyl-dark .rey-siteLogo a.custom-logo-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--jyl-logo-dark, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}
@media (max-width: 897px) {
    .jyl-dark .rey-siteLogo a.custom-logo-link::after {
        background-image: var(--jyl-logo-dark-mobile, var(--jyl-logo-dark, none));
    }
}
/* Hide the original logo only when a dark logo URL is actually set —
 * we use the @supports trick: only mask the <img> when the var resolves
 * to a real url(). If --jyl-logo-dark is `none` (default), the img stays.
 * For broader compat, we rely on JS toggling .jyl-dark-logo--active on
 * the <body> when the customizer setting exists (set in jyl-dark-logo.php
 * via inline <style> alongside the variables).                              */
.jyl-dark-logo--active.jyl-dark .rey-siteLogo a.custom-logo-link > img.custom-logo,
.jyl-dark.jyl-dark-logo--active .rey-siteLogo a.custom-logo-link > img.custom-logo,
body.jyl-dark-logo--active.jyl-dark .rey-siteLogo a.custom-logo-link > img.custom-logo {
    visibility: hidden;
}