/* Essencia: translucent glass, soft edge reflections and quiet motion. */

:root {
    --ess-deep:      #0D3F34;
    --ess-emerald:   #2E9E84;
    --ess-cyan:      #59BEC0;

    --ess-nav-top: 0px;
    --ess-nav-h:     76px;
    --ess-nav-radius: 0;
    --ess-nav-max:   1480px;
    --ess-nav-gutter: 0px;
    --ess-ink:       #0D3F34;           /* text / icons on the water glass */
    --ess-ink-soft:  rgba(13, 63, 52, .78);

    /* cursor light position inside the capsule (percent), driven by JS */
    --ess-mx: 50%;
    --ess-my: 50%;
    --ess-light: 0;               /* 0..1, how close the pointer is */

    --ess-ease: cubic-bezier(.22, 1, .36, 1);   /* spring-like, no overshoot */
    --ess-ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* --------------------------------------------------------------------------
   Header shell — always fixed; a spacer keeps page content below it.
   -------------------------------------------------------------------------- */
header#mainHeader.ess-header {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 0;
    pointer-events: none;                /* only the capsule itself is interactive */
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: translate3d(0, 0, 0);
    transition: transform .34s cubic-bezier(.22, .68, 0, 1);
    will-change: transform;
}
header#mainHeader.ess-header.is-hidden {
    transform: translate3d(0, calc(-100% - 32px), 0);
}

.ess-nav-spacer {
    height: var(--ess-nav-h);
}

/* --------------------------------------------------------------------------
   The capsule
   -------------------------------------------------------------------------- */
.ess-nav {
    pointer-events: auto;
    position: relative;
    width: 100%;
    height: var(--ess-nav-h);
    border-radius: 0;
    overflow: visible;                   /* the account dropdown must escape */
    /* NOTE: no filter / isolation / blend on this element or its ancestors —
       any of them would create a new backdrop root and kill the glass blur. */
}

.ess-nav__bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    z-index: 0;
    transform: translateZ(0);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .55),
        0 6px 20px -12px rgba(13, 63, 52, .18),
        0 20px 40px -28px rgba(13, 63, 52, .12);
}

/* Neutral glass with a faint emerald tint; the page supplies the colour. */
.ess-nav__glass {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, .62) 0%,
            rgba(245, 251, 249, .40) 40%,
            rgba(232, 245, 240, .46) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .75),
        inset 0 -1px 0 rgba(13, 63, 52, .18),
        inset 0 -8px 20px -16px rgba(46, 158, 132, .12);
}

/* Grain: tiny static SVG turbulence, tiled. Practically free. */
.ess-nav__noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .015;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 160px 160px;
}

