I would suggest that you have a couple of issues here that need to be further explored.
The first issue, as my question alluded to, is when they discovered anything unlawful. If the clerk informed the police that you were the thief and the stopped you, that would be a lawful stop. Continuing with the hypothetical, if they then came across something illegal, while still believing you to be the thief, then this search would be considered lawful.
As to this, the issue is whether the officers acted in good faith. In this hypothetical, the officers have been informed by a clerk that you stole an item. In response to this information, they conducted a traffic stop and then located something illegal, whether related to the "crime" or not.
Another issue would be the consent to search. If you are reasonably thought to have committed a crime, the search is lawful. If you are no longer a suspect, the officers may still search if they have your consent. If, as you stated, no consent was given, the search would be unlawful at this point.
You should consider reviewing the police reports, any video from the store and any statements from the clerk. Combining these items, you should be able to ascertain whether your initial detention by law enforcement was lawful. If it was not, then everything thereafter would likely fall.
Please let me know if anything requires clarification.
I hope you found my answer helpful. If so, please click on the green ACCEPT for my answer. This is necessary for me to be paid for my work and so that I can get credit for assisting you. Even if you are a subscription member, you will need to click ACCEPT. Your question will not close, and you will still have the opportunity to follow-up if needed. Leaving a bonus and positive feedback is not required, but doing so is certainly appreciated! Thank you and good luck!
Also, several customers have asked how they may direct a question to me in particular. If you specifically want me to assist you in your legal matter, just put "FOR JOSEPH" in the subject line and I will gladly pick up the question as soon as I am on-line.