/* --- Variables (Matching Theme) --- */
:root {
    --primary-color: #000;
    --secondary-color: #595959;
    --accent-color: #ee3239;
    --premium-dark: #9c8c7c;
    /* Brown/Beige */
    --bg-warm: #fcf8f3;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Cart Wrapper --- */
.cart-page-wrapper {
    background-color: var(--bg-warm);
    padding: 80px 0;
    min-height: 80vh;
}

.cart-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
}

/* --- Cart Table --- */
.cart-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 40px;
}

.premium-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.premium-cart-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary-color);
    padding: 15px 10px;
    border-bottom: 2px solid #eee;
    text-align: left;
}

.premium-cart-table td {
    padding: 20px 10px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

/* Product Info */
.cart-product-info h5 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cart-product-info h5 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.cart-product-info h5 a:hover {
    color: var(--premium-dark);
}

.cart-product-info p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
}

.cart-product-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Quantity Control */
.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f9f9f9;
    border: none;
    width: 30px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    cursor: pointer;
    transition: background 0.3s;
}

.qty-btn:hover {
    background: #eee;
    color: var(--primary-color);
}

.qty-input {
    width: 40px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 500;
    background: #fff;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

/* Other Cells */
.cart-price {
    font-weight: 500;
    color: var(--primary-color);
}

.remove-link {
    color: #cc0000;
    font-size: 1.2rem;
    transition: transform 0.2s;
    display: inline-block;
}

.remove-link:hover {
    transform: scale(1.1);
    color: #ff0000;
}

/* --- Cart Actions --- */
.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-secondary-outline {
    padding: 10px 20px;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary-outline:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* --- Summary Card --- */
.cart-summary-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.summary-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--secondary-color);
}

.summary-row.total {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--premium-dark);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 25px;
    transition: background-color 0.3s, transform 0.2s;
}

.checkout-btn:hover {
    background-color: #8a7a6b;
    transform: translateY(-2px);
    color: #fff;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .premium-cart-table thead {
        display: none;
        /* Hide headers on mobile */
    }

    .premium-cart-table tr {
        display: block;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .premium-cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
    }

    .premium-cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
    }
}