/* Soft internal reflection: a wide, faint sheet of light on the upper-left */
.ess-nav__sheen {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(70% 160% at 12% -50%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
        radial-gradient(40% 120% at 68% -60%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%),
        radial-gradient(60% 100% at 92% 130%, rgba(46, 158, 132, .035), rgba(46, 158, 132, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 42%);
}

/* Illuminated rim: 1px gradient border via mask, with a cursor-following glint */
.ess-nav__edge {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    padding: 1px;
    background:
        radial-gradient(220px 140px at var(--ess-mx) var(--ess-my),
            rgba(255, 255, 255, calc(.9 * var(--ess-light))),
            rgba(255, 255, 255, 0) 70%),
        linear-gradient(180deg,
            rgba(255, 255, 255, .85) 0%,
            rgba(255, 255, 255, .25) 30%,
            rgba(13, 63, 52, .10) 70%,
            rgba(13, 63, 52, .12) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

/* --------------------------------------------------------------------------
   Content row
   -------------------------------------------------------------------------- */
.ess-nav__row {
    direction: ltr !important;
    position: relative;
    z-index: 1;
    height: var(--ess-nav-h);
    max-width: var(--ess-nav-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px 0 24px;
}

.ess-nav__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    outline: none;
}
.ess-nav__logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: opacity .2s ease;
    /* the SVG logo is black; tint it to the brand's deep emerald on the water glass */
    filter: brightness(0) invert(17%) sepia(28%) saturate(1200%) hue-rotate(125deg) brightness(.9);
}
.ess-nav__logo:hover img { opacity: .92; }
.ess-nav__logo:focus-visible { box-shadow: 0 0 0 2px rgba(13, 63, 52, .55); }

/* Links */
.ess-nav__links {
    direction: ltr !important;
    display: none;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    position: relative;
}
@media (min-width: 1024px) {
    .ess-nav__links { display: flex; }
}

.ess-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .005em;
    color: var(--ess-ink-soft);
    text-decoration: none;
    white-space: nowrap;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}
.ess-nav__link:hover,
.ess-nav__link:focus-visible {
    color: var(--ess-ink);
    background: rgba(255, 255, 255, .24);
}
.ess-nav__link[aria-current="page"] {
    color: var(--ess-ink);
    font-weight: 600;
    background: rgba(255, 255, 255, .40);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 0 0 1px rgba(255,255,255,.48), 0 2px 6px rgba(13,63,52,.055);
}
.ess-nav__link:focus-visible {
    box-shadow: 0 0 0 2px rgba(13, 63, 52, .5);
}

/* Actions (search / cart / account / burger) */
.ess-nav__actions {
    direction: ltr !important;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ess-nav__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--ess-ink);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    outline: none;
    overflow: visible !important;
    -webkit-tap-highlight-color: transparent;
    transition: background .35s ease, border-color .35s ease, color .35s ease, transform .35s var(--ess-ease);
}
.ess-nav__icon i { font-size: 15px; line-height: 1; }
.ess-nav__icon:hover,
.ess-nav__icon:focus-visible {
    background: rgba(255, 255, 255, .35);
    border-color: rgba(255, 255, 255, .6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 8px -4px rgba(13, 63, 52, .35);
}
.ess-nav__icon:active { transform: scale(.94); }
.ess-nav__icon:focus-visible { box-shadow: 0 0 0 2px rgba(13, 63, 52, .5); }

.ess-nav__cart-count {
    pointer-events: none;
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 2;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: linear-gradient(180deg, #2E9E84, #0D3F34);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 2px 6px rgba(13, 63, 52, .35);
    font-variant-numeric: tabular-nums;
}

/* Account pill (logged in) */
.ess-nav__account { position: relative; margin-left: 4px; }
.ess-nav__account-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px 0 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .28);
    color: var(--ess-ink);
    cursor: pointer;
    outline: none;
    transition: background .35s ease, border-color .35s ease;
}
.ess-nav__account-btn:hover,
.ess-nav__account-btn:focus-visible {
    background: rgba(255, 255, 255, .42);
    border-color: rgba(255, 255, 255, .8);
}
.ess-nav__account-btn:focus-visible { box-shadow: 0 0 0 2px rgba(13, 63, 52, .5); }
.ess-nav__avatar {
    width: 32px; height: 32px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    color: #fff;
    background: linear-gradient(160deg, var(--ess-emerald), var(--ess-deep));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px rgba(13, 63, 52, .3);
}
.ess-nav__account-name {
    display: none;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8125rem;
    font-weight: 500;
}
@media (min-width: 768px) { .ess-nav__account-name { display: block; } }
.ess-nav__account-btn .fa-chevron-down {
    font-size: 10px;
    color: var(--ess-emerald);
    transition: transform .3s var(--ess-ease);
}
.ess-nav__account-btn .fa-chevron-down.rotate-180 { transform: rotate(180deg); }

/* Account dropdown — dark glass panel, escapes the capsule */
#userProfileDropdown {
    position: absolute !important;
    right: 0;
    top: calc(100% + 12px);
    z-index: 9999 !important;
    width: 15rem;
    padding: 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(238, 247, 243, .94));
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    backdrop-filter: blur(24px) saturate(145%);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 24px 50px -20px rgba(13, 63, 52, .45);
    color: var(--ess-ink);
}
#userProfileDropdown.hidden { display: none; }
#userProfileDropdown .ess-dd__head {
    padding: 10px 12px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(13, 63, 52, .12);
}
#userProfileDropdown .ess-dd__head small {
    display: block;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(13, 63, 52, .55);
}
#userProfileDropdown .ess-dd__head strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ess-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#userProfileDropdown .ess-dd__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 0;
    font-size: 13.5px;
    color: var(--ess-ink-soft);
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}
#userProfileDropdown .ess-dd__item i { width: 16px; text-align: center; color: var(--ess-emerald); }
#userProfileDropdown .ess-dd__item:hover { background: rgba(255, 255, 255, .55); color: var(--ess-ink); }
#userProfileDropdown .ess-dd__item--danger { color: #b3261e; }
#userProfileDropdown .ess-dd__item--danger i { color: #b3261e; }
#userProfileDropdown .ess-dd__item--danger:hover { background: rgba(179, 38, 30, .08); color: #8f1d17; }
#userProfileDropdown .ess-dd__sep { height: 1px; margin: 4px 6px; background: rgba(13, 63, 52, .12); }

