/* Variables */
:root {
    --primary-color: #4CAF50;
    --white-color: #ffffff;
    --black-color: #333333;
    --gray-color: #f5f5f5;
    --border-radius: 6px;
    --box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

/* Navbar Styling */
.navbar {
    background-color: var(--white-color);
    box-shadow: var(--box-shadow);
    padding: 15px 20px;
    position: relative;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Navigation Content */
.nav-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: var(--black-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--primary-color);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Primary Button */
.btn-cart {
    position: relative;
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.btn-cart .fa-shopping-cart {
    font-size: 1.2rem;
}

.btn-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff0000;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid #ffffff;
}

.btn-cart:hover {
    background: #45a049;
    color: #ffffff;
}

/* Profile Style */
.profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--gray-color);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.profile-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--black-color);
    transition: all 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 101;
    }
    
    .nav-content {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white-color);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 5px 10px rgb(0 0 0 / 0.1);
        display: none;
        z-index: 100;
    }
    
    .nav-content.show {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .btn-cart,
    .profile {
        width: 100%;
        justify-content: center;
    }
    
    /* Hamburger animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.profile-trigger:hover {
    background-color: #edf5ed;
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgb(0 0 0 / 0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 8px 0;
}

.profile-dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.dropdown-content i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

/* Cart Count Badge */
.cart-count {
    background-color: #ff4757;
    color: #ffffff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid #ffffff;
}
