If it is an easily removed wooden shelf, I would take it out, scrub it with vinegar, then hydrogen peroxide. Let it dry, sand it down so that the staining is gone. When you reinstall it, flip it over. Chins will pee where they smell that they have peed before. The vinegar will neutralize the ammonia. The peroxide with denature proteins, the sanding will get most of the stained wood off, and flipping it will put some distance between the smell and where it was.