.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  background: var(--black); color: var(--white);
  transition: transform 420ms var(--ease-out);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner {
  height: calc(var(--header-h) - var(--bar-h)); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.site-header__logo { display: block; flex: none; }
.site-header__logo img { height: 44px; width: auto; }
.site-header__nav { display: flex; gap: 28px; margin-left: auto; }
.site-header__nav a {
  text-decoration: none; font-weight: 600; font-size: .9375rem; padding: 10px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size var(--t-ui) var(--ease-out);
}
.site-header__nav a:hover { background-size: 100% 1.5px; }
.site-header__bag {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 12px;
  background: none; border: 0; cursor: pointer; font-weight: 700;
}
.site-header__count {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px;
  background: var(--lit); color: var(--black); font-size: .8125rem; font-weight: 800;
}
.site-header__count.bump { animation: bump 420ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.35); } }

.site-header__menu {
  display: none; min-height: 44px; padding: 0 14px; margin-left: auto;
  background: none; color: var(--white); border: 1.5px solid #4a4743; border-radius: 999px;
  font-weight: 700; cursor: pointer;
}
.site-header__nav a[aria-current="page"] { background-size: 100% 1.5px; }

/* phones: the nav becomes a panel under the bar */
@media (max-width: 860px) {
  .site-header__menu { display: inline-flex; align-items: center; }
  .site-header__bag { margin-left: 4px; }
  .site-header__nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 20px;
    /* short phones: the menu scrolls inside itself instead of running off the screen */
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    background: var(--black); border-top: 1px solid #2a2927;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out), visibility 0s var(--t-ui);
  }
  .site-header__nav a { padding: 12px 0; font-family: var(--display); font-size: 1.4rem; font-weight: 800; font-stretch: 120%; border-bottom: 1px solid #2a2927; background: none; }
  .site-header.is-open .site-header__nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .site-header__count.bump { animation: none; }
}

/* sound toggle with a little equaliser that only moves while sound is on */
.site-header__sound {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; margin-left: 12px;
  background: none; border: 0; color: var(--muted-on-black); font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.site-header__sound[aria-pressed="true"] { color: var(--white); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 3px; background: currentColor; }
.site-header__sound[aria-pressed="true"] .eq i { height: 9px; }
.site-header__sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -300ms; }
.site-header__sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -600ms; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
@media (max-width: 860px) { .site-header__sound [data-sound-label] { display: none; } .site-header__sound { margin-left: 4px; } }
@media (prefers-reduced-motion: reduce) { .site-header__sound .eq i { animation: none !important; height: 8px; } }

/* small phones: tighter spacing so the bag and its count stay on screen */
@media (max-width: 480px) { .site-header__inner { gap: 8px; } .site-header__bag { padding-left: 6px; margin-left: 0; } .site-header__sound { padding: 0 6px; margin-left: 0; } }

/* ---------- the shipping line along the top ---------- */
.site-header__bar {
  height: var(--bar-h); margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 var(--gutter); background: var(--lit); color: #000;
  font-family: var(--mono); font-size: .6875rem; font-weight: 600; letter-spacing: .03em; white-space: nowrap; overflow: hidden;
}
.site-header__bar a { color: inherit; text-underline-offset: 3px; }
@media (max-width: 600px) { .site-header__bar-more, .site-header__bar-long { display: none; } .site-header__bar { font-size: .625rem; } }

/* ---------- search, account and wishlist icons ---------- */
@media (min-width: 861px) { .site-header__nav { gap: 24px; } }
.site-header__icon {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: none; border: 0; color: var(--white); cursor: pointer; border-radius: 50%;
  transition: color var(--t-fast), background var(--t-fast);
}
.site-header__icon:hover { color: var(--lit); }
.site-header__icon:focus-visible { outline: 2px solid var(--lit); outline-offset: 2px; }
.site-header__dot {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; background: var(--lit); color: #000; font-size: .6875rem; font-weight: 800; line-height: 1;
}
.site-header__dot[hidden] { display: none; }
.site-header__nav-extra { display: none; }
.site-header__sound + .site-header__icon { margin-left: 4px; }
@media (max-width: 1180px) and (min-width: 861px) { .site-header__nav-wide { display: none; } .site-header__nav { gap: 18px; } .site-header__sound [data-sound-label] { display: none; } }
/* the nav never breaks a link over two lines (at 1181 to about 1400px every two-word link was wrapping) */
@media (min-width: 861px) {
  .site-header__nav a, .site-header__sound { white-space: nowrap; }
}
/* 1181 to 1299px: the seven links need the room the "Sound on" words take (the icon stays) */
@media (max-width: 1299px) and (min-width: 1181px) {
  .site-header__sound [data-sound-label] { display: none; }
  .site-header__nav { gap: 22px; }
}
/* small laptops and tablets on their side (861 to 1100px): the full nav on one line, bag fully on screen
   (it used to wrap to two lines and push the bag off the right edge; final device check, 14 Nov) */
