/* Variables CSS */
:root {
    --primary-color: #00c4b4;
    --secondary-color: #1a3c6d;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 25px rgba(0, 196, 180, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Logo */
.logo img {
    height: 45px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

/* Navigation List */
.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* Navigation Links */
.nav-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-list li a:hover {
    color: var(--primary-color);
    background: rgba(0, 196, 180, 0.05);
    transform: translateY(-2px);
}

/* Partner Button */
.partner-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white) !important;
    font-weight: 600;
    border-radius: 25px;
    padding: 0.8rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
}

.partner-btn:hover,
.partner-btn:focus,
.partner-btn:active,
.partner-btn:visited {
    background: linear-gradient(135deg, #00a693, #142d52) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
    color: var(--white) !important;
    text-decoration: none !important;
}

/* Login Button */
.login-btn {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    border-radius: 25px;
    font-weight: 600;
    background: transparent !important;
}

.login-btn:hover,
.login-btn:focus,
.login-btn:active,
.login-btn:visited {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    border-color: var(--primary-color) !important;
    text-decoration: none !important;
}

/* Cart Link */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    min-width: 1.2rem;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Notification Link */
.notification-link {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b35;
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    min-width: 1.2rem;
    text-align: center;
    animation: bellRing 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.notification-link:hover .notification-badge {
    animation: bellRingFast 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bellRing {
    0%, 50%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
}

/* Marketplace Link */
.marketplace-link {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), #00a692);
    border-radius: 25px;
    padding: 0.8rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
    font-weight: 600;
    color: var(--white) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.marketplace-link:hover,
.marketplace-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
    color: var(--white) !important;
    background: linear-gradient(135deg, #00a692, var(--primary-color));
}

.marketplace-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    border-radius: 25px;
}

.marketplace-link:hover::before {
    left: 100%;
}

.marketplace-link i {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes bellRingFast {
    0%, 50%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    75% { transform: rotate(15deg) scale(1.1); }
}

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

.profile-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1rem !important;
    background: var(--light-bg);
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.profile-toggle:hover {
    background: rgba(0, 196, 180, 0.05);
    border-color: rgba(0, 196, 180, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.1);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 50%;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: var(--text-color);
    transition: var(--transition);
    margin-left: 0.3rem;
}

.profile-toggle:hover .dropdown-arrow {
    color: var(--primary-color);
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid rgba(0, 196, 180, 0.1);
}

.dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.dropdown-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.05), rgba(26, 60, 109, 0.05));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    flex-shrink: 0;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-avatar .avatar-placeholder {
    font-size: 1.1rem;
}

.dropdown-user-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.dropdown-user-info p {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: rgba(0, 196, 180, 0.1);
    margin: 0;
}

/* Dropdown Content */
.dropdown-content {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem !important;
    color: var(--text-color) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0 !important;
    transition: var(--transition);
    border: none !important;
    background: none !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(0, 196, 180, 0.05) !important;
    color: var(--primary-color) !important;
    transform: none !important;
}

.dropdown-item i {
    width: 1.2rem;
    text-align: center;
    opacity: 0.7;
}

.dropdown-item:hover i {
    opacity: 1;
    color: var(--primary-color);
}

/* Logout Form */
.logout-form {
    margin: 0;
}

.logout-item {
    color: #dc3545 !important;
}

.logout-item:hover {
    background: rgba(220, 53, 69, 0.05) !important;
    color: #dc3545 !important;
}

.logout-item:hover i {
    color: #dc3545;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.7rem;
    border-radius: 8px;
    transition: var(--transition);
    z-index: 1002;
}

.menu-toggle:hover {
    background: rgba(0, 196, 180, 0.05);
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar .container {
        padding: 0 1.5rem;
    }
    
    .profile-info {
        display: none;
    }
    
    .dropdown {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.6rem 0;
    }
    
    .navbar .container {
        padding: 0 1rem;
    }
    
    .logo img {
        height: 40px;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100vw;
        max-width: 100vw;
        background: var(--white);
        flex-direction: column;
        padding: 80px 0 2rem 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        gap: 0;
        overflow-y: auto;
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-list.active {
        right: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 196, 180, 0.1);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list li a {
        padding: 1.2rem 1.5rem;
        border-radius: 0;
        justify-content: flex-start;
        width: 100%;
        font-size: 1rem;
    }

    .nav-list li a:hover {
        transform: none;
        background: rgba(0, 196, 180, 0.05);
    }

    .partner-btn, .login-btn {
        border-radius: var(--border-radius) !important;
        margin: 0.5rem 1.5rem !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }

    .menu-toggle {
        display: flex;
    }

    .profile-toggle {
        padding: 0.5rem !important;
        background: transparent !important;
        border: none !important;
        border-radius: 50% !important;
        width: 45px !important;
        height: 45px !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    .profile-avatar {
        width: 35px;
        height: 35px;
    }

    .dropdown {
        position: fixed;
        top: 60px;
        right: 1rem;
        left: 1rem;
        border-radius: var(--border-radius);
        min-width: auto;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    .cart-link {
        order: -1;
    }

    .notification-link {
        order: -2;
    }

    /* Mobile specific hover effects */
    .nav-list li a:active {
        background: rgba(0, 196, 180, 0.1);
    }

    .partner-btn:active,
    .login-btn:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 0.8rem;
    }

    .logo img {
        height: 32px;
    }

    .profile-avatar {
        width: 32px;
        height: 32px;
    }

    .profile-toggle {
        width: 40px !important;
        height: 40px !important;
        padding: 0.4rem !important;
    }

    .dropdown {
        top: 55px;
        right: 0.8rem;
        left: 0.8rem;
    }

    .dropdown-header {
        padding: 1rem;
    }

    .dropdown-avatar {
        width: 40px;
        height: 40px;
    }

    .dropdown-user-info h4 {
        font-size: 0.9rem;
    }

    .dropdown-user-info p {
        font-size: 0.8rem;
    }

    .dropdown-item {
        padding: 0.8rem 1rem !important;
        font-size: 0.85rem;
    }

    .nav-list {
        width: 280px;
        padding: 65px 0 2rem 0;
    }

    .nav-list li a {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .partner-btn, .login-btn {
        margin: 0.5rem 1.2rem !important;
        padding: 0.9rem 1.2rem !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 360px) {
    .navbar .container {
        padding: 0 0.5rem;
    }

    .logo img {
        height: 30px;
    }

    .profile-avatar {
        width: 28px;
        height: 28px;
    }

    .profile-toggle {
        width: 35px !important;
        height: 35px !important;
        padding: 0.3rem !important;
    }

    .dropdown {
        right: 0.5rem;
        left: 0.5rem;
    }

    .nav-list {
        width: 260px;
    }

    .nav-list li a {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }

    .partner-btn, .login-btn {
        margin: 0.4rem 1rem !important;
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }
}