Dani Martinez shepherded Egan Bernal up the final climb as Ineos Grenadiers produced another climbing masterclass to all but secure the maglia rosa at the Giro d’Italia.