/*
 * header.css — Hybrid (locked): dual strip + twin groups
 * Top navy utility: brand · phone · consultation
 * Main white: logo · nav/mega · Service ▾ · Orders ▾
 * All rules scoped under .bd-header-wrap
 */

.bd-header-wrap {
  --navy: #002f66;
  --navy-2: #003a7a;
  --blue: #0068b7;
  --ice: #f4f9ff;
  --mist: #dceaf7;
  --ink: #1f2f3d;
  --line: rgba(0, 47, 102, 0.12);
  --hd-scale: 0.87;
  --hd-h: 64px;
  --hd-utility-h: 36px;
  --hd-logo-h: 42px;
  --hd-gap: 18px;
  --hd-padding-x: 6px;
  --hd-nav-font: 13px;
  --hd-nav-min-h: 38px;

  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  isolation: isolate;
  position: relative;
  z-index: 100;
  /* clip horizontal bleed so mobile chrome cannot force sideways page scroll */
  overflow-x: clip;
  overflow-y: visible;
  background: #fff;
}

.bd-header-wrap,
.bd-header-wrap * {
  box-sizing: border-box;
}

.bd-header-wrap a {
  text-decoration: none;
}

/* ========== Utility (v2) ========== */
.bd-header-wrap .bd-header__utility {
  display: block;
  width: 100%;
  background-color: #002f66;
  background-image: linear-gradient(180deg, #003a7a 0%, #002f66 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bd-header-wrap .bd-header__utility-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: var(--hd-utility-h);
  padding: 6px var(--hd-padding-x);
}

.bd-header-wrap .bd-header__utility-brand {
  flex: 0 0 auto;
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.bd-header-wrap .bd-header__utility-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  min-width: 0;
}

.bd-header-wrap .bd-header__utility-phone {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-size: var(--text-caption);
  font-weight: 600;
  white-space: nowrap;
}

.bd-header-wrap .bd-header__utility-phone:hover {
  opacity: 0.92;
  color: #fff !important;
}

.bd-header-wrap .bd-header__utility-phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  flex: 0 0 auto;
}

.bd-header-wrap .bd-header__utility-phone-icon svg {
  display: block;
  width: 12px;
  height: 12px;
}

.bd-header-wrap .bd-header__utility-cta {
  display: inline-flex !important;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff !important;
  font-size: var(--text-caption);
  font-weight: 700;
  white-space: nowrap;
}

.bd-header-wrap .bd-header__utility-cta:hover {
  background: #fff;
  color: #002f66 !important;
  border-color: #fff;
}

/* ========== Main bar ========== */
.bd-header-wrap .bd-header {
  position: relative;
  width: 100%;
  height: var(--hd-h);
  min-height: var(--hd-h);
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 12px rgba(0, 47, 102, 0.07);
  z-index: 40;
}

.bd-header-wrap .bd-header__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--hd-gap);
  height: var(--hd-h);
  min-height: var(--hd-h);
  padding: 0 var(--hd-padding-x);
}

.bd-header-wrap .bd-header__logo {
  display: inline-flex;
  align-items: center;
}

.bd-header-wrap .bd-header__logo picture {
  display: block;
  line-height: 0;
}

.bd-header-wrap .bd-header__logo img {
  display: block;
  width: auto;
  height: var(--hd-logo-h);
  max-width: none;
}

/* Mobile menu toggle (hidden on desktop) */
.bd-header-wrap .bd-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--mist);
  border-radius: 10px;
  background: var(--ice);
  color: var(--navy);
  cursor: pointer;
}

.bd-header-wrap .bd-header__menu-toggle-bars,
.bd-header-wrap .bd-header__menu-toggle-bars::before,
.bd-header-wrap .bd-header__menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bd-header-wrap .bd-header__menu-toggle-bars {
  position: relative;
}

.bd-header-wrap .bd-header__menu-toggle-bars::before,
.bd-header-wrap .bd-header__menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.bd-header-wrap .bd-header__menu-toggle-bars::before {
  top: -6px;
}

