I would do same, if you just called, after the flop you’ll probably fold on the aggressors raise. So I think you made a good decision in given situation
You have two options the 3 bet all-in or fold I might have opted for the fold since the stack is still quite good and 77 is not the best hand to make a 3 bet
Shoving pre is the best play. It's difficult for one opponent to have a higher pair. A lot of the time he'll fold which is a great outcome. When he calls, you'll usually be flipping against two overcards. So shoving is a high EV strong play and you just got hit by an unlucky river!
It was possible to avoid the loss of the stack, and it could even be possible to win this distribution. Before the flop, you call a, then after the flop you raise and on the turn, if the opponent continues to play, you make an all-in. Surely he will fold because the chances of getting his card on the river are very small.
You're playing 3 handed. Any pair pre-flop is a monster in this position. The only thing you could do different is just call pre and shove the flop, since you know you're facing overs in most spots.