Routes with slash (SEO)

I have two kinds of routes, products and categories:

/clothes/men/t-shirts-c10 (c = category and 10 is the category id)
/clothes/men/t-shirts/pretty-tshirt-p55 (p = product and 55 is the product id)

How would I create these routes in Slim3?
I have tried $app->get('/{slug}-p{id}'... which works as long as there’s only one slash in the URL.

What is the expected result? Do you want slug to contain clothes/men/t-shirts/pretty-tshirt? If so you have to use a regex

I don’t care much about the slug, all I want is to get the product/category id to serve the correct content.
How does it work with regex in routes, I haven’t found any documentation about?

Not much, but its mentioned in the docs