/* Shared AllphaParts header. This file is the single source of truth for desktop and mobile header layout. */
.mobile-topbar,
.mobile-search-drawer,
.mobile-bottom-nav { display: none; }
.header-phone {
  display: grid;
  gap: 1px;
  min-width: max-content;
  padding: 7px 11px;
  color: #fff;
  background: rgba(227, 29, 36, .13);
  border: 1px solid rgba(255, 75, 81, .55);
  border-radius: 0;
  font-family: "Manrope", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}
.header-phone:hover,
.header-phone:focus-visible,
.header-phone.is-copied { background: #e31d24; border-color: #ff7378; transform: translateY(-1px); }
.header-phone span { font-size: .94rem; font-weight: 850; line-height: 1.15; letter-spacing: .025em; }
.header-phone small,
.header-phone em { color: #c9c9ce; font-size: .61rem; font-style: normal; font-weight: 700; line-height: 1.1; }
.header-phone:hover :is(small, em),
.header-phone:focus-visible :is(small, em),
.header-phone.is-copied :is(small, em) { color: #fff; }
.header-phone-mobile { display: none; }
.header-contact-strip {
  display: flex;
  justify-content: center;
  min-height: 58px;
  background: #0d0d0f;
  border-top: 1px solid #29292d;
}
.header-phone-desktop {
  grid-template-columns: 1fr;
  align-content: center;
  align-items: baseline;
  gap: 2px;
  min-height: 57px;
  padding: 7px 24px;
  background: transparent;
  border: 0;
  text-align: center;
}
.header-phone-desktop small { color: #dddde1; font-size: .78rem; }
.header-phone-desktop span { color: #fff; font-size: 1.22rem; }
.header-phone-desktop em { color: #8d8d94; text-align: center; }
.header-phone-desktop:hover,
.header-phone-desktop:focus-visible,
.header-phone-desktop.is-copied { background: transparent; color: #fff; border-color: transparent; transform: none; }
.header-phone-desktop:hover span,
.header-phone-desktop:focus-visible span { color: #ff4b51; }
html[data-theme="light"] .header-contact-strip {
  background: #f4f5f7;
  border-color: #d9dce2;
}
html[data-theme="light"] .header-phone,
html[data-theme="light"] .header-phone span { color: #17181b; }
html[data-theme="light"] .header-phone small { color: #4e525b; }
html[data-theme="light"] .header-phone em { color: #717680; }
html[data-theme="light"] .header-phone:hover,
html[data-theme="light"] .header-phone:focus-visible,
html[data-theme="light"] .header-phone.is-copied { color: #17181b; }
html[data-theme="light"] .header-phone:hover :is(small, em),
html[data-theme="light"] .header-phone:focus-visible :is(small, em),
html[data-theme="light"] .header-phone.is-copied :is(small, em) { color: #4e525b; }
html[data-theme="light"] .header-phone:hover span,
html[data-theme="light"] .header-phone:focus-visible span { color: #c9141b; }
.scroll-to-top {
  position: fixed;
  right: clamp(18px, 2.5vw, 36px);
  bottom: clamp(18px, 2.5vw, 36px);
  z-index: 119;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: rgba(24, 24, 27, .94);
  border: 1px solid #45454a;
  border-radius: 50%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .48);
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease, background-color .18s ease;
}
.scroll-to-top[hidden] { display: none; }
.scroll-to-top:hover { background: #e31d24; border-color: #e31d24; transform: translateY(-3px); }
.scroll-to-top svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #151516;
  border-bottom: 1px solid #29292b;
}

.site-header .figma-mainbar { background: #151516; }
.site-header .figma-mainbar-inner {
  display: grid;
  grid-template-columns: minmax(175px, 235px) minmax(145px, 190px) minmax(280px, 620px) minmax(180px, 1fr) !important;
  align-items: center;
  gap: 20px !important;
  min-height: 102px !important;
  width: min(1480px, calc(100% - 2rem)) !important;
  margin-inline: auto;
}
.site-header .storefront-catalog-menu { position: relative; display: flex; align-items: center; min-width: 0; height: 100%; }
.site-header .storefront-catalog-trigger { width: 100%; min-width: 0; }
.site-header .storefront-catalog-panel {
  position: absolute;
  z-index: 130;
  top: calc(100% - 12px);
  left: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  width: min(1120px, calc(100vw - 2rem));
  min-height: 520px;
  max-height: min(720px, calc(100vh - 150px));
  overflow: hidden;
  color: #f6f6f7;
  background: #111113;
  border: 1px solid #333337;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .67);
}
.site-header .storefront-catalog-panel[hidden] { display: none !important; }
.site-header .storefront-catalog-roots { overflow-y: auto; padding: 12px 0; background: #18181b; border-right: 1px solid #343438; }
.site-header .storefront-catalog-roots a { display: flex; justify-content: space-between; gap: 1rem; padding: .78rem 1.1rem; color: #d3d3d6; text-decoration: none; font-size: .88rem; font-weight: 700; }
.site-header .storefront-catalog-roots a::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-top: 2px solid #f5222d; border-right: 2px solid #f5222d; transform: rotate(45deg); }
.site-header .storefront-catalog-roots a:hover,
.site-header .storefront-catalog-roots a:focus-visible { color: #fff; background: #242428; }
.site-header .storefront-catalog-children { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); align-content: start; gap: 28px 36px; overflow-y: auto; padding: 28px 32px; }
.site-header .storefront-catalog-children > p { grid-column: 1 / -1; color: #929298; }
.site-header .storefront-catalog-children section { display: grid; align-content: start; gap: .65rem; }
.site-header .storefront-catalog-children section > a:first-child { margin-bottom: .15rem; color: #fff; font: 750 .95rem/1.3 "Manrope", sans-serif; }
.site-header .storefront-catalog-children a { color: #b7b7bc; text-decoration: none; font-size: .84rem; line-height: 1.35; }
.site-header .storefront-catalog-children a:hover,
.site-header .storefront-catalog-children a:focus-visible { color: #f5222d; }
.site-header .storefront-catalog-loading { color: #77777d; font-size: .76rem; }
.storefront-catalog-mobile-header,
.storefront-catalog-backdrop { display: none; }
.site-header .figma-brand { display: block; width: min(190px, 100%) !important; }
.site-header .figma-brand img { display: block; width: 100%; height: 78px; object-fit: contain; object-position: left center; }
.site-header .figma-search { width: 100% !important; max-width: 620px !important; min-width: 0; justify-self: center; }
.site-header .figma-search input,
.site-header .figma-search input:focus {
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.site-header .figma-search:focus-within { border-color: #e31d24; }
.site-header .figma-account { display: flex; align-items: center; justify-content: flex-end; justify-self: end; gap: clamp(.7rem, 1.2vw, 1.35rem) !important; min-width: 0 !important; white-space: nowrap; }
.site-header .figma-account > a,
.site-header .figma-account-dropdown > summary { color: #fff !important; font-size: .88rem !important; }
.site-header .figma-account > a,
.site-header .figma-account-dropdown > summary {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}
.site-header .figma-account > a:focus:not(:focus-visible),
.site-header .figma-account-dropdown > summary:focus:not(:focus-visible) { outline: 0; }
.site-header .header-garage[aria-current="page"] { color: #ff4b51 !important; }
.site-header .header-cart-link { position: relative; }
.site-header .header-cart-count { position: absolute; top: -8px; right: -10px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; color: #fff; background: #e31d24; border: 2px solid #111113; border-radius: 999px; font: 800 11px/1 "Manrope", sans-serif; }
.site-header .header-cart-count[hidden] { display: none; }

@media (max-width: 1100px) {
  .site-header .figma-mainbar-inner {
    grid-template-columns: minmax(165px, 190px) minmax(130px, 150px) minmax(220px, 1fr) auto !important;
    gap: 12px !important;
  }
  .site-header .figma-brand { width: 145px !important; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .site-header { position: sticky; top: 0; min-height: 68px; background: linear-gradient(180deg, rgba(9,9,11,.94), rgba(9,9,11,.58) 72%, transparent); border-bottom: 0; backdrop-filter: blur(10px); }
  .site-header .figma-mainbar,
  .site-header > nav.container.nav { display: none !important; }
  .header-contact-strip { display: none; }
  .mobile-topbar { display: grid; grid-template-columns: 118px minmax(0, 1fr) 44px; align-items: center; gap: 8px; width: min(100% - 28px, 720px); min-height: 68px; margin-inline: auto; }
  .mobile-topbar-logo { display: block; width: 118px; }
  .mobile-topbar-logo img { display: block; width: 100%; height: 46px; object-fit: contain; object-position: left center; }
  .header-phone-mobile {
    display: grid;
    justify-self: center;
    gap: 0;
    padding: 2px 4px;
    color: #fff;
    background: transparent;
    border: 0;
    text-align: center;
    transform: none;
  }
  .header-phone-mobile:hover,
  .header-phone-mobile:focus-visible,
  .header-phone-mobile.is-copied { background: transparent; border: 0; transform: none; }
  .header-phone-mobile span { font-size: clamp(.88rem, 3.8vw, 1.02rem); }
  .header-phone-mobile small { color: #d2d2d6; font-size: clamp(.5rem, 2.1vw, .62rem); white-space: nowrap; }
  .header-phone-mobile em { color: #9999a0; font-size: .51rem; white-space: nowrap; }
  .mobile-topbar > :last-child { justify-self: end; }
  .mobile-account-button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: rgba(31,31,34,.88); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
  .mobile-account-button img { width: 21px; height: 21px; }
  .mobile-account-button > span { position: absolute; top: 3px; right: 2px; width: 8px; height: 8px; background: #ed1c24; border: 2px solid #1f1f22; border-radius: 50%; }
  .mobile-account-dropdown { position: relative; }
  .mobile-account-dropdown > summary { list-style: none; cursor: pointer; }
  .mobile-account-dropdown > summary::-webkit-details-marker { display: none; }
  .mobile-search-drawer { position: absolute; top: 62px; right: 12px; left: 12px; z-index: 135; }
  .mobile-search-drawer[hidden] { display: none; }
  .mobile-search-drawer:not([hidden]) { display: block; }
  .mobile-search-drawer form { display: grid; grid-template-columns: 22px minmax(0, 1fr) 38px; align-items: center; gap: 8px; min-height: 54px; padding: 6px 8px 6px 14px; background: #18181b; border: 1px solid #3f3f46; border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.64); }
  .mobile-search-drawer form > img { width: 20px; height: 20px; opacity: .75; }
  .mobile-search-drawer input { width: 100%; min-width: 0; height: 42px; color: #fff; background: transparent; border: 0; outline: 0; }
  .mobile-search-drawer input::placeholder { color: #a1a1aa; opacity: 1; }
  .mobile-search-drawer button { display: grid; place-items: center; width: 38px; height: 38px; color: #d4d4d8; background: #27272a; border: 0; border-radius: 50%; cursor: pointer; }
  .mobile-bottom-nav { position: fixed; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); left: 10px; z-index: 125; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; min-height: 72px; padding: 7px 6px; background: rgba(17,17,19,.94); border: 1px solid #303034; border-radius: 22px; box-shadow: 0 18px 46px rgba(0,0,0,.72); backdrop-filter: blur(18px); }
  .mobile-bottom-nav > a,
  .mobile-bottom-nav > button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 58px; padding: 5px 1px; color: #929298; background: transparent; border: 0; border-radius: 18px; font: 650 10px/1.15 "Manrope", sans-serif; text-decoration: none; cursor: pointer; }
  .mobile-bottom-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-nav > a[aria-current="page"],
  .mobile-bottom-nav > button[aria-expanded="true"] { color: #fff; }
  .mobile-bottom-nav .mobile-nav-home { align-self: center; min-height: 68px; margin-top: -24px; color: #fff; background: linear-gradient(180deg, #27272a, #18181b); border: 1px solid #e32a31; border-radius: 22px; box-shadow: 0 0 0 3px rgba(227,29,36,.12), 0 0 24px rgba(227,29,36,.5); }
  .mobile-bottom-nav .mobile-nav-home[aria-current="page"] { background: linear-gradient(180deg, #343438, #1d1d20); box-shadow: 0 0 0 3px rgba(227,29,36,.16), 0 0 30px rgba(227,29,36,.7); }
  .mobile-bottom-nav .mobile-nav-home svg { width: 26px; height: 26px; stroke-width: 1.9; }
  .mobile-nav-cart strong { position: absolute; top: 1px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 4px; color: #fff; background: #e31d24; border: 2px solid #111113; border-radius: 999px; font-size: 10px; line-height: 1; }
  .mobile-nav-cart strong[hidden] { display: none; }
  .scroll-to-top { right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); width: 44px; height: 44px; z-index: 124; }
  .site-header .figma-mainbar-inner {
    grid-template-columns: minmax(0, clamp(130px, 34vw, 210px)) minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 10px 8px !important;
    min-height: 0 !important;
    padding-block: 10px 12px;
  }
  .site-header .figma-brand { grid-column: 1 !important; grid-row: 1 !important; width: 112px !important; }
  .site-header .figma-brand img { height: 40px !important; }
  .site-header .figma-account {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    gap: 10px !important;
  }
  .site-header .figma-account > a,
  .site-header .figma-account-dropdown > summary { min-height: 36px !important; padding: 0 !important; font-size: .75rem !important; }
  .site-header .figma-account img { width: 20px !important; height: 20px !important; }
  .site-header .header-garage span { display: none; }
  .site-header .storefront-catalog-menu {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }
  .site-header .figma-search {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch;
    margin: 0 !important;
  }
  .site-header .figma-search { min-height: 52px !important; grid-template-columns: minmax(0, 1fr) auto !important; }
  .site-header .figma-search button { height: 52px !important; }
  .site-header .storefront-catalog-trigger { min-height: 52px !important; }
  .site-header .storefront-catalog-panel {
    position: fixed !important;
    z-index: 131;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(180px, 42vh) minmax(0, 1fr);
    background: #0b0b0d;
    border: 0;
    box-shadow: none;
  }
  .site-header .storefront-catalog-mobile-header { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 18px; color: #fff; border-bottom: 1px solid #343438; font-family: "Unbounded", "Segoe UI", sans-serif; font-size: .88rem; font-weight: 750; }
  .site-header .storefront-catalog-mobile-header > a { color: inherit; text-decoration: none; }
  .site-header .storefront-catalog-mobile-close { padding: .65rem; color: #fff; background: transparent; border: 0; font-size: 1.15rem; cursor: pointer; }
  .site-header .storefront-catalog-roots { max-height: none; border-right: 0; border-bottom: 1px solid #343438; }
  .site-header .storefront-catalog-roots a.is-mobile-active { color: #fff; background: #242428; box-shadow: inset 3px 0 #e31d24; }
  .site-header .storefront-catalog-children { grid-template-columns: 1fr; gap: 22px; padding: 20px 18px 32px; }
  .storefront-catalog-backdrop { position: fixed; z-index: 130; inset: 0; display: block; background: rgba(0,0,0,.74); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
  .storefront-catalog-backdrop.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }
  body.catalog-drawer-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .mobile-topbar { grid-template-columns: 92px minmax(0, 1fr) 40px; width: calc(100% - 18px); gap: 5px; }
  .mobile-topbar-logo { width: 92px; }
  .header-phone-mobile { padding-inline: 6px; }
  .site-header .figma-mainbar-inner { grid-template-columns: minmax(118px, 36vw) minmax(0, 1fr) !important; }
  .site-header .figma-account { gap: 6px !important; }
  .site-header .storefront-theme-icon { width: 34px !important; height: 34px !important; }
}

/* Light header account control: one clear treatment on desktop and mobile. */
html[data-theme="light"] .site-header .figma-account img[src$="icon-user.svg"] {
  width: 40px !important;
  height: 40px !important;
  padding: 7px;
  background: #f5f6f7;
  border: 1px solid #aeb2ba;
  border-radius: 999px;
  filter: brightness(0);
  box-shadow: 0 2px 8px rgba(23,24,27,.1);
}
html[data-theme="light"] .site-header .figma-account :is(a, summary):hover img[src$="icon-user.svg"],
html[data-theme="light"] .site-header .figma-account :is(a, summary):focus-visible img[src$="icon-user.svg"] {
  background: #fff;
  border-color: #686d76;
}

@media (max-width: 760px) {
  html[data-theme="light"] .site-header {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid #d7d9de;
  }
  html[data-theme="light"] .site-header .mobile-account-button {
    color: #17181b;
    background: #f5f6f7;
    border-color: #aeb2ba;
    box-shadow: 0 3px 12px rgba(23,24,27,.12);
  }
  html[data-theme="light"] .site-header .mobile-account-button:hover,
  html[data-theme="light"] .site-header .mobile-account-button:focus-visible {
    background: #fff;
    border-color: #686d76;
  }
  html[data-theme="light"] .site-header .mobile-account-button img[src$="icon-user.svg"] {
    width: 21px !important;
    height: 21px !important;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: brightness(0);
  }
  html[data-theme="light"] .site-header .mobile-account-button > span { border-color: #f5f6f7; }
}
