/**
 * InfoVentas - Estilos del Carrito
 */

/* Ícono del carrito en el header */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b00510;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    text-decoration: none;
    padding: 8px;
}

.cart-icon:hover {
    color: #e30613;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e30613;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

/* Notificaciones */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification.success {
    border-left: 4px solid #10823a;
}

.cart-notification.success i {
    color: #10823a;
    font-size: 1.5rem;
}

.cart-notification.error {
    border-left: 4px solid #dc3545;
}

.cart-notification.error i {
    color: #dc3545;
    font-size: 1.5rem;
}

/* Página del carrito */
.cart-page {
    padding: 40px 0;
    min-height: 60vh;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-header {
    margin-bottom: 30px;
}

.cart-header h1 {
    color: #b00510;
    font-size: 2rem;
    margin-bottom: 10px;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Items del carrito */
.cart-items {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 150px 100px 50px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

.cart-item-details h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #e30613;
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: #e30613;
    color: white;
    border-color: #e30613;
}

.quantity-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-weight: 600;
}

.cart-item-total p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-btn:hover {
    color: #a71d2a;
}

/* Resumen del carrito */
.cart-summary {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-summary h2 {
    color: #b00510;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    color: #e30613;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.cart-actions .btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.cart-actions .btn.primary-btn {
    background-color: #e30613;
    color: white;
}

.cart-actions .btn.primary-btn:hover {
    background-color: #c40510;
}

.cart-actions .btn.whatsapp-btn {
    background-color: #25d366;
    color: white;
}

.cart-actions .btn.whatsapp-btn:hover {
    background-color: #1fb855;
}

.cart-actions .btn.secondary-btn {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.cart-actions .btn.secondary-btn:hover {
    background-color: #e9ecef;
}

/* Carrito vacío */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #777;
    margin-bottom: 30px;
}

/* Carrito compartido */
.shared-cart-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.shared-cart-info h3 {
    color: #b00510;
    margin-bottom: 10px;
}

.shared-cart-info p {
    margin: 5px 0;
    color: #555;
}

/* Responsive */
@media (max-width: 968px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: relative;
        top: 0;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .cart-item-quantity,
    .cart-item-total {
        grid-column: 2;
    }

    .cart-item-remove {
        grid-column: 2;
        justify-self: end;
    }
}

@media (max-width: 576px) {
    .cart-header h1 {
        font-size: 1.5rem;
    }

    .cart-item {
        padding: 15px 10px;
    }

    .cart-item-image img {
        height: 80px;
    }

    .quantity-btn,
    .quantity-input {
        width: 30px;
        height: 30px;
    }

    .cart-summary {
        padding: 20px;
    }
}
