If you still have money after you buy a card, you can buy the card beneath it. You are not limited to just the top three cards.
If you are flipping cards due to unengaged ships, you flip them from left to right.
One unengaged ship, flip the leftmost card. Two unengaged ships, flip the leftmost and the middle. If there are three or more unengaged ships, flip all three.