If you want to visit a mosque make sure you bring trousers and scarfs to cover your legs, arms, hairs and shoulders. Take off your shoes before you go in.
When you are in Kastamonu or anywhere in Turkey, you will see many times (if not always) you will be offered something to drink such as tea, Turkish coffee or apple tea.. This is just a sign of hospitality. It does not mean that you have to buy something or that you absolutely have to talk to them. It is just a way of welcoming you. Enjoy your drink..