/* SPOMOTIVE public header v3
   One desktop/tablet row and two single-line mobile rails. */

.global-topbar {
  --header-control-size: 42px;
  --header-utility-font-size: 12.5px;
  --header-utility-font-weight: 720;
  position: sticky;
  top: 0;
  z-index: 90;
  width: min(calc(100% - (var(--shell-pad) * 2)), var(--inner-shell-width));
  min-height: 72px;
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto auto;
  grid-template-areas: "brand nav utility cart";
  align-items: center;
  gap: 0 18px;
  overflow: visible;
  box-sizing: border-box;
  border: 1px solid rgba(255, 210, 30, .16);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: rgba(16, 25, 34, .985);
  box-shadow: 0 10px 28px rgba(6, 10, 15, .16);
}

.global-topbar [hidden] {
  display: none !important;
}

.global-topbar .top-brand {
  grid-area: brand;
  width: 148px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center start;
}

.global-topbar .top-brand-logo {
  width: 156px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

.global-topbar .top-nav-row {
  grid-area: nav;
  min-width: 0;
  width: 100%;
  display: block;
}

.global-topbar .top-primary-nav {
  width: 100%;
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.global-topbar .top-primary-nav::-webkit-scrollbar {
  display: none;
}

.global-topbar .top-primary-nav > button {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  min-height: 44px;
  height: 44px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: rgba(235, 242, 246, .68);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.global-topbar .top-primary-nav > button:hover,
.global-topbar .top-primary-nav > button:focus-visible {
  color: #fff;
  background: transparent;
}

.global-topbar .top-primary-nav > button.active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.global-topbar .top-primary-nav > button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--spomo-yellow);
}

.global-topbar #servicesNavBtn {
  display: none !important;
}

.global-topbar .top-primary-nav .mobile-more-nav {
  display: inline-flex !important;
}

.global-topbar .level-menu-caret {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 7px;
  border-width: 0 1.5px 1.5px 0;
}

.global-topbar .header-utility {
  grid-area: utility;
  width: auto;
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  overflow: visible;
}

