/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f8f8f8;
    color: #333;
}

/* Header and Navigation */
header {
    background-color: #6a0000; /* Darker chocolate color */
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffd700; /* Gold color for hover */
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #a04000; /* Brownish chocolate color */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #803300;
}

/* Sections General */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

h1, h2 {
    color: #4a0000; /* Even darker chocolate color */
    margin-bottom: 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://via.placeholder.com/1500x500/8B4513/FFFFFF?text=Delicious+Chocolates') no-repeat center center/cover; /* Placeholder image */
    color: white;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Products Section */
.products-section {
    background-color: white;
    padding-top: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: left;
    position: relative; /* For the "add to cart" button */
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.4rem;
    color: #4a0000;
    margin-bottom: 10px;
}

.product-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.product-card .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #a04000;
    margin-bottom: 15px;
    display: block;
}

.product-card .add-to-cart-btn {
    background-color: #a04000;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.product-card .add-to-cart-btn:hover {
    background-color: #803300;
}

/* About and Contact Sections */
.about-section, .contact-section {
    background-color: #f0f0f0;
    margin-top: 30px;
    border-radius: 8px;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.contact-section input,
.contact-section textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-section textarea {
    resize: vertical;
    min-height: 100px;
}

/* Cart Section */
.cart-section {
    background-color: white;
    margin-top: 30px;
    border-radius: 8px;
    padding: 40px;
}

#cart-items {
    margin-top: 20px;
    text-align: left;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details h4 {
    margin: 0;
    color: #4a0000;
}

.cart-item-details p {
    margin: 5px 0 0;
    color: #666;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-actions button {
    background-color: #ccc;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.cart-item-actions button:hover {
    background-color: #bbb;
}

.cart-item-actions .remove-item-btn {
    background-color: #dc3545; /* Red for remove */
    color: white;
}

.cart-item-actions .remove-item-btn:hover {
    background-color: #c82333;
}

.cart-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

#empty-cart-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 0 10px;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 10px;
    }

    .product-card {
        padding: 15px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-actions {
        margin-top: 10px;
    }
}