Preheat your oven to 350°F (175°C) and prepare a muffin tin with cupcake liners.
In a mixing bowl, combine the flour, baking powder, and salt, whisking them together until well blended.
In a separate large bowl, beat the softened butter and sugar together until light and fluffy.
Incorporate the eggs one at a time, ensuring each is fully mixed in before adding the next.
Stir in the vanilla extract and lime zest.
Alternate adding the dry flour mixture and buttermilk to the butter mixture, starting and finishing with the flour. Mix just until combined.
Fold in the fresh lime juice along with the optional tequila and orange liqueur.
Spoon the batter into the prepared cupcake liners, filling each about two-thirds full.
Bake for 18-20 minutes, or until a toothpick inserted in the center comes out clean.
Let the cupcakes cool in the pan for about 5 minutes before moving them to a wire rack to cool completely.
For the frosting, whip the softened butter until creamy, then gradually add the powdered sugar.
Mix in the lime juice, tequila (if desired), lime zest, and a pinch of salt. Beat on high speed until light and fluffy.
Once the cupcakes have cooled, generously spread the lime buttercream on top of each one.
Finish by sprinkling a touch of coarse sea salt and adding lime wedges for garnish.