@media (max-width: 1100px) and (min-width: 861px) {
  .site-header__inner { gap: 14px; }
  .site-header__nav { gap: 14px; }
  .site-header__nav a { white-space: nowrap; font-size: .8125rem; }
  .site-header__sound { margin-left: 0; padding: 0 6px; }
  .site-header__icon { width: 40px; }
  .site-header__bag > span:not(.site-header__count) { display: none; }
}
@media (max-width: 860px) {
  .site-header__icon--wide { display: none; }
  .site-header__nav-extra {
    display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; cursor: pointer;
    padding: 12px 0; font-family: var(--font); font-size: 1rem; font-weight: 600; border-bottom: 1px solid #2a2927;
  }
  button.site-header__nav-extra { margin-top: 12px; }
}

/* ---------- hearts (wishlist) ---------- */
.heart {
  --heart-fill: none;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; justify-content: center;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .35); color: var(--fg);
  font-weight: 700; font-size: .875rem; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.heart:hover { border-color: var(--fg); }
.heart[aria-pressed="true"] { --heart-fill: var(--lit); color: var(--lit); border-color: var(--lit); }
.heart:focus-visible { outline: 2px solid var(--lit); outline-offset: 2px; }
.heart.is-pop svg { animation: heart-pop 420ms var(--ease-out); }
@keyframes heart-pop { 35% { transform: scale(1.35); } }
/* on a photo: a round button in the corner */
.heart--photo { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 0; width: 40px; min-height: 40px; min-width: 40px; height: 40px;
  background: rgba(0, 0, 0, .55); border-color: transparent; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .heart.is-pop svg { animation: none; } }

/* ---------- search panel ---------- */
.search {
  width: min(720px, calc(100% - 24px)); max-height: min(80vh, 760px); margin: 8vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: #0d0d0c; color: var(--fg); overflow: hidden;
}
.search::backdrop { background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.search__inner { display: grid; grid-template-rows: auto auto 1fr; max-height: inherit; }
.search__bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search__input {
  flex: 1; min-width: 0; height: 44px; border: 0; background: none; color: var(--fg);
  font-family: var(--display); font-size: 1.25rem; font-weight: 700; outline: none;
}
.search__input::placeholder { color: var(--muted); font-weight: 500; }
.search__close { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--muted);
  font-family: var(--mono); font-size: .75rem; cursor: pointer; }
.search__count { margin: 0; padding: 12px 18px 4px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.search__list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow-y: auto; overscroll-behavior: contain; }
.search__hit {
  display: grid; grid-template-columns: 56px 1fr auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit;
}
.search__hit:hover, .search__hit:focus-visible { background: #1b1a18; outline: none; }
.search__hit img { grid-row: 1 / 3; width: 56px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--frame); }
.search__name { font-weight: 700; }
.search__meta { grid-column: 2; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.search__price { grid-column: 3; grid-row: 1 / 3; font-weight: 700; }

/* hearts in captions and beside buy buttons */
.look__cap { position: relative; padding-right: 52px; }
.look__heart { position: absolute; top: 0; right: 0; }
.hero__heart { width: 44px; padding: 0; }
.pdp__buy { display: flex; gap: 10px; align-items: stretch; }
.pdp__buy .btn { flex: 1 1 auto; }
.pdp__heart { flex: 0 0 auto; padding: 0 16px; }
.rack__heart { min-height: 36px; }

/* narrow phones (iPhone SE, small Androids): the bag keeps its icon and count, the word goes */
@media (max-width: 400px) {
  .site-header__bag > span:not(.site-header__count) { display: none; }
  .site-header__logo img { width: 84px; height: auto; }
}
@media (max-width: 340px) {
  .site-header__inner { gap: 4px; }
  .site-header__logo img { width: 68px; }
  .site-header__menu { padding-left: 12px; padding-right: 12px; }
  .site-header__sound { padding: 0 4px; }
}
