/* Walupi header 2.0. Layers on app.css: .site-header/.bar/.brand,
   .header-basket, .account-menu, .suggest-box, .mobile-search all keep their
   base rules there; everything here is scoped under .hd so the two files
   cannot fight. Colour rules from tokens.css hold: indigo-950 is the trust
   surface, royal is the action colour, accent only for the alert dot. */

.hd .hd-bar {
  gap: 14px;
}
@media (min-width: 980px) {
  .hd .hd-bar {
    gap: 22px;
    min-height: 68px;
  }
}

/* Brand: wordmark with the tagline riding under it on desktop. */
.hd-brand {
  line-height: 1;
}
.hd-word {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hd-tag {
  display: none;
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo-950-muted);
  white-space: nowrap;
}
@media (min-width: 980px) {
  .hd-tag {
    display: block;
  }
  .hd-brand svg {
    width: 38px;
    height: 26px;
  }
  .hd-brand {
    font-size: 21px;
  }
}

/* Search: the dominant element. Royal submit circle inside the pill. */
.hd-search {
  max-width: 720px;
}
.hd-search input {
  width: 100%;
  padding-right: 52px;
  font-size: 14.5px;
}
.hd-go {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 37px;
  height: 37px;
  border: 0;
  border-radius: 999px;
  background: var(--royal-700);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hd-go:hover {
  background: var(--royal-900);
}
.hd-go svg {
  width: 17px;
  height: 17px;
}
.hd-msearch .hd-mwrap {
  position: relative;
}
.hd-msearch input {
  width: 100%;
  padding-right: 52px;
}

/* Right cluster: labeled items, the big-retailer signature. The basket and
   bell share .header-basket from app.css; here they become icon-over-label
   columns with a hover wash. */
.hd-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex: none;
}
.hd .header-basket {
  width: auto;
  height: auto;
  min-width: 48px;
  flex-direction: column;
  gap: 2px;
  padding: 6px 9px 5px;
  border-radius: var(--r-control);
}
.hd .header-basket:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.hd .header-basket .badge {
  top: 0;
  right: 7px;
}
.hd-cluster-label {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--indigo-950-muted);
}
.hd .header-basket:hover .hd-cluster-label {
  color: #fff;
}

/* Account: the avatar is the whole trigger. A light ring on hover and a
   royal ring while the menu is open, so the state reads without text. */
.hd .account-menu > summary {
  padding: 4px;
  border-radius: 999px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
.hd .account-menu > summary:hover .avatar {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}
.hd .account-menu[open] > summary .avatar {
  outline: 2px solid var(--indigo-950-soft);
  outline-offset: 2px;
}

/* The browse band: row 2. A lighter wash on the same trust surface, links
   left, the escrow chip pinned right on desktop. On mobile the whole row
   scrolls sideways with the scrollbar hidden, chip included. */
.hd-subnav {
  background: rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.hd-subnav-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hd-subnav-row::-webkit-scrollbar {
  display: none;
}
.hd-subnav-row a {
  color: var(--indigo-950-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  padding: 4px 0;
}
.hd-subnav-row a:hover {
  color: #fff;
  text-decoration: none;
}
.hd-subnav-row a[aria-current="page"] {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--royal-500);
}
.hd-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--indigo-950-soft);
}
.hd-trust svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.hd-subnav-row .hd-trust:hover {
  color: #fff;
}
@media (min-width: 980px) {
  .hd-subnav-row {
    min-height: 40px;
  }
  .hd-subnav-row a {
    font-size: 13px;
  }
  .hd-trust {
    margin-left: auto;
  }
}

/* The two-row header is taller than the old bar, so the sticky side rail
   (app.css) needs a deeper offset and the full remaining viewport; the
   overflow stays as a safety valve for short laptop screens, but the rail's
   content is sized to fit without ever showing its own scrollbar. */
@media (min-width: 980px) {
  .col-side-sticky {
    top: 122px;
    max-height: calc(100dvh - 134px);
  }
}
