/* Modern Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

/* Left Section */
.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo a {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3436;
    text-decoration: none;
    white-space: nowrap;
}

/* Center Section */
.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #636e72;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover {
    color: #2d3436;
    background-color: #f5f6fa;
}

.nav-link.active {
    color: #2d3436;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff6b6b;
    border-radius: 2px;
}

/* Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.cart-button, .my-orders-button {
    position: relative;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    color: #636e72;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.cart-button:hover, .my-orders-button:hover {
    color: #2d3436;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6b6b;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    height: 36px;
}

.user-button:hover {
    background-color: rgba(245, 246, 250, 0.8);
}

.user-button-content {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    border-radius: 18px;
    height: 100%;
}

.profile-icon {
    font-size: 1.75rem;
    color: #2d3436;
    transition: color 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picture {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dropdown-icon.profile-picture {
    width: 48px;
    height: 48px;
    font-size: 48px;
}

.user-button:hover .profile-icon {
    color: #ff6b6b;
}

.username {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3436;
    margin-right: 0.25rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #636e72;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .username {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-center {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-center.active {
        transform: translateX(0);
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link.active {
        background-color: #f5f6fa;
    }
}

/* Profile Dropdown Styles */
.profile-menu {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-icon {
    font-size: 2.5rem;
    color: #2d3436;
}

.dropdown-icon.profile-picture {
    width: 40px;
    height: 40px;
}

.profile-info h4 {
    font-size: 0.9rem;
    color: #636e72;
    margin: 0;
    font-weight: normal;
}

.profile-links {
    padding: 0.5rem 0;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #2d3436;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.profile-link:hover {
    background-color: #f5f6fa;
    color: #ff6b6b;
}

.profile-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

@media (max-width: 480px) {
    .logo a {
        font-size: 1.1rem;
    }
    
    .nav-logo {
        width: 32px;
        height: 32px;
    }
    
    .profile-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        border-radius: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}