^ good advice.
But, a security guard will have no more of a right to detain you than the store clerk would. They would both do a "citizens arrest", but that's a very shady area because they must be 100% sure and have proof that you committed a crime. If not, and they can't prove anything, then they may be punishable for false arrest or if they relocate you, kidnapping.
Only law enforcement has the civil duty to place a person "under arrest". A citizens arrest was mostly meant to stop a violent crime, like, tackling and restraining a murderer or rapist.
JerseyViking gave the best advice to add onto Virtue's advice, DENY EVERYTHING. EVEN IF THEY HAVE VIDEO, DENY EVERYTHING. If you can walk away, RUN AWAY. Say I DIDN'T DO SHIT and GTFO of there. If they chase you, ditch the marker when you're far enough away. So, if 5-O somehow nabs you, they don't have shit.