Guys, how would you feel if a random girl compliments on your hair?

I was at the store today, the worker was helping me. It didn’t occurred to me how much I love his style of hair until the end! It does make him attractive. I didn’t wanna come off as too flirty. So before I left, I told him he has cool hair LOL. What would a guy think? Was it too friendly or he might know I find him attractive?
Guys, how would you feel if a random girl compliments on your hair?
Post Opinion