A judicial officer shall have the power to impose reasonable money sanctions, not to exceed fifteen hundred dollars ($1,500), notwithstanding any other provision of law, payable to the court, for any violation of a lawful court order by a person, done without good cause or substantial justification. This power shall not apply to advocacy of counsel before the court. For the purposes of this section, the term "person" includes a witness, a party, a party' s attorney, or both.
Sanctions pursuant to this section shall not be imposed except on notice contained in a party's moving or responding papers; or on the court's own motion, after notice and opportunity to be heard. An order imposing sanctions shall be in writing and shall recite in detail the conduct or circumstances justifying the order.
Ca. Civ. Proc. Code § 177.5