I was wondering, I understand cat is a male noun, and seems to work indeed like male here... Could I also have written Ta kot (if the cat was female) and To kot (if I did not know or wanted to make the gender clear) ?
Or is it simply because the noun cat is male and it does not imply any sex differentiation?
Female cat is KOTKA, the noun is feminine. If you don't know the sex of cat you say KOT and then it is always a masculine noun , if you know that the cat is male you still use KOT , and masculine (animated, not personal), grammatical gender. Kitten is kociątko - neuter gender.
With many animals we have "special" nouns for female ones. Sometimes (ex. cow,) we have special nouns for male . Sometimes (ex. pig) we have different names for unspecified gender vs male vs female.
With other animals we have only one word for unspecified sex and we add samica/samiczka, samiec to specify.
kotek, koteczek are diminutives fot kot, that can be used for adult cats. Kocię is a young cat, and only ised for them, kociątko is diminutive of kocię and only for little young cats. Kociak is augmentative for kocię and used as "normal" word for young cat. ( more often than kocię)
kociak can be used to describe a young flirting woman (casual).
"In linguistics, grammatical gender is a specific form of noun-class system in which the division of noun classes forms an agreement system with another aspect of the language, such as adjectives, articles, pronouns, or verbs." https://en.wikipedia.org/wiki/Grammatical_gender While there is correlation between gender and grammatical gender, for the most part it is purely accidental.
In other words, kot is masculine not because it is a male cat(in fact it is not - "kot" is a general word denoting cat regardless of sex), but because it's inflection conforms to masculine class nouns in the Polish language.