What is the worst case scenario for a category D damage?

Is it just cosmetic or can it include damage to mechanical parts?

Would you buy a category D damaged car if upon inspection everything seemed fine?