/* Site header: full viewport width, sticky, content aligned with the page sections.
   Every header rule lives here; it overrides the imported styles in original.css. */
:root { --header-h: 72px; --megamenu-h: 52px; }

/* Sticky height = top row + category bar (css/mega-menu.css). */
main [id], section[id] { scroll-margin-top: calc(var(--header-h) + var(--megamenu-h) + 16px); }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: #091015;
  color: #fff;
  border-bottom: 1px solid #ffffff14;
}
.header-inner {
  max-width: 1480px;
  height: var(--header-h);
  margin: 0 auto;
  padding-inline: 44px;
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Logo wordmark */
.header .logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #fff;
  font: italic 950 34px/1 Arial, sans-serif;
  letter-spacing: -.07em;
}
.header .slash { width: 16px; height: 32px; margin-right: 11px; vertical-align: 0; }
/* The italic T leans over its own box: the mark needs more room than the letter box suggests. */
.header .logo sup { align-self: flex-start; margin: 2px 0 0 8px; font-size: 9px; letter-spacing: 0; }

/* Actions */
.tools { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: inherit; }
.header-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color .15s;
}
.header-button:hover { background: #ffffff14; }
.header-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cartn {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  width: auto;
  height: 18px;
  margin: 0;
  padding: 0 5px;
  border-radius: 9px;
  font: 700 var(--fs-meta)/18px var(--font-body);
  vertical-align: 0;
}
.cartn[hidden] { display: none; }
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-left: 12px;
  padding: 10px 18px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font: 800 var(--fs-small)/1.2 var(--font-display);
  white-space: nowrap;
  transition: background-color .15s;
}
.header-cta:hover { background: #e95a00; }
.header a:focus-visible, .header button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.menu-toggle { display: none; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Search field (js/site-search.mjs): white input and a square orange button, suggestions underneath. */
.header-search { position: relative; display: flex; flex: 1; max-width: 660px; height: 46px; margin-inline: auto; }
.header-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 16px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: #13202a;
  font: 400 var(--fs-body)/1 var(--font-body);
}
.header-search input::placeholder { color: #6b747a; }
.header-search input::-webkit-search-cancel-button { cursor: pointer; }
.header-search input:focus { outline: 3px solid #ff9a62; outline-offset: -3px; }
.header-search button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s;
}
.header-search button:hover { background: #e95a00; }
.header-search button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.header-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: min(70vh, 520px);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 40px #0910154d;
}
.header-search-option a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 6px; color: #18232c; }
.header-search-option b { font-size: var(--fs-small); font-weight: 600; line-height: 1.35; }
.header-search-option small { font-size: var(--fs-meta); line-height: 1.35; color: #6b747a; }
.header-search-option[aria-selected="true"] a, .header-search-option a:hover { background: #fff4ec; }
.header-search-option.is-product b, .header-search-option.is-quote b { color: #c2410c; }

/* "Mon compte": icon and two lines, the second one smaller (js/navigation.mjs opens #accountDialog). */
.header-account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 12px 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s;
}
.header-account:hover { background: #ffffff14; }
.header-account svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.header-account span { display: grid; line-height: 1.2; }
.header-account b { font: 600 var(--fs-small)/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .02em; }
.header-account small { font-size: var(--fs-meta); color: #b9c3c8; }

/* Account dialog */
.account-dialog { width: min(480px, calc(100% - 24px)); }
.account-lead { margin: 0 0 14px; font-size: var(--fs-body); line-height: 1.55; color: #18232c; }
.account-note { margin: 0 0 10px; font-size: var(--fs-small); color: #5f6c74; }
.account-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.account-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e2e6e9;
  border-radius: 8px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: #18232c;
}
.account-links a::after { content: "→"; color: var(--orange); }
.account-links a:hover { border-color: var(--orange); }

/* Trust bar under the header: rating, then the commitments the page already makes. */
.trustbar { background: #f4f6f7; border-bottom: 1px solid #e2e6e9; }
.trustbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 10px 44px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.trustbar-item { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: var(--fs-small); color: #18232c; white-space: nowrap; }
.trustbar-item svg { width: 26px; height: 26px; fill: none; stroke: var(--orange); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trustbar-rating .rating-stars { display: inline-flex; gap: 2px; }
.trustbar-rating .rating-stars svg { width: 18px; height: 18px; stroke: none; fill: var(--orange); }
.trustbar-rating .rating-stars svg.is-empty { fill: #d6dbe0; }
.trustbar-rating b { font-weight: 700; }
.trustbar-rating span:last-child { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.trustbar-rating:hover span:last-child { color: var(--orange); }

@media (max-width: 1150px) {
  .header-inner { gap: 20px; padding-inline: 28px; }
  .trustbar-inner { padding-inline: 28px; justify-content: flex-start; }
}

/* Below 1025 px the category bar moves into the burger panel (css/mega-menu.css). */
@media (max-width: 1024px) {
  /* The search field takes its own line under the logo. */
  :root { --header-h: 118px; --megamenu-h: 0px; }
  .header-inner { flex-wrap: wrap; height: auto; gap: 10px 12px; padding: 10px 20px 12px; }
  .tools { margin-left: auto; }
  .header-search { order: 3; flex: 1 1 100%; max-width: none; height: 44px; }
  .header .logo { font-size: 28px; }
  .header .slash { width: 13px; height: 26px; margin-right: 8px; }
  .header .logo sup { margin-left: 6px; }
  .menu-toggle { display: grid; }
  .header-cta { display: none; }
  .header-account span { display: none; }
  .header-account { padding: 0; width: 42px; justify-content: center; }
}
@media (max-width: 600px) {
  .header-inner { padding-inline: 16px; }
  .tools { gap: 0; }
  .header-button { width: 40px; height: 40px; }
  .trustbar-inner { padding-inline: 16px; gap: 22px; }
}
