People think in very static terms about this but you make a good point to keep in mind. For example, if the foreign comparative advantage for commodity X is less than the tariff rate, all the tariff will do is increase domestic production/consumption according to the newly-reshaped competitive balance. So a tariff is unlikely to raise prices more than the competitive disparity for a given item. It'll be cheaper to just make the thing domestically (in the long term of course).