loop mix my child-category and parent-category

For the example you posted, the article is styled according to the css rule(s) for category-selling-and-advertising which is defined last (among the category-* classes) in the article’s class attribute.

You need to intercept the functionality of post_class() to change the order these classes appear. The post_class filter will do the job for you:

add_filter(
  'post_class',
  function($classes) // $classes is an array
    {
    $cats=get_the_category();
    $master_cat=$cats[0]->slug;
    if($k=array_search("category-$master_cat",$classes))
      {
      unset($classes[$k]);
      $classes[]="category-$master_cat";
      }
    return $classes;
    }
  );

The above is a rather naive solution, but I think it’s a good place to start.