In a postdoc interview, I was asked about something that I didn't know, and I said I don't have a professional experience into that however I am willing to know more about it. Although, this was not something I needed to know and not mentioned in my CV. So I am not sure I reacted well enough. How should I deal with such kind of questions in the future?
It sounds like you reacted fairly well. I've been in many interviews, and been asked all sorts of questions that I don't know.
If it is on the job description, you should have researched it ahead of time. It is ok to state that is an area of interest and drew you to this job (if that is true). State that you have experience in learning new things.
If it is a specific product or buzzword, state that you don't know that product name; ask what type of thing it is, and then answer with your experience in that type of thing.
There are also "unanswerable" interview questions just to see how the interviewee responds.
I know recruiters who aim for people to be an 80-90% match, not 100% as they already know everything and will not be challenged and thus leave fairly soon.
The most important things are to stay calm, rational, and willing to research and learn whatever it is.