You took a while for just shopping. Were you off having a good time somewhere?

Literal

Shopping [possessive-の] for-the-amount late was [reflective-な]. Somewhere [at-で] having-a-good-time-were [question-のか]?

~の割に 'for the amount of, considering' — sets up a discrepancy between the supposed activity (shopping) and the time taken. どこぞで 'somewhere or other' is a slightly archaic/literary indefinite. よろしくやっていた 'was having a good time' — a euphemism implying romantic or illicit activity. Suspicious, teasing tone.