/* ============================================================
   商信聚合 - 统一样式 V2
   shangjiamenhu.com 内容平台
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f8fafc;
  color: #1a202c;
  line-height: 1.7;
  font-size: 15px;
}

a { color: #185FA5; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 20px; }

mark { background: #FEF3C7; padding: 0 2px; border-radius: 2px; }

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: #185FA5;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #185FA5; }
.nav-actions { display: flex; gap: 12px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}
.btn-primary {
  background: #185FA5;
  color: #fff;
}
.btn-primary:hover { background: #144a82; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: #185FA5;
  border: 1px solid #185FA5;
}
.btn-outline:hover { background: #185FA5; color: #fff; text-decoration: none; }

/* ============================================================
   搜索结果页
   ============================================================ */
.search-container { padding-top: 20px; }

.search-box-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.search-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #64748b;
  background: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.search-tab:hover { background: #e2e8f0; text-decoration: none; }
.search-tab.active {
  background: #185FA5;
  color: #fff;
}
.tab-count {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

.search-input-wrapper {
  display: flex;
  gap: 12px;
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: #185FA5; }
.search-btn { padding: 12px 24px; }

/* 搜索元信息 */
.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 0;
}
.result-count { font-size: 14px; color: #64748b; }
.facets {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.facet-select {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.facet-select:focus { border-color: #185FA5; }
.facet-check {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* 搜索结果卡片 */
.search-results { display: flex; flex-direction: column; gap: 12px; }

.result-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.result-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.card-type-bar {
  width: 4px;
  flex-shrink: 0;
}
.card-type-bar.green { background: #0F6E56; }
.card-type-bar.blue { background: #185FA5; }
.card-type-bar.orange { background: #854F0B; }
.card-type-bar.red { background: #D85A30; }
.card-type-bar.pink { background: #993556; }
.card-type-bar.gray { background: #64748b; }

.card-body { padding: 16px 20px; flex: 1; }

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.card-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.card-type-badge.green { background: #D1FAE5; color: #065F46; }
.card-type-badge.blue { background: #DBEAFE; color: #1E40AF; }
.card-type-badge.orange { background: #FED7AA; color: #7C2D12; }
.card-type-badge.red { background: #FECACA; color: #991B1B; }
.card-type-badge.pink { background: #FCE7F3; color: #831843; }

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
  text-decoration: none;
}
.card-title:hover { color: #185FA5; text-decoration: underline; }

.card-summary {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
  line-height: 1.6;
}

.card-meta {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.meta-region, .meta-verify { color: #64748b; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 12px;
  color: #475569;
  margin-right: 4px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 16px;
}
.page-link {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.page-link:hover { border-color: #185FA5; color: #185FA5; text-decoration: none; }
.page-link.active { background: #185FA5; color: #fff; border-color: #185FA5; }

/* 无结果引导 */
.no-result-guide {
  text-align: center;
  padding: 48px 20px;
}
.no-result-content h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #64748b;
}
.no-result-content p { color: #94a3b8; margin-bottom: 24px; }

/* 加载/错误状态 */
.loading-state, .error-state {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  font-size: 15px;
}

/* ============================================================
   商家信息主页
   ============================================================ */
.breadcrumb {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
  padding: 8px 0;
}
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #185FA5; }

.merchant-header {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.merchant-header-left { flex-shrink: 0; }
.merchant-logo, .merchant-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}
.merchant-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #185FA5;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.merchant-header-right { flex: 1; }
.merchant-header-right h1 {
  font-size: 24px;
  margin-bottom: 12px;
}
.merchant-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.trust-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.trust-badge.实名认证 { background: #D1FAE5; color: #065F46; }
.trust-badge.已认领 { background: #FEF3C7; color: #92400E; }
.trust-badge.未认领 { background: #F1F5F9; color: #64748b; }
.geo-link {
  margin-left: auto;
  color: #185FA5;
  font-size: 14px;
  font-weight: 500;
}
.merchant-intro {
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.7;
}
.merchant-region {
  font-size: 14px;
  color: #64748b;
}

.merchant-info, .merchant-content-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.merchant-info h2, .merchant-content-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}
.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.info-row:last-child { border-bottom: none; }
.info-label {
  width: 100px;
  color: #64748b;
  font-size: 14px;
  flex-shrink: 0;
}
.info-value { color: #1a202c; font-size: 14px; flex: 1; }
.info-value.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.content-list { display: flex; flex-direction: column; gap: 8px; }
.content-item { border-bottom: 1px solid #f1f5f9; padding: 8px 0; }
.content-item:last-child { border-bottom: none; }
.content-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1a202c;
}
.content-link:hover { color: #185FA5; text-decoration: none; }
.content-type-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.content-type-badge.guide, .content-type-badge.tutorial, .content-type-badge.case, .content-type-badge.faq {
  background: #DBEAFE; color: #1E40AF;
}
.content-type-badge.recruitment { background: #FED7AA; color: #7C2D12; }
.content-type-badge.promotion { background: #FECACA; color: #991B1B; }
.content-type-badge.announcement, .content-type-badge.relocation {
  background: #FCE7F3; color: #831843;
}
.content-title { flex: 1; font-size: 14px; }
.content-date { font-size: 13px; color: #94a3b8; }

.empty-state { color: #94a3b8; text-align: center; padding: 24px; }

/* ============================================================
   文章详情页
   ============================================================ */
.article-container { max-width: 800px; }

.article {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.article-header { margin-bottom: 24px; }
.article-header h1 {
  font-size: 26px;
  line-height: 1.4;
  margin: 12px 0;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #64748b;
  margin-top: 12px;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.author-info { display: flex; flex-direction: column; }
.author-name { font-weight: 500; color: #185FA5; }
.author-meta { font-size: 12px; color: #94a3b8; }

.article-tags {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.article-summary {
  background: #f8fafc;
  border-left: 4px solid #185FA5;
  padding: 16px;
  margin: 20px 0;
  border-radius: 4px;
  font-size: 15px;
  color: #475569;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: #1a202c;
}
.article-body p { margin-bottom: 16px; }
.article-body h2, .article-body h3 { margin: 24px 0 12px; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

.geo-promo {
  margin-top: 24px;
  padding: 16px;
  background: #EBF8FF;
  border-radius: 8px;
  text-align: center;
}
.geo-promo a { font-weight: 500; }

/* 商家卡片区块 */
.merchant-card-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.merchant-card-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
.merchant-card-mini {
  display: flex;
  align-items: center;
  gap: 16px;
}
.merchant-logo-small {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.merchant-card-info { flex: 1; }
.merchant-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
}
.merchant-card-name:hover { color: #185FA5; }
.merchant-card-meta { font-size: 13px; color: #94a3b8; }
.merchant-card-tags { margin-top: 4px; }

/* 招聘/促销详情页 */
.job-meta, .promo-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0;
  font-size: 14px;
  color: #475569;
}
.job-salary { color: #D85A30; font-weight: 600; }
.promo-price { color: #D85A30; font-weight: 600; font-size: 18px; }
.promo-discount { color: #854F0B; font-weight: 600; }
.job-benefits { margin: 12px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.job-contact { margin-top: 16px; padding: 12px; background: #f8fafc; border-radius: 8px; }
.promo-conditions { margin-top: 16px; padding: 12px; background: #FEF3C7; border-radius: 8px; font-size: 14px; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
  padding: 24px 0;
}
.footer-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left p { font-size: 13px; color: #64748b; margin-bottom: 4px; }
.footer-right { display: flex; gap: 16px; }
.footer-right a { font-size: 13px; color: #64748b; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-container { padding: 0 12px; }
  .container { padding: 16px 12px; }
  .search-input-wrapper { flex-direction: column; }
  .search-btn { width: 100%; }
  .merchant-header { flex-direction: column; padding: 20px; }
  .article { padding: 20px; }
  .article-header h1 { font-size: 20px; }
  .facets { flex-direction: column; align-items: stretch; }
  .facet-select { width: 100%; }
  .footer-container { flex-direction: column; text-align: center; }
}
