/* NPC storefront header */
.np-header {
  --np-header-ink: #17191f;
  --np-header-muted: #6b6f7a;
  --np-header-surface: #ffffff;
  --np-header-soft: #f5f4f1;
  --np-header-line: #e5e2dc;
  position: relative;
  z-index: 40;
  color: var(--np-header-ink);
  background: var(--np-header-surface);
  border-bottom: 1px solid var(--np-header-line);
  box-shadow: 0 10px 30px rgba(28, 24, 18, .045);
}

.np-header__utility {
  background: rgba(255, 255, 255, .96);
}

.np-header__inner {
  width: min(calc(100% - 32px), var(--np-max));
  min-height: 98px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(280px, 1fr) auto;
  gap: clamp(18px, 3vw, 38px);
  align-items: center;
}

.np-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.np-brand:hover {
  text-decoration: none;
}

.np-brand__mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 17px 11px 17px 11px;
  background: var(--np-header-ink);
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: .08em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 7px 20px rgba(23,25,31,.16);
  transform: rotate(-2deg);
}

.np-brand__wordmark {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.np-brand__name {
  font-size: 20px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -.035em;
}

.np-brand__tagline {
  color: var(--np-header-muted);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
}

.np-brand__custom-logo .custom-logo-link,
.np-brand__custom-logo img {
  display: block;
}

.np-brand__custom-logo img {
  width: auto;
  max-width: 280px;
  max-height: 78px;
}

.np-brand__logo {
  display: block;
  line-height: 0;
}

.np-brand__logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 280px;
  max-height: 78px;
  object-fit: contain;
}

.np-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #d8d4cc;
  border-radius: 15px;
  background: var(--np-header-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.np-search:focus-within {
  border-color: #999287;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23,25,31,.07);
}

.np-search__icon {
  display: grid;
  place-items: center;
  width: 46px;
  color: #737780;
}

.np-search__icon svg,
.np-header-action__icon svg,
.np-header__menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.np-search__input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--np-header-ink);
  font: inherit;
  font-size: 14px;
}

.np-search__input::placeholder {
  color: #8a8d94;
}

.np-search__btn {
  align-self: stretch;
  margin: 5px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  background: var(--np-header-ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.np-search__btn:hover {
  background: #2a2d35;
}

.np-header__actions {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.np-header-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 9px;
  border-radius: 12px;
  text-decoration: none;
  transition: background .16s ease;
}

.np-header-action:hover {
  background: var(--np-header-soft);
  text-decoration: none;
}

.np-header-action__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  color: #343740;
}

.np-header-action__text {
  display: grid;
  gap: 1px;
  min-width: 58px;
}

.np-header-action__eyebrow {
  color: var(--np-header-muted);
  font-size: 10px;
  line-height: 1;
}

.np-header-action__label {
  font-size: 13px;
  line-height: 1.15;
  font-weight: 720;
  white-space: nowrap;
}

.np-cart-count {
  position: absolute;
  top: -7px;
  right: -8px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--np-header-ink);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
}

.np-header__menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--np-header-soft);
  color: var(--np-header-ink);
  cursor: pointer;
}

.np-header__menu-toggle-close {
  display: none;
}

.np-header.is-menu-open .np-header__menu-toggle-open {
  display: none;
}

.np-header.is-menu-open .np-header__menu-toggle-close {
  display: inline-flex;
}

/* Universe navigation
   1-3 universes use the roomy presentation.
   4+ universes switch to compact tabs automatically. */
.np-universe-nav {
  border-top: 1px solid var(--np-header-line);
  background: #fbfaf8;
}

