Why is it sometimes dobry and sometimes dobre?
Gender. "Den" is masculine (-ý) and "odpoledne" is neuter (-é). See https://www.duolingo.com/skill/cs/Masculine
Btw. this phrase is used rarely by native speakers...
Maybe not be so common in speech but the written corpus has a decent amount. http://syd.korpus.cz/ClKCXa3i.syn