/* ==========================================================================
   品牌总览 /brands
   版心沿用 .w_1200（i18n-fit.css v46 已在 ≤1280 做响应式收口）
   ========================================================================== */

/* ------------------------------ 通用 ------------------------------ */
.w_1200 {
  width: 1200px;
  margin: 0 auto;
}
.content {
  padding-bottom: 80px;
}
#location {
  height: 40px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -moz-box-align: center;
  -ms-box-align: center;
  align-items: center;
  font-size: 14px;
}
#location a,
#location span {
  color: #808080;
  margin-right: 3px;
}
#location a:last-of-type {
  color: #4d4d4d;
}
#location a:hover {
  color: #821619;
}

/* ------------------------------ 页头 ------------------------------ */
.brands_head {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 22px;
  border-bottom: 1px solid #ececec;
}
.brands_head_l {
  min-width: 0;
}
.brands_head h1 {
  font-size: 26px;
  line-height: 1.4;
  font-weight: 700;
  color: #333;
}
.brands_head_num {
  margin-left: 8px;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  color: #994345;
  background: #fbf0f0;
  border-radius: 12px;
  padding: 2px 10px;
  vertical-align: 3px;
  white-space: nowrap;
}
.brands_head_desc {
  margin-top: 10px;
  max-width: 800px;
  font-size: 13px;
  line-height: 1.9;
  color: #7a7a7a;
}

/* 搜索 */
.brands_head_r {
  -webkit-box-flex: 0;
  -webkit-flex: none;
  flex: none;
}
.brands_search {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  width: 320px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 20px;
  -webkit-transition: border-color 0.2s, box-shadow 0.2s;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.brands_search:focus-within {
  border-color: #994345;
  box-shadow: 0 0 0 3px rgba(153, 67, 69, 0.08);
}
.brands_search_ico {
  -webkit-flex: none;
  flex: none;
  margin-right: 8px;
  color: #9a9a9a;
}
.brands_search input {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: #333;
  font-family: inherit;
}
.brands_search input::placeholder {
  color: #b0b0b0;
}
.brands_search input::-webkit-search-cancel-button,
.brands_search input::-webkit-search-decoration {
  -webkit-appearance: none;
  display: none;
}
#brandClear {
  -webkit-flex: none;
  flex: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: #b5b5b5;
  cursor: pointer;
  padding: 0 2px;
}
#brandClear:hover {
  color: #821619;
}

/* ------------------------------ 主体 ------------------------------ */
.brands_wrap {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: 28px;
  padding-top: 18px;
}

/* 字母索引 */
.brand_aside {
  -webkit-box-flex: 0;
  -webkit-flex: none;
  flex: none;
  width: 42px;
  position: sticky;
  position: -webkit-sticky;
  top: 16px;
}
.brand_aside a {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  margin: 0 auto 2px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #6b6b6b;
  cursor: pointer;
  -webkit-transition: background 0.18s, color 0.18s;
  transition: background 0.18s, color 0.18s;
}
.brand_aside a:hover {
  background: #fbf0f0;
  color: #994345;
}
.brand_aside a.on {
  background: #994345;
  color: #fff;
}
.brand_aside a.is-off {
  opacity: 0.25;
  cursor: default;
}

/* 分组 */
.brand_main {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}
.brand_group {
  margin-bottom: 26px;
  scroll-margin-top: 16px;
}
.brand_group_t {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 400;
  color: #333;
}
.brand_group_t span {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #994345;
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}
.brand_group_t::after {
  content: '';
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  flex: 1;
  height: 1px;
  background: #f0f0f0;
}

/* 网格 */
.brand_grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

/* 卡片 */
.brand_card {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  height: 148px;
  padding: 16px 10px 14px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 4px;
  overflow: hidden;
  -webkit-transition: -webkit-transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.brand_card:hover {
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
  border-color: #e2c9ca;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}
.brand_card_logo {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-bottom: 12px;
}
.brand_card_logo img {
  max-width: 132px;
  max-height: 56px;
  width: auto;
  height: auto;
  -o-object-fit: contain;
  object-fit: contain;
}
.brand_card_ph {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #d8bfc0;
}
.brand_card_name {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #333;
  text-align: center;
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand_card_sub {
  width: 100%;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
  color: #9b9b9b;
  text-align: center;
  overflow: hidden;
  -o-text-overflow: ellipsis;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand_card_num {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: #994345;
  background: #fbf0f0;
  border-radius: 9px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* hidden 必须显式声明：display:flex / grid 会盖掉 UA 的 [hidden]{display:none} */
.brand_card[hidden],
.brand_group[hidden],
.brands_empty[hidden] {
  display: none !important;
}

.brands_empty {
  padding: 90px 0;
  text-align: center;
  font-size: 14px;
  color: #9b9b9b;
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1280px) {
  .brands_head,
  .brands_wrap,
  #location {
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand_grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .brands_head {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
    gap: 16px;
  }
  .brands_head_r {
    width: 100%;
  }
  .brands_search {
    width: 100%;
  }
  .brand_grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  /* 字母索引转成顶部横条，滚动时吸顶 */
  .brands_wrap {
    display: block;
    padding-top: 0;
  }
  .brand_aside {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 9;
    width: auto;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    gap: 2px;
    padding: 8px 16px;
    margin: 0 -16px 14px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .brand_aside a {
    -webkit-box-flex: 0;
    -webkit-flex: none;
    flex: none;
    width: 30px;
    margin: 0;
  }
  .brand_group {
    scroll-margin-top: 56px;
  }
}

@media (max-width: 640px) {
  .brands_head h1 {
    font-size: 22px;
  }
  .brands_head_desc {
    font-size: 12.5px;
  }
  .brand_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .brand_card {
    height: 128px;
    padding: 12px 8px 10px;
  }
  .brand_card_logo {
    height: 46px;
    margin-bottom: 9px;
  }
  .brand_card_logo img {
    max-width: 104px;
    max-height: 46px;
  }
  .brand_card_name {
    font-size: 12.5px;
  }
  .brand_card_sub {
    font-size: 11px;
  }
  .brand_card_num {
    top: 6px;
    right: 6px;
    font-size: 10px;
    padding: 1px 6px;
  }
}