.bd-header-wrap .bd-header__menu-toggle-bars::after {
  top: 6px;
}

.bd-header-wrap.is-nav-open .bd-header__menu-toggle-bars {
  background: transparent;
}

.bd-header-wrap.is-nav-open .bd-header__menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.bd-header-wrap.is-nav-open .bd-header__menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.bd-header-wrap .bd-header__menu-toggle:focus-visible,
.bd-header-wrap .bd-header__drop-btn:focus-visible,
.bd-header-wrap .bd-header__nav-link:focus-visible,
.bd-header-wrap .bd-header__drop-item:focus-visible,
.bd-header-wrap .bd-header__utility-phone:focus-visible,
.bd-header-wrap .bd-header__utility-cta:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Nav */
.bd-header-wrap .bd-header__nav {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

.bd-header-wrap .bd-header__nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bd-header-wrap .bd-header__nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  min-height: var(--hd-nav-min-h);
  font-size: var(--hd-nav-font);
  font-weight: 500;
  line-height: 1;
  color: var(--ink) !important;
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.bd-header-wrap .bd-header__nav-link:hover,
.bd-header-wrap .bd-header__nav-link:active {
  color: var(--blue) !important;
  background: rgba(0, 104, 183, 0.08);
}

.bd-header-wrap .bd-header__nav-chev {
  width: 6px;
  height: 6px;
  margin-top: -2px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.bd-header-wrap .bd-header__nav-item--mega:hover .bd-header__nav-chev,
.bd-header-wrap .bd-header__nav-item--mega:focus-within .bd-header__nav-chev {
  transform: rotate(225deg);
  margin-top: 2px;
}

.bd-header-wrap .bd-header__nav-item--mega:hover .bd-header__nav-link--mega,
.bd-header-wrap .bd-header__nav-item--mega:focus-within .bd-header__nav-link--mega {
  color: var(--blue) !important;
  background: rgba(0, 104, 183, 0.08);
}

/* Mega menu */
.bd-header-wrap .bd-header__mega {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 60;
}

.bd-header-wrap .bd-header__nav-item--mega:hover .bd-header__mega,
.bd-header-wrap .bd-header__nav-item--mega:focus-within .bd-header__mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.bd-header-wrap .bd-header__mega-panel {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(125, 161, 207, 0.35);
  background: linear-gradient(135deg, #fff, #f7fbff);
  box-shadow: 0 18px 48px rgba(29, 58, 98, 0.16);
}

.bd-header-wrap .bd-header__mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bd-header-wrap .bd-header__mega-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.bd-header-wrap .bd-header__mega-card:hover,
.bd-header-wrap .bd-header__mega-card:focus-visible {
  border-color: rgba(0, 104, 183, 0.28);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(29, 58, 98, 0.1);
  outline: none;
}

.bd-header-wrap .bd-header__mega-thumb {
  display: block;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(125, 161, 207, 0.22);
  background: linear-gradient(135deg, rgba(0, 104, 183, 0.12), rgba(10, 42, 95, 0.08));
}

.bd-header-wrap .bd-header__mega-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.bd-header-wrap .bd-header__mega-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bd-header-wrap .bd-header__mega-title {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

.bd-header-wrap .bd-header__mega-sub {
  font-size: var(--text-caption);
  color: #6b778c;
  font-weight: 400;
}

.bd-header-wrap .bd-header__mega-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(125, 161, 207, 0.22);
}

.bd-header-wrap .bd-header__mega-hint {
  font-size: var(--text-small);
  color: #6b778c;
}

.bd-header-wrap .bd-header__mega-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--blue) !important;
}

/* ========== Twin groups (v4) ========== */
.bd-header-wrap .bd-header__groups {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.bd-header-wrap .bd-header__drop {
  position: relative;
  display: inline-flex;
}

.bd-header-wrap .bd-header__drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  border: 1px solid var(--mist);
  background: var(--ice);
  color: var(--navy);
  font-family: inherit;
  font-size: var(--text-caption);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bd-header-wrap .bd-header__drop-btn--orders {
  border-color: transparent;
  background: var(--navy);
  color: #fff;
}

/* Names only: Сервис / Заказы. 700 × 0.77 ≈ 539 → 500. */
.bd-header-wrap .bd-header__drop-label {
  font-weight: 500;
}

.bd-header-wrap .bd-header__drop.is-open .bd-header__drop-btn--service {
  background: #fff;
  border-color: rgba(0, 47, 102, 0.18);
}

.bd-header-wrap .bd-header__drop.is-open .bd-header__drop-btn--orders {
  background: #003a7a;
}

.bd-header-wrap .bd-header__drop-stack {
  display: flex;
  align-items: center;
}

.bd-header-wrap .bd-header__drop-stack-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -6px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: var(--ice);
  color: var(--navy);
}

.bd-header-wrap .bd-header__drop-stack-ico:first-child {
  margin-left: 0;
}

.bd-header-wrap .bd-header__drop-btn--orders .bd-header__drop-stack-ico {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: var(--navy);
}

.bd-header-wrap .bd-header__drop-lang-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(0, 47, 102, 0.08);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bd-header-wrap .bd-header__drop-chev {
  width: 6px;
  height: 6px;
  margin-top: -2px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.65;
}

.bd-header-wrap .bd-header__drop.is-open .bd-header__drop-chev {
  transform: rotate(225deg);
  margin-top: 2px;
}

.bd-header-wrap .bd-header__drop-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bd-header-wrap .bd-header__drop-badge.is-empty,
.bd-header-wrap .bd-header__wishlist-badge.is-empty,
.bd-header-wrap .bd-header__cart-badge.is-empty,
.bd-header-wrap .bd-header__drop-badge[hidden],
.bd-header-wrap .bd-header__wishlist-badge[hidden],
.bd-header-wrap .bd-header__cart-badge[hidden] {
  display: none !important;
}

.bd-header-wrap .bd-header__drop-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(125, 161, 207, 0.35);
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 47, 102, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 70;
}

