@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
  body > header.nocta-store-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 110;
  }
  .nocta-links-intro { position: static; }
}

@media (min-width: 761px) {
  body > header.nocta-store-header {
    --nocta-header-side: clamp(18px, calc((100vw - 1304px) / 2), 6vw);
    position: sticky !important;
    top: 0 !important;
    z-index: 110;
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
    min-height: 68px;
    padding: 10px var(--nocta-header-side) !important;
  }
  body > header.nocta-store-header > a:first-child { order: 0; flex: 0 0 auto; }
  body > header.nocta-store-header > a:first-child .logo { display: block; width: clamp(88px, 8.4vw, 120px); height: auto; }
  body > header.nocta-store-header > #nocta-home-nav {
    display: flex;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
    order: 1 !important;
    align-items: center;
    justify-content: center !important;
    gap: clamp(4px, .8vw, 13px);
    flex-wrap: nowrap;
  }
  body > header.nocta-store-header .nav-trigger {
    padding: 8px clamp(3px, .55vw, 8px);
    font-size: clamp(11px, .95vw, 14px);
    white-space: nowrap;
  }
  body > header.nocta-store-header > .nocta-header-spacer { display: none; }
  body > header.nocta-store-header > .brand-socials { order: 2; flex: 0 0 auto; margin: 0; }
  body > header.nocta-store-header > .nocta-mobile-tools {
    display: flex;
    flex: 0 0 auto;
    order: 3;
  }
  body > header.nocta-store-header #nocta-mobile-bag { display: none; }
  body > header.nocta-store-header #nocta-search-toggle {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    padding: 7px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  body > header.nocta-store-header #nocta-search-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  body > header.nocta-store-header > :is([data-account-cart], #bag) { order: 4; flex: 0 0 auto; margin: 0; }
  body > header.nocta-store-header > #nocta-night-toggle { order: 5; flex: 0 0 auto; margin: 0; }
  body > header.nocta-store-header > #nocta-mobile-search:not([hidden]) {
    position: absolute;
    z-index: 2;
    top: 100%;
    right: var(--nocta-header-side);
    display: grid;
    gap: 8px;
    width: min(360px, 92vw);
    padding: 12px;
    border: 1px solid #e8dfe8;
    border-radius: 0 0 10px 10px;
    background: var(--header-bg, #fff);
    color: #17151d;
    box-shadow: 0 12px 28px #17151d15;
  }
  body > header.nocta-store-header > #nocta-mobile-search input {
    width: 100%;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid #d8d0d4;
    border-radius: 7px;
  }
  body > header.nocta-store-header .nocta-search-results a { display: block; padding: 6px; }
}

@media (min-width: 761px) and (max-width: 1120px) {
  body > header.nocta-store-header > .brand-socials { display: none; }
  body > header.nocta-store-header > #nocta-night-toggle > span { display: none; }
  body > header.nocta-store-header [data-customer-account] { font-size: 11px; }
}

@media (min-width: 761px) {
  body > header.nocta-store-header #nocta-home-nav > .nav-group { flex: 0 0 auto; min-width: 0; }
  body > header.nocta-store-header #nocta-home-nav .nav-trigger {
    display: flex;
    align-items: center;
    width: auto !important;
    padding: 8px clamp(3px, .55vw, 8px) !important;
    font-size: clamp(11px, .95vw, 14px) !important;
  }
}
@media (min-width: 761px) and (max-width: 950px) {
  body > header.nocta-store-header #bag { display: none; }
  body > header.nocta-store-header #nocta-home-nav { gap: 4px; }
  body > header.nocta-store-header #nocta-mobile-bag {
    position: relative;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    padding: 7px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  body > header.nocta-store-header #nocta-mobile-bag svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  body > header.nocta-store-header #nocta-mobile-bag [data-bag-count] { position: absolute; top: 0; right: 0; min-width: 14px; border-radius: 9px; background: #eab099; font-size: 9px; }
}
@media (min-width: 761px) and (max-width: 950px) {
  body > header.nocta-store-header #nocta-home-nav .nav-trigger[data-compact-label] { font-size: 0 !important; gap: 4px; }
  body > header.nocta-store-header #nocta-home-nav .nav-trigger[data-compact-label]::after {
    order: -1;
    content: attr(data-compact-label);
    font-size: 11px;
  }
  body > header.nocta-store-header #nocta-home-nav .nav-trigger[data-compact-label] span { font-size: 11px; }
}

