This is a handy site for visiting or driving through any US state --
https://handgunlaw.us/
Click on any state to see its laws, scroll to the end.
For CA the following is posted --
"You must have a Permit/License to carry a loaded handgun in any vehicle.
The transportation or carrying of any pistol, revolver, or other firearm capable of being concealed upon the person by any citizen of the United States over the age of 18 years who resides or is temporarily within this state, and is not within the excepted classes prescribed by Penal Code Sections 29800 or 29900 or Welfare and Institutions Code sections 8100 & 8103, provided that the following applies:
1. the firearm is within a motor vehicle and it is locked in the vehicle's trunk or in a locked container in the vehicle other than the utility or glove compartment,
2. and when the firearm is carried by the person to or from any motor vehicle for any lawful purpose, the firearm must be contained in a locked container while being physically carried. (Penal Code § 16850)
Traveling with Firearms in California (From the California Attorney General)
HANDGUNS
California Penal Code section 25400 does not prevent a citizen of the United States over 18 years of age who is not lawfully prohibited from firearm possession, and who resides or is temporarily in California, from transporting by motor vehicle any pistol, revolver, or other firearm capable of being concealed upon the person provided the firearm is unloaded and stored in a locked container. The term "locked container" means a secure container which is fully enclosed and locked by a padlock, key lock, combination lock, or similar locking device. This includes the trunk of a motor vehicle, but does not include the utility or glove compartment. For more information, refer to California Penal Code Section 25610.
SHOTGUNS AND RIFLES
Nonconcealable firearms (rifles and shotguns) are not generally covered within the provisions of California Penal Code section 25400 and therefore
are not required to be transported in a locked container. However, as with any firearm, nonconcealable firearms must be unloaded while they are being transported. A rifle or shotgun that is defined as an assault weapon pursuant to Penal Code 30510 or 30515 must be transported in accordance with Penal Code section 25610."