How To Add Details Frame In A Pet Inventory

Basically, I want to position a Details frame at the center of a Pet Frame that’s inside a scrolling frame. I’ve tried using AbsolutePosition, however, there seems to be a significant offset from the center of the frame

Details.Position = UDim2.new(0,Template.AbsolutePosition.X, 0, Template.AbsolutePosition.Y)

This is what I want to achieve, but with the Details frame centered with the Pet Frame.
image