Why do conservatives cheer for tarrifs but rally against the gas tax?

Effectively, they're exactly the same thing.

Tarrifs on goods entering the country is a tax that's applied as the item enters the country, paid by the importer and passed on to the consumer. It's designed to discourage purchasing those foreign items in favour of domestic ones.

The gas "tax" is a tax that's applied to carbon intensive items, paid by the producer and passed on to the consumer. It's designed to discourage purchasing those carbon intensive items in favour of non carbon intensive ones.

At least the carbon tax is neutral and we get back what we've been charged (often more) but not so with tarrifs.

Can someone who believes in tarrifs but not the carbon tax help me understand how you can hold both those views at the same time?