/* Open state driven by header-chrome.js (.is-open); no hover-only traps on touch */
.bd-header-wrap .bd-header__drop.is-open .bd-header__drop-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.bd-header-wrap .bd-header__drop-panel[hidden] {
  display: block !important; /* keep layout transition; visibility handled above */
}

.bd-header-wrap .bd-header__drop:not(.is-open) .bd-header__drop-panel[hidden] {
  display: none !important;
}

.bd-header-wrap .bd-header__drop-section {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.bd-header-wrap .bd-header__drop-caption {
  display: block;
  margin: 0 0 6px 8px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b778c;
}

.bd-header-wrap .bd-header__drop-lang {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Desktop: full language names; short codes shown on mobile only */
.bd-header-wrap .bd-header__drop-lang-short {
  display: none;
}

.bd-header-wrap .bd-header__drop-lang-name {
  display: inline;
}

.bd-header-wrap .bd-header__drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink) !important;
  font-size: var(--text-small);
  font-weight: 500;
  position: relative;
}

.bd-header-wrap .bd-header__drop-item:hover,
.bd-header-wrap .bd-header__drop-item:focus-visible {
  background: var(--ice);
  color: var(--navy) !important;
  outline: none;
}

.bd-header-wrap .bd-header__drop-item.is-active {
  background: rgba(0, 104, 183, 0.1);
  color: var(--blue) !important;
  font-weight: 700;
}

.bd-header-wrap .bd-header__wishlist,
.bd-header-wrap .bd-header__cart {
  color: var(--ink) !important;
}

.bd-header-wrap .bd-header__wishlist-icon,
.bd-header-wrap .bd-header__cart-icon {
  display: inline-flex;
  line-height: 0;
  color: var(--navy);
}

.bd-header-wrap .bd-header__wishlist-badge,
.bd-header-wrap .bd-header__cart-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: var(--text-caption);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bd-header-wrap .bd-header__wishlist.is-active .bd-header__wishlist-icon {
  color: #e11d48;
}

