/* ============================================
   CONTENEDOR PRINCIPAL DEL CARRITO
   ============================================ */
.cart-card-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ocupa el 100vh del sidebar [cite: 2026-01-20] */
    background: #ffffff;
}

/* 1. STEPPER (Cabecera del carrito) */
.cart-stepper {
    padding: 20px 0;
    text-align: center;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    transition: all 0.3s ease;
}

.step-badge.active {
    background: #5d51e8;
    /* Tu púrpura de marca */
    color: white;
    box-shadow: 0 0 15px rgba(93, 81, 232, 0.4);
}

.step-line {
    width: 30px;
    height: 2px;
    background: #e2e8f0;
}

.step-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1b2559;
}

/* 2. CUERPO (Área scrolleable) */
.cart-body-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 5px;
}

/* Cards de Retenciones (Paso 1) [cite: 2026-01-20] */
.ret-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.ret-option-card {
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ret-option-card:hover {
    border-color: #cbd5e1;
}

.ret-option-card.selected {
    background: #fff;
    border-color: #5d51e8;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.ret-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ret-amount {
    font-weight: 900;
    font-size: 1.1rem;
    color: #1b2559;
}

.ret-name {
    font-size: 0.8rem;
    color: #a3aed0;
    margin: 0;
    font-weight: 600;
}

/* 3. FOOTER FIJO (El corazón de la conversión) */
.cart-footer-totals {
    margin-top: auto;
    /* Empuja al fondo */
    padding: 24px 0 0 0;
    border-top: 1px solid #e0e5f2;
    background: white;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #a3aed0;
    font-size: 0.9rem;
    font-weight: 600;
}

/* CAJA DE TOTAL NEGRO (Tu pedido especial) [cite: 2026-01-20] */
.grand-total {
    background: #1b2559;
    /* Azul muy oscuro / Negro */
    color: white !important;
    padding: 20px;
    border-radius: 16px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grand-total span:last-child {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

/* BOTÓN PRINCIPAL PRO */
.btn-primary-action {
    width: 100%;
    padding: 20px;
    background: #5d51e8;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary-action:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(93, 81, 232, 0.3);
}

.btn-primary-action:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    background: transparent;
    border: none;
    color: #a3aed0;
    font-weight: 700;
    margin-bottom: 10px;
    cursor: pointer;
}

/* --- FOOTER FIJO Y TOTAL NEGRO --- */
.cart-footer-totals {
    margin-top: auto;
    padding: 20px 0;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.grand-total-box {
    background: #1b2559;
    /* FONDO NEGRO/OSCURO [cite: 2026-01-20] */
    color: white;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    box-shadow: 0 10px 20px rgba(27, 37, 89, 0.2);
}

.total-label-group .label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    opacity: 0.7;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

/* --- BOTONES PRO --- */
.btn-primary-action {
    width: 100%;
    padding: 18px;
    background: #5d51e8;
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary-action:hover:not(:disabled) {
    background: #4a3fcf;
    transform: translateY(-2px);
}

/* --- CARDS DE RETENCIONES Y AGENDA --- */
.ret-option-card,
.agenda-card {
    background: #f4f7fe;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: 0.2s;
    margin-bottom: 10px;
}

.ret-option-card.selected,
.agenda-card.selected {
    border-color: #5d51e8;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-instruction {
    font-size: 0.8rem;
    color: #a3aed0;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}