body > header.nocta-unified-secondary {
  width: 100%;
  max-width: none;
  margin: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #17151d;
  box-sizing: border-box;
  text-align: left;
}
.nocta-unified-secondary > a:first-child img { display: block; width: 108px; height: auto; }
.nocta-unified-secondary [hidden] { display: none !important; }
@media (min-width: 761px) { .nocta-unified-secondary > .nocta-mobile-menu { display: none; } }
.nocta-unified-secondary .nav-trigger {
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 14px/1.25 Montserrat, Arial, sans-serif;
  cursor: pointer;
}
.nocta-unified-secondary .brand-socials { display: flex; align-items: center; gap: 6px; }
.nocta-unified-secondary .brand-socials svg { width: 17px; height: 17px; }
.nocta-unified-secondary .mega-menu:not([hidden]) {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, 94vw);
  max-height: 70dvh;
  overflow: auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 12px 26px #17151d20;
}
.nocta-unified-secondary :is(.mega-items, .mega-aside, .text-menu) { display: grid; gap: 8px; }
.nocta-unified-secondary .mega-item:not([hidden]) {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.nocta-unified-secondary .mega-item .shop-photo { width: 46px; aspect-ratio: 1; border-radius: 50%; }
.nocta-unified-secondary .mega-item small { display: block; }
.nocta-unified-secondary :is(.mega-menu, .nocta-search-results) a { color: inherit; text-decoration: none; padding: 5px; }
.nocta-unified-secondary #bag { border: 0; background: transparent; color: inherit; cursor: pointer; white-space: nowrap; }

@media (max-width: 760px) {
  body > header.nocta-unified-secondary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 88px;
    align-items: center;
    justify-content: stretch;
    gap: 0;
    min-height: 61px;
    padding: 8px 10px;
  }
  .nocta-unified-secondary > a:first-child { grid-column: 2; grid-row: 1; justify-self: center; }
  .nocta-unified-secondary > .nocta-mobile-menu { grid-column: 1; grid-row: 1; }
  .nocta-unified-secondary > .nocta-mobile-tools { display: flex; grid-column: 3; grid-row: 1; }
  .nocta-unified-secondary :is(.nocta-mobile-menu, .nocta-mobile-tools button) {
    display: grid;
    place-items: center;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
  }
  .nocta-unified-secondary .nocta-mobile-menu svg:nth-child(2),
  .nocta-unified-secondary.nocta-menu-open .nocta-mobile-menu svg:first-child { display: none; }
  .nocta-unified-secondary.nocta-menu-open .nocta-mobile-menu svg:nth-child(2) { display: block; }
  .nocta-unified-secondary :is(.nocta-mobile-menu, .nocta-mobile-tools) svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .nocta-unified-secondary [data-bag-count] { position: absolute; top: 2px; right: 2px; min-width: 17px; border-radius: 10px; background: #eab099; font-size: 10px; }
  .nocta-unified-secondary > :is(#bag, .brand-socials),
  .nocta-unified-secondary [data-account-cart] #bag,
  .nocta-unified-secondary:not(.nocta-menu-open) > :is(#nocta-home-nav, [data-account-cart]) { display: none !important; }
  .nocta-unified-secondary.nocta-menu-open > #nocta-home-nav,
  .nocta-unified-secondary.nocta-menu-open > [data-account-cart],
  .nocta-unified-secondary #nocta-mobile-search:not([hidden]) {
    display: grid;
    grid-column: 1 / -1;
    gap: 5px;
    max-height: 67dvh;
    overflow: auto;
    padding-block: 6px;
  }
  .nocta-unified-secondary .nav-trigger { min-height: 38px; width: 100%; text-align: left; }
  .nocta-unified-secondary .mega-menu:not([hidden]) {
    position: static;
    width: 100%;
    transform: none;
    grid-template-columns: 1fr;
    padding: 7px;
    box-shadow: none;
  }
  .nocta-unified-secondary #nocta-mobile-search input { width: 100%; min-height: 44px; padding: 7px 10px; border: 1px solid #d8d0d4; border-radius: 8px; }
}

/* Keep primary actions legible independently of the theme and page. */
body > header.nocta-store-header .mega-menu .mega-aside > a.button {
  background-color: #17151d !important;
  color: #fff !important;
}
body > header.nocta-store-header .mega-menu .mega-aside > a.button:is(:hover, :focus-visible) {
  background-color: #302633 !important;
  color: #fff !important;
}
