Fiorentina secure win at Cagliari