/* Burger */
.ess-nav__burger { display: inline-flex; }
@media (min-width: 1024px) { .ess-nav__burger { display: none; } }
.ess-nav__burger-lines {
    position: relative;
    width: 18px;
    height: 12px;
}
.ess-nav__burger-lines span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .45s var(--ess-ease), opacity .3s ease, top .45s var(--ess-ease);
}
.ess-nav__burger-lines span:nth-child(1) { top: 0; }
.ess-nav__burger-lines span:nth-child(2) { top: 5.25px; }
.ess-nav__burger-lines span:nth-child(3) { top: 10.5px; }
.ess-nav.is-open .ess-nav__burger-lines span:nth-child(1) { top: 5.25px; transform: rotate(45deg); }
.ess-nav.is-open .ess-nav__burger-lines span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.ess-nav.is-open .ess-nav__burger-lines span:nth-child(3) { top: 5.25px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Mobile menu — lives INSIDE the capsule; the glass grows to reveal it.
   -------------------------------------------------------------------------- */
#mobileMenu.ess-nav__menu {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows .6s var(--ess-ease), opacity .35s ease;
}
.ess-nav.is-open #mobileMenu.ess-nav__menu {
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows .6s var(--ess-ease), opacity .4s ease .1s;
}
#mobileMenu.ess-nav__menu > div {
    min-height: 0;
    overflow: hidden;
}
.ess-nav__menu-inner {
    max-width: var(--ess-nav-max);
    margin: 0 auto;
    padding: 4px 12px 20px;
    max-height: calc(100dvh - var(--ess-nav-h) - 16px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ess-nav__menu-sep {
    height: 1px;
    margin: 6px 8px;
    background: linear-gradient(90deg, rgba(13, 63, 52, 0), rgba(13, 63, 52, .18), rgba(13, 63, 52, 0));
}
.ess-nav__mlink {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 0;
    background: transparent;
    border: 0;
    text-align: left;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .9375rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--ess-ink-soft) !important;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateY(6px);
    opacity: 0;
    transition: transform .5s var(--ess-ease), opacity .4s ease, background .25s ease;
}
.ess-nav.is-open .ess-nav__mlink {
    transform: translateY(0);
    opacity: 1;
}
/* stagger — feels like the glass reconfiguring, not a list appearing */
.ess-nav.is-open .ess-nav__mlink:nth-child(1)  { transition-delay: .06s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(2)  { transition-delay: .09s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(3)  { transition-delay: .12s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(4)  { transition-delay: .15s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(5)  { transition-delay: .18s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(6)  { transition-delay: .21s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(7)  { transition-delay: .24s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(8)  { transition-delay: .27s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(9)  { transition-delay: .30s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(10) { transition-delay: .33s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(11) { transition-delay: .36s; }
.ess-nav.is-open .ess-nav__mlink:nth-child(12) { transition-delay: .39s; }
.ess-nav__mlink i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    color: var(--ess-emerald) !important;
}
.ess-nav__mlink:hover,
.ess-nav__mlink:focus-visible { background: rgba(255, 255, 255, .3); }
.ess-nav__mlink:focus-visible { box-shadow: inset 0 0 0 2px rgba(13, 63, 52, .45); }
.ess-nav__mlink[aria-current="page"] { color: var(--ess-ink) !important; font-weight: 600; }
.ess-nav__mlink--danger,
.ess-nav__mlink--danger i { color: #b3261e !important; }

/* page dim behind an open mobile menu */
#mobileMenuOverlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(13, 63, 52, .30);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s ease;
}
#mobileMenuOverlay.is-visible { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) { #mobileMenuOverlay { display: none; } }
.ess-nav.is-open { height: auto !important; }

/* --------------------------------------------------------------------------
   Responsive sizing
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    :root {
        --ess-nav-h: 80px;
    }
    .ess-nav__row { padding: 0 16px; }
    .ess-nav__logo img { height: 48px; max-width: 160px; }
}
@media (max-width: 640px) {
    :root {
        --ess-nav-h: 80px;
    }
    .ess-nav__icon { width: 38px; height: 44px; }
    .ess-nav__actions { gap: 2px; }
    .ess-nav__row { padding: 0 12px 0 16px; }
    .ess-nav__logo img { height: 46px; max-width: 155px; }
}

/* --------------------------------------------------------------------------
   Reduced motion / fallbacks
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    header#mainHeader.ess-header,
    .ess-nav, .ess-nav__row, .ess-nav__logo img,
    .ess-nav__link, .ess-nav__icon, .ess-nav__mlink,
    #mobileMenu.ess-nav__menu, .ess-nav__burger-lines span {
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ess-nav__glass {
        background: linear-gradient(180deg, rgba(250, 253, 251, .98), rgba(233, 243, 237, .98));
    }
}

/* --------------------------------------------------------------------------
   Global rules carried over from the previous navbar stylesheet
   -------------------------------------------------------------------------- */
html, body { overflow-x: hidden; }

#searchModal.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

@media (max-width: 768px) {
    #authContainer {
        align-items: flex-start !important;
        padding-top: 120px !important;
        padding-bottom: 20px !important;
    }
    #authDialog { width: 95% !important; margin: 0 auto !important; }
}

/* Reference treatment: obsidian capsule with a raised optical-glass lens.
   The lens sits inside the bar; its centre stays clear and the rim carries
   the highlights. No spring, scale pulse or growing wave amplitude. */
:root {
    --ess-nav-top: 0px;
    --ess-nav-gutter: 0px;
    --ess-nav-radius: 0;
    --ess-nav-h: 80px;
}
header#mainHeader.ess-header {
    padding: var(--ess-nav-top) var(--ess-nav-gutter) 0;
}
.ess-nav {
    max-width: none;
    margin: 0 auto;
    border-radius: var(--ess-nav-radius);
    --ess-ink: #f8faf9;
    --ess-ink-soft: rgba(245, 248, 247, .86);
}
.ess-nav-spacer { height: var(--ess-nav-h); }
.ess-nav__bg {
    box-shadow: 0 16px 36px -18px rgba(0,0,0,.48), 0 2px 5px rgba(0,0,0,.12);
}
.ess-nav__glass {
    background: linear-gradient(155deg, rgba(22,25,25,.96), rgba(7,9,9,.98) 65%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -1px 0 rgba(255,255,255,.035);
}
.ess-nav__sheen { background: linear-gradient(165deg, rgba(255,255,255,.035), transparent 42%); }
.ess-nav__edge { background: linear-gradient(140deg, rgba(255,255,255,.20), transparent 38%, rgba(255,255,255,.06)); }
.ess-nav__row { padding: 0 24px; gap: 20px; }
.ess-nav__logo img { height: 34px; max-width: 160px; filter: brightness(0) invert(1); }
.ess-nav__links { gap: 10px; height: 100%; }
.ess-nav__link {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 90px;
    height: 100%;
    padding: 0 13px;
    font-size: 11px;
    letter-spacing: .01em;
    isolation: isolate;
    transition: color .3s ease;
}
.ess-nav__link > .ess-outline-icon {
    font-size: 20px;
    color: rgba(245,248,247,.86);
    transition: color .3s ease, filter .3s ease;
}
.ess-nav__link > span, .ess-nav__link > .ess-outline-icon { position: relative; z-index: 2; }
.ess-nav__link:hover,
.ess-nav__link:focus-visible,
.ess-nav__link[aria-current="page"] { background: transparent; box-shadow: none; color: #fff; }
.ess-nav__link:hover > .ess-outline-icon { color: rgba(255,255,255,.9); }
.ess-nav__link[aria-current="page"] > .ess-outline-icon {
    color: #fff;
    filter: none;
}
/* Cute soap-bubble: almost clear centre, thin rim, a couple of soft highlights. */
.ess-nav__link[aria-current="page"]::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 7px -2px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.20);
    background:
        radial-gradient(ellipse 70% 55% at 28% 16%, rgba(255,255,255,.28), transparent 58%),
        radial-gradient(ellipse 45% 40% at 86% 78%, rgba(196,230,248,.10), transparent 62%),
        linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.015) 42%, transparent 78%);
    backdrop-filter: blur(1px) saturate(108%);
    -webkit-backdrop-filter: blur(1px) saturate(108%);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.32),
        inset 0 -1px 1px rgba(255,255,255,.06),
        0 2px 8px -5px rgba(0,0,0,.28);
}
/* Thin reflective rim — a halo, not a thick glass wall. */
.ess-nav__link[aria-current="page"]::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 7px -2px;
    padding: 2px;
    border-radius: 999px;
    background: conic-gradient(from 20deg,
        rgba(255,255,255,.55),
        rgba(186,224,246,.22) 12%,
        transparent 26%,
        transparent 40%,
        rgba(255,255,255,.42) 52%,
        rgba(214,236,248,.16) 64%,
        transparent 78%,
        rgba(255,255,255,.38));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: .38;
    animation: ess-lens-light 48s ease-in-out infinite;
}
@keyframes ess-lens-light {
    0%, 100% { opacity: .34; transform: translateY(-.3px); }
    50% { opacity: .44; transform: translateY(.3px); }
}
.ess-nav__link:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.ess-nav__icon:hover, .ess-nav__icon:focus-visible { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }
.ess-nav__account-btn { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.17); }
.ess-nav__account-btn:hover { background: rgba(255,255,255,.14); }
.ess-nav__logo:focus-visible, .ess-nav__icon:focus-visible, .ess-nav__account-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#userProfileDropdown { --ess-ink: #17352c; --ess-ink-soft: #345148; }
.ess-nav.is-open { border-radius: var(--ess-nav-radius); }
.ess-nav__mlink { border-radius: 14px; }
.ess-nav__mlink i { color: rgba(255,255,255,.64) !important; }
.ess-nav__mlink[aria-current="page"] {
    background: linear-gradient(120deg, rgba(255,255,255,.20), rgba(255,255,255,.04));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.30), inset 0 1px 4px rgba(255,255,255,.18);
}
.ess-nav__mlink:hover, .ess-nav__mlink:focus-visible { background-color: rgba(255,255,255,.10); }
.ess-nav__menu-sep { background: rgba(255,255,255,.12); }
.ess-nav__menu-inner { max-height: calc(100dvh - var(--ess-nav-h) - var(--ess-nav-top) - 24px); }
@media (max-width: 1199px) and (min-width: 1024px) {
    .ess-nav__links { gap: 4px; }
    .ess-nav__link { min-width: 78px; padding: 0 10px; }
    .ess-nav__account-name { display: none; }
    .ess-nav__logo img { max-width: 125px; }
}
@media (max-width: 1023px) {
    :root { --ess-nav-top: 0px; --ess-nav-gutter: 0px; --ess-nav-h: 80px; }
    .ess-nav__row { padding: 0 16px; gap: 8px; }
    .ess-nav__logo img { height: 48px; max-width: 160px; }
}
@media (max-width: 640px) {
    :root { --ess-nav-top: 0px; --ess-nav-gutter: 0px; --ess-nav-h: 80px; }
    .ess-nav__row { padding: 0 12px 0 16px; }
    .ess-nav__logo img { max-width: 155px; height: 46px; }
    .ess-nav__icon { width: 38px; height: 44px; }
    .ess-nav__account-btn { gap: 5px; padding-right: 8px; }
}
.ess-header.is-hidden .ess-nav__link::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .ess-nav__link[aria-current="page"]::after { animation: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ess-nav__glass { background: #101313; }
}

/* Search uses the navbar's dark body and raised, clear glass rim. */
#searchModal { z-index: 80; --color-accent: #d4e1e5; }
#searchOverlay {
    background: rgba(5, 8, 9, .46);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
#searchContainer {
    padding-top: calc(var(--ess-nav-top) + var(--ess-nav-h) + 26px);
    padding-bottom: 20px;
    overflow-y: auto;
}
#searchDialog { max-width: 640px; transition-duration: 150ms; }
.ess-search__glass {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.28);
    background: linear-gradient(140deg, rgba(25,29,30,.95), rgba(9,12,13,.97) 55%, rgba(30,35,37,.94));
    -webkit-backdrop-filter: blur(24px) saturate(115%);
    backdrop-filter: blur(24px) saturate(115%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.27), inset 0 -1px 1px rgba(255,255,255,.10), 0 24px 70px -20px rgba(0,0,0,.65);
    color: #f8faf9;
}
.ess-search__glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,.6), transparent 35%, transparent 65%, rgba(214,237,250,.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.ess-search__head { padding: 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ess-search__field { position: relative; border-radius: 999px; }
.ess-search__field::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.35);
    background: linear-gradient(125deg, rgba(255,255,255,.20), transparent 35%, transparent 65%, rgba(221,239,249,.17));
    box-shadow: inset 2px 2px 4px rgba(255,255,255,.26), inset -2px -2px 5px rgba(255,255,255,.16), 0 6px 14px -9px #000;
}
#searchInput {
    position: relative;
    width: 100%;
    min-height: 56px;
    padding: 16px 54px 16px 22px;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(5,8,9,.48);
    color: #fff;
    font-size: 16px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.18);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
