* {
    font-family: "Inter", sans-serif;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo a {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    gap: 0.2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    letter-spacing: -0.05em;
}

.logo-accent {
    font-size: 1.5rem;
    font-weight: 300;
    color: #666;
    letter-spacing: -0.02em;
}

.logo-image {
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-item {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #000;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.nav-item:hover {
    color: #000;
}

.nav-item:hover .nav-dot {
    opacity: 1;
    transform: scale(1);
}

/* Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn,
.cart-btn,
.account-btn {
    background: none;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover,
.cart-btn:hover,
.account-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
    transform: translateY(-1px);
}

.cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #000;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0.5rem;
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.account-btn:hover .account-avatar {
    background: rgba(0, 0, 0, 0.1);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-btn,
.signup-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn {
    color: #333;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.login-btn:hover {
    color: #000;
    border-color: #000;
    background: rgba(0, 0, 0, 0.02);
}

.signup-btn {
    color: white;
    background: #000;
    border: 1px solid #000;
}

.signup-btn:hover {
    background: #333;
}

/* Account Dropdown */
.account-dropdown {
    position: relative;
}

.account-dropdown:hover .account-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-header {
    padding: 12px 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 4px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 8px 0;
}

.logout-btn {
    color: #dc3545 !important;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
    color: black !important;
}

.mobile-toggle i {
    color: black !important;
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 1000;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    padding: 2rem;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mobile-nav a:hover {
    color: #000;
    padding-left: 0.5rem;
}

.mobile-bottom {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-actions {
    display: flex;
    gap: 1rem;
}

.mobile-actions button {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-actions button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-social {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-social span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #000;
}

.mobile-overlay {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile User Section */
.mobile-user-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.mobile-avatar {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-user-actions a,
.mobile-logout {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.mobile-user-actions a:hover,
.mobile-logout:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.mobile-logout {
    color: #dc3545;
    margin-top: 8px;
}

.mobile-logout:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 64px;
    }

    .nav-menu {
        display: none;
    }

    .search-btn,
    .nav-divider,
    .account-btn {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .logo-text,
    .logo-accent {
        font-size: 1.3rem;
    }

    .auth-buttons {
        display: none;
    }

    .mobile-menu {
        top: 64px;
    }

    .mobile-overlay {
        top: 64px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .mobile-menu-content {
        padding: 1.5rem;
    }
}

/* Smooth animations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus styles for accessibility */
.search-btn:focus,
.cart-btn:focus,
.account-btn:focus,
.login-btn:focus,
.signup-btn:focus,
.dropdown-item:focus,
.mobile-actions button:focus,
.mobile-user-actions a:focus,
.mobile-logout:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid #000;
    }

    .nav-item:hover .nav-dot {
        opacity: 1;
        transform: scale(1.5);
    }

    .cart-badge {
        background: #000;
        color: #fff;
        border: 1px solid #fff;
    }

    .account-dropdown-menu {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}