The Verdict: Need More Info
You need three consecutive years of permanent residence before applying for citizenship, and you have not reached them yet. Keep living in Panama and note the date three years after your permanent residence was granted.
Married to a Panamanian, you can apply for citizenship after three consecutive years of permanent residence, instead of five. Counting from your first permit, that is about five years in all.
Permanent residence can be cancelled after more than two years away from Panama without authorisation, and naturalisation needs consecutive years, so plan to actually live there.