/* ==========================================
   CARRITO DE COMPRAS - LOVENDI SAAS
   ========================================== */

.carrito-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow-y: auto;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

.carrito-header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb4d);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.carrito-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cerrar-carrito {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cerrar-carrito:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.carrito-productos {
    padding: 20px;
    max-height: 35vh;
    overflow-y: auto;
    background: #fafbfc;
}

.item-carrito {
    background: white;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.item-carrito:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(-4px);
}

.item-info {
    flex: 1;
}

.item-nombre {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
    font-size: 14px;
}

.item-precio {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

.item-cantidad {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-cantidad button {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s;
}

.item-cantidad button:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.carrito-footer {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #eef2f6;
}

.desglose-total {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
}

.pago-opciones {
    margin-bottom: 20px;
}

.pago-opciones h4 {
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pago-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.pago-opcion:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.pago-opcion input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bancario-info {
    background: #fefce8;
    padding: 16px;
    border-radius: 16px;
    margin: 15px 0;
    border: 1px solid #fde047;
}

.bancario-info h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #854d0e;
}

.datos-cliente {
    margin-bottom: 24px;
}

.datos-cliente h4 {
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.datos-cliente input,
.datos-cliente textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s;
    font-family: inherit;
}

.datos-cliente input:focus,
.datos-cliente textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #075e54, #128c7e);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 40px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-vaciar {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px;
    width: 100%;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-vaciar:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.text-sm { font-size: 12px; }
.text-gray-600 { color: #475569; }
.text-muted { color: #6c757d; }

@media (max-width: 480px) {
    .carrito-sidebar { width: 100%; }
    .carrito-header { padding: 16px 20px; }
    .carrito-productos { max-height: 30vh; }
}

/* Modal de confirmación */
#modalConfirmacion > div {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 32px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 40px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#modalConfirmacion h2 {
    background: linear-gradient(135deg, #059669, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#modalConfirmacion > div > div {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 24px;
    border: 1px solid #bbf7d0;
}