/* ── CONTENEDOR PRINCIPAL ────────────────────────────────────── */
#results-container {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── BADGE IA ────────────────────────────────────────────────── */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    background: #e6f1fb;
    color: #0c447c;
    padding: 4px 14px;
    border-radius: 99px;
    margin-bottom: 14px;
}

/* ── TÍTULO Y RESUMEN ────────────────────────────────────────── */
.results-titulo {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 10px;
}

#ai-resumen {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
    background: #f7f7f7;
    padding: 16px 18px;
    border-left: 3px solid #185FA5;
    margin-bottom: 22px;
}

/* ── ADVERTENCIAS ────────────────────────────────────────────── */
#ai-advertencias,
#ai-info-faltante {
    display: none;
    margin-bottom: 18px;
}

.advertencia-item {
    background: #faeeda;
    color: #633806;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.info-item {
    background: #e6f1fb;
    color: #0c447c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

/* ── BADGE INSTALACIÓN ───────────────────────────────────────── */
#badge-instalacion {
    display: none;
    background: #EEEDFE;
    color: #3C3489;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 18px;
    align-items: center;
    gap: 8px;
}

/* ── GRID DE PRODUCTOS ───────────────────────────────────────── */
#productos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.producto-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.producto-imagen {
    height: 130px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.producto-imagen i {
    font-size: 44px;
    color: #ccc;
}

.producto-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.producto-nombre {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}

.producto-razon {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
}

.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.producto-precio {
    font-size: 13px;
    color: #444;
}

.producto-subtotal {
    font-size: 14px;
    font-weight: 500;
    color: #185FA5;
}

.producto-link {
    display: block;
    font-size: 13px;
    color: #185FA5;
    text-decoration: none;
    padding: 6px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

.producto-link:hover {
    text-decoration: underline;
}

.sin-productos {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 15px;
}

/* ── TOTAL ───────────────────────────────────────────────────── */
.total-box {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.total-label {
    font-size: 15px;
    color: #666;
}

.total-note {
    font-size: 12px;
    color: #aaa;
    margin-top: 3px;
}

#ai-total {
    font-size: 26px;
    font-weight: 500;
    color: #1a1a1a;
}

/* ── ACCIONES ────────────────────────────────────────────────── */
.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.btn-resultado {
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.15s;
    text-align: center;
}

.btn-resultado:hover {
    background: #f5f5f5;
}

.btn-resultado:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-resultado.primary {
    background: #185FA5;
    color: #fff;
    border-color: #185FA5;
}

.btn-resultado.primary:hover {
    background: #0C447C;
}

.btn-resultado.wa {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

.btn-resultado.wa:hover {
    background: #1aab52;
}

/* ── REINICIAR ───────────────────────────────────────────────── */
#btn-reiniciar {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    padding: 10px;
    margin-top: 4px;
    background: none;
    border: none;
    width: 100%;
}

#btn-reiniciar:hover {
    color: #444;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 540px) {
    #productos-grid {
        grid-template-columns: 1fr;
    }
    .actions-grid {
        grid-template-columns: 1fr;
    }
    #ai-total {
        font-size: 22px;
    }
}