/* v298 header, mega menu, live search and mobile drawer (module 54).
   New class names only (els-topbar, els-hdr, els-dept, els-fly, els-search, els-drawer),
   so the older .site-header layers do not apply. */

:root {
    --elsh-green: #1fbd6b;
    --elsh-green-dark: #16a35b;
    --elsh-ink: #0e3328;
    --elsh-ink-2: #173c2f;
    --elsh-muted: #587063;
    --elsh-line: #dfe9e2;
    --elsh-soft: #f3faf6;
    --elsh-wrap: 1360px;
}

.els-wrap { width: min(var(--elsh-wrap), calc(100% - 32px)); margin: 0 auto; }
.els-ico { flex: 0 0 auto; display: block; }
.els-skip-link:focus { position: fixed !important; top: 8px; left: 8px; z-index: 100010; width: auto; height: auto; clip: auto; padding: 10px 16px; background: #fff; color: var(--elsh-ink); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

/* Top bar */
.els-topbar { background: var(--elsh-ink); color: #e6f4ec; font-size: 13px; line-height: 1.3; }
.els-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.els-topbar__promise { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.els-topbar__promise .els-ico { width: 18px; height: 18px; color: var(--elsh-green); }
.els-topbar__links { display: flex; align-items: center; gap: 4px; }
.els-topbar__links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; color: #e6f4ec; text-decoration: none; font-weight: 700; border-radius: 6px; }
.els-topbar__links a .els-ico { width: 16px; height: 16px; opacity: .85; }
.els-topbar__links a:hover, .els-topbar__links a:focus-visible { background: rgba(255,255,255,.1); color: #fff; }

/* Main row */
.els-hdr { position: relative; z-index: 9990; background: #fff; border-bottom: 1px solid var(--elsh-line); }
.els-hdr__main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 84px; }
.els-hdr__menu-btn { display: none; }
.els-hdr__logo { display: inline-flex; align-items: center; }
.els-hdr__logo img { display: block; width: auto; height: 64px; max-width: 240px; object-fit: contain; }

/* Search */
.els-search { position: relative; display: flex; align-items: stretch; min-width: 0; height: 50px; margin: 0; border: 2px solid var(--elsh-green); border-radius: 12px; background: #fff; }
.els-search__cat { position: relative; display: flex; align-items: center; flex: 0 0 auto; border-right: 1px solid var(--elsh-line); background: var(--elsh-soft); border-radius: 10px 0 0 10px; }
.els-search__cat select { height: 100%; max-width: 190px; padding: 0 34px 0 14px; border: 0; background: transparent; color: var(--elsh-ink); font: inherit; font-size: 14px; font-weight: 700; appearance: none; -webkit-appearance: none; cursor: pointer; }
.els-search__cat .els-ico { position: absolute; right: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--elsh-muted); }
.els-search__field { position: relative; flex: 1 1 auto; min-width: 0; }
.els-search__field input[type="search"] { width: 100%; height: 100%; padding: 0 14px; border: 0; background: transparent; color: var(--elsh-ink); font: inherit; font-size: 15px; box-shadow: none; outline: none; }
.els-search__field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
.els-search:focus-within { box-shadow: 0 0 0 4px rgba(31,189,107,.18); }
.els-search__btn { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0; padding: 0 20px; border: 0; border-radius: 0 9px 9px 0; background: var(--elsh-green); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.els-search__btn:hover, .els-search__btn:focus-visible { background: var(--elsh-green-dark); }
.els-search__results { position: absolute; top: calc(100% + 8px); left: -2px; right: -2px; z-index: 10000; max-height: min(70vh, 560px); overflow: auto; padding: 8px; background: #fff; border: 1px solid var(--elsh-line); border-radius: 12px; box-shadow: 0 20px 50px rgba(14,51,40,.18); }
.els-search__results[hidden] { display: none; }
.els-search__group { margin: 6px 8px 4px; color: var(--elsh-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.els-search__opt { display: flex; align-items: center; gap: 12px; padding: 8px; color: var(--elsh-ink); text-decoration: none; border-radius: 8px; }
.els-search__opt img { width: 48px; height: 48px; object-fit: contain; background: var(--elsh-soft); border-radius: 6px; }
.els-search__opt-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; }
.els-search__opt-price { display: block; margin-top: 2px; color: var(--elsh-ink-2); font-size: 14px; font-weight: 800; }
.els-search__opt-price del { color: #8a9a91; font-weight: 600; margin-right: 4px; }
.els-search__opt-price ins { text-decoration: none; color: #c8102e; }
.els-search__opt-type { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: var(--elsh-soft); color: var(--elsh-muted); font-size: 12px; font-weight: 800; }
.els-search__opt.is-active, .els-search__opt:hover { background: var(--elsh-soft); }
.els-search__opt.is-active { outline: 2px solid var(--elsh-green); outline-offset: -2px; }
.els-search__all { display: block; margin: 6px 0 0; padding: 10px; border-top: 1px solid var(--elsh-line); color: var(--elsh-green-dark); font-weight: 800; text-align: center; text-decoration: none; }
.els-search__empty { margin: 8px; color: var(--elsh-muted); font-size: 14px; }

/* Actions */
.els-hdr__actions { display: flex; align-items: center; gap: 8px; }
.els-hdr__action { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--elsh-line); border-radius: 12px; color: var(--elsh-ink); text-decoration: none; font-weight: 800; font-size: 14px; white-space: nowrap; }
.els-hdr__action .els-ico { width: 22px; height: 22px; color: var(--elsh-ink-2); }
.els-hdr__action:hover, .els-hdr__action:focus-visible { border-color: var(--elsh-green); }
.els-hdr__cart { background: var(--elsh-ink); border-color: var(--elsh-ink); color: #fff; }
.els-hdr__cart .els-ico { color: #fff; }
.els-hdr__cart:hover, .els-hdr__cart:focus-visible { background: #0a271e; }
.els-hdr-cart-total .woocommerce-Price-amount { color: inherit; }
.els-hdr__badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--elsh-green); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.els-hdr__wishlist .els-hdr__badge { background: #c8102e; }

/* Nav row */
.els-hdr__nav { background: #fff; border-top: 1px solid var(--elsh-line); }
.els-hdr__nav-inner { display: flex; align-items: stretch; gap: 20px; min-height: 52px; }
.els-dept { position: relative; flex: 0 0 280px; }
.els-dept__btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; min-height: 52px; margin: 0; padding: 0 16px; border: 0; border-radius: 0; background: var(--elsh-green); color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.els-dept__btn > span { flex: 1 1 auto; text-align: left; }
.els-dept__btn .els-ico--down { transition: transform .15s ease; }
.els-dept__btn[aria-expanded="true"] .els-ico--down { transform: rotate(180deg); }
.els-dept__btn:hover, .els-dept__btn:focus-visible { background: var(--elsh-green-dark); }
.els-dept__panel { position: absolute; top: 100%; left: 0; z-index: 9995; width: 100%; background: #fff; border: 1px solid var(--elsh-line); border-top: 0; box-shadow: 0 24px 48px rgba(14,51,40,.16); }
.els-dept__panel[hidden] { display: none; }
.els-dept__list { margin: 0; padding: 6px 0; list-style: none; }
.els-dept__item { position: static; display: flex; align-items: center; }
.els-dept__link { flex: 1 1 auto; display: block; padding: 11px 6px 11px 18px; color: var(--elsh-ink); text-decoration: none; font-size: 15px; font-weight: 700; }
.els-dept__expand { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 6px 0 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--elsh-muted); cursor: pointer; }
.els-dept__item:hover, .els-dept__item:focus-within, .els-dept__item.is-open { background: var(--elsh-soft); }
.els-dept__item:hover > .els-dept__link, .els-dept__item.is-open > .els-dept__link { color: var(--elsh-green-dark); }
.els-dept__expand:focus-visible, .els-dept__link:focus-visible { outline: 2px solid var(--elsh-green); outline-offset: -2px; }

.els-fly { display: none; position: absolute; top: -1px; left: 100%; z-index: 9996; width: min(860px, calc(100vw - 340px)); min-height: calc(100% + 1px); padding: 22px 26px; background: #fff; border: 1px solid var(--elsh-line); box-shadow: 24px 24px 48px rgba(14,51,40,.14); }
.els-dept__item.has-fly:hover > .els-fly, .els-dept__item.is-open > .els-fly { display: block; }
.els-dept[data-hover-off] .els-dept__item.has-fly:hover:not(.is-open) > .els-fly { display: none; }
.els-fly__title { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.els-fly__title a { color: var(--elsh-ink); text-decoration: none; }
.els-fly__title a:hover { color: var(--elsh-green-dark); text-decoration: underline; }
.els-fly__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.els-fly__cols > .els-fly__col--products { grid-column: span 1; }
.els-fly__col--products { min-width: 0; }
.els-fly__product-copy { min-width: 0; }
.els-fly__head { margin: 0 0 8px; color: var(--elsh-green-dark); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.els-fly__col ul { margin: 0; padding: 0; list-style: none; }
.els-fly__col li a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; color: var(--elsh-ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.els-fly__col li a:hover, .els-fly__col li a:focus-visible { color: var(--elsh-green-dark); text-decoration: underline; }
.els-fly__count { color: #8a9a91; font-weight: 600; }
.els-fly__product { min-width: 0; overflow: hidden; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; padding: 8px; border: 1px solid var(--elsh-line); border-radius: 10px; color: var(--elsh-ink); text-decoration: none; }
.els-fly__product:hover, .els-fly__product:focus-visible { border-color: var(--elsh-green); }
.els-fly__product-img { flex: 0 0 56px; }
.els-fly__product-img img { width: 56px; height: 56px; object-fit: contain; display: block; }
.els-fly__product-name { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; }
.els-fly__product-price { display: block; margin-top: 3px; font-size: 13px; font-weight: 800; }
.els-fly__product-price del { color: #8a9a91; font-weight: 600; }
.els-fly__product-price ins { color: #c8102e; text-decoration: none; }

.els-quick { flex: 1 1 auto; min-width: 0; }
.els-quick ul { display: flex; align-items: center; flex-wrap: wrap; height: 100%; gap: 2px; margin: 0; padding: 0; list-style: none; }
.els-quick a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--elsh-ink); text-decoration: none; font-size: 15px; font-weight: 700; }
.els-quick a:hover, .els-quick a:focus-visible { background: var(--elsh-soft); color: var(--elsh-green-dark); }

/* Shared: neutralise the generic main.css button styles for header buttons */
.els-hdr button, .els-drawer button { -webkit-tap-highlight-color: transparent; box-shadow: none; text-transform: none; letter-spacing: normal; min-width: 0; }

/* Drawer (mobile) */
.els-drawer[hidden] { display: none; }
.els-drawer { position: fixed; inset: 0; z-index: 100005; }
.els-drawer__backdrop { position: absolute; inset: 0; background: rgba(5,24,18,.5); }
.els-drawer__panel { position: absolute; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column; width: min(88vw, 400px); background: #fff; box-shadow: 28px 0 80px rgba(18,63,50,.28); animation: elsDrawerIn .22s ease; }
@keyframes elsDrawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.els-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--elsh-line); }
.els-drawer__head img { height: 38px; width: auto; }
.els-drawer__close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--elsh-line); border-radius: 12px; background: #fff; color: var(--elsh-ink); cursor: pointer; }
.els-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 8px 0 24px; overscroll-behavior: contain; }
.els-drawer__label { margin: 10px 18px 4px; color: var(--elsh-green-dark); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.els-drawer__depts, .els-drawer__sub, .els-drawer__quick { margin: 0; padding: 0; list-style: none; }
.els-drawer__toggle, .els-drawer__link { -webkit-tap-highlight-color: transparent; border-radius: 0; box-shadow: none; display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; margin: 0; padding: 0 18px; border: 0; border-bottom: 1px solid #eef4f0; background: #fff; color: var(--elsh-ink); font: inherit; font-size: 16px; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.els-drawer__toggle .els-ico { color: var(--elsh-muted); }
.els-drawer__toggle[aria-expanded="true"] .els-ico { transform: rotate(180deg); }
.els-drawer__toggle[aria-expanded="true"] { color: var(--elsh-green-dark); }
.els-drawer__sub { background: var(--elsh-soft); padding: 4px 0 8px; }
.els-drawer__sub[hidden] { display: none; }
.els-drawer__sub a { display: block; padding: 11px 18px 11px 32px; color: var(--elsh-ink-2); text-decoration: none; font-size: 15px; font-weight: 600; }
.els-drawer__sub a.els-drawer__all { font-weight: 800; color: var(--elsh-green-dark); }
.els-drawer__subhead { padding: 10px 18px 2px 32px; color: var(--elsh-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.els-drawer__quick { margin-top: 12px; }
.els-drawer__quick a { display: block; padding: 13px 18px; color: var(--elsh-ink); text-decoration: none; font-size: 15px; font-weight: 700; border-bottom: 1px solid #eef4f0; }
.els-drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 16px 0; }
.els-drawer__actions a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--elsh-line); border-radius: 12px; color: var(--elsh-ink); text-decoration: none; font-size: 14px; font-weight: 700; }
.els-drawer__actions a .els-ico { color: var(--elsh-green-dark); }
body.els-v298-drawer-open { overflow: hidden; }

/* Tablet */
@media (max-width: 1180px) {
    .els-hdr__main { gap: 16px; }
    .els-hdr__action-label { display: none; }
    .els-hdr__action { padding: 0 12px; }
    .els-dept { flex-basis: 240px; }
    .els-quick a { padding: 0 9px; font-size: 14px; }
    .els-search__cat select { max-width: 150px; }
}

/* Mobile */
@media (max-width: 900px) {
    .els-topbar__links { display: none; }
    .els-topbar__inner { justify-content: center; min-height: 32px; }
    .els-topbar { font-size: 12px; }
    .els-hdr { position: sticky; top: 0; transition: transform .22s ease; }
    body.admin-bar .els-hdr { top: 46px; }
    .els-hdr__main { grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo actions" "search search search"; gap: 10px 12px; min-height: 0; padding: 10px 0 12px; }
    .els-hdr__menu-btn { grid-area: menu; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin: 0; padding: 0; border: 1px solid var(--elsh-line); border-radius: 12px; background: #fff; color: var(--elsh-ink); cursor: pointer; }
    .els-hdr__logo { grid-area: logo; justify-self: start; }
    .els-hdr__logo img { height: 40px; max-width: 170px; }
    .els-hdr__actions { grid-area: actions; gap: 6px; }
    .els-hdr__wishlist { display: none; }
    .els-hdr__action { min-height: 46px; padding: 0 12px; }
    .els-search { grid-area: search; height: 46px; }
    .els-search__cat { display: none; }
    .els-search__btn { padding: 0 14px; }
    .els-search__btn-label { display: none; }
    .els-search__field input[type="search"] { font-size: 16px; }
    .els-hdr__nav { display: none; }
    body.els-v262-mobile-nav-enabled.els-v263-scrolling-down .els-hdr { transform: translateY(-110%); }
}
@media (max-width: 380px) {
    .els-hdr__logo img { height: 34px; max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .els-drawer__panel { animation: none; }
    .els-hdr, .els-dept__btn .els-ico--down { transition: none; }
}
@media print {
    .els-topbar, .els-hdr__nav, .els-search, .els-hdr__actions, .els-hdr__menu-btn { display: none !important; }
}
