﻿.carrito-container {
    padding: 2rem 0;
}

.carrito-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.carrito-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .carrito-title i {
        color: #667eea;
    }

.carrito-count {
    background: #667eea;
    color: white;
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.carrito-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

    .carrito-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

.carrito-item-content {
    display: flex;
    padding: 1.5rem;
}

.carrito-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

    .carrito-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.carrito-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carrito-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.carrito-item-price {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carrito-item-subtotal {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.carrito-item-actions {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    color: #6c757d;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .quantity-btn:hover {
        background: #e9ecef;
        color: #212529;
    }

.quantity-input {
    width: 50px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: #212529;
    padding: 0.25rem;
}

    .quantity-input:focus {
        outline: none;
    }

.update-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    margin-left: 1rem;
    transition: all 0.2s ease;
}

    .update-btn:hover {
        background: #5a6fd8;
        transform: translateY(-2px);
    }

.remove-btn {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    margin-left: auto;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .remove-btn:hover {
        background: #dc3545;
        color: white;
    }

.carrito-empty {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    text-align: center;
    margin: 2rem 0;
}

    .carrito-empty i {
        font-size: 4rem;
        color: #6c757d;
        margin-bottom: 1.5rem;
        opacity: 0.5;
    }

    .carrito-empty h3 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: #212529;
    }

    .carrito-empty p {
        color: #6c757d;
        margin-bottom: 2rem;
    }

.btn-shop {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-shop:hover {
        background: #5a6fd8;
        transform: translateY(-2px);
        color: white;
    }

.carrito-summary {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
    border: 1px solid #e9ecef;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #6c757d;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    font-weight: 700;
    font-size: 1.25rem;
    color: #212529;
}

.btn-checkout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-weight: 600;
    width: 100%;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-checkout:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        color: white;
    }

.btn-continue {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

    .btn-continue:hover {
        background: rgba(102, 126, 234, 0.1);
        transform: translateY(-2px);
        color: #5a6fd8;
    }

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
    border-left: 4px solid #198754;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .alert-success i {
        font-size: 1.25rem;
    }

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 992px) {
    .carrito-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .carrito-item-content {
        flex-direction: column;
    }

    .carrito-item-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .carrito-item-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .remove-btn {
        margin-left: 0;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .carrito-container {
        padding: 1rem 0;
    }

    .carrito-header {
        margin-bottom: 1.5rem;
    }

    .carrito-title {
        font-size: 1.5rem;
    }

    .carrito-item {
        margin-bottom: 1rem;
    }

    .carrito-item-content {
        padding: 1rem;
    }

    .carrito-item-image {
        height: 150px;
    }

    .carrito-empty {
        padding: 2rem 1rem;
    }

        .carrito-empty i {
            font-size: 3rem;
        }
}
