/* ============================================
   JIAHE UNIFIED HEADER — the single source of truth for the site chrome
   (header + top bar + language dropdown + search bar + full-screen search
   popup + cart dropdown + left "Valikoimat" rail + mobile drawer + login
   drawer). Loaded by BOTH the B2C shop (html/head.php) and the static
   jiahe.fi clone pages (transform pass 10 injects the <link>), so the two
   always render the exact same header.
   Header/rail/mobile blocks were MOVED here from wp-theme.css (2026-11-22).
   Font URLs are relative to this css dir (../fonts/) which resolves correctly
   from both /shop/assets/css/ (shop) and /shop/assets/css/ via the clone
   pages' root-absolute <link href="/shop/assets/css/unified-header.css">.
   ============================================ */

/* ── Fonts (self-hosted, copied from jiahe.fi; Manrope is a variable font) ── */
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 700; font-display:swap; src:url('../fonts/manrope-bcbadccc.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 700; font-display:swap; src:url('../fonts/manrope-7965cb05.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400 700; font-display:swap; src:url('../fonts/manrope-19d45c9a.woff2') format('woff2'); unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/lato-702e3b8c.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Lato'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/lato-ab8d749e.woff2') format('woff2'); unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ── FontAwesome subset (clone pages don't load font-awesome.min.css; the
      header uses ~12 glyphs — same woff2 file the shop serves) ── */
@font-face { font-family:'FontAwesome'; src:url('../fonts/fontawesome-webfont3e6e.woff2') format('woff2'); font-weight:normal; font-style:normal; font-display:block; }
.fa { font-family:'FontAwesome'; font-weight:normal; font-style:normal; display:inline-block; text-rendering:auto; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; line-height:1; }
.fa-bars:before { content:"\f0c9"; }
.fa-search:before { content:"\f002"; }
.fa-shopping-cart:before { content:"\f07a"; }
.fa-caret-down:before { content:"\f0d7"; }
.fa-heart-o:before { content:"\f08a"; }
.fa-user:before { content:"\f007"; }
.fa-user-o:before { content:"\f2c0"; }
.fa-sign-out:before { content:"\f08b"; }
.fa-angle-down:before { content:"\f107"; }
.fa-angle-right:before { content:"\f105"; }
.fa-times:before { content:"\f00d"; }
.fa-home:before { content:"\f015"; }
.fa-briefcase:before { content:"\f0b1"; }
.fa-tags:before { content:"\f02c"; }
.fa-ellipsis-h:before { content:"\f141"; }
.fa-comments-o:before { content:"\f0e6"; }
.fa-info-circle:before { content:"\f05a"; }
.fa-map-marker:before { content:"\f041"; }
.fa-truck:before { content:"\f0d1"; }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --jhw-primary: rgb(140, 188, 103);
  --jhw-primary-hover: rgb(128, 171, 94);
  --jhw-alt: #fbbc34;
  --jhw-bg: rgb(250, 248, 245);
  --jhw-title: #242424;
  --jhw-text: #777777;
  --jhw-entities: #333333;
  --jhw-brd: rgba(0, 0, 0, 0.11);
  --jhw-brd-radius: 10px;
  --jhw-btn-radius: 5px;
  --jhw-topbar-h: 40px;
  --jhw-mainbar-h: 85px;
  --jhw-container-w: 1480px;
  --jhw-sticky-nav-w: 60px;
  --jhw-sticky-nav-open-w: 275px;
  /* Clone pages still load Woodmart's opt-sticky-nav.css, which sizes the rail
     with --wd-sticky-nav-w (and would otherwise collapse it to ~1px because
     that var is undefined there). Keep both vars in sync. */
  --wd-sticky-nav-w: 60px;
}

body.jhw-rail-on { font-family: 'Manrope', 'Lato', Arial, Helvetica, sans-serif; }
@media (min-width: 1025px) {
  body.jhw-rail-on { margin-left: var(--jhw-sticky-nav-w); }
}

.jhw-container { max-width: var(--jhw-container-w); margin: 0 auto; padding: 0 15px; }

