In Russian, some words function as nouns but look and decline exactly like adjectives. Because they have standard adjective endings (like -ый, -ая, -ое), they follow the adjective declension rules you already know.
Neuter Adjectival Nouns
Many categories, such as animals and sweets, use neuter adjectival endings (-ое or -ее). Keep in mind that while пирожное (pastry) is inanimate, words like животное (animal) and насекомое (insect) are animate, so their Accusative plural matches their Genitive plural.
Feminine Adjectival Nouns (Places)
Shops and everyday businesses are frequently feminine adjectival nouns ending in -ая, originally describing a dropped noun like комната (room) or лавка (shop). They take standard feminine adjective case endings, like -ую in the Accusative and -ой in the Prepositional.
Masculine Adjectival Nouns (People)
Professions and types of people often take masculine adjectival endings (-ый, -ий, or -ой). Since they represent people, they are animate (Accusative matches Genitive) and use standard masculine adjective endings for cases like the Dative (-ому or -ему).
Plural-Only Adjectival Nouns
A few adjectival nouns only exist in the plural, such as чаевые (tips). They decline following plural adjective rules across all cases.