We introduce a weight-dependent extension of the inversion statistic, a classical Mahonian statistic on permutations. This immediately gives us a new weight-dependent extension of $n!$. By restricting to $312$-avoiding permutations our extension happens to coincide with the weighted Catalan numbers that were considered by Flajolet in his combinatorial study of continued fractions. We show that for a specific choice of weights the weighted Catalan numbers factorize into a closed form, hereby yielding a new $q$-analogue of the Catalan numbers, different from those considered by MacMahon, by Carlitz, or by Andrews. We further refine the weighted Catalan numbers by introducing an additional statistic, namely a weight-dependent extension of Haglund’s bounce statistic, and obtain a new family of bi-weighted Catalan numbers that generalize Garsia and Haiman’s $q,t$-Catalan numbers and appear to satisfy remarkable properties. This is joint work with Shishuo Fu.