How customize the appearance of sections like Amazon?

Their markup is different partiall because they haven’t appeared to update their site in quite a while

Adding this CSS gets you most of the way there with the subcategory style…

.category-list .subcategories .subcategory {
  display: flex;
}

If you want to make markup changes, you’ll have to start looking into how template overrides in Discourse work… that’s in the advanced section of Developer’s guide to Discourse Themes