"you are a lunatic BECAUSE you're opinion is invalid" (translates to: you are being unreasonable). Not ad hominen.
is different from
"you are a lunatic THEREFORE your opinion is invalid" (translates to: I think your conclusions came from your mental condition). Ad hominen.
It's quite easy to understand.
Fallacy lists are known to be vulnerable to sophists that take it apart literally instead of seeing the broader perspective of having them.
The introduction of a disruptive discussion (such as: is this a fallacy or not?) is a common technique for diversion.
You should have acknowledged that the other guy didn't meant to insult when he tried to explain. But you did the opposite, you doubled down on making it an insult. It's a sign of a bad conversation, in which one or more participants are not interested in the discussion.