  In this paper we give an extension of the classical Caffarelli-Kohn-Nirenberg
inequalities: we show that for $1<p,q<\infty$, $0<r<\infty$ with $p+q\geq r$,
$\delta\in[0,1]\cap\left[\frac{r-q}{r},\frac{p}{r}\right]$ with $\frac{\delta
r}{p}+\frac{(1-\delta)r}{q}=1$ and $a$, $b$, $c\in\mathbb{R}$ with
$c=\delta(a-1)+b(1-\delta)$, and for all functions $f\in
C_{0}^{\infty}(\mathbb{R}^{n}\backslash\{0\})$ we have
  $$ \||x|^{c}f\|_{L^{r}(\mathbb{R}^{n})} \leq
\left|\frac{p}{n-p(1-a)}\right|^{\delta} \left\||x|^{a}\nabla
f\right\|^{\delta}_{L^{p}(\mathbb{R}^{n})}
\left\||x|^{b}f\right\|^{1-\delta}_{L^{q}(\mathbb{R}^{n})} $$ for $n\neq
p(1-a)$, where the constant $\left|\frac{p}{n-p(1-a)}\right|^{\delta}$ is sharp
for $p=q$ with $a-b=1$ or $p\neq q$ with $p(1-a)+bq\neq0$.
  In the critical case $n=p(1-a)$ we have
  $$ \left\||x|^{c}f\right\|_{L^{r}(\mathbb{R}^{n})} \leq p^{\delta}
\left\||x|^{a}\log|x|\nabla f\right\|^{\delta}_{L^{p}(\mathbb{R}^{n})}
\left\||x|^{b}f\right\|^{1-\delta}_{L^{q}(\mathbb{R}^{n})}. $$ Moreover, we
also obtain anisotropic versions of these inequalities which can be
conveniently formulated in the language of Folland and Stein's homogeneous
groups. Consequently, we obtain remainder estimates for $L^{p}$-weighted Hardy
inequalities on homogeneous groups, which are also new in the Euclidean setting
of $\mathbb{R}^{n}$. The critical Hardy inequalities of logarithmic type and
uncertainty type principles on homogeneous groups are obtained. Moreover, we
investigate another improved version of $L^{p}$-weighted Hardy inequalities
involving a distance and stability estimates. We also establish sharp Hardy
type inequalities in $L^{p}$, $1<p<\infty$, with superweights, i.e. with the
weights of the form $\frac{(a+b|x|^{\alpha})^{\frac{\beta}{p}}}{|x|^{m}}$
allowing for different choices of $\alpha$ and $\beta$.
