cat_tree (category_id, name, parent_id) is a product-category tree: parent_id points at the parent category and is NULL for the root.
A product page needs the breadcrumb trail for category `c05` (Trail running shoes): every category above it, up to and including the root. Give each one its distance from c05 — 1 for its parent, 2 for the parent's parent, and so on. Don't include c05 itself. Trees in the hidden data are deeper than this sample.
Columns: category_id, name, distance. Sort by distance.