Basement side Cagliari are now just three adrift of Empoli after a stunning late comeback against Napoli.