Ugly can of worms. Without opining on each of the issues, YES, you can sue for an unwind of the deal. In CA cases that are under $7,500.00 generally go into small claims courts which are faster and less involved. Attorneys are not allowed in small claims court in CA and appeals are extremely limited, so, gather all of your evidence as you only get one shot at it.
I agree with my colleague that you can sue for fraud (material misrepresentation of facts you reasonably relied on and that dmaaged you) to "rescind" (undo) this sale. Unless you make a very credible witness and they don't, I think you'd have a hard time proving what were probably oral misrepresentations about the engine type and frame (they'd likely deny it), but you'd have pretty good odds on the smog test, because it's illegal in CA to sell most cars (there are exceptions) without a current smog test. Please see the link below.
PLEASE READ THIS BEFORE YOU COMMENT, EMAIL ME OR PHONE ME. I'm only licensed in CA. This answer doesn't make me your lawyer, and neither do follow-up comments and/or emails and/or phone calls, and you shouldn't expect me to respond to your further questions if you haven't hired me. We need an actual agreement confirmed in writing before any attorney-client relationship is formed. This answer doesn't constitute legal advice, and shouldn't be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue.