/* Header, full-screen menu, search overlay. */
/* The bar spans the viewport (rules and backgrounds run edge to edge); its
   content keeps the page margin, like flagship brand stores. */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  padding-inline: var(--page-margin);
}

/* Sticky must sit on the section wrapper: a sticky element only sticks inside
   its parent, and the header's parent is its own (short) section. */
.shopify-section:has(> .site-header--sticky) {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-background);
}

.site-header__start,
.site-header__end {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-header__end {
  justify-content: flex-end;
}

.site-header__nav ul {
  display: flex;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

@media (max-width: 989px) {
  .site-header__nav {
    display: none;
  }
}

.site-header__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-header__link:hover,
.site-header__link[aria-current='page'] {
  text-decoration: underline;
}

.site-header__mark {
  font-family: var(--font-heading--family);
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
}

.site-header__mark img {
  max-width: 40vw;
  height: auto;
}

@media (max-width: 749px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .site-header__mark {
    justify-self: center;
    font-size: 1.375rem;
  }

  /* Search lives in the menu on phones to keep the header uncluttered. */
  .site-header__end [data-dialog-open='search-dialog'] {
    display: none;
  }
}

/* ---------- Menu + search dialogs ---------- */
.menu-dialog,
.search-dialog {
  width: 100%;
  height: 100%;
  background: var(--color-background);
  color: var(--color-foreground);
}

.menu-dialog[open],
.search-dialog[open] {
  animation: dialog-in 250ms ease;
}

@keyframes dialog-in {
  from {
    opacity: 0;
  }
}

.menu-dialog__inner,
.search-dialog__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  min-height: 100%;
  padding: 1.25rem var(--page-margin) 2rem;
}

.menu-dialog__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Optional brand at the top of the menu (logo image or wordmark). */
/* The brand takes its own row so the links keep the flexible middle row. */
.menu-dialog__inner:has(> .menu-dialog__brand) {
  grid-template-rows: auto auto 1fr auto;
}

.menu-dialog__brand {
  justify-self: start;
  margin-block-start: 1.5rem;
  color: inherit;
  text-decoration: none;
}

.menu-dialog__logo {
  display: block;
  max-width: 100%;
  height: auto;
}

.menu-dialog__wordmark {
  font-family: var(--font-heading--family);
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  font-style: var(--font-heading--style);
  font-weight: var(--font-heading--weight);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.menu-dialog__list {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  list-style: none;
}

.menu-dialog__link {
  display: inline-block;
  font-family: var(--font-heading--family);
  font-size: calc(clamp(2.5rem, 1.5rem + 4vw, 5rem) * var(--heading-scale));
  line-height: 1.05;
  text-decoration: none;
  cursor: pointer;
}

.menu-dialog__link:hover,
.menu-dialog__link[aria-current='page'] {
  font-style: italic;
}

summary.menu-dialog__link,
summary.menu-dialog__sublink {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.menu-dialog__group[open] > summary {
  font-style: italic;
}

.menu-dialog__sublist {
  display: grid;
  gap: 0.375rem;
  padding: 0.75rem 0 1rem 0.25rem;
  list-style: none;
}

.menu-dialog__sublink {
  font-size: 1.125rem;
  text-decoration: none;
  cursor: pointer;
}

.menu-dialog__sublink:hover {
  text-decoration: underline;
}

.menu-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.search-dialog__inner {
  grid-template-rows: auto auto 1fr;
}

.search-dialog__input {
  width: 100%;
  padding: 0.5rem 0;
  border: 0;
  border-block-end: 1px solid var(--color-foreground);
  background: transparent;
  color: inherit;
  font-family: var(--font-heading--family);
  font-size: clamp(2rem, 1.25rem + 3vw, 4rem);
}

.search-dialog__input:focus-visible {
  outline: none;
  border-block-end-width: 2px;
}

.search-dialog__results {
  margin-block-start: 2rem;
}

.predictive-search {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.predictive-search__queries,
.predictive-search__other {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  list-style: none;
}

.predictive-search__products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
  width: 100%;
  padding: 0;
  list-style: none;
}

.predictive-search__product {
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
}

.predictive-search__vendor {
  color: var(--color-foreground-muted);
}

/* ---------- Transparent header over a first-section hero ----------
   JavaScript only: without header.js the header would never turn solid. */
.site-header__logo--overlay {
  display: none;
}

html.js body:has(main > .shopify-section:first-child .campaign) .shopify-section:has(> .site-header--overlay) {
  margin-block-end: calc(var(--header-overlay-height, 3rem) * -1);
  background: transparent;
}

html.js body:has(main > .shopify-section:first-child .campaign) .shopify-section:has(> .site-header--overlay:not(.site-header--sticky)) {
  position: relative;
  z-index: 10;
}

html.js body:has(main > .shopify-section:first-child .campaign) .site-header--overlay:not(.is-solid) {
  border-color: transparent;
  background: transparent;
  color: var(--header-overlay-color);
}

html.js body:has(main > .shopify-section:first-child .campaign) .site-header--overlay:not(.is-solid):has(.site-header__logo--overlay) .site-header__logo:not(.site-header__logo--overlay) {
  display: none;
}

html.js body:has(main > .shopify-section:first-child .campaign) .site-header--overlay:not(.is-solid) .site-header__logo--overlay {
  display: block;
}

html.js body:has(main > .shopify-section:first-child .campaign) main > .shopify-section:first-child .campaign--screen {
  min-height: 100svh;
}

.site-header--overlay,
.shopify-section:has(> .site-header--overlay) {
  transition: background-color var(--duration-normal, 300ms) ease, color var(--duration-normal, 300ms) ease,
    border-color var(--duration-normal, 300ms) ease;
}

/* Solid again once scrolled: paint the full-width section, not the inset header. */
html.js body:has(main > .shopify-section:first-child .campaign) .shopify-section:has(> .site-header--overlay.is-solid) {
  background: var(--color-background);
}

/* ---------- Header layouts (Theme settings > Look > Header layout) ---------- */
.site-header--logo_left,
.site-header--centered,
.site-header--stacked {
  grid-template-areas: 'start mark end';
}

:is(.site-header--logo_left, .site-header--centered, .site-header--stacked) .site-header__start {
  grid-area: start;
}

:is(.site-header--logo_left, .site-header--centered, .site-header--stacked) .site-header__mark {
  grid-area: mark;
}

:is(.site-header--logo_left, .site-header--centered, .site-header--stacked) .site-header__end {
  grid-area: end;
}

/* Logo left: wordmark, inline menu in the middle, utilities on the right. */
.site-header--logo_left {
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: 'mark nav start end';
}

.site-header--logo_left > .site-header__nav {
  grid-area: nav;
  justify-self: center;
}

/* Centered: wordmark on top, menu centred on its own row. */
.site-header--centered {
  grid-template-areas:
    'start mark end'
    'nav nav nav';
  row-gap: 0.25rem;
}

.site-header--centered > .site-header__nav {
  grid-area: nav;
  justify-self: center;
  padding-block-end: 0.5rem;
}

/* Stacked: a giant wordmark spanning the page above the bar. */
.site-header--stacked {
  grid-template-areas:
    'giant giant giant'
    'start mark end';
  row-gap: 0;
}

.site-header__giant {
  grid-area: giant;
  display: block;
  padding-block-start: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.site-header__giant svg,
.site-header__giant img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header__giant svg {
  overflow: visible;
  fill: currentColor;
}

.site-header__giant text {
  font-family: var(--font-heading--family);
  font-size: 150px;
  font-style: var(--font-heading--style, normal);
  font-weight: var(--font-heading--weight);
}

/* The small mark appears once the giant one has scrolled away. */
.site-header--stacked .site-header__mark {
  opacity: 0;
  transition: opacity var(--duration-normal, 300ms) ease;
}

.site-header--stacked.is-scrolled .site-header__mark,
.site-header--stacked .site-header__mark:focus-visible {
  opacity: 1;
}

/* Sticky stacked header: only the bar stays; the giant row scrolls off. */
.shopify-section:has(> .site-header--stacked.site-header--sticky) {
  top: calc(var(--header-giant-height, 0px) * -1);
}

/* ---------- Wordmark styles (text logo) ---------- */
.site-header__mark--outline,
.site-header--stacked:has(.site-header__mark--outline) .site-header__giant {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px currentColor;
}

.site-header--stacked:has(.site-header__mark--outline) .site-header__giant svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

@media (max-width: 989px) {
  .site-header--logo_left {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'mark start end';
  }

  .site-header--logo_left .site-header__start {
    justify-content: flex-end;
  }

  .site-header--centered {
    grid-template-areas: 'start mark end';
  }
}

/* ---------- Minimal header: icons + centred wordmark (flagship chrome) ---------- */
.site-header--minimal {
  grid-template-columns: 1fr auto 1fr;
  min-height: 3.8rem;
}

.site-header--minimal .site-header__start,
.site-header--minimal .site-header__end {
  gap: 0.25rem;
}

.site-header__center {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
}

.site-header__icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.site-header__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.3;
}

.site-header__icon:hover svg {
  stroke-width: 1.8;
}

.site-header__count {
  position: absolute;
  right: 0.125rem;
  bottom: 0.25rem;
  min-width: 0.875rem;
  height: 0.875rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: currentcolor;
  font-size: 0.5625rem;
  line-height: 0.875rem;
  text-align: center;
}

/* Count text in the page colour on a currentColor dot. */
.site-header__count {
  color: var(--color-background);
}

.site-header--overlay:not(.is-solid) .site-header__count {
  color: var(--color-ink);
}

.site-header__count[hidden] {
  display: none;
}

.site-header__clock,
.style-street .site-header__clock {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-body--family);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

@media (max-width: 749px) {
  .site-header__clock .store-clock__label {
    display: none;
  }
}
