/* =====================================================================
   BIOHEAL HEADER STABILITY — failsafe sticky enforcement on the homepage
   2026-05-26 — first-load fix per Attila: the theme's mage/sticky module
   sometimes hangs during cold-cache page loads, leaving the .page-header
   frozen, click events blocked, the search trigger invisible, and the
   green nav bar drifting with the scroll. This CSS forces the header
   into a clean, JS-independent position:sticky state so the page is
   usable even if the theme's sticky script never finishes initializing.
   ===================================================================== */

body.cms-home .page-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  /* Wipe any half-baked transform the theme stickyJS may have set */
  transform: none !important;
  /* Opaque background so scrolling content doesn't bleed through */
  background: #FFFFFF;
  transition: box-shadow .25s ease;
  pointer-events: auto !important;
  width: 100%;
}

/* Force the green bottom nav bar (page-header-bottom / navigation) to
   stay in normal flow inside the header — no rogue fixed/transform that
   could detach it from the header above. */
body.cms-home .page-header .page-header-bottom,
body.cms-home .page-header .navigation,
body.cms-home .page-header .nav-sections {
  position: relative !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Re-assert: header children stay clickable. The runtime JS cleans
   inline pointer-events overrides, this is the failsafe. */
body.cms-home .page-header * {
  pointer-events: auto;
}

/* Soft scrolled shadow (replaces the theme's JS-driven .sticky class
   effect, so even if that class never gets toggled we still get visual
   feedback that the header is anchored). */
body.cms-home.bh-is-scrolled .page-header {
  box-shadow: 0 6px 18px rgba(45, 90, 61, .08);
}

/* Failsafe overrides: if any script still manages to set an inline
   `top: NNNpx` or position on the header attribute, clobber it. */
body.cms-home .page-header[style*="top:"] {
  top: 0 !important;
}
body.cms-home .page-header[style*="position:"] {
  position: sticky !important;
}
body.cms-home .page-header[style*="transform:"] {
  transform: none !important;
}

/* =====================================================================
   2026-05-26 PATCH — account/login dropdown was being occluded by the
   green page-header-bottom nav after the first stability patch.
   Lift the dropdown ABOVE everything and stop the nav from creating
   its own stacking context.
   ===================================================================== */
body.cms-home .page-header .account-dropdown,
body.cms-home .page-header .switcher-dropdown,
body.cms-home .page-header .dropdown.switcher-dropdown,
body.cms-home .page-header [class*="account-dropdown"],
body.cms-home .page-header #header-account .dropdown {
  z-index: 9999 !important;
  position: absolute !important;
}
/* The earlier patch set position:relative on .page-header-bottom,
   which (combined with anything that sets z-index) created a stacking
   context that trapped the dropdown below it. Force static so the
   dropdown can float above. The JS already strips any stuck inline
   transform that would otherwise need this. */
body.cms-home .page-header .page-header-bottom,
body.cms-home .page-header .navigation,
body.cms-home .page-header .nav-sections {
  position: static !important;
  z-index: auto !important;
}