#searchInput::placeholder { color: rgba(237,243,245,.57); }
#searchInput:focus {
    border-color: rgba(226,243,252,.75);
    background: rgba(5,8,9,.60);
    box-shadow: 0 0 0 2px rgba(220,238,249,.13), inset 0 1px 3px rgba(0,0,0,.2);
}
#searchInput::-webkit-search-cancel-button { -webkit-appearance: none; }
.ess-search__field > div { pointer-events: none; }
.ess-search__field i { color: #e0ebef; font-size: 18px; }
#searchResults { max-height: min(384px, 48dvh); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526064 transparent; }
#searchResults > .text-center { padding: 38px 24px; }
#searchResults > .text-center > .fa-search { font-size: 32px; color: #d7e3e8; filter: drop-shadow(0 0 7px rgba(255,255,255,.15)); }
#searchResults > .text-center p { font-size: 14px; color: #bac7cc; }
#searchResults [data-search-result] { margin: 4px 12px; border-radius: 16px; border-color: rgba(255,255,255,.07); }
#searchResults [data-search-result]:hover { background: rgba(255,255,255,.065); }
#searchResults [data-search-result]:focus-visible { outline: 2px solid #d4e1e5; outline-offset: -2px; }
#searchResults [data-search-result] .flex { min-width: 0; }
#searchResults [data-search-result] img { flex-shrink: 0; }
.ess-search__footer { display: flex; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); }
#closeSearchModal {
    padding: 9px 17px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.17);
    background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
    color: #d4e1e5;
    font-size: 13px;
}
#closeSearchModal:hover { color: #fff; background: rgba(255,255,255,.12); }
#closeSearchModal:focus-visible { outline: 2px solid #d4e1e5; outline-offset: 3px; }
@media (max-width: 640px) {
    #searchContainer { padding-left: 12px; padding-right: 12px; }
    .ess-search__glass { border-radius: 24px; }
    .ess-search__head { padding: 20px; }
    #searchInput { padding-left: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    #searchDialog, #searchOverlay, #searchInput, #closeSearchModal { transition: none; }
}
/* A single composited reflection replaces the continuous canvas redraw.
   Fixed size: scrolling changes only the outer header's transform. */
