/* CNDY 十大品牌网 站点样式 */

:root {
  --red: #e60012;
  --red-deep: #c00010;
  --yellow: #f5d64a;
  --nav: #383838;
  --text: #222;
  --gray: #666;
  --gray-light: #999;
  --line: #e6e6e6;
  --bg: #f5f5f5;
  --card-left-a: #fdf7f7;
  --card-left-b: #fdf3ea;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }

img { max-width: 100%; display: block; }

.container {
  width: 1200px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

/* ---------- 顶部工具条 ---------- */
.topbar { background: #fff; border-bottom: 1px solid #eee; }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
}

.logo-text strong { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; }
.logo-text span { display: block; font-size: 11px; color: var(--gray-light); letter-spacing: .22em; }

.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  font-size: 13px;
  color: var(--gray);
}

.topbar-right a { color: var(--gray); }
.topbar-right a:hover { color: var(--red); }

.proxy-btn {
  padding: 6px 16px;
  border-radius: 4px;
  background: var(--yellow);
  color: #333 !important;
  font-weight: 700;
  font-size: 13px;
}

.proxy-btn:hover { background: #efc928; color: #222 !important; }

/* ---------- 主导航 ---------- */
.mainnav { background: var(--nav); }

.mainnav-inner { display: flex; gap: 2px; height: 46px; align-items: stretch; }

.mainnav a { display: flex; align-items: center; padding: 0 20px; color: #ddd; font-size: 15px; }

.mainnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.mainnav a.active { background: var(--yellow); color: #222; font-weight: 700; }

.mainnav a.active:hover { color: #222; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 14px 0; font-size: 13px; color: var(--gray); }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb i { font-style: normal; margin: 0 6px; color: #bbb; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  padding-bottom: 40px;
}

/* grid 子项默认 min-width:auto，长内容会把整列撑宽，必须显式归零 */
.layout > * { min-width: 0; }

.layout-single { display: block; padding-bottom: 40px; }

/* ---------- 榜单标签 ---------- */
.rank-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.rank-tabs::-webkit-scrollbar { display: none; }

.rank-tabs a {
  padding: 7px 20px;
  background: #ececec;
  color: #666;
  font-size: 14px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rank-tabs a:hover { background: #e2e2e2; color: #333; }
.rank-tabs a.on { background: var(--red); color: #fff; font-weight: 700; }
.rank-tabs a.on:hover { color: #fff; }

/* ---------- 标题与说明 ---------- */
.page-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  color: #222;
}

.page-title::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.intro {
  padding: 16px 20px;
  background: #fdf8ec;
  border: 1px solid #f0e6cf;
  font-size: 13px;
  line-height: 2;
  color: #444;
}

.intro b { color: var(--red); }
.intro a { color: #1668b3; }

.intro-foot {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #e8dcc2;
  text-align: right;
  color: var(--gray);
  font-size: 12px;
}

/* ---------- 品牌卡片 ---------- */
.brand-list { margin-top: 18px; display: grid; gap: 16px; }

.brand-card {
  display: grid;
  grid-template-columns: 252px 1fr;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: box-shadow .2s ease;
}

.brand-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .09); }

.brand-left {
  position: relative;
  padding: 34px 20px 18px;
  background: linear-gradient(160deg, var(--card-left-a) 0%, var(--card-left-b) 100%);
  border-right: 1px solid #f2ece6;
  text-align: center;
}

.top-flag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 10px 3px 8px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
}

.stars { color: #cfcfcf; font-size: 15px; letter-spacing: 2px; line-height: 1; margin-bottom: 14px; }
.brand-card.lead .stars { color: #e8b93b; }

.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  background: #fff;
  border: 1px solid #f0e8e2;
  border-radius: 4px;
  overflow: hidden;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lit-label { margin-top: 12px; font-size: 12px; color: var(--gray); }
.lit-label b { color: var(--red); font-weight: 700; }

.brand-right { padding: 18px 24px 20px; min-width: 0; }

.brand-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.brand-name a { color: inherit; }
.brand-name a:hover { color: var(--red); }
.brand-name em { font-style: normal; font-size: 14px; font-weight: 400; color: var(--gray); }

.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 13px; color: #555; line-height: 1.9; }
.meta-line .sep { margin: 0 8px; color: #d8d8d8; }

.k-blue { color: #1668b3; }
.k-orange { color: #d9730d; }
.k-red { color: var(--red); }
.k-gray { color: var(--gray-light); }

.brand-desc { margin: 10px 0 0; font-size: 13px; line-height: 1.95; color: #555; }

.brand-more { display: inline-block; margin-top: 10px; font-size: 13px; color: #1668b3; }
.brand-more:hover { color: var(--red); }

/* ---------- 右侧栏 ---------- */
.side-block { background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }

.side-head {
  padding: 9px 14px;
  background: #f7f4ee;
  border-bottom: 1px solid #efe9dd;
  font-size: 14px;
  font-weight: 700;
  color: #444;
  text-align: center;
  letter-spacing: .06em;
}

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }

.cats a {
  display: block;
  text-align: center;
  padding: 7px 4px;
  background: #f7f3ea;
  border-radius: 3px;
  font-size: 13px;
  color: #6b5a3e;
}

.cats a:hover { background: #efe7d6; color: #8a6d3b; }

.side-brands { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #eee; }

.side-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 10px 6px;
  background: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand, #333);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-brand:hover { background: #fbf9f5; }

.side-brand small { display: block; margin-top: 2px; font-size: 9px; font-weight: 400; letter-spacing: .12em; color: #b9b2ab; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; }

.badge-item { flex: 1 1 72px; text-align: center; font-size: 11px; color: #7a6a4a; }

.badge-item i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: #f7f3ea;
  border: 1px solid #e8dfc9;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #8a6d3b;
  line-height: 1.15;
  padding: 4px;
}

/* ---------- 说明 ---------- */
.notes {
  margin-top: 18px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--gray);
}

.notes p { margin: 0 0 8px; }
.notes p:last-child { margin-bottom: 0; }
.notes strong { color: #444; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 34px; font-size: 12.5px; color: var(--gray); line-height: 2; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.footer-links a { color: #555; }
.footer-links a:hover { color: var(--red); }

/* ---------- 排行榜表格 ---------- */
.rank-table-card { background: #fff; border: 1px solid var(--line); overflow-x: auto; }

.rank-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13.5px; }

.rank-table thead th {
  padding: 12px 16px;
  background: #f7f4ee;
  border-bottom: 1px solid #efe9dd;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--gray);
  white-space: nowrap;
}

.rank-table tbody td { padding: 13px 16px; border-bottom: 1px solid #f2efe9; vertical-align: middle; }
.rank-table tbody tr:last-child td { border-bottom: none; }
.rank-table tbody tr:hover { background: #fdfbf7; }

.rank-table .cell-rank { width: 64px; font-weight: 700; color: #c9c2b2; font-variant-numeric: tabular-nums; }
.rank-table tbody tr:nth-child(1) .cell-rank { color: var(--red); }
.rank-table .cell-name { font-weight: 700; }
.rank-table .cell-name a:hover { color: var(--red); }
.rank-table .num { font-variant-numeric: tabular-nums; }

/* ---------- 品牌详情页 ---------- */
.detail-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  align-items: start;
}

.detail-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f0e8e2;
  border-radius: 4px;
}

.detail-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; line-height: 1.35; }
.detail-sub { margin: 0 0 14px; font-size: 14px; color: var(--gray); }

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.tag {
  padding: 3px 10px;
  border-radius: 3px;
  background: #f7f3ea;
  border: 1px solid #e8dfc9;
  color: #7a6a4a;
  font-size: 12px;
}

.tag.red { background: #fdf0f1; border-color: #f6d5d9; color: var(--red); }

.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: #555; }
.detail-meta b { color: var(--text); font-variant-numeric: tabular-nums; }

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: var(--line);
  border: 1px solid var(--line);
}

.detail-stat { padding: 14px 16px; background: #fbfaf7; }
.detail-stat dt { margin: 0 0 4px; font-size: 12px; color: var(--gray); }
.detail-stat dd { margin: 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-stat dd small { font-size: 12px; font-weight: 400; color: var(--gray); margin-left: 3px; }

.detail-section { margin-top: 20px; padding: 22px 26px; background: #fff; border: 1px solid var(--line); }

.detail-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.detail-section h2::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--red);
}

.detail-section h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 700; color: #333; }
.detail-section h3:first-of-type { margin-top: 0; }

.detail-section p { margin: 0 0 12px; font-size: 13.5px; line-height: 2; color: #555; }
.detail-section p:last-child { margin-bottom: 0; }

.detail-section ul { margin: 0 0 12px; padding-left: 20px; font-size: 13.5px; line-height: 2; color: #555; }
.detail-section li { margin-bottom: 4px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.spec-table th, .spec-table td { padding: 10px 14px; border: 1px solid #efe9dd; text-align: left; vertical-align: top; }
.spec-table th { background: #f9f6f0; color: #555; font-weight: 700; width: 30%; }
.spec-table td { color: #555; line-height: 1.85; }

/* ---------- 网格卡片（分类/品牌大全） ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }

.grid-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.grid-card:hover { border-color: #d9d2c4; box-shadow: 0 4px 16px rgba(0, 0, 0, .07); }

.grid-card strong { display: block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.grid-card p { margin: 0; font-size: 12.5px; color: var(--gray); line-height: 1.8; }
.grid-card .count { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--red); }

/* ---------- 投票页 ---------- */
.vote-note {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fdf8ec;
  border: 1px solid #f0e6cf;
  font-size: 12.5px;
  color: #8a6d3b;
  line-height: 1.8;
}

.vote-list { display: grid; gap: 10px; margin-top: 6px; }

.vote-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.vote-rank { font-size: 20px; font-weight: 800; color: #c9c2b2; text-align: center; font-variant-numeric: tabular-nums; }
.vote-row.top .vote-rank { color: var(--red); }

.vote-name { font-size: 15px; font-weight: 700; }
.vote-org { font-size: 12px; color: var(--gray-light); margin-top: 2px; }

.vote-bar-wrap { margin-top: 8px; height: 6px; background: #f0ece4; border-radius: 3px; overflow: hidden; }
.vote-bar { height: 100%; background: linear-gradient(90deg, #e8808c, var(--red)); border-radius: 3px; }

.vote-count { font-size: 12px; color: var(--gray); margin-top: 5px; font-variant-numeric: tabular-nums; }

.vote-btn {
  padding: 8px 18px;
  border: 1px solid var(--red);
  border-radius: 3px;
  background: #fff;
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}

.vote-btn:hover { background: var(--red); color: #fff; }
.vote-btn.voted { background: #f5f5f5; border-color: #ddd; color: #999; cursor: default; }

/* ---------- 文章 ---------- */
.article-list { display: grid; gap: 14px; margin-top: 18px; }

.article-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
}

.article-item h2 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.article-item p { margin: 0; font-size: 13px; color: var(--gray); line-height: 1.8; }
.article-item .date { font-size: 12px; color: var(--gray-light); white-space: nowrap; }

.article-body { padding: 30px 36px; background: #fff; border: 1px solid var(--line); }

.article-body h1 { margin: 0 0 10px; font-size: 26px; font-weight: 700; line-height: 1.4; }
.article-body .article-date { font-size: 12.5px; color: var(--gray-light); margin-bottom: 22px; }
.article-body h2 { margin: 26px 0 12px; font-size: 19px; font-weight: 700; }
.article-body h3 { margin: 20px 0 10px; font-size: 16px; font-weight: 700; }
.article-body p { margin: 0 0 14px; font-size: 14.5px; line-height: 2; color: #444; }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 22px; font-size: 14.5px; line-height: 2; color: #444; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0 18px; }
.article-body th, .article-body td { padding: 10px 14px; border: 1px solid #efe9dd; text-align: left; }
.article-body th { background: #f9f6f0; font-weight: 700; color: #555; }

/* ---------- 搜索 ---------- */
.search-box { display: flex; gap: 8px; margin-bottom: 18px; }

.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.search-box input:focus { border-color: var(--red); }

.search-box button {
  padding: 10px 24px;
  border: none;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.search-result { padding: 14px 18px; background: #fff; border: 1px solid var(--line); margin-bottom: 8px; }
.search-result strong { display: block; font-size: 15px; margin-bottom: 3px; }
.search-result span { font-size: 12.5px; color: var(--gray); }

/* ---------- 提示 ---------- */
.empty { padding: 40px; text-align: center; color: var(--gray-light); background: #fff; border: 1px solid var(--line); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .side-block { margin-bottom: 0; }
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .container { width: calc(100% - 24px); }
  .topbar-inner { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .topbar-right { justify-content: flex-start; gap: 10px; font-size: 12px; }
  .mainnav-inner { height: auto; flex-wrap: wrap; }
  .mainnav a { padding: 10px 14px; font-size: 14px; }
  .page-title { font-size: 18px; }
  .brand-card { grid-template-columns: 1fr; }
  .brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid #f2ece6;
    text-align: left;
  }
  .top-flag { position: static; clip-path: none; border-radius: 2px; font-size: 10px; padding: 2px 7px; }
  .stars { margin-bottom: 0; font-size: 13px; }
  .logo-box { height: 56px; min-width: 110px; padding: 6px 8px; }
  .logo-box strong { font-size: 15px; }
  .lit-label { display: none; }
  .brand-right { padding: 14px 16px 18px; }
  .brand-name { font-size: 19px; }
  .side-col { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-logo { min-height: 110px; }
  .detail-title { font-size: 21px; }
  .detail-section { padding: 18px 16px; }
  .article-body { padding: 22px 18px; }
  .article-body h1 { font-size: 21px; }
  .article-item { grid-template-columns: 1fr; gap: 8px; }
  .vote-row { grid-template-columns: 40px 1fr; }
  .vote-btn { grid-column: 1 / -1; }
  .grid-cards { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- 微信联系 ---------- */
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.footer-main { flex: 1; min-width: 0; }
.footer-qr { flex-shrink: 0; text-align: center; }
.footer-qr img { width: 96px; height: 96px; border: 1px solid var(--line); padding: 4px; background: #fff; }
.footer-qr span { display: block; margin-top: 5px; font-size: 12px; color: var(--gray); }

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 22px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
}

.contact-card h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.contact-card p { margin: 0; font-size: 13px; color: var(--gray); line-height: 1.9; }

.qr-box { flex-shrink: 0; text-align: center; }
.qr-box img { width: 120px; height: 120px; border: 1px solid var(--line); padding: 4px; background: #fff; }
.qr-box span { display: block; margin-top: 4px; font-size: 12px; color: var(--gray); }

@media (max-width: 820px) {
  .footer-inner { flex-direction: column; }
  .footer-qr { text-align: left; }
  .contact-card { flex-direction: column; align-items: flex-start; }
}
