Any store needs protection from large and small kidnappers. Therefore, video cameras and solid security guards with walkie-talkies are an indispensable attribute of supermarkets. It happens that, on suspicion of theft, they detain citizens and arrange a search. However, if you look at the situation, it turns out that they do not have very much authority.
To begin with, security guards are the same store attendants as cashiers and merchandise managers. Therefore, they should treat you politely. If the guard behaves rudely, lets go of his hands - this is a reason to call the manager or even call the police.
The guards have no authority to search. They are citizens, like buyers, and have the same rights and responsibilities. It is not their responsibility to inspect your personal belongings. If you are suspected of theft, they should politely stop you, explain the complaint and call the police. Only people in uniform have to interrogate and search you.
If the guard takes you impudently, calls you obscene words or a thief, you must demand from him personal data and the data of the private security company for which he works. Then with these data, having secured the testimony of witnesses, you can go to court with a demand for moral compensation. If the guard behaved rudely, the PSC's license may be revoked altogether.