Some people who make such remarks are just having a bad day. Some are motivated by jealousy. Some are mentally ill, aggressive, and potentially dangerous. As tempting as it is to retort with a perfect "bon mot," since you can never know with which category you are dealing, silence is safest. At the end of the day, what some random stranger thinks or feels about your appearance and belongings is completely irrelevant. (It took me half a lifetime to figure that out, but it is empowering!) And as poet George Herbert said, "Living well is the best revenge."
This is it exactly. Life is too short and there are far more important things to think about, than letting this type of person get into your head. I know it can be hard to shrug off, but the good news is that you get older, it becomes easier!