Yes, there are grandparent rights in PA if the parents are separated and the court makes the determination that such custody/visitation is in the "best interests of the child(ren)".
Historically, only blood relatives had the right to file for custody in Pennsylvania. It was not until the very early 1980s that step-parents began to have their loving relationship with their step-children recognized by Pennsylvania Courts.
Today, anyone in a loving, parental relationship with a minor can file for and perhaps obtain custodial rights in a child. The relationship that must exist is an "in loco parentis" (or like a parent) relationship with the minor child.
Courts have historically been most willing to permit custodial visits between step-parents and their step-child when that step-parent has been the only "father" or "mother" the child has known. For example, natural Father dies, is incarcerated or disappears when the minor child is one year old. Two years later, Mother marries Step-father. They remain married for 10 years and divorce when minor child is 14. Will this step-parent be granted custodial rights in the minor child even though the parent is not a natural parent of the minor child? Quite possibly, yes. Since Step-father is the only "father" the minor child has known, the court would be quite likely to grant custodial rights in the step-parent. Of course, these cases are very fact sensitive and there may be other factors in any case which would change the result one way or the other.
In summary, Step-parents (male or female) who have developed a loving, parental relationship with a minor child may have enforceable custodial rights in that minor child.