.nd-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--nd-bg);
  border-bottom: 1px solid var(--nd-border);
}

.admin-bar .nd-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .nd-header {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  .admin-bar .nd-header {
    top: 0;
  }
}

.nd-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nd-brand img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 200px;
}

.nd-brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--nd-accent);
  flex-shrink: 0;
}

.nd-brand-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nd-text);
  white-space: nowrap;
}

.nd-nav { flex: 1; }

.nd-nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nd-nav-list a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1px;
  color: var(--nd-muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.nd-nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--nd-accent);
  transition: width 200ms ease;
}

.nd-nav-list a:hover { color: var(--nd-text); }
.nd-nav-list a:hover::after { width: 100%; }

.nd-nav-list .current-menu-item > a { color: var(--nd-text); }
.nd-nav-list .current-menu-item > a::after { width: 100%; }

.nd-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nd-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nd-search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--nd-muted);
  pointer-events: none;
  z-index: 2;
}

.nd-search-input {
  width: 180px;
  height: 38px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  line-height: 38px;
  color: var(--nd-text);
  background: var(--nd-bg-raised);
  border: 1px solid var(--nd-border);
  border-radius: 6px;
  outline: none;
  transition: width 220ms ease, border-color 160ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.nd-search-input::placeholder {
  color: var(--nd-muted);
}

.nd-search.is-expanded .nd-search-input,
.nd-search-input:focus {
  width: 420px;
  border-color: var(--nd-accent);
}

.nd-search-input::-webkit-search-cancel-button {
  display: none;
}

/* Header Search Suggestion Panel */
.nd-hsearch-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 420px;
  margin-top: 8px;
  background: var(--nd-bg-raised);
  border: 1px solid var(--nd-border);
  border-radius: 10px;
  z-index: 950;
  max-height: 440px;
  overflow-y: auto;
  box-shadow: 0 14px 36px var(--nd-shadow);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nd-hsearch-panel::-webkit-scrollbar {
  display: none;
}

.nd-search.is-open .nd-hsearch-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nd-hsearch-section-title {
  margin: 0;
  padding: 14px 16px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--nd-muted);
}

.nd-hsearch-list {
  display: flex;
  flex-direction: column;
}

.nd-hsearch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.nd-hsearch-item:hover,
.nd-hsearch-item.is-focused {
  background: var(--nd-bg);
}

.nd-hsearch-item-title {
  font-size: 14px;
  color: var(--nd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: color 140ms ease;
}

.nd-hsearch-item:hover .nd-hsearch-item-title,
.nd-hsearch-item.is-focused .nd-hsearch-item-title {
  color: var(--nd-accent);
}

.nd-hsearch-highlight {
  font-weight: 500;
  color: var(--nd-accent);
  background: transparent;
}

.nd-hsearch-item-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--nd-accent);
  font-weight: 500;
  flex-shrink: 0;
}

.nd-hsearch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 16px 14px;
}

.nd-hsearch-chip {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nd-border);
  border-radius: 999px;
  color: var(--nd-muted);
  background: var(--nd-bg);
  text-decoration: none;
  transition: color 140ms ease, border-color 140ms ease;
}

.nd-hsearch-chip:hover,
.nd-hsearch-chip.is-focused {
  color: var(--nd-accent);
  border-color: var(--nd-accent);
}

.nd-hsearch-foot {
  border-top: 1px solid var(--nd-border);
  padding: 11px 16px;
  font-size: 12px;
  color: var(--nd-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nd-hsearch-foot kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-family: inherit;
  color: var(--nd-muted);
  background: var(--nd-bg);
  border: 1px solid var(--nd-border);
  border-radius: 4px;
}

.nd-hsearch-skeleton {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nd-hsearch-skel-line {
  height: 14px;
  background: var(--nd-placeholder);
  border-radius: 4px;
  animation: ndHsearchPulse 1.2s ease-in-out infinite alternate;
}

@keyframes ndHsearchPulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

.nd-hsearch-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--nd-muted);
  font-size: 14px;
}

.nd-hsearch-all-wrap {
  border-top: 1px solid var(--nd-border);
}

.nd-hsearch-all {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--nd-accent);
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease;
}

.nd-hsearch-all:hover,
.nd-hsearch-all.is-focused {
  background: var(--nd-bg);
}

.nd-signin {
  font-size: 14px;
  color: var(--nd-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.nd-signin:hover { color: var(--nd-text); }

.nd-header .nd-cta {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--nd-accent-ink);
  background: var(--nd-accent);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 160ms ease;
}

.nd-header .nd-cta:hover { opacity: 0.86; }

.nd-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--nd-border);
  border-radius: 6px;
  cursor: pointer;
}

.nd-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--nd-text);
  transition: transform 200ms ease, opacity 160ms ease;
}

.nd-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nd-burger.is-open span:nth-child(2) { opacity: 0; }
.nd-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nd-drawer {
  display: none;
  padding: 8px 24px 28px;
  background: var(--nd-bg);
  border-top: 1px solid var(--nd-border);
}

.nd-drawer[hidden] { display: none; }

.nd-drawer-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.nd-drawer-list li { border-bottom: 1px solid var(--nd-border); }

.nd-drawer-list a {
  display: block;
  padding: 15px 0;
  font-size: 16px;
  color: var(--nd-text);
  text-decoration: none;
}

.nd-drawer-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nd-drawer-actions .nd-cta { flex: 1; justify-content: center; height: 44px; }

@media (max-width: 1080px) {
  .nd-nav-list { gap: 20px; }
  .nd-search.is-expanded .nd-search-input,
  .nd-search-input:focus {
    width: 340px;
  }
}

@media (max-width: 980px) {
  .nd-header-inner { height: 64px; padding: 0 24px; gap: 16px; }
  .nd-nav { display: none; }
  .nd-signin { display: none; }
  .nd-actions .nd-cta { display: none; }
  .nd-search { flex: 1; }
  .nd-search-input,
  .nd-search.is-expanded .nd-search-input,
  .nd-search-input:focus {
    width: 100%;
  }
  .nd-hsearch-panel {
    min-width: 0;
    width: 100%;
  }
  .nd-burger { display: flex; }
  .nd-drawer:not([hidden]) { display: block; }
  .nd-drawer-actions .nd-signin { display: inline-block; }
  .nd-drawer-actions .nd-cta { display: inline-flex; }
}

@media (max-width: 640px) {
  .nd-brand img { height: 26px; }
}

@media (max-width: 520px) {
  .nd-header-inner { padding: 0 16px; }
  .nd-brand-name { font-size: 15px; }
  .nd-drawer { padding: 8px 16px 24px; }
}

