/* .nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
} */

.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    animation: navSlideDown .5s ease both;
}
  
@keyframes navSlideDown {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo span {
    color: var(--ink);
}

.nav-badge {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-left: 8px;
}

.nav-inner {
    gap: 24px;
}

.nav-search-wrap {
    position: relative;
    width: 280px;
}

.nav-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-3);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    cursor: text;
    transition: border-color .2s, box-shadow .2s, border-radius .2s;
}

.nav-search-box.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
    border-radius: 10px 10px 0 0;
    background: var(--surface);
}

#navCatInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    padding: 9px 0;
}

#navCatInput::placeholder {
    color: var(--ink-3);
}

#navClearBtn {
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .15s;
    line-height: 1;
}

#navClearBtn:hover {
    color: var(--ink);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1.5px solid var(--accent);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(99,102,241,.13);
    z-index: 200;
    overflow: hidden;
}

.nav-dropdown.open {
    display: block;
}

.nav-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
}

.nav-drop-item:last-child {
    border-bottom: none;
}

.nav-drop-item:hover,
.nav-drop-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-drop-item.active {
    font-weight: 600;
}

.nav-drop-item.active::after {
    content: '✓';
    margin-left: auto;
    font-size: 12px;
}

.nav-drop-item.hidden {
    display: none;
}

.nav-drop-empty {
    padding: 12px 14px;
    font-size: 13px; color: var(--ink-3);
    text-align: center;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2) !important;
    text-decoration: none;
    transition: color .15s;
}
.nav-links a:hover {
    color: var(--accent) !important;
}

@media (max-width: 640px) { .nav-links { display: none; } }