You called the argument delusional, and therefore it wasn't an ad hominem, so you're right about that.
But, "Delusional" is often associated with name-calling, so it sounds more like you're calling the person delusional, rather than what they said. Something like "This sounds delusional to me" would avoid that confusion.
But, "Delusional" is often associated with name-calling, so it sounds more like you're calling the person delusional, rather than what they said. Something like "This sounds delusional to me" would avoid that confusion.