/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: red;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    background-color: whitesmoke;
    margin: 0px 20px;
}

h3 {
    text-align: center;
    padding: 20px;
}

/* Header */
header {
    background-color: #007bff;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.header-container h1 {
    margin: 0;
    font-size: 2em;
}

.header-container p {
    font-size: 1em;
    margin-top: 5px;
}

/* Cart Container */
.cart-container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(177, 25, 25, 0.4);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th, .cart-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.cart-table th {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
}

.cart-table td {
    background-color: #f9f9f9;
}

/* Cart Item Styling */
.cart-item-img img {
    width: 80px;
    height: auto;
    border-radius: 5px;
}

.cart-item-details h3 {
    margin: 5px 0;
    font-size: 1.1em;
}

.cart-item-price {
    font-size: 1.2em;
    font-weight: bold;
    color: green;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.cart-item-quantity input {
    width: 50px;
    text-align: center;
    font-size: 1rem;
    border: 1px solid #ddd;
    padding: 5px;
    margin: 0;
}

.quantity-btn {
    padding: 5px 10px;
    background-color: pink;
    color: black;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity-btn:hover {
    background-color: blue;
}

/* Remove Button Styling */
.remove-btn {
    padding: 8px 12px;
    background-color: yellow;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 5px;
}

.remove-btn:hover {
    background-color: green;
}

/* Cart Summary */
.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    margin-top: 20px;
}

.cart-summary h2 {
    margin: 0;
}

.checkout-btn {
    padding: 10px 20px;
    background-color: red;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 5px;
}

.checkout-btn:hover {
    background-color: black;
}

/* Footer */
footer {
    text-align: center;
    background-color: orange;
    color: white;
    padding: 15px 0;
    margin-top: 30px;
}

footer p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Cart Container Padding */
    .cart-container {
        padding: 15px;
    }

    /* Adjust Cart Table Padding */
    .cart-table th, .cart-table td {
        padding: 10px;
        font-size: 1rem;
    }

    /* Adjust Cart Item Image Size */
    .cart-item-img img {
        width: 70px;
    }

    /* Adjust Quantity Buttons */
    .quantity-btn {
        padding: 5px 8px;
        font-size: 0.9rem;
        width: 28px;
        height: 28px;
    }

    /* Adjust Remove Button */
    .remove-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    /* Adjust Cart Summary Font Size */
    .cart-summary h2 {
        font-size: 1.1rem;
    }

    /* Ensure Footer is still centered */
    footer {
        padding: 12px 0;
    }
}

@media (max-width: 768px) {
    /* Adjust Cart Container Padding */
    .cart-container {
        padding: 10px;
    }

    /* Adjust Cart Table Font Size */
    .cart-table th, .cart-table td {
        font-size: 0.9rem;
        padding: 8px;
    }

    /* Adjust Cart Item Image */
    .cart-item-img img {
        width: 60px;
    }

    /* Adjust Quantity Input */
    .cart-item-quantity input {
        width: 40px;
        font-size: 0.9rem;
    }

    /* Adjust Buttons and Inputs */
    .quantity-btn, .remove-btn, .checkout-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    /* Adjust Cart Summary */
    .cart-summary h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    /* Full Width for Cart Container */
    .cart-container {
        width: 100%;
        padding: 5px;
    }

    /* Cart Table Padding */
    .cart-table th, .cart-table td {
        font-size: 0.8rem;
        padding: 6px;
    }

    /* Cart Item Image Size */
    .cart-item-img img {
        width: 50px;
    }

    /* Quantity Buttons and Input for Mobile */
    .cart-item-quantity {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
    }

    .quantity-btn {
        width: 28px;
        height: 28px;
        padding: 5px;
    }

    /* Adjust Remove Button */
    .remove-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    /* Adjust Cart Summary for Small Screens */
    .cart-summary {
        flex-direction: column;
        align-items: center;
    }

    .cart-summary h2 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    /* Checkout Button Adjustment */
    .checkout-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}