.ess-nav__reflection {
    position: absolute;
    left: -2%;
    bottom: 5px;
    width: 104%;
    height: 8px;
    border-top: 1px solid rgba(255,255,255,.025);
    border-radius: 50%;
    pointer-events: none;
    animation: ess-glass-drift 56s ease-in-out infinite;
}
@keyframes ess-glass-drift {
    0%, 100% { transform: translate3d(-2px, -.4px, 0); }
    50% { transform: translate3d(2px, .4px, 0); }
}
.ess-header.is-hidden .ess-nav__reflection,
.ess-header.is-paused .ess-nav__reflection,
.ess-header.is-paused .ess-nav__link::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .ess-nav__reflection { animation: none; }
}

/* Crisp local SVG icons, consistent strokes across navigation and actions. */
.ess-outline-icon { display: block; width: 22px; height: 22px; flex-shrink: 0; }
.ess-nav__link > .ess-outline-icon { width: 21px; height: 21px; }
.ess-nav__link { font-weight: 500; }
.ess-nav__link[aria-current="page"] { font-weight: 600; }
.ess-nav__icon > .ess-outline-icon { width: 20px; height: 20px; }
.ess-nav__mlink > .ess-outline-icon { width: 20px; height: 20px; color: rgba(245,248,247,.88); }
#userProfileDropdown .ess-outline-icon { width: 17px; height: 17px; }
