Pup Spa project

Project lesson link: https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-22-making-a-website-responsive/modules/wdcp-22-learn-css-grid/projects/pupspa

I’m quite confused about the last task. Somehow margin is being used with grid to center the

elements in their divs but it’s not explained how exactly this works.

Just wondering if anyone could provide a breakdown?