/* --- Estilos para la Página del Carrito de Compras --- */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; padding-top: 2rem; height:80vh;}
.cart-items-column h1 { margin-top: 0; margin-bottom: 1.5rem; font-size: 2rem; }

/* --- Tabla del Carrito --- */
.cart-header, .cart-item {
    display: grid;
    /* Updated grid columns */
    grid-template-columns: 2fr 1fr 1fr 1fr 40px; 
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.cart-header {
    padding: 0.75rem 1rem;
    background-color: var(--light-bg);
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.cart-item-product { display: flex; align-items: center; gap: 1rem; }
.cart-item-product img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.product-name { font-weight: 600; }
.product-variation { font-size: 0.85rem; color: var(--text-light); }
.cart-item-quantity input { width: 60px; text-align: center; padding: 0.5rem; }
.cart-item-subtotal { font-weight: bold; text-align: right; }
.cart-item-remove { text-align: right; }

/* --- Botón Eliminar "X" --- */
.remove-item-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}
.remove-item-btn:hover { color: var(--danger-color); }

/* --- Mensaje de Carrito Vacío --- */
.cart-empty-message { text-align: center; padding: 3rem 1rem; }

/* --- Resumen del Pedido --- */
.summary-box { background-color: #fff; padding: 30px; border-radius: 8px; position: sticky; top: 150px; }
.summary-box h3 { margin-top: 0; }
.summary-row { display: flex; justify-content: space-between; padding: 0.75rem 0; }
.summary-total { display: flex; justify-content: space-between; padding: 1rem 0; margin-top: 1rem; border-top: 1px solid var(--border-color); font-weight: bold; font-size: 1.2rem; }
.btn-checkout {
    display: block; /* Hace que el enlace se comporte como un bloque */
    width: 100%;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center; /* Centra el texto dentro del botón */
    text-decoration: none; /* <-- QUITA EL SUBRAYADO */
    transition: background-color 0.2s;
}

.btn-checkout:hover {
    background-color: #333; /* Efecto hover */
}

.btn-checkout.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Responsividad --- */
@media (max-width: 992px) {
    .cart-layout { grid-template-columns: 1fr; height:auto;}
    .cart-summary-column { grid-row: 1; }
}
@media (max-width: 600px) {
    .cart-header { display: none; }
    .cart-item { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .cart-item-product { grid-column: 1 / -1; }
    .cart-item-price, .cart-item-quantity, .cart-item-subtotal, .cart-item-remove { display: flex; justify-content: space-between; align-items: center; }
    .cart-item-price::before, .cart-item-quantity::before, .cart-item-subtotal::before { content: attr(data-label); font-weight: 600; }
    .cart-item-remove { justify-content: flex-end; }
}