Rule reminder
The trapassato prossimo (imperfect auxiliary + past participle) expresses an action completed before another past action; essere verbs require gender/number agreement of the participle.
Le amiche si abbracciarono come se non ___ (vedersi) da secoli.