Carlos Berlocq recovered from failing to win a game in the opening set to stun top seed Tomas Berdych 0-6 7-5 6-1 and win the ATP Portugal Open.