/* Estilos para el carrito de compras */

/* Alertas */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Carrito vacío */
.cart-empty {
    text-align: center;
    padding: 3rem 0;
}

.cart-empty i {
    font-size: 5rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.cart-empty h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
}

.cart-empty p {
    color: #777;
    margin-bottom: 2rem;
}

.btn-continue-shopping {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #1976d2;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-continue-shopping:hover {
    background: #1565c0;
}

/* Tabla del carrito */
.cart-table-container {
    margin-bottom: 2rem;
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: #f5f5f5;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.product-info {
    display: flex;
    align-items: center;
}

.product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

.product-info .no-image {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.product-info .no-image i {
    color: #ccc;
    font-size: 2rem;
}

.product-name a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.product-name a:hover {
    color: #1976d2;
}

.product-price, .product-subtotal {
    font-weight: 500;
    color: #1976d2;
}

.product-actions .btn-remove {
    color: #f44336;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s;
}

.product-actions .btn-remove:hover {
    color: #d32f2f;
}

/* Resumen del carrito */
.cart-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 2rem;
}

.cart-summary-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-clear-cart {
    padding: 0.8rem 1.5rem;
    background: #f5f5f5;
    color: #666;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-clear-cart:hover {
    background: #e0e0e0;
    color: #333;
}

.cart-totals {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 5px;
    min-width: 300px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.cart-total-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1976d2;
    border-bottom: none;
    padding-top: 1rem;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: #4fc3f7;
    color: #fff;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-checkout:hover {
    background: #1976d2;
}

.btn-checkout i {
    margin-left: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-summary {
        flex-direction: column;
    }
    
    .cart-summary-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-continue-shopping, .btn-clear-cart {
        width: 100%;
        text-align: center;
    }
    
    .cart-totals {
        width: 100%;
    }
}
