Cognitive empathy is knowing what you feel; affective empathy is feeling it with you. Many people with NPD have intact — even sharp — cognitive empathy, but impaired affective empathy, so the read gets used to influence rather than to care.
They knew the exact words that would land hardest — proof they understood your feelings perfectly. They just weren't moved by them. That combination, not a total absence of empathy, is what makes it feel deliberate.