China reported a surprise trade deficit in February as surging prices for oil and other commodities pushed up its import bill.