Under one ounce of marijuana is now an Infraction in California. However, the "fine" will be increased by about 5x the amount due to what are called Penalty Assessments.
Seth Weinstein, Esq.
This reply should NOT be considered a legal opinion of your case / inquiry. At this time I do not have sufficient factual/legal documentation to give a complete answer to your question and there may be more to the issues you raised then I have set out in my brief reply.
You should consult with an attorney about this stop and resulting seizure. There are a myriad of issues that your facts present and I believe that there are additional facts which may impact the legal analysis of your situation - some of which have already been raised by my colleagues.
The above answer is for general information only and is based on the information you posted. Every case is fact dependent, so to get a thorough analysis of your situation, you will need to consult face to face with an attorney licensed to practice in the jurisdiction where the incident took place. Do not conclusively rely on any information posted online when deciding what to do about your case.