"Good evening, sir."
Translation:Buenas tardes, señor.
"buenos" modifies "noches", which is feminine, regardless of whether you are speaking to a female or a male.
Sorry that happened to you. Yes there is proper ways to use that, Señor is for an older man around his 50. Señora is when she is married. Señorita is use for a young girl in her 20's and for respect it is also used for older women around their 50's too.
I just read: Buenas noches. * = good night. Buenas tardes. * = good afternoon or good evening. But I don't know if that is correct.
I believe notches means night (dark) and tardes would be anytime after noon.
In Cataluña, I was pulled up for saying this to a youngish 29/30 year old. He was so offended and told me you only use señor speaking to old men. Others confirmed this when I asked later.