A Political-Economy Theory of Trade Agreements