Shifting trade patterns and inequality in rich countries