* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Red Hat Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fcf8f5;
    color: #87635a;
}

.container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.products-section {
    flex: 2;
}

.products-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #260f08;
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    position: relative;
}

.product-image {
    width: 100%;
    height: 240px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 2rem;
}

.product-card.selected .product-image {
    border: 3px solid #c73b0f;
}

.product-category {
    font-size: 0.875rem;
    color: #87635a;
    margin-bottom: 0.25rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #260f08;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1rem;
    font-weight: 600;
    color: #c73b0f;
}

.add-to-cart-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #ad8a85;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #260f08;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:hover {
    background-color: #c73b0f;
    color: white;
    border-color: #c73b0f;
}

.cart-icon {
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 3px;
    position: relative;
    margin-right: 0.25rem;
}

.cart-icon::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 3px;
    right: 3px;
    height: 6px;
    border: 2px solid currentColor;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.cart-icon::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 2px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 8px 0 0 currentColor;
}

.quantity-controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #c73b0f;
    border-radius: 25px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 180px;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-btn {
    background: transparent;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
}

.quantity-btn:hover {
    background: white;
    color: #c73b0f;
}

.quantity-display {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
}

.cart-section {
    flex: 1;
    min-width: 350px;
}

.cart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.cart-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c73b0f;
    margin-bottom: 1.5rem;
}

.empty-cart {
    text-align: center;
    padding: 2rem 0;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-cart-text {
    color: #87635a;
    font-weight: 600;
}

.cart-items {
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #260f08;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.cart-item-quantity {
    color: #c73b0f;
    font-weight: 600;
}

.cart-item-price {
    color: #87635a;
}

.cart-item-total {
    color: #87635a;
    font-weight: 600;
}

.cart-item-remove {
    background: transparent;
    border: 2px solid #caafa7;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    color: #caafa7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-left: 1rem;
}

.cart-item-remove:hover {
    border-color: #260f08;
    color: #260f08;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.cart-total-label {
    font-size: 0.875rem;
    color: #87635a;
}

.cart-total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #260f08;
}

.carbon-neutral {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fcf8f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.carbon-neutral::before {
    content: "🌳";
    font-size: 1rem;
}

.carbon-neutral-text {
    color: #87635a;
}

.carbon-neutral-highlight {
    font-weight: 600;
    color: #260f08;
}

.confirm-order-btn {
    width: 100%;
    background: #c73b0f;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.confirm-order-btn:hover {
    background: #ad2d00;
}

/* Hidden class for JavaScript control */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .cart-section {
        min-width: auto;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .products-section h1 {
        font-size: 2rem;
    }

    .product-image {
        height: 200px;
        margin-bottom: 2rem;
    }

    .add-to-cart-btn,
    .quantity-controls {
        bottom: 50px;
    }
}