/* ════════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════════ */
.jiahe-header { background: var(--jhw-bg); font-family: 'Manrope', Arial, Helvetica, sans-serif; position: relative; z-index: 390; }
/* eCMS.css's "AF HEADER: make NON-sticky" patch sets
   #header { position: static !important; z-index: auto !important } — pin the
   intended stacking over it (both !important, higher specificity): the left
   sticky rail (393) must paint ABOVE the header (390), matching the clone. */
#header.jiahe-header { position: relative !important; z-index: 390 !important; }

/* Row 1 — top bar */
.jhw-topbar { background: var(--jhw-bg); border-bottom: 1px solid var(--jhw-brd); }
.jhw-topbar-inner { display: flex; align-items: center; height: var(--jhw-topbar-h); gap: 0; }
.jhw-topbar-nav { display: flex; align-items: center; flex-wrap: wrap; }
.jhw-topbar-nav a, .jhw-topbar-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; min-height: 28px;
  font-size: 13px; font-weight: 600; color: #333;
  text-decoration: none; border-radius: 3px;
}
.jhw-topbar-nav a:first-child { padding-left: 0; }
.jhw-topbar-nav a:hover { color: var(--jhw-primary); }
.jhw-topbar-nav a + a { border-left: 1px solid rgba(0,0,0,.08); border-radius: 0; }
.jhw-topbar-nav a + a:hover { border-radius: 3px; }
.jhw-topbar-item img, .jhw-topbar-nav a img { width: 18px; height: 18px; }
.jhw-topbar-right { margin-left: auto; display: flex; align-items: center; }

