Replacing the backing of the China cabinet

My China cabinet had backing in a pretty bad condition. It also was installed behind the mirror panels to support them. I took it off and took mirrors panels out as well. So, my initial plan was to replace everything with sheet of plywood as backing. But if I do it it’s gonna be too thick to fit into the grove where mirror panels were before. If I put in the place where previous hard board was installed, it leaves gaps in front where mirrors were. What can I do for backing so it fits nicely. Thank you!