As others, I have to start by saying I am not giving any type of legal advice here.
I assume you used the California CAR (California Association of Realtors) Purchase Agreement and Joint Escrow Instructions form, right? I think it is form RPA-CA which is what is commonly used in CA for purchases of residental property. If so, there is a Loan Contingency Removal on the first page, and I assume it was checked, right? And there was an amount of days on the first page under Loan Contingecy Removal. If you are over that amount of days than it usually states something that the seller may be entitled to the buyer's deposit. In additon many times we in CA are asked to sign a contigency removal document in escrow after all dates have expired. Did you sign anything after a few weeks removing all contingencies?
This would be something to talk to a lawyer about. No matter what, you can always ask for the deposit back and see what happens. Are you represented by an agent on the deal? Have you discussed with him/her?
This is really a contract issue and something you would want legal counsel for if you cannot get the deposit back. These contracts often have all kinds of things written into them as addendums, etc. and its very hard to answer a question like this with limited information.
I hope this was helpful in some way. Good Luck on it.