
/* ============ HEADER v2 — mobile-first (base = mobile <768px) ============ */
.bnx-header {
  background: var(--bnx-white);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.bnx-header.is-scrolled { border-bottom-color: var(--bnx-border); }
.bnx-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 60px;
}
.bnx-burger { display: inline-flex; }
.bnx-brand { justify-self: center; min-width: 0; }
.bnx-nav { display: none; }
.bnx-actions { display: flex; align-items: center; gap: 4px; justify-self: end; }
/* Mobile: icon search + icon CTA visible; desktop controls hidden */
.bnx-msearch { display: inline-flex; }
.bnx-cta-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bnx-brand); color: #fff; text-decoration: none;
}
.bnx-cta-icon:hover { background: var(--bnx-brand-dark); color: #fff; }
.bnx-hsearch, .bnx-cta-full, .bnx-fav-link, .bnx-user-wrap, .bnx-login-btn { display: none; }
/* Expanding desktop search (also used if enabled on larger phones) */
.bnx-hsearch { position: relative; align-items: center; }
.bnx-hsearch-form {
  display: none; align-items: center; gap: 8px;
  border: 1px solid var(--bnx-border); border-radius: var(--bnx-r-input);
  background: #fff; padding: 4px 4px 4px 12px;
}
.bnx-hsearch.open .bnx-hsearch-form { display: flex; }
.bnx-hsearch-form input {
  border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--bnx-ink); width: 200px; min-height: 36px;
}
.bnx-hsearch-form .bnx-btn { min-height: 36px; padding: 6px 14px; }
/* Drawer */
.bnx-drawer {
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.bnx-drawer.open {
  visibility: visible;
  transition: transform 0.25s ease;
}
.bnx-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--bnx-border-soft);
  min-height: 60px;
}
.bnx-dsearch {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 16px 4px; padding: 0 14px;
  border: 1px solid var(--bnx-border); border-radius: var(--bnx-r-input);
  background: var(--bnx-soft); min-height: 48px; color: var(--bnx-secondary);
}
.bnx-dsearch:focus-within { border-color: var(--bnx-brand); background: #fff; }
.bnx-dsearch input {
  border: 0; outline: 0; background: transparent;
  width: 100%; font-size: 15px; color: var(--bnx-ink); min-height: 44px;
}
.bnx-dnav-wrap { flex: 1; overflow-y: auto; padding: 8px; }
.bnx-dnav { list-style: none; margin: 0; padding: 0; }
.bnx-ditem { border-bottom: 1px solid var(--bnx-border-soft); }
.bnx-ditem:last-child { border-bottom: 0; }
.bnx-drow { display: flex; align-items: center; gap: 4px; }
.bnx-dlink {
  flex: 1; display: flex; align-items: center;
  min-height: 48px; padding: 12px;
  font-size: 15px; font-weight: 600; color: var(--bnx-ink); text-decoration: none;
  border-radius: 10px;
}
.bnx-dlink:hover { color: var(--bnx-brand-ink); }
.bnx-ditem.is-active > .bnx-drow > .bnx-dlink { color: var(--bnx-brand-ink); }
.bnx-dtoggle {
  width: 48px; height: 48px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 10px; cursor: pointer; color: var(--bnx-secondary);
}
.bnx-dtoggle:hover { background: var(--bnx-soft); color: var(--bnx-ink); }
.bnx-dtoggle svg { transition: transform 0.2s ease; }
.bnx-dtoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.bnx-dtoggle[aria-expanded="true"] { color: var(--bnx-brand-ink); }
.bnx-dsub { list-style: none; margin: 0; padding: 0 0 4px 12px; }
.bnx-dsub[hidden] { display: none; }
.bnx-dsub .bnx-dlink { font-weight: 500; font-size: 14px; color: var(--bnx-secondary); }
.bnx-dsub .bnx-dlink:hover { color: var(--bnx-ink); }
.bnx-drawer-foot { padding: 12px 16px 20px; display: grid; gap: 8px; border-top: 1px solid var(--bnx-border-soft); }
.bnx-btn-block { width: 100%; }
/* Desktop (≥768px) */
@media (min-width: 768px) {
  .bnx-bar { min-height: 68px; gap: 16px; }
  .bnx-burger { display: none; }
  .bnx-brand { justify-self: start; }
  .bnx-nav { display: flex; justify-self: center; }
  .bnx-msearch, .bnx-cta-icon { display: none; }
  .bnx-hsearch { display: flex; }
  .bnx-cta-full, .bnx-fav-link { display: inline-flex; }
  .bnx-user-wrap, .bnx-login-btn { display: inline-flex; }
  .bnx-user-wrap { align-items: center; }
  /* Nested flyout (level 2) for WP menus with depth */
  .bnx-menu .sub-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: #fff; border: 1px solid var(--bnx-border); border-radius: var(--bnx-r-card); box-shadow: var(--bnx-shadow-lg); padding: 8px; z-index: 650; list-style: none; margin: 0; }
  .bnx-menu li { position: relative; }
  .bnx-menu li:hover > .sub-menu, .bnx-menu li:focus-within > .sub-menu { display: block; }
  .bnx-menu .sub-menu a { display: flex; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; }
  .bnx-menu .sub-menu a:hover { background: var(--bnx-soft); }
  .bnx-menu .sub-menu .sub-menu { top: -8px; left: 100%; }
}
/* Small phones: tighten logo + actions */
@media (max-width: 379px) {
  .bnx-bar { gap: 4px; }
  .bnx-logo-word { font-size: 16px; }
  .bnx-logo-mark { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .bnx-drawer { transition: none; }
  .bnx-dtoggle svg { transition: none; }
}
