The trade deficit rose to the highest level in six months as the growth in imports outpaced a modest rise in exports