The genitive case deal with inanimate things that have some attribute. I find it easier to think of this as expressions with the English of, what is known as periphrastic genitive. I'm sure that makes everything much clearer! If you think in terms of English of, then the the thing with the attribute is said first, with the attribute second.
The endings are the same as for 3rd person possessive pronouns:
- in, ın, ün, un / -nin, nın, nün, nun for the first word (after consonant, after vowel)
- i, ı, ü, u / -si, sı, sü, su for the second word (after consonant, after vowel)