/* =========================================================
   xiaozhongkeji_v2 — 珠宝行业官网主题样式
   Bootstrap 5.3.2 覆盖 + 行业定制配色
   ========================================================= */

/* === CSS 变量 (珠宝行业调色板) === */
:root {
  --gold: #c8a45c;
  --gold-light: #e0c87a;
  --gold-dark: #a07d3a;
  --navy: #1a2744;
  --navy-light: #2a3f6a;
  --cream: #fefaf3;
  --jade: #0d9488;
  --pearl: #f5f0eb;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

/* === 全局字体 === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === 工具类 === */
.text-gold { color: var(--gold) !important; }
.text-navy { color: var(--navy) !important; }
.text-jade { color: var(--jade) !important; }
.bg-gold { background: var(--gold) !important; }
.bg-navy { background: var(--navy) !important; }
.bg-cream { background: var(--cream) !important; }
.bg-pearl { background: var(--pearl) !important; }
.bg-gradient-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold-light)) !important; }

/* === 按钮 === */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  border: none;
  font-weight: 500;
  transition: var(--transition);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,164,92,.4);
}
.btn-outline-gold {
  border: 2px solid var(--gold);
  color: var(--gold-dark);
  background: transparent;
  font-weight: 500;
  transition: var(--transition);
}
.btn-outline-gold:hover {
  background: var(--gold);
  color: #fff;
}
.btn-navy {
  background: var(--navy);
  color: #fff;
  border: none;
}
.btn-navy:hover { background: var(--navy-light); color: #fff; }

/* === 导航栏增强 === */
.site-header .navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.navbar .nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
  position: relative;
  transition: var(--transition);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--gold-dark);
}
.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* === 页面 Hero === */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,164,92,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero h1 { font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); }
.page-hero .lead { color: rgba(255,255,255,.75); max-width: 700px; margin: 0 auto; }

/* === 卡片系统 === */
.card-product {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  background: #fff;
  height: 100%;
}
.card-product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-product .card-img-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-product .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card-product:hover .card-img-wrapper img { transform: scale(1.05); }
.card-product .card-body { padding: 1.25rem; }
.card-product .card-category {
  display: inline-block;
  background: var(--cream);
  color: var(--gold-dark);
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}
.card-product .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-product .card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === 案例卡片 === */
.card-case {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  break-inside: avoid;
  margin-bottom: 1.5rem;
}
.card-case:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-case img { width: 100%; display: block; }
.card-case .case-overlay {
  padding: 1rem 1.25rem;
  background: #fff;
}
.card-case .case-overlay h5 { font-size: 1rem; font-weight: 600; margin: 0; }

/* === 新闻卡片 === */
.card-news {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  transition: var(--transition);
  overflow: hidden;
}
.card-news:hover { box-shadow: var(--shadow-md); }
.card-news .news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-news .card-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}
.card-news .card-title a:hover { color: var(--gold-dark); }

/* === 首页 Swiper Banner === */
.hero-swiper { width: 100%; }
.hero-swiper .swiper-slide {
  height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-swiper .swiper-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,39,68,.4), rgba(26,39,68,.7));
}
.hero-swiper .slide-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 600px;
}
.hero-swiper .slide-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.hero-swiper .slide-content p {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 1.5rem;
}
.hero-swiper .swiper-pagination-bullet { background: #fff; opacity: .6; }
.hero-swiper .swiper-pagination-bullet-active { opacity: 1; background: var(--gold); }

/* === 统计数字 === */
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}
.stat-card .stat-number {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--gold-dark);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* === 合作伙伴 Logo 网格 === */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  align-items: center;
}
.partner-grid a, .partner-grid .partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.partner-grid img {
  height: 70px;
  max-width: 100%;
  transition: var(--transition);
  object-fit: contain;
  opacity: 1;
}
.partner-grid img:hover {
  filter: grayscale(100%);
  opacity: 0.5;
}
@media (max-width: 992px) { .partner-grid { grid-template-columns: repeat(4, 1fr); } .partner-grid img { height: 55px; } }
@media (max-width: 576px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } .partner-grid img { height: 45px; } }

/* === 联系表单 === */
.contact-form-wrapper {
  max-width: 700px;
  margin: 0 auto;
}
.contact-form-wrapper .form-control {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  transition: var(--transition);
}
.contact-form-wrapper .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,164,92,.15);
}

/* === 文档侧边栏 === */
.doc-sidebar {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
}
.doc-sidebar .nav-link {
  color: var(--text-dark);
  padding: .4rem .75rem;
  border-radius: 6px;
  font-size: .9rem;
  transition: var(--transition);
}
.doc-sidebar .nav-link:hover,
.doc-sidebar .nav-link.active {
  background: var(--gold);
  color: #fff;
}

/* === CTA 区域 === */
.cta-section {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 { font-weight: 700; margin-bottom: 1rem; }

/* === 定价卡片 === */
.border-gold { border: 2px solid var(--gold) !important; }
.badge.text-bg-gold { background: var(--gold); color: #fff; font-size: 0.75rem; }

/* === Banner 内文字区域 === */
.hero-swiper .slide-content { max-width: 600px; }
.hero-swiper .text-start .slide-content { text-align: left; }
.hero-swiper .text-end .slide-content { text-align: right; }
.hero-swiper .text-center .slide-content { text-align: center; }
.hero-swiper .swiper-slide .justify-content-start .slide-content { margin-left: 5%; }
.hero-swiper .swiper-slide .justify-content-end .slide-content { margin-right: 5%; }

/* === 返回顶部 === */
.product-detail-hero { background: var(--cream); padding: 2rem; border-radius: var(--radius); }
.product-meta-item { display: inline-flex; align-items: center; padding: 0.3rem 0.8rem; background: #fff; border-radius: 20px; margin: 0.25rem; font-size: 0.85rem; }
.content-body img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.content-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.content-body table td, .content-body table th { border: 1px solid #e2e8f0; padding: 0.5rem 0.75rem; }
.content-body table th { background: #f8fafc; font-weight: 600; }
.content-body pre { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.content-body blockquote { border-left: 4px solid var(--gold); padding: 0.5rem 1rem; margin: 1rem 0; background: var(--cream); }

/* === 返回顶部 === */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold-dark); transform: translateY(-2px); }

/* === 加载/空状态 === */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
