/** HiGuppy search V5: single scoped owner, shared by every page template. */
@layer hg-search {
  html:has(body.hg-search-open) { overflow:hidden !important;  }
  body.hg-search-open { overflow:hidden !important; }
  body #hgSearchOverlay.hgs5-overlay {
    position:fixed !important; inset:0 !important; z-index:10090 !important;
    display:flex !important; align-items:flex-start !important; justify-content:center !important;
    width:100% !important; height:100% !important; min-height:0 !important; max-width:none !important;
    margin:0 !important; padding:clamp(24px,7vh,76px) 20px 24px !important;
    background:rgba(15,40,32,.47) !important; background-image:none !important;
    backdrop-filter:blur(5px) !important; -webkit-backdrop-filter:blur(5px) !important;
    overflow:hidden !important; box-sizing:border-box !important; color:#203d32 !important;
    font:400 15px/1.5 var(--hg-shared-body,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif) !important;
  }
  body #hgSearchOverlay.hgs5-overlay[hidden],body #hgSearchOverlay [hidden] { display:none !important; }
  body #hgSearchOverlay.hgs5-overlay *,body #hgSearchOverlay.hgs5-overlay *::before,body #hgSearchOverlay.hgs5-overlay *::after { box-sizing:border-box !important; }
  body #hgSearchOverlay .hgs5-dialog {
    position:relative !important; display:flex !important; flex-direction:column !important;
    width:min(920px,100%) !important; max-width:920px !important; height:auto !important;
    min-height:0 !important; max-height:calc(100dvh - 110px) !important;
    margin:0 !important; padding:0 !important; border:1px solid #d6e0d5 !important;
    border-radius:24px !important; background:#fffdf8 !important; background-image:none !important;
    box-shadow:0 30px 100px #08281f3b !important; overflow:hidden !important;
  }
  body #hgSearchOverlay :is(p,h2,h3,fieldset,legend) { margin:0 !important; padding:0 !important; border:0 !important; text-align:left !important; letter-spacing:normal !important; text-transform:none !important; color:#203d32 !important; -webkit-text-fill-color:currentColor !important; }
  body #hgSearchOverlay :is(a,button,input,label,small,span,strong,kbd) { font-family:var(--hg-shared-body,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif) !important; letter-spacing:normal !important; text-transform:none !important; -webkit-text-fill-color:currentColor !important; }
  body #hgSearchOverlay :is(a,button) { transition:background-color .15s,border-color .15s !important; text-decoration:none !important; cursor:pointer !important; box-shadow:none !important; transform:none !important; }
  body #hgSearchOverlay :is(a,button,input):focus-visible { outline:2px solid #528672 !important; outline-offset:3px !important; }
  body #hgSearchOverlay .hgs5-heading { display:flex !important; justify-content:space-between !important; align-items:flex-start !important; flex:0 0 auto !important; gap:16px !important; margin:0 !important; padding:26px 28px 18px !important; background:transparent !important; border:0 !important; }
  body #hgSearchOverlay .hgs5-eyebrow { font-size:11px !important; font-weight:750 !important; letter-spacing:.14em !important; color:#61786b !important; line-height:1.4 !important; margin:0 0 7px !important; }
  body #hgSearchOverlay #hg-search-dialog-title { font-family:var(--hg-shared-heading,"Baloo 2",sans-serif) !important; font-size:32px !important; font-weight:700 !important; line-height:1.12 !important; margin:0 0 7px !important; }
  body #hgSearchOverlay #hgs5-subtitle { color:#617267 !important; font-size:14px !important; line-height:1.55 !important; }
  body #hgSearchOverlay :is(.hgs5-close,.hgs5-clear) { display:inline-flex !important; align-items:center !important; justify-content:center !important; flex-shrink:0 !important; padding:0 !important; margin:0 !important; min-width:44px !important; width:44px !important; height:44px !important; min-height:44px !important; border:1px solid #d8e2d8 !important; border-radius:12px !important; background:#f0f5ed !important; color:#285644 !important; }
  body #hgSearchOverlay :is(.hgs5-close,.hgs5-clear):hover { background:#e3edde !important; }
  body #hgSearchOverlay .hgs5-form { display:block !important; flex:0 0 auto !important; width:100% !important; max-width:none !important; margin:0 !important; padding:0 28px 14px !important; background:transparent !important; border:0 !important; }
  body #hgSearchOverlay .hgs5-scopes { display:flex !important; gap:4px !important; width:fit-content !important; max-width:100% !important; min-width:0 !important; padding:4px !important; margin:0 0 14px !important; border:1px solid #dce5d9 !important; border-radius:12px !important; background:#f0f4ec !important; }
  body #hgSearchOverlay .hgs5-scopes label { position:relative !important; display:block !important; flex:1 1 auto !important; width:auto !important; min-width:0 !important; margin:0 !important; padding:0 !important; cursor:pointer !important; }
  body #hgSearchOverlay .hgs5-scopes input { position:absolute !important; width:1px !important; height:1px !important; min-height:0 !important; padding:0 !important; margin:0 !important; opacity:0 !important; overflow:hidden !important; }
  body #hgSearchOverlay .hgs5-scopes label>span { display:flex !important; align-items:center !important; justify-content:center !important; min-height:44px !important; padding:10px 16px !important; border:0 !important; border-radius:9px !important; background:transparent !important; color:#486252 !important; font-size:13px !important; font-weight:650 !important; line-height:1.3 !important; white-space:nowrap !important; }
  body #hgSearchOverlay .hgs5-scopes label:hover>span { background:#e3edde !important; }
  body #hgSearchOverlay .hgs5-scopes input:checked+span,body #hgSearchOverlay .hgs5-scopes label:hover input:checked+span { background:#285644 !important; color:#fff !important; -webkit-text-fill-color:#fff !important; }
  body #hgSearchOverlay .hgs5-scopes input:focus-visible+span { outline:2px solid #528672 !important; outline-offset:2px !important; }
  body #hgSearchOverlay .hgs5-field { display:flex !important; align-items:center !important; gap:10px !important; width:100% !important; padding:6px 6px 6px 15px !important; margin:0 !important; border:1px solid #b7ccbb !important; border-radius:14px !important; background:#fff !important; }
  body #hgSearchOverlay .hgs5-field:focus-within { border-color:#528672 !important; box-shadow:0 0 0 3px #5e96711c !important; }
  body #hgSearchOverlay .hgs5-search-icon { flex:0 0 20px !important; color:#62796b !important; }
  body #hgSearchOverlay #hg-search-input { flex:1 1 0 !important; min-width:0 !important; width:auto !important; height:46px !important; min-height:46px !important; padding:0 !important; margin:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; outline:0 !important; box-shadow:none !important; color:#203d32 !important; font-size:16px !important; line-height:1.4 !important; font-weight:400 !important; }
  body #hgSearchOverlay #hg-search-input::placeholder { color:#748477 !important; opacity:1 !important; }
  body #hgSearchOverlay #hg-search-input::-webkit-search-cancel-button { display:none !important; }
  body #hgSearchOverlay .hgs5-clear { border:0 !important; width:44px !important; min-width:44px !important; background:transparent !important; font-size:22px !important; }
  body #hgSearchOverlay .hgs5-submit { display:flex !important; justify-content:center !important; align-items:center !important; gap:14px !important; flex:0 0 auto !important; min-height:46px !important; margin:0 !important; padding:12px 18px !important; border:1px solid #285644 !important; border-radius:10px !important; background:#285644 !important; color:#fff !important; -webkit-text-fill-color:#fff !important; font-size:14px !important; font-weight:700 !important; line-height:1.4 !important; }
  body #hgSearchOverlay .hgs5-submit * { color:#fff !important; -webkit-text-fill-color:#fff !important; }
  body #hgSearchOverlay .hgs5-submit:is(:hover,:focus-visible,:active) { background:#1e4535 !important; color:#fff !important; -webkit-text-fill-color:#fff !important; }
  body #hgSearchOverlay .hgs5-input-help { font-size:12px !important; line-height:1.5 !important; color:#6c7c70 !important; margin-top:9px !important; }
  body #hgSearchOverlay .hgs5-body { flex:1 1 auto !important; min-height:0 !important; overflow-y:auto !important; overscroll-behavior:contain !important; padding:0 28px 24px !important; scrollbar-width:thin; }
  body #hgSearchOverlay .hgs5-quick { display:flex !important; align-items:center !important; flex-wrap:wrap !important; gap:8px !important; padding:2px 0 18px !important; margin:0 !important; }
  body #hgSearchOverlay .hgs5-quick>span { color:#6c7c70 !important; font-size:12px !important; padding-right:4px !important; }
  body #hgSearchOverlay .hgs5-quick :is(a,button) { display:inline-flex !important; align-items:center !important; justify-content:center !important; width:auto !important; min-width:0 !important; min-height:36px !important; padding:7px 12px !important; margin:0 !important; background:#fffdf8 !important; border:1px solid #d9e3d6 !important; border-radius:9px !important; color:#42614e !important; font-size:12px !important; font-weight:600 !important; line-height:1.4 !important; }
  body #hgSearchOverlay .hgs5-quick :is(a,button):hover { background:#edf4e8 !important; border-color:#aac1aa !important; }
  body #hgSearchOverlay :is(.hgs5-discovery,.hgs5-results) { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:24px !important; padding:18px 0 0 !important; border-top:1px solid #e1e7dc !important; }
  body #hgSearchOverlay[data-scope="product"] :is(.hgs5-discovery,.hgs5-results),body #hgSearchOverlay[data-scope="article"] :is(.hgs5-discovery,.hgs5-results) { grid-template-columns:1fr !important; }
  body #hgSearchOverlay .hgs5-group { display:block !important; width:100% !important; min-width:0 !important; margin:0 !important; padding:0 !important; background:transparent !important; border:0 !important; }
  body #hgSearchOverlay .hgs5-group-heading { display:flex !important; justify-content:space-between !important; align-items:center !important; gap:8px !important; margin-bottom:9px !important; }
  body #hgSearchOverlay .hgs5-group-heading h3 { font-family:var(--hg-shared-body,sans-serif) !important; font-size:13px !important; font-weight:750 !important; line-height:1.4 !important; }
  body #hgSearchOverlay .hgs5-group-heading a { color:#587b60 !important; font-size:12px !important; line-height:1.4 !important; min-height:32px !important; display:flex !important; align-items:center !important; gap:5px !important; }
  body #hgSearchOverlay .hgs5-result { display:flex !important; align-items:center !important; gap:12px !important; min-height:82px !important; min-width:0 !important; width:100% !important; padding:11px !important; margin:0 0 8px !important; border:1px solid #e0e7dc !important; border-radius:12px !important; background:#fff !important; color:#203d32 !important; }
  body #hgSearchOverlay .hgs5-result:hover { border-color:#a9c0ac !important; background:#f5f8f1 !important; }
  body #hgSearchOverlay .hgs5-thumb { flex:0 0 56px !important; width:56px !important; height:56px !important; display:grid !important; place-items:center !important; border-radius:9px !important; overflow:hidden !important; background:#eef4e9 !important; color:#476954 !important; }
  body #hgSearchOverlay .hgs5-thumb img { width:56px !important; height:56px !important; margin:0 !important; padding:0 !important; border-radius:9px !important; object-fit:cover !important; }
  body #hgSearchOverlay .hgs5-result-copy { display:block !important; flex:1 1 0 !important; min-width:0 !important; }
  body #hgSearchOverlay .hgs5-result strong { display:-webkit-box !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important; overflow:hidden !important; color:#203d32 !important; font-size:14px !important; font-weight:650 !important; line-height:1.45 !important; text-align:left !important; }
  body #hgSearchOverlay .hgs5-result small { display:block !important; margin:4px 0 0 !important; color:#617466 !important; font-size:12px !important; font-weight:400 !important; line-height:1.4 !important; }
  body #hgSearchOverlay .hgs5-reference-label { display:inline-block !important; margin:0 0 3px !important; color:#866332 !important; font-size:10px !important; font-weight:650 !important; line-height:1.4 !important; }
  body #hgSearchOverlay .hgs5-guide-icon { flex:0 0 32px !important; width:32px !important; height:38px !important; display:grid !important; place-items:center !important; color:#68866b !important; background:#f1f5ec !important; border-radius:7px !important; }
  body #hgSearchOverlay .hgs5-row-arrow { flex:0 0 auto !important; font-size:16px !important; color:#6f8874 !important; }
  body #hgSearchOverlay .hgs5-status { display:flex !important; align-items:center !important; gap:10px !important; color:#617466 !important; font-size:13px !important; line-height:1.6 !important; padding:0 0 12px !important; }
  body #hgSearchOverlay .hgs5-live[aria-busy="true"] .hgs5-status::before { content:""; width:14px; height:14px; flex:0 0 auto; border:2px solid #cfdfcc; border-top-color:#285644; border-radius:50%; animation:hgs5-spin .7s linear infinite; }
  body #hgSearchOverlay .hgs5-empty { grid-column:1/-1 !important; padding:18px !important; border-radius:12px !important; background:#f2f6ed !important; }
  body #hgSearchOverlay .hgs5-empty strong { display:block !important; font-size:17px !important; color:#285644 !important; margin-bottom:6px !important; }
  body #hgSearchOverlay .hgs5-empty p { font-size:14px !important; line-height:1.6 !important; color:#617466 !important; }
  body #hgSearchOverlay .hgs5-all-results { display:flex !important; align-items:center !important; justify-content:space-between !important; min-height:44px !important; margin:12px 0 0 !important; padding:12px 14px !important; border:1px solid #cbdcc4 !important; border-radius:10px !important; background:#edf4e7 !important; color:#285644 !important; font-size:14px !important; font-weight:650 !important; }
  body #hgSearchOverlay .hgs5-foot { display:flex !important; align-items:center !important; justify-content:space-between !important; gap:14px !important; flex:0 0 auto !important; padding:13px 28px !important; margin:0 !important; background:#f3f6ee !important; border:0 !important; border-top:1px solid #e0e7dc !important; color:#6b7c6d !important; font-size:11px !important; line-height:1.5 !important; }
  body #hgSearchOverlay .hgs5-keys { display:flex !important; gap:5px !important; align-items:center !important; white-space:nowrap !important; }
  body #hgSearchOverlay kbd { background:#fffdf8 !important; border:1px solid #d7e0d2 !important; border-radius:4px !important; padding:1px 4px !important; font-size:10px !important; color:#627462 !important; }
  body #hgSearchOverlay .hgs5-sr { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
  @media(max-width:600px) {
    body #hgSearchOverlay.hgs5-overlay { padding:max(10px,env(safe-area-inset-top,0px)) 10px max(10px,env(safe-area-inset-bottom,0px)) !important; }
    body #hgSearchOverlay .hgs5-dialog { max-height:calc(var(--hgs5-viewport,100dvh) - 20px) !important; border-radius:18px !important; }
    body #hgSearchOverlay .hgs5-heading { padding:18px 16px 14px !important; gap:8px !important; }
    body #hgSearchOverlay #hg-search-dialog-title { font-size:25px !important; line-height:1.15 !important; }
    body #hgSearchOverlay #hgs5-subtitle { font-size:13px !important; line-height:1.5 !important; }
    body #hgSearchOverlay .hgs5-eyebrow { font-size:10px !important; }
    body #hgSearchOverlay .hgs5-close { width:44px !important; min-width:44px !important; border-radius:10px !important; }
    body #hgSearchOverlay .hgs5-form { padding:0 16px 10px !important; }
    body #hgSearchOverlay .hgs5-scopes { width:100% !important; gap:2px !important; margin-bottom:12px !important; }
    body #hgSearchOverlay .hgs5-scopes label>span { padding:9px 6px !important; min-height:44px !important; font-size:11px !important; white-space:normal !important; text-align:center !important; }
    body #hgSearchOverlay .hgs5-field { gap:5px !important; padding:5px 5px 5px 10px !important; }
    body #hgSearchOverlay .hgs5-search-icon { display:none !important; }
    body #hgSearchOverlay .hgs5-submit { padding:12px 13px !important; font-size:13px !important; }
    body #hgSearchOverlay .hgs5-submit>span { display:none !important; }
    body #hgSearchOverlay .hgs5-clear { width:44px !important; min-width:44px !important; }
    body #hgSearchOverlay .hgs5-body { padding:0 16px 16px !important; }
    body #hgSearchOverlay .hgs5-quick { gap:6px !important; padding-bottom:14px !important; }
    body #hgSearchOverlay .hgs5-quick>span { flex-basis:100% !important; }
    body #hgSearchOverlay .hgs5-quick :is(a,button) { min-height:44px !important; padding:8px 10px !important; font-size:11px !important; }
    body #hgSearchOverlay :is(.hgs5-discovery,.hgs5-results) { grid-template-columns:1fr !important; gap:16px !important; padding-top:14px !important; }
    body #hgSearchOverlay .hgs5-result { gap:10px !important; min-height:80px !important; }
    body #hgSearchOverlay .hgs5-foot { padding:11px 16px !important; font-size:10px !important; }
    body #hgSearchOverlay .hgs5-keys { display:none !important; }
  }
  @media(prefers-reduced-motion:reduce) { body #hgSearchOverlay * { animation:none !important; transition:none !important; } }
  @keyframes hgs5-spin { to {transform:rotate(360deg);} }
}
