Veteran striker Kris Boyd was on target twice, with Rory McKenzie and Chris Johnston completing a memorable day for the visitors.
Johnston said afterwards: "When you have those types of players you want to get them as high up the pitch as possible, you saw that with the goals they scored.
"I'm delighted for Rory McKenzie, he has probably been in the shadow of Chris Johnston because Chris has scored a few goals recently but he has been doing extremely well as well.
"We're delighted for him to get a fantastic goal at the end, he thoroughly deserved it.
"Young Chris' was a wee bit special, I think I was away celebrating as I was right behind it, it was a fantastic piece of ability. He curled one into the top corner, it just shows you the confidence they've got with the way they're playing."
Hearts manager Gary Locke added: "You could see there's probably one or two players there that are short on confidence but if you play here you've got to be brave, you've got to take the ball, and that was one of the disappointing things because we can pass the ball.
"But, for me, I felt there were too many times when a Hearts player had the ball that he didn't have enough options. It is a lack of confidence but the only way to get through that is by digging in, and we've got to do that."