/* Navbar Base Styles */
nav {
    position: fixed;
    /* Fixed to float */
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    /* Default transparent */
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* White line at top */
}

/* Scrolled State - The Floating Pill */
nav.scrolled {
    top: 20px;
    /* Float down */
    width: 85%;
    /* Shrink width darker */
    max-width: 850px;
    margin: 0 auto;
    /* Center */
    padding: 8px 24px;
    /* Slimmer height */
    border-radius: 100px;
    /* Fully rounded */
    background: #09090b;
    /* Dark bg */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* More visible white border */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    /* Double border effect */
    backdrop-filter: blur(16px);
}

/* Logo */
.logo {
    font-family: 'Inter', sans-serif;
    /* Consistent with other pages */
    font-weight: 800;
    /* ExtraBold (Thicker than 600) */
    font-size: 1.5rem;
    color: #f4f4f5;
    text-decoration: none;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #f97316;
    /* Color Expansion: Text becomes orange */
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
    /* Orange glow */
}

.logo span {
    color: #f97316;
    transition: all 0.3s ease;
}

.logo:hover span {
    text-shadow: 0 0 20px #f97316;
    /* Orange glow for dot */
}

/* Center Pill Container */
.nav-center {
    /* Default: Separate pill in center */
    padding: 6px 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    /* Fix vertical alignment */
    gap: 4px;
    transition: all 0.3s ease;
}

/* When scrolled, the center pill blends into the main bar */
nav.scrolled .nav-center {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Nav Link Items */
nav ul {
    display: contents;
    /* Strip default ul behavior */
}

nav a.nav-item {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 999px;
    transition: all 0.2s;
    /* font-family: 'JetBrains Mono', monospace; <-- Removed based on user feedback */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

nav a.nav-item:hover {
    color: #f4f4f5;
    background: rgba(249, 115, 22, 0.15);
    /* Orange tint */
    text-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
    /* Orange glow */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
    /* Subtle outer glow */
}

nav a.nav-item.active {
    color: #09090b;
    background: #f4f4f5;
    font-weight: 700;
}

/* Right Side (Auth) */
.nav-right {
    z-index: 10;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

#nav-auth-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #18181b;
    border: 1px solid #27272a;
    color: #f4f4f5;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-btn:hover {
    border-color: #f4f4f5;
    background: #27272a;
}

.auth-btn i {
    font-size: 0.9rem;
    color: #a1a1aa;
}

/* Hide auth text on mobile */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .nav-center {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        display: none;
        /* Hide for now or use hamburger */
    }

    nav {
        flex-wrap: wrap;
    }
}

/* User Dropdown (Hover to Logout) */
.auth-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 0px;
    /* Bridge gap if any */
}

.auth-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f4f4f5;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.9rem;
    cursor: default;
    /* Not clickable itself if it just opens menu */
    transition: 0.2s;
    text-decoration: none;
}

.auth-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* The Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    min-width: 140px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Animation Stare: Hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;

    display: flex;
    flex-direction: column;
    z-index: 1000;
}

/* Show on Hover */
.auth-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.dropdown-item:hover {
    background: #27272a;
    color: #f4f4f5;
}

.dropdown-item.danger {
    color: #ef4444;
}


/* --- Shopping Cart --- */
.nav-cart-container {
    position: relative;
    cursor: pointer;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: 0.2s;
    color: #a1a1aa;
}

.nav-cart-container:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f4f4f5;
}

.cart-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #f97316;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #18181b;
    opacity: 0;
    transform: scale(0);
    transition: 0.2s;
}

.cart-badge.show {
    opacity: 1;
    transform: scale(1);
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: 130%;
    right: -20px;
    width: 320px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-cart-container:hover .cart-dropdown,
.cart-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-header {
    padding: 12px 16px;
    font-weight: 700;
    color: #f4f4f5;
    border-bottom: 1px solid #27272a;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-list {
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    padding: 12px 16px;
    border-bottom: 1px solid #27272a;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: 0.2s;
}

.cart-item:hover {
    background: #27272a;
}

.cart-item-img {
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.2rem;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.85rem;
    color: #f4f4f5;
    font-weight: 600;
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 0.8rem;
    color: #f97316;
    /* Price color */
    font-family: 'JetBrains Mono', monospace;
}

.cart-footer {
    padding: 12px 16px;
    background: #101012;
    border-top: 1px solid #27272a;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.cart-total-price {
    color: #f4f4f5;
    font-weight: 700;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 10px;
    background: #f97316;
    color: white;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-checkout:hover {
    background: #ea580c;
}

.empty-cart {
    padding: 30px;
    text-align: center;
    color: #71717a;
    font-size: 0.9rem;
}

.nav-bell-container {
    position: relative;
    cursor: pointer;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: 0.2s;
    color: #a1a1aa;
}

.nav-bell-container:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f4f4f5;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #18181b;
    /* Cutout effect */
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 130%;
    /* Space below bell */
    right: -60px;
    /* Center alignment adjustment */
    width: 300px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-bell-container:hover .notification-dropdown,
.notification-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.note-header {
    padding: 12px 16px;
    font-weight: 700;
    color: #f4f4f5;
    border-bottom: 1px solid #27272a;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-list {
    max-height: 300px;
    overflow-y: auto;
}

.note-item {
    padding: 12px 16px;
    border-bottom: 1px solid #27272a;
    display: flex;
    gap: 12px;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

.note-item:hover {
    background: #27272a;
}

.note-item.unread {
    background: rgba(249, 115, 22, 0.05);
    /* Orange tint */
    border-left: 2px solid #f97316;
}

.note-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
}

.note-content {
    flex-grow: 1;
}

.note-text {
    font-size: 0.85rem;
    color: #d4d4d8;
    margin-bottom: 4px;
    line-height: 1.4;
}

.note-time {
    font-size: 0.75rem;
    color: #a1a1aa;
}

.empty-note {
    padding: 20px;
    text-align: center;
    color: #71717a;
    font-size: 0.9rem;
}