/* Cart Page Styles */
.cart-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-page h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #333;
}

.cart-page > p {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin: 40px 0;
}

/* Cart Table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table thead {
    background: #f8f8f8;
    border-bottom: 2px solid #ddd;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.cart-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.cart-table tbody tr:hover {
    background: #fafafa;
}

/* Product Image in Cart */
.cart-table td img {
    max-width: 80px;
    height: auto;
    border-radius: 4px;
    margin-right: 15px;
    vertical-align: middle;
}

.cart-table td strong {
    display: inline-block;
    vertical-align: middle;
}

/* Quantity Input */
.cart-quantity {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cart-quantity:focus {
    outline: none;
    border-color: #333;
}

/* Remove Button */
.remove-item {
    padding: 8px 16px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.remove-item:hover {
    background: #cc0000;
}

/* Cart Total */
.cart-table tfoot {
    border-top: 2px solid #ddd;
    background: #f8f8f8;
}

.cart-table tfoot td {
    padding: 20px 15px;
    font-size: 18px;
    border-bottom: none;
}

#cart-total {
    color: #333;
    font-size: 24px;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.cart-actions .button,
.cart-actions .purchase-button {
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.cart-actions .button {
    background: #f0f0f0;
    color: #333;
}

.cart-actions .button:hover {
    background: #e0e0e0;
}

.cart-actions .purchase-button {
    background: #333;
    color: white;
    font-weight: 600;
}

.cart-actions .purchase-button:hover {
    background: #000;
}

/* Empty Cart State */
.cart-page .purchase-button {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 30px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.cart-page .purchase-button:hover {
    background: #000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-page {
        padding: 20px;
        margin: 20px;
    }

    .cart-table {
        font-size: 14px;
    }

    .cart-table th,
    .cart-table td {
        padding: 10px 5px;
    }

    .cart-table td img {
        max-width: 50px;
        margin-right: 10px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .cart-actions .button,
    .cart-actions .purchase-button {
        width: 100%;
        text-align: center;
    }

    /* Stack table on mobile */
    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
    }

    .cart-table td {
        display: block;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .cart-table td:last-child {
        border-bottom: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 12px;
    }
}