/* ==========================================================================
   筑美空间装饰（装修行业）纯 CSS3 模板样式
   零构建依赖，直接引入即可使用；支持桌面端两列布局与移动端响应式
   ========================================================================== */

:root {
  --primary: #7c5438;
  --primary-dark: #5c3d28;
  --accent: #b86b43;
  --bg: #f8f5f0;
  --surface: #ffffff;
  --tint: #f1eae1;
  --border: #e3d8ca;
  --text: #2c2623;
  --muted: #6a5f58;
  --footer-bg: #24211f;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  --font-body: 'Noto Sans CJK SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 1. 顶部导航栏 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-search-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.header-search-link:hover { background: var(--border); }
.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.phone-badge:hover { background: var(--primary-dark); }

/* 2. 首页 Hero Banner */
.hero-wrap {
  padding: 20px 0 8px;
}
.hero-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  align-items: center;
  background: var(--primary-dark);
  box-shadow: var(--shadow);
}
.hero-banner img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 36px 44px;
  color: #ffffff;
}
.hero-content h1 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.28;
  font-weight: 700;
}
.hero-content p {
  margin: 0 0 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}
.hero-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}
.hero-btn:hover { opacity: 0.92; }

/* 面包屑与子分类筛选条 / 搜索通栏 */
.sub-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a:hover { color: var(--primary); }
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.filter-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.filter-pill {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
}
.filter-pill.active,
.filter-pill:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 搜索页顶部通栏 */
.search-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.search-form {
  display: flex;
  max-width: 720px;
  margin: 0 auto;
  border: 2px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
}
.search-form button {
  border: none;
  background: var(--primary);
  color: #ffffff;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.search-form button:hover { background: var(--primary-dark); }
.hot-search-row {
  max-width: 720px;
  margin: 10px auto 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hot-search-row a { color: var(--primary); }
.hot-search-row a:hover { text-decoration: underline; }

/* 3. 中间核心区域：严格左右两列布局 */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 24px 0 36px;
  align-items: start;
}

/* 左侧主栏 */
.category-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.tab-btn {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.tab-btn.active,
.tab-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.article-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.article-thumb {
  border-radius: 8px;
  overflow: hidden;
  height: 136px;
  background: var(--tint);
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.article-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}
.article-title a:hover { color: var(--primary); }
.article-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}
.tag-pill:hover {
  background: var(--primary);
  color: #ffffff;
}

/* 搜索结果统计与高亮 */
.search-summary {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
}
.search-summary strong,
.hl {
  color: var(--accent);
  font-weight: 700;
}

/* 分页器 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.page-item {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text);
}
.page-item.active,
.page-item:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 文章详情页主卡片 */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 34px;
  box-shadow: var(--shadow);
}
.detail-title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.35;
  color: var(--text);
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.detail-summary {
  background: var(--tint);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 14.5px;
  color: var(--text);
}
.detail-content h2 {
  margin: 22px 0 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--primary);
}
.detail-content p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
}
.detail-nav a {
  color: var(--text);
  display: block;
}
.detail-nav a:hover { color: var(--primary); }
.detail-nav .nav-next { text-align: right; }

/* 右侧单侧边栏（热门文章 + 热门标签 + 在线客服） */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.side-title {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}
.hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
  line-height: 1.45;
}
.hot-list li:last-child { border-bottom: none; padding-bottom: 0; }
.hot-rank {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.hot-list li:nth-child(1) .hot-rank { background: var(--primary); color: #ffffff; }
.hot-list li:nth-child(2) .hot-rank { background: var(--accent); color: #ffffff; }
.hot-list a:hover { color: var(--primary); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-cloud a {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.tag-cloud a:hover {
  background: var(--primary);
  color: #ffffff;
}

.service-card {
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--tint) 100%);
}
.service-qr {
  width: 142px;
  height: 142px;
  margin: 4px auto 10px;
  border-radius: 10px;
  overflow: hidden;
}
.service-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}
.service-sub {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.service-phone {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

/* 4. 底部通栏页脚 */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.86);
  padding: 26px 0;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-links a { color: rgba(255, 255, 255, 0.92); }
.footer-links a:hover { color: #ffffff; text-decoration: underline; }
.footer-copy {
  color: rgba(255, 255, 255, 0.7);
}

/* 响应式适配移动端 */
@media screen and (max-width: 820px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }
  .main-nav {
    order: 3;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-top: 6px;
  }
  .article-card {
    grid-template-columns: 1fr;
  }
  .article-thumb { height: 180px; }
  .detail-card { padding: 20px; }
  .detail-nav { grid-template-columns: 1fr; }
  .detail-nav .nav-next { text-align: left; }
}