/* Legacy / unused in hybrid */
.bd-header-wrap .bd-header__phone,
.bd-header-wrap .bd-header__actions {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .bd-header-wrap .bd-header__nav-link,
  .bd-header-wrap .bd-header__mega,
  .bd-header-wrap .bd-header__mega-card,
  .bd-header-wrap .bd-header__drop-panel,
  .bd-header-wrap .bd-header__nav-chev,
  .bd-header-wrap .bd-header__drop-chev {
    transition: none;
  }

  .bd-header-wrap .bd-header__mega-card:hover {
    transform: none;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .bd-header-wrap .bd-header__mega {
    width: min(640px, calc(100vw - 40px));
  }

  .bd-header-wrap .bd-header__mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bd-header-wrap {
    --hd-logo-h: 34px;
  }

  .bd-header-wrap .bd-header,
  .bd-header-wrap .bd-header__content {
    height: auto;
    min-height: auto;
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__content {
    /* logo can shrink; chrome stays compact — no sideways page scroll */
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "logo groups menu"
      "nav nav nav";
    padding: 10px var(--hd-padding-x) 12px;
    gap: 8px 6px;
    min-width: 0;
  }

  .bd-header-wrap .bd-header__logo {
    grid-area: logo;
    min-width: 0;
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__logo img {
    height: var(--hd-logo-h);
    max-width: min(148px, 42vw);
    width: auto;
    object-fit: contain;
    object-position: left center;
  }

  .bd-header-wrap .bd-header__groups {
    grid-area: groups;
    justify-self: end;
    flex-shrink: 0;
    gap: 4px;
    max-width: none;
  }

  .bd-header-wrap .bd-header__menu-toggle {
    grid-area: menu;
    display: inline-flex;
    flex-shrink: 0;
    width: 40px;
    height: 36px;
  }

  .bd-header-wrap .bd-header__nav {
    grid-area: nav;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    gap: 2px;
  }

  .bd-header-wrap.is-nav-open .bd-header__nav {
    display: flex;
  }

  .bd-header-wrap .bd-header__nav-link {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    white-space: normal;
  }

  .bd-header-wrap .bd-header__mega { display: none; }
  .bd-header-wrap .bd-header__nav-chev { display: none; }
  .bd-header-wrap .bd-header__utility-brand { display: none; }

  /* Compact group buttons: hide text labels, keep language code letters */
  .bd-header-wrap .bd-header__drop-label {
    display: none !important;
  }

  /* Mobile: only LV / RU / EN stay extra-bold. Caption/nav/orders untouched. */
  .bd-header-wrap .bd-header__drop-caption {
    font-weight: 700;
  }

  .bd-header-wrap .bd-header__drop-lang-code {
    display: inline-flex !important;
    min-width: 26px;
    height: 22px;
    padding: 0 6px;
    border-radius: 5px;
    background: rgba(0, 47, 102, 0.1);
    font-size: var(--text-caption);
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1;
  }

  /* Language picker: LV / RU / EN letter chips */
  .bd-header-wrap .bd-header__drop-lang {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .bd-header-wrap .bd-header__drop-lang .bd-header__drop-item {
    flex: 1 1 0;
    justify-content: center;
    min-height: 40px;
    min-width: 0;
    padding: 8px 6px;
    font-size: var(--text-small);
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .bd-header-wrap .bd-header__drop-lang-short {
    display: inline;
  }

  .bd-header-wrap .bd-header__drop-lang-name {
    display: none;
  }

  .bd-header-wrap .bd-header__drop-btn {
    padding: 0 8px;
    height: 36px;
    min-height: 36px;
    gap: 4px;
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__drop-stack-ico {
    width: 20px;
    height: 20px;
  }

  .bd-header-wrap .bd-header__utility {
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__utility-inner {
    justify-content: center;
    gap: 10px;
    padding: 6px 6px;
    min-width: 0;
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__utility-right {
    margin-left: 0;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
  }

  .bd-header-wrap .bd-header__utility-phone {
    min-width: 0;
    max-width: 100%;
  }

  .bd-header-wrap .bd-header__utility-phone-text {
    font-size: var(--text-caption);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bd-header-wrap .bd-header__utility-cta {
    display: none !important;
  }

  /* Dropdowns stay inside viewport; never widen the page */
  .bd-header-wrap .bd-header__drop-panel {
    position: fixed;
    top: auto;
    right: max(12px, env(safe-area-inset-right, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }
}

@media (max-width: 680px) {
  .bd-header-wrap .bd-header__logo img {
    height: 30px;
    max-width: min(128px, 38vw);
  }

  .bd-header-wrap .bd-header__nav-link {
    padding: 0 10px;
    font-size: var(--text-small);
    min-height: 42px;
  }

  .bd-header-wrap .bd-header__utility-phone-text {
    font-size: var(--text-caption);
  }

  .bd-header-wrap .bd-header__groups {
    gap: 4px;
  }

  /* One stack icon per group on narrow phones */
  .bd-header-wrap .bd-header__drop-stack-ico + .bd-header__drop-stack-ico {
    display: none;
  }

  .bd-header-wrap .bd-header__drop-btn {
    padding: 0 7px;
    height: 34px;
    min-height: 34px;
  }

  .bd-header-wrap .bd-header__menu-toggle {
    width: 36px;
    height: 34px;
  }
}

@media (max-width: 360px) {
  .bd-header-wrap .bd-header__drop-chev {
    display: none;
  }

  .bd-header-wrap .bd-header__logo img {
    max-width: min(110px, 34vw);
  }
}

/* ========== Header search (site-wide typeahead in the navy utility strip) ==========
 * Lives inside .bd-header__utility-inner between brand and phone/consultation.
 * Additive — does not alter the main header grid layout on any breakpoint.
 */
.bd-header-wrap .bd-header__utility-inner {
  position: relative;
}

.bd-header-wrap .bd-header__search {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  width: clamp(260px, 32vw, 380px);
  max-width: calc(100% - 40px);
}

.bd-header-wrap .bd-header__search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bd-header-wrap .bd-header__search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: var(--text-caption);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.bd-header-wrap .bd-header__search-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.bd-header-wrap .bd-header__search-input:focus {
  outline: none;
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.bd-header-wrap .bd-header__search-input:focus::placeholder {
  color: #7d93b8;
}

.bd-header-wrap .bd-header__search-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.bd-header-wrap .bd-header__search-submit:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.bd-header-wrap .bd-header__search-submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.bd-header-wrap .bd-header__search-submit svg {
  display: block;
  flex: 0 0 auto;
}

/* Typeahead dropdown (progressive enhancement; hidden without JS) */
.bd-header-wrap .bd-header__search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--mist);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 47, 102, 0.16);
}

.bd-header-wrap .bd-header__search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
}

.bd-header-wrap .bd-header__search-item.is-active,
.bd-header-wrap .bd-header__search-item:hover {
  background: #f4f9ff;
}

.bd-header-wrap .bd-header__search-thumb {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #edf1f6;
  overflow: hidden;
}

.bd-header-wrap .bd-header__search-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bd-header-wrap .bd-header__search-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bd-header-wrap .bd-header__search-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--navy);
}

.bd-header-wrap .bd-header__search-sku {
  font-size: var(--text-caption);
  color: #7d93b8;
}

.bd-header-wrap .bd-header__search-price {
  flex: 0 0 auto;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.bd-header-wrap .bd-header__search-empty {
  padding: 14px 10px;
  text-align: center;
  font-size: var(--text-small);
  color: #7d93b8;
}

@media (max-width: 900px) {
  /* Utility strip is centered on mobile: search becomes a normal flex child
     and fills the width between the phone and the viewport edge. */
  .bd-header-wrap .bd-header__search {
    position: static;
    transform: none;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    margin: 0;
  }
}
