Couldn't you use "nth-of-type" for browsers that support it then fall back to `category-detail--X`?