.global-topbar .header-auth-links {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.global-topbar .header-auth-link {
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 44px;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: rgba(235, 242, 246, .68);
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: var(--header-utility-font-size);
  font-weight: var(--header-utility-font-weight);
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.global-topbar .header-auth-link:hover,
.global-topbar .header-auth-link:focus-visible {
  color: var(--spomo-yellow);
  background: transparent;
}

.global-topbar .lang-switch.compact {
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--header-utility-font-size);
  font-weight: var(--header-utility-font-weight);
}

.global-topbar .lang-switch.compact button {
  min-width: 0;
  width: auto;
  min-height: 44px;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  color: rgba(235, 242, 246, .54);
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  font-size: var(--header-utility-font-size);
  font-weight: var(--header-utility-font-weight);
  line-height: 1;
  letter-spacing: -.01em;
}

.global-topbar .lang-switch.compact button::after {
  display: none !important;
}

.global-topbar .lang-switch.compact button.active {
  color: var(--spomo-yellow);
  background: transparent;
}

.global-topbar .lang-switch-divider {
  color: rgba(235, 242, 246, .24);
  font-family: inherit;
  font-size: var(--header-utility-font-size);
  font-weight: var(--header-utility-font-weight);
  line-height: 1;
}

.header-account-button,
.header-cart-button {
  min-width: 0;
  width: auto;
  min-height: 44px;
  height: 44px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 0;
  color: rgba(235, 242, 246, .68);
  background: transparent;
  box-shadow: none;
}

.header-account-button {
  width: auto;
  min-width: 0;
}

.global-topbar .header-account-button {
  display: none;
}

.header-account-button svg,
.header-cart-button svg {
  display: none;
}

.header-account-label,
.header-cart-label {
  font-family: inherit;
  font-size: var(--header-utility-font-size);
  font-weight: var(--header-utility-font-weight);
  line-height: 1;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.header-account-button:hover,
.header-account-button:focus-visible,
.header-account-button[aria-expanded="true"],
.header-cart-button:hover,
.header-cart-button:focus-visible,
.header-cart-button.has-items {
  color: var(--spomo-yellow);
  border-color: transparent;
  background: transparent;
}

.header-account-button:focus-visible,
.header-cart-button:focus-visible,
.global-topbar .header-auth-link:focus-visible,
.global-topbar .lang-switch.compact button:focus-visible {
  outline: 2px solid rgba(255, 210, 30, .72);
  outline-offset: 3px;
}

.global-topbar .header-cart-button {
  position: relative;
  top: auto;
  right: auto;
  grid-area: cart;
  place-self: center;
  z-index: 4;
  flex: none;
}

.global-topbar .header-cart-badge {
  position: static;
  top: auto;
  right: auto;
  min-width: 17px;
  height: 17px;
  margin-left: 1px;
  padding: 0 4px;
  border: 0;
  font-size: 9px;
}

.global-topbar .level-test-menu {
  top: calc(100% - 2px);
}

.global-topbar.level-menu-open {
  z-index: 220;
}

body:has(.global-topbar.level-menu-open) .support-widget {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.global-topbar .account-menu {
  width: 220px;
}

.global-topbar .account-menu .top-link,
.global-topbar .account-menu .top-link.top-action,
.global-topbar .account-menu .top-link.top-login {
  width: 100%;
  max-width: none;
  min-height: 46px;
  height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 7px;
  color: rgba(240, 245, 247, .84);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
}

.global-topbar .account-menu .top-link::before {
  display: none !important;
}

.global-topbar .account-menu .top-link:hover,
.global-topbar .account-menu .top-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.global-topbar .mobile-more-menu .more-home-link {
  width: 100%;
  min-height: 50px;
  padding: 10px 34px 10px 12px;
  display: grid;
  align-content: center;
  border-radius: 7px;
  color: rgba(240, 245, 247, .82);
  text-decoration: none;
}

.global-topbar .mobile-more-menu .more-home-link:hover,
.global-topbar .mobile-more-menu .more-home-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.global-topbar .mobile-more-menu .more-home-link strong {
  font-size: 13px;
}

.global-topbar .mobile-more-menu:not([hidden]) {
  display: grid;
}

@media (min-width: 901px) {
  .global-topbar .mobile-more-menu .more-mobile-only {
    display: none !important;
  }
}

@media (max-width: 1140px) and (min-width: 901px) {
  .global-topbar {
    min-height: 72px;
    grid-template-columns: 84px minmax(0, 1fr) auto auto;
    grid-template-areas: "brand nav utility cart";
    gap: 0 6px;
    padding: 0 8px;
  }

  .global-topbar .top-brand {
    width: 84px;
  }

  .global-topbar .top-brand-logo {
    width: 88px;
    height: 44px;
  }

  .global-topbar .top-primary-nav {
    display: flex;
    gap: 3px;
    overflow: visible;
  }

  .global-topbar .top-primary-nav > button,
  .global-topbar .top-primary-nav > .top-nav-dropdown {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .global-topbar .top-primary-nav .top-nav-dropdown-trigger {
    width: 100%;
    min-width: 0;
  }

  .global-topbar .top-primary-nav > button,
  .global-topbar .top-primary-nav .top-nav-dropdown-trigger {
    padding-inline: 0;
    overflow: hidden;
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .global-topbar .header-utility {
    gap: 5px;
  }

  .global-topbar .header-auth-links {
    display: inline-flex !important;
    gap: 5px;
  }

  .global-topbar .header-auth-link,
  .global-topbar .lang-switch.compact,
  .global-topbar .lang-switch.compact button,
  .global-topbar .header-cart-button {
    font-size: 11px;
  }
}

@media (max-width: 1180px) and (min-width: 1141px) {
  .global-topbar {
    grid-template-columns: 118px minmax(0, 1fr) auto auto;
    gap: 0 10px;
    padding-inline: 12px;
  }

  .global-topbar .top-brand {
    width: 118px;
  }

  .global-topbar .top-brand-logo {
    width: 124px;
  }

  .global-topbar .top-primary-nav {
    gap: 10px;
  }

  .global-topbar .top-primary-nav > button,
  .global-topbar .top-primary-nav .top-nav-dropdown-trigger {
    font-size: 12px !important;
  }

  .global-topbar .header-utility,
  .global-topbar .header-auth-links {
    gap: 6px;
  }

  .global-topbar .header-auth-link,
  .global-topbar .lang-switch.compact,
  .global-topbar .lang-switch.compact button,
  .global-topbar .header-cart-label {
    font-size: 11.5px !important;
  }
}

@media (max-width: 900px) {
  .global-topbar {
    --header-control-size: 44px;
    width: calc(100% - 16px);
    min-height: 102px;
    padding: 6px 10px 7px;
    grid-template-columns: minmax(92px, 1fr) auto auto;
    grid-template-areas:
      "brand utility cart"
      "nav nav nav";
    gap: 3px 8px;
    border-radius: 0 0 11px 11px;
  }

  .global-topbar .top-brand {
    width: 118px;
    height: 44px;
  }

  .global-topbar .top-brand-logo {
    width: 126px;
    height: 42px;
  }

  .global-topbar .header-utility {
    align-self: center;
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  .global-topbar .header-auth-links {
    display: inline-flex !important;
    justify-content: flex-end;
    gap: 6px;
  }

  .global-topbar .lang-switch.compact {
    justify-content: flex-end;
    min-width: 0;
    height: 22px;
    min-height: 22px;
    font-size: 12px;
  }

  .global-topbar .lang-switch.compact button,
  .global-topbar .header-auth-link {
    min-height: 22px;
    height: 22px;
    font-size: 12px;
  }

  .global-topbar .header-cart-label {
    font-size: 12px;
  }

  .global-topbar .header-account-button {
    display: none !important;
  }

  .global-topbar .top-nav-row {
    width: 100%;
  }

  .global-topbar .top-primary-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .global-topbar .top-primary-nav > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px;
    padding: 0 3px !important;
    overflow: hidden;
    font-size: 13px !important;
    font-weight: 720;
    text-overflow: ellipsis;
  }

  .global-topbar .top-primary-nav > button > span:not(.dot):not(.level-menu-caret) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .global-topbar .top-primary-nav > button.active::after {
    right: 10px;
    bottom: 1px;
    left: 10px;
  }

  .global-topbar .top-primary-nav .nav-mobile-secondary {
    display: none !important;
  }

  .global-topbar .top-primary-nav .mobile-more-nav {
    display: inline-flex !important;
  }

  /* Account remains a mobile bottom sheet. Credit is a shared header
     dropdown and is positioned below the sticky header by
     unified-public-shell.css. Grouping it here pins tall credit content
     above the iOS viewport. */
  .global-topbar #accountMenu {
    position: fixed;
    top: auto !important;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px !important;
    width: auto;
    max-width: calc(100vw - 24px);
    max-height: min(70dvh, 520px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .38);
  }

  .global-topbar #mobileMoreMenu {
    position: absolute !important;
    inset: calc(100% + 8px) 8px auto 8px !important;
    width: auto;
    margin: 0 !important;
    transform: none !important;
    max-height: min(calc(100dvh - 132px), 520px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .38);
  }

  .global-topbar #accountMenu .top-link,
  .global-topbar #membershipMenu button,
  .global-topbar #mobileMoreMenu button,
  .global-topbar #mobileMoreMenu .more-home-link {
    min-height: 52px;
  }
}

@media (max-width: 430px) {
  .global-topbar {
    max-width: calc(100% - 16px);
    grid-template-columns: minmax(70px, 1fr) max-content max-content;
    gap-inline: 3px;
    padding-inline: 8px;
  }

  .global-topbar .top-brand {
    width: 88px;
  }

  .global-topbar .top-brand-logo {
    width: 90px;
  }

  .global-topbar .header-utility,
  .global-topbar .lang-switch.compact {
    min-width: 0;
    gap: 4px;
  }

  .global-topbar .header-cart-button {
    min-width: max-content;
    max-width: none;
    padding-inline: 1px;
    flex: 0 0 auto;
  }

  .global-topbar .header-cart-label {
    min-width: max-content;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 520px) {
  .global-topbar {
    width: calc(100% - 16px);
    margin-inline: 8px;
  }

  .global-topbar .lang-switch.compact button {
    min-width: 0;
    width: auto;
    padding-inline: 1px;
    font-size: var(--header-utility-font-size);
  }

  html[lang="en"] .global-topbar .top-primary-nav > button {
    padding-inline: 2px !important;
    font-size: 12px !important;
    letter-spacing: -.025em;
  }

  html[lang="en"] .global-topbar .level-menu-caret {
    margin-left: 4px;
  }
}

@media (max-width: 360px) {
  .global-topbar {
    --header-utility-font-size: 11px;
    grid-template-columns: minmax(64px, 1fr) max-content max-content;
    gap-inline: 2px;
    padding-inline: 6px;
  }

  .global-topbar .top-brand-logo {
    width: 68px;
  }

  .global-topbar .top-brand {
    width: 68px;
  }

  .global-topbar .header-utility,
  .global-topbar .lang-switch.compact {
    gap: 1px;
  }

  .global-topbar .header-auth-links {
    gap: 2px;
  }

  .global-topbar .lang-switch.compact,
  .global-topbar .lang-switch.compact button,
  .global-topbar .header-auth-link,
  .global-topbar .header-cart-label {
    font-size: 11px !important;
    letter-spacing: -.035em;
  }

  .global-topbar .header-cart-label {
    min-width: max-content;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .global-topbar .top-primary-nav > button,
  html[lang="en"] .global-topbar .top-primary-nav > button {
    font-size: 11.5px !important;
  }
}
