.top-bar {
    background-color: var(--text-dark);
    color: #ffffff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 253, 249, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 1;
    min-width: 0;
}

.logo i {
    font-size: 1.8rem;
    color: var(--accent);
    flex-shrink: 0;
}

.logo b {
    color: var(--accent);
}

.logo span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.nav-search {
    display: flex;
    align-items: center;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 16px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

.nav-search input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 6px;
    color: var(--text-dark);
    min-width: 0;
}

.nav-search button {
    color: var(--text-muted);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    font-weight: 500;
    flex-shrink: 0;
}

.nav-links a {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-dark);
    transition: all 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    bottom: -6px;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 4px;
    transition: transform 0.28s ease;
    transform-origin: center;
    opacity: 0.95;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--bg-alt);
    font-size: 1.2rem;
    color: var(--text-dark);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.mobile-toggle:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* Search icon button — sirf tablet/mobile pe show hoga */
.search-toggle-btn {
    display: none;
}

.navbar.scrolled {
    box-shadow: 0 8px 24px rgba(20, 15, 12, 0.08);
    transform: translateY(-2px);
}

@keyframes mobileMenuIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .nav-container {
        gap: 18px;
    }

    .nav-search {
        max-width: 260px;
    }

    .nav-links {
        gap: 10px;
    }
}

@media (max-width: 992px) {
    .nav-container {
        gap: 14px;
    }

    /* Search bar ab inline nahi rahega — dropdown ban jayega */
    .nav-search {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        max-width: none;
        width: auto;
        margin: 0;
        padding: 10px 16px;
        border-radius: var(--radius-md, 12px);
        background: var(--bg-card, #ffffff);
        box-shadow: 0 16px 32px rgba(20, 15, 12, 0.12);
        z-index: 99;
    }

    .nav-search.active {
        display: flex;
        animation: mobileMenuIn 0.3s ease forwards;
    }

    .nav-search input {
        height: 40px;
    }

    /* Search icon button ab dikhega */
    .search-toggle-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 14px;
        margin-top: 8px;
        background: var(--bg-card, #ffffff);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md, 12px);
        box-shadow: 0 16px 32px rgba(20, 15, 12, 0.12);
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
        animation: mobileMenuIn 0.3s ease forwards;
    }

    .nav-links a {
        padding: 13px 14px;
        border-radius: 10px;
        width: 100%;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: var(--primary-light);
        color: var(--accent);
    }

    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }

    .logo {
        font-size: 1.05rem;
    }

    .nav-container {
        gap: 10px;
    }

    .nav-actions {
        gap: 6px;
        margin-left: auto;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1rem;
    }

    .mobile-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

@media (max-width: 576px) {
    .top-bar {
        padding: 6px 10px;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .logo {
        gap: 6px;
    }

    .logo span {
        font-size: 0.95rem;
        max-width: 110px;
    }

    .logo i {
        font-size: 1.4rem;
    }

    .nav-container {
        gap: 8px;
    }

    .nav-actions {
        gap: 3px;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.9rem;
    }

    .badge {
        width: 16px;
        height: 16px;
        font-size: 0.62rem;
        top: -2px;
        right: -2px;
    }

    .mobile-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1.05rem;
    }

    .nav-search {
        padding: 8px 12px;
    }

    .nav-links a {
        padding: 11px 12px;
        font-size: 0.92rem;
    }
}

/* ===== EXTRA SMALL DEVICES ===== */
@media (max-width: 400px) {
    .top-bar p {
        font-size: 0.65rem;
    }

    .nav-search input {
        font-size: 0.78rem;
    }

    .logo span {
        max-width: 90px;
        font-size: 0.88rem;
    }

    .nav-actions {
        gap: 2px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.85rem;
    }

    .mobile-toggle {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .navbar {
        padding: 10px 0;
    }

    .top-bar {
        padding: 5px 8px;
        font-size: 0.68rem;
    }

    .logo {
        font-size: 0.9rem;
        gap: 5px;
    }

    .logo span {
        max-width: 75px;
        font-size: 0.8rem;
    }

    .logo i {
        font-size: 1.2rem;
    }

    .nav-container {
        gap: 6px;
    }

    .nav-actions {
        gap: 1px;
    }

    .icon-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.82rem;
    }

    .badge {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
    }

    .mobile-toggle {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.95rem;
    }

    .nav-search {
        padding: 6px 10px;
    }

    .nav-search input {
        font-size: 0.75rem;
        height: 34px;
    }

    .nav-links {
        padding: 10px;
    }

    .nav-links a {
        padding: 10px;
        font-size: 0.88rem;
    }
}

/* ===== ULTRA SMALL DEVICES (300px se neeche jaise chhote devtools preview) ===== */
/* ===== ULTRA SMALL DEVICES (300px se neeche jaise chhote devtools preview) ===== */
@media (max-width: 320px) {
    .navbar {
        padding: 8px 0;
    }

    .top-bar {
        padding: 4px 6px;
        font-size: 0.62rem;
    }

    .logo {
        gap: 4px;
    }

    .logo span {
        max-width: 55px;
        font-size: 0.72rem;
    }

    .logo i {
        font-size: 1.05rem;
    }

    .nav-container {
        gap: 4px;
    }

    .nav-actions {
        gap: 0;
    }

    .account-btn {
        display: none;
    }

    .icon-btn {
        width: 27px;
        height: 27px;
        min-width: 27px;
        font-size: 0.75rem;
    }

    .badge {
        width: 13px;
        height: 13px;
        font-size: 0.5rem;
        top: -1px;
        right: -1px;
    }

    .mobile-toggle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.85rem;
    }

    /* 👇 yahan add karein */
    .account-link-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}