/* hero 主視覺 */
.hero {
  width: 100%;
  margin-bottom: -1rem;
}
.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* 品牌牆大容器 */
.brand-wall-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: auto;
  padding: 2rem 1rem 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-top-banner {
  width: 100%;
  max-width: 1200px;
  margin: -2rem auto 2rem auto;
  padding: 0;
  background: none;
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-top-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* 主內容背景色 */
.brand-wrapper {
  background: #f8f6f2;
  padding: 4rem 1rem 2rem;
}

/* ✅ 品牌卡片排列 */
.brand-cards {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ✅ 單一品牌卡片 */
.brand-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.brand-card-logo {
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.brand-card-logo img {
  max-width: 200px;
  max-height: 100%;
  object-fit: contain;
}
.brand-card-text h3 {
  font-size: 20px;
  margin: 0 0 0.5rem;
  color: #222;
}
.brand-card-text p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* ✅ 分類按鈕樣式 */
.brand-tabs {
  text-align: center;
  margin: 1rem auto 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.brand-tab {
  padding: 0.6rem 1.5rem;
  border: 2px solid #ccc;
  background: #fff;
  color: #333;
  font-size: 16px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Noto Sans TC", sans-serif;
  transition: all 0.3s ease;
}
.brand-tab.active {
  background: #f0e0d0;
  border-color: #aaa;
  font-weight: bold;
}

/* ✅ 手機版 */
@media (max-width: 768px) {
  .brand-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1rem;
  }

  .brand-card {
    padding: 1.5rem 1rem;
    border-radius: 14px;
    text-align: center;
  }

  .brand-card-logo {
    height: 80px;
    margin-bottom: 1rem;
  }

  .brand-card-logo img {
    max-width: 140px;
    max-height: 100%;
  }

  .brand-card-text h3 {
    font-size: 16px;
    margin-bottom: 0.25rem;
  }

  .brand-card-text p {
    font-size: 13px;
    line-height: 1.5;
  }

  .hero {
    margin-bottom: -7rem;
  }

  .brand-top-banner {
    height: auto;               /* ✅ 讓它隨圖片撐開 */
    min-height: unset;          /* ✅ 移除原本限制高度 */
    margin-top: 1.5rem;
    margin-bottom: 2rem;
  }

  .brand-top-banner picture {
    display: block;
    width: 100%;
  }

  .brand-top-banner picture img {
    display: block;
    width: 100%;
    height: auto;               /* ✅ 圖片依比例縮放 */
    max-height: none;
    object-fit: cover;
    border-radius: 16px;
  }

  .brand-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  .brand-tab {
    flex: 1 1 30%;
    max-width: 100px;
    text-align: center;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-size: 15px;
  }
}