It becomes masculine if we assume you were omiting an infinitive and not the article. "(Comprar) comida de cachorro é caro" -> "Comida de cachorro é caro". It doesn't sound formal at all, though, but very natural and acceptable.
Ração...when talking about animal kibble. I put "Ração é caro" and was marked wrong however. Would I need to enter "Ração de cachorro..." or does that not work, and I would then need to write "comida de cachorro..."