.np-universe-nav__inner {
  width: min(calc(100% - 32px), var(--np-max));
  min-height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.np-universe-nav__list {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.np-universe-nav__item {
  display: flex;
  min-width: 0;
}

.np-universe-link {
  --np-link-accent: #888;
  --np-link-soft: #f3f2ef;
  --np-link-ink: #343740;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 16px;
  border-radius: 11px;
  color: var(--np-link-ink);
  text-decoration: none;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.np-universe-link:hover {
  background: var(--np-link-soft);
  color: var(--np-link-ink);
  text-decoration: none;
}

.np-universe-link::after {
  content: '';
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.np-universe-link.is-active {
  background: var(--np-link-soft);
}

.np-universe-link.is-active::after {
  background: var(--np-link-accent);
}

.np-universe-link__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--np-link-accent);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, .035);
}

.np-universe-link__content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.np-universe-link__label {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 760;
}

.np-universe-link__label--short {
  display: none;
}

.np-universe-link__description {
  overflow: hidden;
  color: #7d7972;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Four or more universes use a denser row. This keeps six current
   universes comfortable while leaving room for additional ones later. */
.np-universe-nav--compact .np-universe-nav__inner {
  min-height: 52px;
}

.np-universe-nav--compact .np-universe-nav__list {
  min-height: 52px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.np-universe-nav--compact .np-universe-nav__list::-webkit-scrollbar {
  display: none;
}

.np-universe-nav--compact .np-universe-nav__item {
  flex: 0 0 auto;
  scroll-snap-align: center;
}

.np-universe-nav--compact .np-universe-link {
  gap: 8px;
  padding: 8px 12px;
  white-space: nowrap;
}

.np-universe-nav--compact .np-universe-link::after {
  right: 12px;
  left: 12px;
}

.np-universe-nav--compact .np-universe-link__label--full,
.np-universe-nav--compact .np-universe-link__description {
  display: none;
}

.np-universe-nav--compact .np-universe-link__label--short {
  display: block;
  font-size: 13px;
}

@media (max-width: 1040px) {
  .np-header__inner {
    grid-template-columns: minmax(180px, 220px) minmax(220px, 1fr) auto;
    gap: 16px;
  }
  .np-brand__tagline,
  .np-header-action__eyebrow {
    display: none;
  }
  .np-header-action__text {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .np-header__inner {
    min-height: auto;
    padding: 12px 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "search search";
    gap: 12px;
  }
  .np-header__brand {
    grid-area: brand;
  }
  .np-header__search {
    grid-area: search;
  }
  .np-header__actions {
    grid-area: actions;
  }
  .np-brand__mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px 9px 14px 9px;
  }
  .np-brand__name {
    font-size: 17px;
  }
  .np-brand__tagline {
    display: block;
    font-size: 9px;
  }
  .np-brand__logo img {
    max-width: 225px;
    max-height: 64px;
  }
  .np-header-action__text {
    display: none;
  }
  .np-header-action {
    width: 42px;
    justify-content: center;
    padding: 0;
  }
  .np-header__menu-toggle {
    display: grid;
  }
  .np-search__btn {
    padding: 0 14px;
  }
  .np-universe-nav {
    display: none;
    border-top: 1px solid var(--np-header-line);
  }
  .np-header.is-menu-open .np-universe-nav {
    display: block;
  }
  .np-universe-nav__inner,
  .np-universe-nav--compact .np-universe-nav__inner {
    min-height: 0;
    padding: 12px 0 16px;
    display: grid;
    gap: 8px;
    justify-content: stretch;
    overflow: visible;
  }
  .np-universe-nav__list,
  .np-universe-nav--compact .np-universe-nav__list {
    min-height: 0;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .np-universe-nav__item,
  .np-universe-nav--compact .np-universe-nav__item {
    min-width: 0;
  }
  .np-universe-link,
  .np-universe-nav--compact .np-universe-link {
    width: 100%;
    min-width: 0;
    padding: 12px;
    background: var(--np-link-soft);
    white-space: normal;
  }
  .np-universe-link::after {
    display: none;
  }
  .np-universe-nav--compact .np-universe-link__label--short {
    display: none;
  }
  .np-universe-nav--compact .np-universe-link__label--full {
    display: block;
  }
  .np-universe-nav--compact .np-universe-link__description {
    display: block;
  }
  .np-universe-link__description {
    font-size: 11px;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .np-universe-nav__list,
  .np-universe-nav--compact .np-universe-nav__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .np-header__inner,
  .np-universe-nav__inner {
    width: min(calc(100% - 22px), var(--np-max));
  }
  .np-brand__wordmark {
    display: none;
  }
  .np-brand__logo img {
    max-width: 64px;
    max-height: 48px;
  }
  .np-search__input {
    font-size: 13px;
  }
  .np-search__btn {
    padding: 0 12px;
  }
}

/* Optional universe groups. Desktop keeps group names quiet and uses only the
   configured separator. Mobile uses the group names to structure the menu. */
.np-universe-nav__group-label {
  display: none;
}

.np-universe-nav__separator {
  align-self: center;
  flex: 0 0 auto;
  height: 24px;
}

.np-universe-nav__separator--none {
  display: none;
}

.np-universe-nav__separator--space {
  width: 14px;
}

.np-universe-nav__separator--line {
  width: 1px;
  margin: 0 9px;
  background: #ddd9d2;
}

/* If an administrator deliberately chooses the roomy presentation with many
   universes, preserve it and allow horizontal overflow instead of forcing a
   compact layout. */
.np-universe-nav--expanded .np-universe-nav__list {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.np-universe-nav--expanded .np-universe-nav__list::-webkit-scrollbar {
  display: none;
}

@media (max-width: 720px) {
  .np-universe-nav__separator {
    display: none;
  }

  .np-universe-nav__group-label {
    display: block;
    grid-column: 1 / -1;
    margin: 9px 4px 0;
    padding: 8px 6px 3px;
    color: #817d75;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1;
    text-transform: uppercase;
  }

  .np-universe-nav__group-label:first-child {
    margin-top: 0;
  }
}

/* Homepage dark shell: the header and universe bar become part of the NPC intro,
   while search stays deliberately light and obvious as a primary control. */
body.home .np-header {
  --np-header-ink: #f7f2e7;
  --np-header-muted: rgba(245, 236, 216, .58);
  --np-header-surface: #0d0e10;
  --np-header-soft: rgba(255, 255, 255, .07);
  --np-header-line: rgba(211, 164, 56, .22);
  color: var(--np-header-ink);
  background:
    radial-gradient(circle at 14% -30%, rgba(211, 164, 56, .13), transparent 34%),
    linear-gradient(180deg, #11110f 0%, #0b0c0e 100%);
  border-bottom-color: rgba(211, 164, 56, .28);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
}

body.home .np-header__utility {
  background: transparent;
}

body.home .np-brand__name {
  color: #fffaf0;
}

body.home .np-brand__tagline,
body.home .np-header-action__eyebrow {
  color: rgba(245, 236, 216, .55);
}

body.home .np-header-action {
  color: #f8f4ea;
}

body.home .np-header-action:hover {
  background: rgba(213, 167, 56, .09);
}

body.home .np-header-action__icon {
  color: #ead8ab;
}

body.home .np-cart-count {
  border-color: #0d0e10;
  background: #c99b30;
  color: #15130d;
}

body.home .np-header__menu-toggle {
  border: 1px solid rgba(211, 164, 56, .26);
  background: rgba(255, 255, 255, .055);
  color: #f2d88f;
}

/* Keep the search field unmistakably a search field on the dark shell. */
body.home .np-search {
  border-color: rgba(228, 216, 191, .7);
  background: #f6f4ef;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 6px 18px rgba(0, 0, 0, .14);
}

body.home .np-search:focus-within {
  border-color: #d5a738;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(213, 167, 56, .18),
    0 8px 22px rgba(0, 0, 0, .16);
}

body.home .np-search__icon {
  color: #77746c;
}

body.home .np-search__input {
  color: #17191f;
}

body.home .np-search__input::placeholder {
  color: #85827b;
}

body.home .np-search__btn {
  background: #1a1915;
  color: #f5d77f;
  box-shadow: inset 0 0 0 1px rgba(213, 167, 56, .22);
}

body.home .np-search__btn:hover {
  background: #29251a;
  color: #ffe6a4;
}

body.home .np-universe-nav {
  border-top-color: rgba(211, 164, 56, .2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent),
    #0a0b0d;
}

body.home .np-universe-link {
  color: rgba(248, 244, 234, .8);
}

body.home .np-universe-link:hover,
body.home .np-universe-link.is-active {
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--np-link-accent) 12%, transparent), transparent 66%),
    rgba(255, 255, 255, .045);
  color: #fffaf0;
}

body.home .np-universe-link__dot {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .025),
    0 0 12px color-mix(in srgb, var(--np-link-accent) 24%, transparent);
}

body.home .np-universe-link__description {
  color: rgba(239, 233, 219, .48);
}

body.home .np-universe-nav__separator--line {
  background: rgba(211, 164, 56, .22);
}

@media (max-width: 820px) {
  body.home .np-header.is-menu-open .np-universe-nav {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .015);
  }

  body.home .np-universe-link,
  body.home .np-universe-nav--compact .np-universe-link {
    border: 1px solid color-mix(in srgb, var(--np-link-accent) 24%, #302f2b);
    background:
      linear-gradient(120deg, color-mix(in srgb, var(--np-link-accent) 8%, transparent), transparent 70%),
      rgba(255, 255, 255, .04);
    color: #f7f3e9;
  }

  body.home .np-universe-link__description {
    color: rgba(239, 233, 219, .52);
  }
}

@media (max-width: 720px) {
  body.home .np-universe-nav__group-label {
    color: rgba(229, 208, 158, .58);
  }
}
