/* =========================================================
   Vitality Naturals - site header (Controls/SiteHeader.ascx)
   Tokens (--vn-*) live in home.css
   ========================================================= */
.vn-header {
  position: -webkit-sticky;
  position: sticky;
  top: -40px;               /* the utility bar scrolls away, the main bar stays */
  z-index: 60;
  background: #fff;
  font-family: var(--vn-text);
  transition: box-shadow .3s ease;
}
.vn-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(10, 53, 23, .45); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
.vn-header.is-scrolled .vn-mainbar { border-bottom-color: rgba(223, 232, 219, .7); }
.vn-header *, .vn-header *:before, .vn-header *:after { box-sizing: border-box; }
.vn-header ul { list-style: none; margin: 0; padding: 0; }
.vn-header a { display: inline-flex; align-items: center; }
.vn-header svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
/* Bootstrap's .container clearfix pseudo-elements would become stray flex items */
.vn-topbar-inner:before, .vn-topbar-inner:after,
.vn-mainbar-inner:before, .vn-mainbar-inner:after { display: none !important; }
.vn-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Utility bar ---------- */
.vn-topbar { background: var(--vn-forest); color: rgba(255, 255, 255, .82); font-size: 13.5px; }
.vn-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 40px; }
.vn-topbar ul { display: flex; align-items: center; gap: 22px; }
.vn-topbar li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.vn-topbar svg { width: 15px; height: 15px; color: var(--vn-sun-soft); }
.vn-header .vn-topbar a { color: #fff; text-decoration: none; transition: color .2s ease; }
.vn-header .vn-topbar a:hover, .vn-header .vn-topbar a:focus { color: var(--vn-sun-soft); }
.vn-topbar-right { display: flex; align-items: center; gap: 22px; }
.vn-topbar-social { gap: 14px !important; }
.vn-header .vn-topbar-social a { font-size: 14px; color: rgba(255, 255, 255, .8); }
.vn-topbar-links { gap: 0 !important; }
.vn-topbar-links li + li:before { content: ""; width: 1px; height: 14px; margin: 0 14px; background: rgba(255, 255, 255, .28); }
.vn-topbar-links a { font-weight: 600; }

/* ---------- Main bar ---------- */
.vn-mainbar { position: relative; border-bottom: 1px solid var(--vn-line); }
.vn-mainbar-inner { display: flex; align-items: center; gap: 24px; height: 84px; }
.vn-logo { flex: 0 0 auto; line-height: 0; }
.vn-logo img { display: block; height: 58px; width: auto; }

.vn-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.vn-nav-list { display: flex; align-items: center; gap: 4px; }
.vn-nav-list a {
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--vn-ink) !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.vn-nav-list a:hover, .vn-nav-list a:focus { color: var(--vn-green) !important; background: var(--vn-mint); }
.vn-nav-list .current_page > a { color: var(--vn-green) !important; }
.vn-nav-list .current_page > a:after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 3px; border-radius: 3px; background: var(--vn-sun);
}
.vn-nav-mobile-cta { display: none; }

.vn-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.vn-icon-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--vn-ink) !important;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.vn-icon-btn:hover, .vn-icon-btn:focus { background: var(--vn-mint); color: var(--vn-green) !important; }
.vn-icon-btn svg { width: 22px; height: 22px; }
.vn-badge {
  position: absolute; top: 3px; right: 1px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--vn-sun); color: var(--vn-forest);
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.vn-header-cta { margin-left: 8px; }
.vn-burger { display: none !important; }

/* Search panel */
.vn-searchpanel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--vn-line); box-shadow: 0 18px 30px -22px rgba(10, 53, 23, .45); padding: 16px 0; }
.vn-searchpanel[hidden] { display: none; }
.vn-search { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; padding: 6px 6px 6px 18px; border: 1.5px solid var(--vn-line); border-radius: 999px; background: var(--vn-mint); transition: border-color .2s ease, background .2s ease; }
.vn-search:focus-within { border-color: var(--vn-green); background: #fff; }
.vn-search > svg { color: var(--vn-muted); }
.vn-search input { flex: 1 1 auto; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; font: 500 16px var(--vn-text); color: var(--vn-ink); -webkit-appearance: none; }
.vn-search input::placeholder { color: var(--vn-muted); }
.vn-search .vn-btn { padding: 12px 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .vn-actions .vn-header-cta { display: none !important; }
  .vn-burger { display: inline-flex !important; }
  .vn-nav {
    position: fixed; left: 0; right: 0; top: 0; bottom: 0;
    z-index: 70;
    display: flex; flex-direction: column; justify-content: flex-start; gap: 24px;
    padding: 96px 24px 32px;
    background: #fff;
    overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .vn-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s ease, transform .25s ease; }
  .vn-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .vn-nav-list li { border-bottom: 1px solid var(--vn-line); }
  .vn-nav-list a { display: flex !important; padding: 16px 4px; font-size: 20px; font-family: var(--vn-display); border-radius: 0; }
  .vn-nav-list a:hover { background: transparent; }
  .vn-nav-list .current_page > a:after { left: 4px; right: auto; width: 28px; bottom: 8px; }
  .vn-nav-mobile-cta { display: flex; flex-direction: column; gap: 12px; }
  .vn-nav-mobile-cta .vn-btn { justify-content: center; }
  .vn-actions, .vn-logo { position: relative; z-index: 80; }
  .vn-actions { margin-left: auto; }
  html.vn-menu-open { overflow: hidden; }
  html.vn-menu-open .vn-header { position: fixed; left: 0; right: 0; top: 0; }
  html.vn-menu-open .vn-topbar { display: none; }
}
@media (max-width: 767px) {
  .vn-hide-xs { display: none !important; }
  .vn-header { top: 0; }
  .vn-topbar { display: none; }
  .vn-mainbar-inner { height: 70px; gap: 12px; }
  .vn-logo img { height: 46px; }
  .vn-search .vn-btn { padding: 12px 16px; }
}
