<template>
  <div>
    <div id="brandsList" class="container">
      <div id="brands">
        <div v-for="(brands, initial) in brandList" class="row container brands-page">
          <div class="brands-title">{{initial}}</div>
          <div class="hr-blue"></div>
          <div class="row brands-body">
            <div class="simplebrand" v-for="brand in brands">
              <div class="brand-name">
                <nuxt-link :to="`/product/brand/${brand.uuid}/`">
                  <span>{{brand.nameEn}}</span>
                </nuxt-link>
              </div>
              <div>
                <nuxt-link :to="`/product/brand/${brand.uuid}/`" v-if="brand.nameEn!=brand.nameCn">
                  <span class="brand-name-cn">{{brand.nameCn}}</span>
                </nuxt-link>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'brandList',
    computed: {
      brandList () {
        return this.$store.state.product.brand.brandList.data
      }
    }
  }
</script>

<style scoped>
  /** brandList*/
  #brandsList {
    clear: both;
    width: 1190px;
    padding: 0px;
  }

  #brandsList .hr-blue {
    border-bottom: 2px solid #6493FF;
    border-right: 0px;
    border-top: 0px;
    border-left: 0px;
    width: 100%;
  }

  #brandsList .initials {
    margin-top: 3px;
  }

  #brandsList .row {
    margin: 20px 0px;
  }

  #brandsList .row .initial {
    display: inline-block;
    margin: 0 5px;
    font-size: 16px;
    color: #787878;
  }

  #brandsList .row .initial:hover{
    color: #5078CB;
    font-weight: bold;
    cursor: pointer;
  }

  #brandsList .row .initial-active{
    color: #5078CB;
    font-weight: bold;
  }

  #brands .container {
    width: 1190px;
    padding: 0px;
  }

  #brands .row .brands-title {
    width: 70px;
    height: 30px;
    padding-top: 5px;
    text-align: center;
    font-size: 16px;
    color: #fff;
    background-color: #6493FF;
  }

  #brands .row .brands-body {
    margin-bottom: 30px;
    font-size: 14px;
    color: #323232;
  }

  #brands .simplebrand {
    height: 30px;
    margin: 13px 0px;
    width: 25%;
    float: left;
  }

  #brands .simplebrand a {
    color: #323232;
    text-decoration: none;
  }

  #brands .simplebrand:hover a{
    color: #6493FF;
    font-weight: bold;
  }

  #brands .simplebrand .brand-name {
    margin-bottom: 2px;
  }

  #brands .simplebrand .brand-name-cn {
    font-size: 12px;
  }

  #brandsList ul {
    padding-left: 0px;
  }

  #brandsList ul li {
    list-style: none;
  }
  #carousel li {
    width: 12px;
    height: 12px;
    margin: 3px;
  }
</style>
