/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Navigation Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img {
    height: 40px;
}

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

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #4CAF50;
}

/* Cart Icon Styles */
.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    display: none;
}

/* Form Styles */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-form h2 {
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Button Styles */
button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn, .signup-btn {
    background-color: #4CAF50;
    color: white;
    width: 100%;
}

.login-btn:hover, .signup-btn:hover {
    background-color: #45a049;
}

.link-btn {
    background: none;
    color: #4CAF50;
    padding: 0;
    margin: 0;
    font-size: inherit;
}

.login-btn.google {
    background: #4285F4;
    color: #fff;
    margin-top: 10px;
}

/* Product Grid Styles */
.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.product-card h3 {
    padding: 1rem;
    margin: 0;
    color: #333;
}

.price {
    color: #4CAF50;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.add-to-cart-btn {
    background-color: #4CAF50;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 0 0 10px 10px;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}
.modal:not(.hidden) {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    margin: 4rem auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Cart Items Styles */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.item-details {
    flex: 1;
}

.remove-btn {
    background-color: #ff4444;
    color: white;
    padding: 8px;
    border-radius: 4px;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #4CAF50;
    color: white;
}

.toast.error {
    background-color: #ff4444;
    color: white;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Profile Name Styles */
.profile-name {
    font-weight: bold;
    color: #4CAF50;
    margin-left: 10px;
}

/* Product Link Styles */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .product-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 2rem auto;
    }
}
