/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Cart Container */
.cart-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.cart-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th {
    background-color: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ddd;
}

.cart-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-table img {
    border-radius: 4px;
    object-fit: cover;
    width: 60px;
    height: 60px;
}

/* Form Elements */
.quantity-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* Buttons */
.update-cart {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.update-cart:hover {
    background-color: #2980b9;
}

.remove-button {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.remove-button:hover {
    color: #c0392b;
    text-decoration: underline;
}

.checkout-button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.checkout-button:hover {
    background-color: #219653;
}

.checkout-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Cart Actions and Checkout Container */
.cart-actions {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.checkout-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Empty Cart Message */
.empty-cart {
    text-align: center;
    padding: 40px 0;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    max-width: 480px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.4s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.modal-body p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.modal-button {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.modal-button:hover {
    background-color: #2980b9;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 0 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #3498db;
    font-weight: 600;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: #3498db;
}

.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    text-align: center;
    margin-top: 20px;
}

.footer-bottom p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 900px) {
    .footer-section {
        flex-basis: 48%;
    }
}

@media (max-width: 768px) {
    .cart-table thead {
        display: none;
    }

    .cart-table tbody td {
        display: block;
        text-align: right;
        padding: 10px;
        position: relative;
        padding-left: 50%;
    }

    .cart-table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        font-weight: 600;
        text-align: left;
    }

    .cart-table tr {
        margin-bottom: 15px;
        display: block;
        border: 1px solid #eee;
        border-radius: 4px;
    }

    .checkout-container {
        flex-direction: column;
        gap: 15px;
    }

    .cart-actions {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer-section {
        flex-basis: 100%;
    }

    .modal-content {
        margin: 20% auto;
        width: 90%;
    }
}