SMS dit: An inframarginal approach to trade theory