/* language switcher (kept mechanism, WP top-bar look) */
.jhw-lang { position: relative; }
.jhw-lang-btn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px 8px; }
.jhw-lang-btn img { width: 18px; height: 18px; display: block; }
.jhw-lang-btn i { font-size: 10px; color: #666; }
.jhw-lang-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 160px; background: #fff; border: 1px solid #E5E5E5; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 8px; z-index: 500; }
.jhw-lang.open .jhw-lang-menu { display: block; }
.jhw-lang-menu a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13px; color: #333; text-decoration: none; border-radius: 6px; }
.jhw-lang-menu a img { width: 18px; height: 18px; }
.jhw-lang-menu a:hover { background: #F5F5F5; color: var(--jhw-primary); }
.jhw-lang-menu a.active { background: #E3EFDA; color: rgb(128,171,94); }
.jhw-topbar-divider { width: 1px; height: 18px; background: rgba(0,0,0,.08); margin: 0 6px; }
.jhw-topbar-tool { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 13px; font-weight: 600; color: #333; text-decoration: none; min-height: 28px; }
.jhw-topbar-tool:hover { color: var(--jhw-primary); }
.jhw-topbar-tool i { font-size: 15px; }

/* Row 2 — main bar */
.jhw-mainbar { background: var(--jhw-bg); border-bottom: 1px solid rgba(0,0,0,.1); }
.jhw-mainbar-inner { display: flex; align-items: center; gap: 18px; min-height: var(--jhw-mainbar-h); padding: 10px 0; }
.jhw-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.jhw-logo img { max-width: 260px; max-height: 62px; width: auto; height: auto; }
.jhw-logo-name { display: none; }

/* Tuoteryhmät trigger (toggles the left rail) */
.jhw-rail-trigger { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 10px 14px; border-radius: var(--jhw-btn-radius); font-family: inherit; font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; }
.jhw-rail-trigger:hover { background: rgba(140,188,103,.25); color: rgb(128,171,94); }
.jhw-rail-trigger i { font-size: 16px; }

/* Search — Woodmart boxed style (focus opens the full-screen popup) */
.jhw-search { position: relative; flex: 1 1 auto; max-width: 560px; min-width: 180px; }
.jhw-search-inner { display: flex; align-items: center; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: var(--jhw-btn-radius); height: 46px; overflow: hidden; }
.jhw-search-inner .jhw-search-icon { padding: 0 4px 0 14px; color: #999; font-size: 15px; }
.jhw-search input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent; padding: 0 14px 0 10px; height: 44px; font-size: 14px; color: #333; font-family: inherit; }
.jhw-search input::placeholder { color: #999; }
.jhw-search button.jhw-search-btn { background: var(--jhw-primary); color: #fff; border: none; cursor: pointer; height: 36px; margin: 0 5px 0 0; padding: 0 18px; border-radius: 4px; font-family: inherit; font-size: 13px; font-weight: 600; }
.jhw-search button.jhw-search-btn:hover { background: var(--jhw-primary-hover); }

/* Second-row nav links */
.jhw-nav-links { display: flex; align-items: center; gap: 8px; }
.jhw-nav-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; color: #333; text-decoration: none; border-radius: var(--jhw-btn-radius); white-space: nowrap; }
.jhw-nav-links a img { width: 18px; height: 18px; }
.jhw-nav-links a:hover { color: rgb(128,171,94); background: rgba(140,188,103,.15); }

/* Cart (Woodmart design-8 style: icon + count badge + total) */
.jhw-cart { position: relative; display: inline-flex; align-items: center; border-radius: var(--jhw-btn-radius); margin-left: auto; }
.jhw-cart-main { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; color: #333; text-decoration: none; border-radius: var(--jhw-btn-radius); }
.jhw-cart-main:hover { color: rgb(128,171,94); background: rgba(140,188,103,.15); }
.jhw-cart-icon { position: relative; font-size: 21px; line-height: 1; }
.jhw-cart-count { position: absolute; top: -8px; right: -10px; background: var(--jhw-primary); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 600; min-width: 17px; height: 17px; line-height: 17px; text-align: center; padding: 0 4px; }
.jhw-cart-total { font-size: 14px; font-weight: 700; color: #242424; white-space: nowrap; }

/* Cart dropdown */
.jhw-cart .jhw-cart-dropdown { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 320px; background: #fff; border: 1px solid #eee; border-radius: var(--jhw-brd-radius); box-shadow: 0 15px 40px rgba(0,0,0,.14); padding: 18px; z-index: 600; text-align: left; }
.jhw-cart:hover .jhw-cart-dropdown { display: block; }
.jhw-cart-dd-title { display: block; font-weight: 700; font-size: 14px; color: #242424; margin-bottom: 12px; }
.jhw-cart-dd-items { display: block; }
.jhw-cart-dd-items .jhw-cart-empty { display: block; color: #999; font-size: 13px; padding: 6px 0; }
.jhw-cart-dd-items .cart_item { border-bottom: 1px solid #F2F0EC; }
.jhw-cart-dd-items .cart_item:last-child { border-bottom: none; }
.jhw-cart-dd-items .minicart-item { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; color: #555; }
.jhw-cart-dd-items .minicart-item .thumb img { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; background: #FAF8F5; }
.jhw-cart-dd-items .minicart-item .product-name { color: #333; font-weight: 600; text-decoration: none; }
.jhw-cart-dd-items .minicart-item .product-name:hover { color: rgb(128,171,94); }
.jhw-cart-dd-items .minicart-item .qty-controls { display: inline-flex; align-items: center; gap: 4px; }
.jhw-cart-dd-items .minicart-item .qty-controls input { width: 40px; padding: 2px 4px; font-size: 12px; border: 1px solid #E5E5E5; border-radius: 4px; }
.jhw-cart-dd-items .minicart-item .qty-controls .qty-btn { width: 20px; height: 20px; line-height: 18px; text-align: center; background: #F4F2EE; border: 1px solid #E5E5E5; border-radius: 4px; cursor: pointer; }
.jhw-cart-dd-items .minicart-item .action .remove { background: none; border: none; cursor: pointer; color: #999; padding: 2px; }
.jhw-cart-dd-items .minicart-item .action .remove:hover { color: #C41E3A; }
.jhw-cart-dd-footer { border-top: 1px solid #eee; margin-top: 10px; padding-top: 12px; }
.jhw-cart-dd-total { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: #242424; margin-bottom: 12px; }
.jhw-cart-dd-actions { display: flex; gap: 10px; }
.jhw-cart-dd-actions a { flex: 1; text-align: center; padding: 9px 0; border-radius: var(--jhw-btn-radius); font-size: 13px; font-weight: 600; text-decoration: none; }
.jhw-cart-dd-actions .view-cart { background: #F4F2EE; color: #333; }
.jhw-cart-dd-actions .view-cart:hover { background: #ECEAE5; color: #242424; }
.jhw-cart-dd-actions .checkout { background: var(--jhw-primary); color: #fff; }
.jhw-cart-dd-actions .checkout:hover { background: var(--jhw-primary-hover); color: #fff; }

/* Burger (mobile) */
.jhw-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.jhw-burger span { display: block; width: 22px; height: 2px; background: #333; margin: 5px 0; border-radius: 2px; }

/* ════════════════════════════════════════════════════════════════════════
   LEFT STICKY NAV ("Valikoimat") — ported from Woodmart opt-sticky-nav.css
   ════════════════════════════════════════════════════════════════════════ */
.wd-sticky-nav {
  position: fixed; inset-block: 0; left: 0; z-index: 393;
  display: flex; flex-direction: column;
  width: var(--jhw-sticky-nav-w);
  border-right: 1px solid rgba(118,118,118,.12);
  background-color: #fff;
  transition: all .5s cubic-bezier(.19, 1, .22, 1);
}
.wd-sticky-nav:is(:hover, .wd-opened) { width: var(--jhw-sticky-nav-open-w); box-shadow: 0 0 20px rgba(0,0,0,.08); }
body.jhw-rail-hidden .wd-sticky-nav { display: none; }
body.jhw-rail-hidden { margin-left: 0 !important; }

.wd-sticky-nav-title {
  display: flex; flex: 0 0 auto; align-items: center; justify-content: center;
  margin: 8px; padding: 0; height: 44px;
  border-radius: 999px; background: var(--jhw-primary); color: #fff; cursor: default;
}
/* Hamburger glyph perfectly centered while the rail is collapsed (60px);
   the fa-bars glyph is optically 4px left-heavy — nudge it. */
.wd-sticky-nav-title i { flex: 0 0 auto; font-size: 18px; width: 100%; text-align: center; transform: translateX(4px); }
.wd-sticky-nav:is(:hover, .wd-opened) .wd-sticky-nav-title { padding: 0 12px 0 16px; justify-content: flex-start; }
.wd-sticky-nav:is(:hover, .wd-opened) .wd-sticky-nav-title i { width: 28px; transform: none; }
.wd-sticky-nav-title span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 15px; }

.wd-sticky-nav .wd-nav-sticky { list-style: none; margin: 0; padding: 0 8px 20px 8px; flex: 0 0 auto; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.wd-sticky-nav .wd-nav-sticky > li { position: relative; margin: 0; }
.wd-sticky-nav .wd-nav-sticky > li > a {
  display: flex; align-items: center; justify-content: center; gap: 0;
  min-width: 1px; min-height: 45px; padding: 4px 8px;
  font-size: 15px; font-weight: 600; color: #333;
  text-decoration: none; white-space: nowrap;
}
.wd-sticky-nav:is(:hover, .wd-opened) .wd-nav-sticky > li > a { justify-content: flex-start; padding: 4px 20px; }
.wd-sticky-nav .wd-nav-sticky > li > a:hover { color: var(--jhw-primary); }
.wd-sticky-nav .wd-nav-sticky > li > a .wd-nav-img { width: 24px; height: 24px; flex: 0 0 auto; object-fit: contain; }
/* Rail sizing parity with the clone pages (2026-11-22, user request: "left menu
   icon and font size ... make both something in between"). The clone pages also
   load Woodmart's base.css, which sizes .wd-nav-img via --nav-img-width/height
   with !important (it rendered 20px there while the shop showed 28px) and adds
   a 7px margin-inline-end that de-centered collapsed icons, plus a
   woodmart-font ::before hamburger glyph in the title pill (the shop has no
   such pseudo). Pin the shared 24px/15px look over all of it — body-scoped
   + !important wins regardless of source order. Both sides now render
   identically: 24px icons, 15px text, single glyph, perfectly centered. */
body .wd-sticky-nav { --nav-img-width: 24px; --nav-img-height: 24px; }
body .wd-sticky-nav .wd-nav-img {
  width: 24px !important; height: 24px !important; max-height: 24px !important;
  margin-inline-end: 0 !important;
}
body .wd-sticky-nav-title:before { content: none !important; }
.wd-sticky-nav .wd-nav-sticky > li > a .nav-link-text { display: inline-flex; align-items: center; height: 36px; margin-left: 0; max-width: 0; width: 0; opacity: 0; overflow: hidden; transition: opacity .15s ease; }
.wd-sticky-nav:is(:hover, .wd-opened) .wd-sticky-nav-title span { opacity: 1; }
.wd-sticky-nav:is(:hover, .wd-opened) .wd-nav-sticky > li > a .nav-link-text { max-width: none; width: auto; opacity: 1; margin-left: 14px; transition: opacity .25s ease .12s; }
.wd-sticky-nav-title span { max-width: 0; width: 0; opacity: 0; overflow: hidden; transition: opacity .15s ease; white-space: nowrap; }
.wd-sticky-nav:is(:hover, .wd-opened) .wd-sticky-nav-title span { max-width: none; width: auto; opacity: 1; transition: opacity .25s ease .12s; }

/* Rail dropdown — fixed full-height panel right of the expanded rail
   (mirrors Woodmart's wd-design-full-height dropdown: full viewport height,
   overlaying the header rows like the jiahe.fi clone; position:fixed escapes
   the nav's overflow clipping and anchors to the viewport). */
.wd-sticky-nav .jhw-rail-drop {
  display: none; position: fixed; top: 0; bottom: 0; left: var(--jhw-sticky-nav-open-w);
  width: 460px; max-width: calc(100vw - var(--jhw-sticky-nav-open-w) - 40px);
  overflow-y: auto;
  background: #fff; border-right: 1px solid rgba(118,118,118,.12);
  box-shadow: 18px 0 45px rgba(0,0,0,.10); padding: 26px 34px; z-index: 394;
}
.wd-sticky-nav .wd-nav-sticky > li:is(:hover) > .jhw-rail-drop { display: block; }
.jhw-rail-drop-title { font-size: 16px; font-weight: 700; color: #242424; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #F0EDE8; }
.jhw-rail-drop ul { list-style: none; margin: 0; padding: 0; }
.jhw-rail-drop ul li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px; font-size: 13.5px; font-weight: 600; color: #555; text-decoration: none; border-radius: 6px; }
.jhw-rail-drop ul li a:hover { background: #F6F9F3; color: rgb(128,171,94); }
.jhw-rail-drop ul li a i { font-size: 11px; color: #BBB; }
.jhw-rail-drop-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; background: var(--jhw-primary); color: #fff !important; font-size: 13px; font-weight: 600; border-radius: 999px; text-decoration: none; }
.jhw-rail-drop-all:hover { background: var(--jhw-primary-hover); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   MOBILE NAV (restyled drawer)
   ════════════════════════════════════════════════════════════════════════ */
.jhw-mobile-nav { display: none; flex-direction: column; background: #fff; border-top: 1px solid #eee; padding: 14px 16px 20px; max-height: 80vh; overflow-y: auto; }
.jhw-mobile-nav.open { display: flex; }
.jhw-mobile-nav a { padding: 10px 4px; color: #333; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid #F2F0EC; display: flex; align-items: center; gap: 10px; }
.jhw-mobile-nav a.active { color: rgb(128,171,94); }
.jhw-mobile-nav a img { width: 20px; height: 20px; }
.jhw-mobile-nav .jhw-mobile-group-children { display: none; flex-direction: column; }
.jhw-mobile-nav .jhw-mobile-group.open .jhw-mobile-group-children { display: flex; }
.jhw-mobile-nav .jhw-mobile-group-children a { padding-left: 34px; font-weight: 500; color: #555; }
.jhw-mobile-nav .jhw-mobile-caret { margin-left: auto; font-size: 12px; color: #999; }
.jhw-mobile-search { display: flex; margin-bottom: 12px; border: 1px solid rgba(0,0,0,.12); border-radius: var(--jhw-btn-radius); overflow: hidden; background: #fff; }
.jhw-mobile-search input { flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 14px; min-width: 0; }
.jhw-mobile-search button { background: var(--jhw-primary); color: #fff; border: none; padding: 0 16px; }

/* ════════════════════════════════════════════════════════════════════════
   FULL-SCREEN SEARCH POPUP (Woodmart wd-search-full-screen-2 look)
   ════════════════════════════════════════════════════════════════════════ */
body.jhw-search-opened { overflow: hidden; }
.jhw-search-overlay {
  position: fixed; inset: 0; z-index: 1040;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 20px 60px;
  background-color: rgba(255, 255, 255, 0.97);
  opacity: 0; transition: opacity .22s ease;
  pointer-events: none; /* a closed-but-not-yet-hidden overlay must not eat clicks */
}
.jhw-search-overlay.open { opacity: 1; pointer-events: auto; }
.jhw-search-overlay[hidden] { display: none; }
.jhw-search-overlay-inner { width: min(980px, 100%); }
.jhw-search-overlay-close {
  position: absolute; top: 26px; right: 30px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.12); background: #fff;
  cursor: pointer; font-size: 16px; color: #333;
}
.jhw-search-overlay-close:hover { background: var(--jhw-primary); border-color: var(--jhw-primary); color: #fff; }
.jhw-ov-form {
  display: flex; align-items: stretch; height: 60px;
  background: #fff; border: 1px solid rgba(0,0,0,.14); border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.08);
}
.jhw-ov-cat { position: relative; flex: 0 0 auto; border-right: 1px solid rgba(0,0,0,.1); }
.jhw-ov-cat-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 18px;
  background: none; border: none; cursor: pointer;
  font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 600; color: #333;
  white-space: nowrap;
}
.jhw-ov-cat-btn i { font-size: 11px; color: #999; }
.jhw-ov-cat-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  width: 280px; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0,0,0,.14); padding: 8px; z-index: 20;
}
.jhw-ov-cat.open .jhw-ov-cat-menu { display: block; }
.jhw-ov-cat-menu ul { list-style: none; margin: 0; padding: 0; }
.jhw-ov-cat-menu a { display: block; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: #333; border-radius: 6px; text-decoration: none; }
.jhw-ov-cat-menu a:hover { background: #F4F7F0; color: rgb(128,171,94); }
.jhw-ov-cat-menu a.is-active { background: #E3EFDA; color: rgb(128,171,94); }
.jhw-ov-input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent; padding: 0 22px; font-size: 17px; color: #333; font-family: inherit; }
.jhw-ov-input::placeholder { color: #999; }
.jhw-ov-submit {
  flex: 0 0 auto; border: none; cursor: pointer;
  background: var(--jhw-primary); color: #fff;
  font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 700;
  padding: 0 34px;
}
.jhw-ov-submit:hover { background: var(--jhw-primary-hover); }
.jhw-ov-results {
  margin-top: 18px; padding: 6px;
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  box-shadow: 0 15px 40px rgba(0,0,0,.10);
  max-height: 46vh; overflow-y: auto;
}
.jhw-ov-results[hidden] { display: none; }
.jhw-sug-item { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.jhw-sug-item:hover { background: #F6F9F3; }
.jhw-sug-item img { width: 52px; height: 52px; object-fit: contain; background: #FAF8F5; border-radius: 8px; flex: 0 0 auto; }
.jhw-sug-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: #333; }
.jhw-sug-price { flex: 0 0 auto; font-size: 13.5px; font-weight: 700; color: rgb(140,188,103); }
.jhw-sug-price del { color: #bbb; font-weight: 400; }
.jhw-sug-empty { padding: 16px; text-align: center; color: #999; font-size: 14px; }
.jhw-sug-all-wrap { padding: 6px; text-align: center; }
.jhw-sug-all { background: var(--jhw-primary); color: #fff; border: none; border-radius: 999px; padding: 10px 26px; font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; }
.jhw-sug-all:hover { background: var(--jhw-primary-hover); }
@media (max-width: 768px) {
  .jhw-ov-cat { display: none; }
  .jhw-ov-form { height: 52px; }
  .jhw-ov-input { font-size: 15px; }
}

/* ════════════════════════════════════════════════════════════════════════
   LOGIN DRAWER (Woodmart login-form-side / wd-side-hidden look, right side)
   ════════════════════════════════════════════════════════════════════════ */
.wd-close-side {
  position: fixed; top: -150px; bottom: 0; left: 0; right: 0; z-index: 400;
  display: block; background-color: rgba(0, 0, 0, .7);
  opacity: 0; pointer-events: none;
  transition: opacity .5s cubic-bezier(.19, 1, .22, 1), z-index 0s cubic-bezier(.19, 1, .22, 1) .5s;
}
.wd-close-side.wd-close-side-opened { opacity: 1; pointer-events: auto; transition-delay: 0s; }
.wd-side-hidden {
  position: fixed; top: 0; bottom: 0; z-index: 500;
  width: min(340px, 100vw);
  background-color: #fff;
  transition: transform .5s cubic-bezier(.19, 1, .22, 1);
  overflow: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  outline: none !important;
}
@media (max-width: 576px) { .wd-side-hidden { width: min(300px, 80vw); } }
.wd-side-hidden.wd-right { right: 0; transform: translate3d(100%, 0, 0); }
.wd-side-hidden.wd-opened { transform: translate3d(0, 0, 0); }

.login-form-side { padding: 30px 30px 40px; font-family: 'Manrope', Arial, Helvetica, sans-serif; }
.login-form-side .wd-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.login-form-side .wd-heading .title { font-size: 17px; font-weight: 700; color: #242424; }
.close-side-widget a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #999; text-decoration: none; }
.close-side-widget a:hover { color: #333; }
.close-side-widget .wd-action-icon:before { content: "\2715"; font-size: 12px; }
.login-form-side .woocommerce-notices-wrapper:empty { display: none; }
.jhw-login-msg { background: #FEE2E2; border: 1px solid #FECACA; color: #991B1B; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.login-form-side .form-row { margin: 0 0 18px; }
.login-form-side .form-row label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px; }
.login-form-side label .required { color: rgb(140,188,103); }
.login-form-side .input-text {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid #E2E0DB; border-radius: 6px;
  font-size: 14px; color: #333; font-family: inherit; outline: none; background: #fff;
}
.login-form-side .input-text:focus { border-color: rgb(140,188,103); box-shadow: 0 0 0 3px rgba(140,188,103,.15); }
.login-form-side .woocommerce-form-login__submit {
  width: 100%; height: 48px;
  background: var(--jhw-primary); color: #fff; border: none; border-radius: 999px;
  font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.login-form-side .woocommerce-form-login__submit:hover { background: var(--jhw-primary-hover); }
.login-form-side .login-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 0; font-size: 13px; }
.login-form-side .lost_password { color: rgb(128,171,94); text-decoration: none; font-weight: 600; }
.login-form-side .lost_password:hover { text-decoration: underline; }
.login-form-side .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: #555; cursor: pointer; }
.login-form-side .create-account-question { margin-top: 26px; padding-top: 22px; border-top: 1px solid #F0EDE8; }
.login-form-side .create-account-question p { margin: 0 0 12px; font-size: 13.5px; color: #666; }
.login-form-side .create-account-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 44px;
  background: var(--jhw-primary); color: #fff !important; border-radius: 999px;
  font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 13.5px; font-weight: 600;
  text-decoration: none;
}
.login-form-side .create-account-button:hover { background: var(--jhw-primary-hover); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM TOOLBAR (Home | Shop | B2B | Offers | More)
   Rendered by pages/header.php on both the shop and the clone pages.
   Same 55px height / ≤1024px breakpoint as Woodmart's old bottom toolbar
   (whose scraped .wd-toolbar block it replaces on the clone pages — hidden
   below, gated on the body class the header render sets, so if the unified
   header boot ever fails the old WP toolbar simply comes back).
   ════════════════════════════════════════════════════════════════════════ */
.jhf-mobbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 350;
  height: 55px; padding: 0;
  background: #fff;
  box-shadow: 0 0 9px rgba(0,0,0,.12);
  border-top: 1px solid rgba(0,0,0,.06);
}
.jhf-mobbar-item {
  flex: 1 1 20%; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; height: 100%;
  color: #333; text-decoration: none;
  background: none; border: none; cursor: pointer; padding: 0; margin: 0;
  font-family: inherit;
}
.jhf-mobbar-item i { font-size: 19px; line-height: 1; }
.jhf-mobbar-item .jhf-mobbar-label {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px; font-size: 11px; font-weight: 600; line-height: 1; color: #555;
}
.jhf-mobbar-item:hover { color: var(--jhw-primary); }
.jhf-mobbar-item:hover .jhf-mobbar-label { color: rgb(128,171,94); }
.jhf-mobbar-item.active { color: rgb(128,171,94); }
.jhf-mobbar-item.active .jhf-mobbar-label { color: rgb(128,171,94); }
@media (max-width: 1024px) {
  .jhf-mobbar { display: flex; }
  body.jhw-mobbar-on { padding-bottom: 55px; } /* keep page content above the bar */
  body.jhw-mobbar-on .wd-toolbar { display: none !important; } /* old scraped WP toolbar */
}
@media (min-width: 1025px) {
  .jhf-mobbar { display: none !important; }
}

/* ── "More" drawer (right side; reuses .wd-side-hidden/.wd-right base) ──── */
.jhf-more-drawer { padding: 30px 26px 40px; font-family: 'Manrope', Arial, Helvetica, sans-serif; }
.jhf-more-drawer .wd-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.jhf-more-drawer .wd-heading .title { font-size: 17px; font-weight: 700; color: #242424; }
.jhf-more-links { display: flex; flex-direction: column; }
.jhf-more-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 8px; margin: 0 -8px;
  font-size: 14px; font-weight: 600; color: #333;
  text-decoration: none; border-bottom: 1px solid #F2F0EC; border-radius: 6px;
}
.jhf-more-links a i { flex: 0 0 auto; width: 22px; text-align: center; font-size: 16px; color: rgb(140,188,103); }
.jhf-more-links a:hover { color: rgb(128,171,94); background: #F6F9F3; }

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE HEADER
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1199px) {
  .jhw-nav-links a { padding: 8px 8px; }
}
@media (max-width: 1024px) {
  /* Clone pages load Woodmart's opt-sticky-nav.css via a BODY-level link AFTER
     this file, and its unqualified .wd-sticky-nav{display:flex} beats a plain
     hide in the cascade (same specificity, later in document order) — which
     made the rail render expanded on mobile with a second hamburger glyph in
     its pill. body-scoped + !important wins regardless of source order.
     .wd-nav-opener = Woodmart WP mobile nav triggers left in the scraped
     markup (the shop has none; the unified header's own burger + drawer
     replace them). */
  body .wd-sticky-nav { display: none !important; }
  body .wd-nav-opener { display: none !important; }
  body.jhw-rail-on { margin-left: 0 !important; }
}
@media (max-width: 991px) {
  .jhw-burger { display: block; }
  .jhw-search { display: none; }
  .jhw-nav-links { display: none; }
  .jhw-topbar-nav a span, .jhw-topbar-nav a { font-size: 12px; }
  .jhw-topbar-nav a:not(:first-child) { display: none; }
  .jhw-topbar-item { display: none; } /* store link + phone: keep the mobile top bar minimal */
  .jhw-logo img { max-width: 190px; max-height: 44px; }
  .jhw-rail-trigger { display: none; }
  .jhw-cart-total { display: none; }
  .jhw-mainbar-inner { min-height: 64px; }
}
@media (min-width: 992px) {
  .jhw-mobile-nav { display: none !important; }
  .jhw-mobile-nav.open { display: none !important; }
}

/* ════════════════════════════════════════════════════════════════════════
   SEARCH INPUTS = home-page look, enforced (2026-11-22, user request)
   The shop pages ALSO load chinese-red-theme.css, which force-styles every
   text input (2px !important border, 12/16 padding, 15px font, white bg) and
   paints a --cr-primary focus border + red-tinted ring with !important — so
   the header/popup/mobile search boxes rendered with borders on focus that
   the home page (no chinese-red-theme.css) never shows. This file loads LAST
   in the shop head; same !important + higher specificity wins it back, and on
   the clone pages (which don't load chinese-red-theme.css) these rules are
   no-ops restating the styles above.
   ════════════════════════════════════════════════════════════════════════ */
.jhw-search input[type="text"],
.jhw-ov-input[type="text"],
.jhw-mobile-search input[type="text"] {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
.jhw-search input[type="text"] { height: 44px !important; padding: 0 14px 0 10px !important; font-size: 14px !important; }
.jhw-ov-input[type="text"] { padding: 0 22px !important; font-size: 17px !important; }
.jhw-mobile-search input[type="text"] { padding: 10px 14px !important; font-size: 14px !important; }
