You can use past tense, of course: "If you kept that window open, your dog would get a cold". Despite being in past tense, this is not a statement about the past, it's just generic advice. You can use past perfect: "If you had kept that window open, your dog would have got a cold".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.