LOL... it's actually totally legal unless it's loaded. Cali doesn't even require a lock on long guns in transport. You can literally throw them in the backseat.
Now if it were loaded (wink wink) then it's a misdemeanor.
https://oag.ca.gov/firearms/travel
But here's the beauty of it - no one can see it up on the headliner and behind the tint. Plus, no one ever looks "up". Even cops, of which I have some working knowledge (wink wink), never look at the headliner of a car on a traffic stop. People aren't conditioned to hide things "up".
Here's the final version, with a more quality nylon strap / fastex buckle for basic retention, and a thin braided steel loop and padlock for security. It wouldn't stand up to repeated ripping against the gun or mount if someone was determined, but it's as good or better than how I previously had it, which was locked using a cable lock under the rear seats. I'll leave it locked unless I'm actually out camping and then I'll just unlock it and leave it secured by the fastex buckle only. If the window is down I can have the gun out, round chambered, and on target in about 1 second - I hang it up there oriented to come out the way I want to hold it (muzzle left, handgrip / trigger in right hand).
As a total incidental to that, I carry it (hypothetically!!! LOL) loaded with 2 rounds slug, 2 rounds 00 buck, and the last round in the tube (first round to be fired) is a less lethal beanbag. I figure the two main purposes of this gun are to scatter a bear if we encounter a hostile one at the campsite, or to scatter hostile humans. I don't really want to kill a bear for being a bear, so the beanbag is like a really hard punch in his balls coupled with a loud noise. Hopefully he would scamper off and the subsequent lethal rounds would not be needed. As far as the human predators go, I just think it would awesomely epic to put a guy down with a beanbag. Imagine you are Joe Shitbag and you start ****ing with some people at a campsite, next thing you know a shotgun gets hauled out from ****ing nowhere and you reckon death is imminent. You see the gun get cycled and you hear the 'boom' of it discharging and feel a searing pain in your gut. You fall down, thinking you are bleeding out...but you're just bruised. If the near-death experience doesn't convey the message or there are multiples, then a lethal shot is just a 6" slide stroke away.
Maybe I overthought this a little... LOL