/* cms 首页 · 轮播 + 分类宫格 + 横滑软件区 + 三栏排行 */
.cms-home { padding: 12px 0 24px; }
.cms-home > .cms-wrap > * + * { margin-top: 12px; }

/* Hero 轮播 + 最新动态侧栏 */
.cms-hero { display: flex; gap: 12px; align-items: stretch; }
.cms-hero-slider {
  flex: 1; min-width: 0; position: relative;
  border-radius: var(--cms-radius); overflow: hidden;
  background: #111; min-height: 200px;
}
@media (min-width:640px) { .cms-hero-slider { min-height: 240px; } }
.cms-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .5s; pointer-events: none;
}
.cms-slide.on { opacity: 1; pointer-events: auto; z-index: 1; }
.cms-slide a {
  display: block; height: 100%; position: relative; color: #fff;
}
.cms-slide img {
  width: 100%; height: 100%; object-fit: cover;
  min-height: 200px;
}
.cms-slide-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
}
.cms-slide-bd {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px 20px;
}
.cms-slide-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.cms-slide h2 { font-size: 16px; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
@media (min-width:640px) { .cms-slide h2 { font-size: 20px; } }
.cms-slide p { font-size: 12px; opacity: .85; margin-bottom: 10px; line-height: 1.5; }
.cms-slide-btn {
  display: inline-block; background: var(--cms-primary); color: #fff !important;
  padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 700;
}
.cms-slide-btn:hover { background: var(--cms-primary-dark); }

.cms-hero-ctrl {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(0,0,0,.35); color: #fff;
  border: 0; width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: 14px; line-height: 1;
}
.cms-hero-ctrl:hover { background: rgba(0,0,0,.55); }
.cms-hero-prev { left: 8px; }
.cms-hero-next { right: 8px; }
.cms-hero-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 10;
}
.cms-hero-dots button {
  border: 0; padding: 0; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.5); cursor: pointer; transition: all .2s;
}
.cms-hero-dots button.on { width: 20px; background: #fff; }
.cms-hero-dots button:not(.on) { width: 6px; }

.cms-hero-news {
  display: none; width: 176px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--cms-border);
  border-radius: var(--cms-radius); overflow: hidden; flex-direction: column;
}
@media (min-width:640px) { .cms-hero-news { display: flex; } }
@media (min-width:1024px) { .cms-hero-news { width: 208px; } }
.cms-hero-news-hd {
  background: var(--cms-primary); padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.cms-hero-news-hd span { color: #fff; font-size: 12px; font-weight: 700; }
.cms-hero-news-hd a { color: rgba(255,255,255,.7); font-size: 10px; }
.cms-hero-news-hd a:hover { color: #fff; }
.cms-hero-news li { border-bottom: 1px solid #f9fafb; }
.cms-hero-news li:last-child { border: 0; }
.cms-hero-news a {
  display: flex; gap: 6px; padding: 8px 10px; color: var(--cms-text);
  font-size: 11px; line-height: 1.35; align-items: flex-start;
}
.cms-hero-news a .cms-clamp1 {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cms-hero-news a:hover { background: #f9fafb; color: var(--cms-primary); }
.cms-hero-news .hot {
  flex-shrink: 0; font-size: 9px; background: var(--cms-red); color: #fff;
  padding: 1px 4px; border-radius: 2px; font-weight: 700; margin-top: 2px;
}
.cms-hero-news .num { flex-shrink: 0; color: #d1d5db; font-size: 9px; width: 14px; text-align: center; margin-top: 2px; }

/* 分类宫格 12 格 */
.cms-catgrid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #f9fafb; }
@media (min-width:640px) { .cms-catgrid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width:1024px) { .cms-catgrid { grid-template-columns: repeat(12, 1fr); } }
.cms-catgrid a {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px; gap: 6px; color: inherit;
  border-right: 1px solid #f9fafb; border-bottom: 1px solid #f9fafb;
  transition: background .15s;
}
.cms-catgrid a:hover { background: var(--cms-primary-light); }
.cms-catgrid a:hover span { color: var(--cms-primary); }
.cms-cat-ico {
  width: 36px; height: 36px; border-radius: var(--cms-radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.cms-catgrid span { font-size: 10px; font-weight: 500; color: #4b5563; text-align: center; }
.cms-catgrid em { font-size: 9px; color: #9ca3af; font-style: normal; }

/* 推广广告条 */
.cms-promo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width:640px) { .cms-promo { grid-template-columns: repeat(4, 1fr); } }
.cms-promo a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--cms-radius); border: 1px solid;
  font-size: 12px; color: inherit; transition: opacity .15s;
}
.cms-promo a:hover { opacity: .85; }
.cms-promo p { font-weight: 600; color: #1f2937; line-height: 1.3; }
.cms-promo small { display: block; font-size: 10px; color: #6b7280; margin-top: 2px; font-weight: 400; }
.cms-promo-tag { font-size: 9px; color: #9ca3af; border: 1px solid #d1d5db; padding: 1px 4px; border-radius: 3px; flex-shrink: 0; margin-left: 8px; }

/* 软件区块 */
.cms-soft-sec .cms-card-bd { padding: 12px; }
.cms-soft-sec .cms-soft-grid { display: none; }
@media (min-width:640px) {
  .cms-soft-sec .cms-scroll-x { display: none; }
  .cms-soft-sec .cms-soft-grid { display: grid; }
}

/* 双栏：热门+测评 | 侧栏 */
.cms-home-split { display: flex; gap: 12px; align-items: flex-start; }
.cms-home-split-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cms-home-split-side { width: 224px; flex-shrink: 0; display: none; flex-direction: column; gap: 12px; }
@media (min-width:1024px) { .cms-home-split-side { display: flex; } }

/* 精选测评 */
.cms-review-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width:640px) { .cms-review-grid { grid-template-columns: repeat(3, 1fr); } }
.cms-review-item {
  display: flex; gap: 10px; padding: 8px; border: 1px solid #f9fafb;
  border-radius: var(--cms-radius); color: inherit;
}
.cms-review-item:hover { background: #f9fafb; }
.cms-review-item:hover .cms-review-title { color: var(--cms-primary); }
.cms-review-ico {
  width: 40px; height: 40px; border-radius: var(--cms-radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.cms-review-title { font-size: 12px; font-weight: 600; line-height: 1.4; color: #1f2937; }
.cms-review-meta { font-size: 10px; color: var(--cms-amber); font-weight: 700; margin-top: 4px; }

/* 三栏排行 */
.cms-rank3 { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 16px; }
@media (min-width:640px) {
  .cms-rank3 { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .cms-rank3 > div { padding: 0 24px; border-left: 1px solid #f3f4f6; }
  .cms-rank3 > div:first-child { border-left: 0; padding-left: 0; }
  .cms-rank3 > div:last-child { padding-right: 0; }
}
.cms-rank3-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid;
}
.cms-rank3-hd h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cms-rank3-hd h3::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px; display: block;
}
.cms-rank3-hd a { font-size: 11px; color: var(--cms-muted); }

/* 资讯网格 */
.cms-news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width:640px) { .cms-news-grid { grid-template-columns: repeat(4, 1fr); } }
.cms-news-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--cms-border); border-radius: var(--cms-radius);
  overflow: hidden; color: inherit; background: #fff;
  transition: box-shadow .2s;
}
.cms-news-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.cms-news-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.cms-news-card-bd { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.cms-news-cat {
  display: inline-block; font-size: 10px; color: #fff;
  padding: 2px 6px; border-radius: 4px; margin-bottom: 6px; align-self: flex-start;
}
.cms-news-card h3 {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  color: #1f2937;
}
.cms-news-card:hover h3 { color: var(--cms-primary); }
.cms-news-card-desc {
  font-size: 11px; color: var(--cms-muted); line-height: 1.6; margin-top: 6px; flex: 1;
}
.cms-news-card-foot {
  display: flex; gap: 12px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #f9fafb; font-size: 10px; color: var(--cms-muted);
}
