/* ===== xypf168.cn 全新设计 - 卡片式布局 ===== */
/* 完全不同于yunyanxuan.cn的新模板 */

:root {
  --theme: #1a365d;
  --gradient: linear-gradient(135deg, #1a365d 0%, #2a5298 100%);
  --accent: #3182ce;
  --bg: #f7f8fc;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #555;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans CJK SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--theme); }

/* ===== 顶部导航栏 ===== */
.topbar {
  background: var(--gradient);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.logo span { opacity: 0.8; font-weight: 400; font-size: 14px; }
.nav-menu {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-menu a {
  color: rgba(255,255,255,0.9);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-menu a:hover, .nav-menu a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* ===== Hero区域 ===== */
.hero {
  background: var(--gradient);
  color: #fff;
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  letter-spacing: 2px;
}
.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto 28px;
  position: relative;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  position: relative;
}
.hero-tags span {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(5px);
}

/* ===== 内容容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ===== 板块标题 ===== */
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title .more {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
}

/* ===== 产品卡片网格 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.product-card .img-wrap {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-card .img-wrap svg {
  width: 100%;
  height: 100%;
}
.product-card .cat-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.product-card .info {
  padding: 16px;
}
.product-card .name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
}
.product-card .desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}
.product-card .price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-card .price {
  font-size: 20px;
  font-weight: 700;
  color: #e53e3e;
}
.product-card .buy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.product-card .buy-btn:hover {
  background: var(--theme);
}

/* ===== 文章列表卡片 ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.article-card .cover {
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.article-card .cover svg {
  width: 100%;
  height: 100%;
}
.article-card .body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card .title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .excerpt {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  flex: 1;
}
.article-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
}
.article-card .meta .cat {
  background: var(--bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* ===== 文章详情 ===== */
.article-detail {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.article-detail h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}
.article-detail .meta {
  display: flex;
  gap: 20px;
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-detail .content {
  font-size: 16px;
  line-height: 2;
  color: var(--text);
}
.article-detail .content p {
  margin-bottom: 16px;
}
.article-detail .content h2 {
  font-size: 22px;
  margin: 24px 0 12px;
  color: var(--theme);
}
.article-detail .cover-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 24px;
}

/* ===== 侧边栏 ===== */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}
.sidebar-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.sidebar-box h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}
.sidebar-box ul {
  list-style: none;
}
.sidebar-box li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.sidebar-box li:last-child { border: none; }
.sidebar-box a {
  font-size: 14px;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-box a:hover { color: var(--accent); }

/* ===== 分类标签 ===== */
.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.cat-bar a {
  padding: 8px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
}
.cat-bar a:hover, .cat-bar a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== 底部 ===== */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}
.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}
.footer a:hover { color: #fff; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

/* ===== 微信咨询弹窗 ===== */
.wechat-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
}
.wechat-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(7,193,96,0.4);
  transition: all 0.3s;
}
.wechat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(7,193,96,0.5);
}
.wechat-modal {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 1000;
  width: 320px;
  text-align: center;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.wechat-modal.show { display: block; }
.wechat-modal h3 {
  font-size: 20px;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.wechat-modal p {
  color: #666;
  font-size: 14px;
  margin-bottom: 16px;
}
.wechat-modal .qr-box {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  background: #f5f5f5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wechat-modal .wx-id {
  font-size: 18px;
  font-weight: 600;
  color: #07c160;
  margin-bottom: 16px;
}
.wechat-modal .copy-btn {
  background: #07c160;
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.wechat-modal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  border: none;
  background: none;
}

/* 立即咨询按钮 */
.consult-btn {
  display: inline-block;
  background: #07c160;
  color: #fff;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.consult-btn:hover {
  background: #06ad56;
  transform: translateY(-1px);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}
.pagination a {
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
}
.pagination a:hover, .pagination a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== APP下载页 ===== */
.download-section {
  text-align: center;
  padding: 60px 20px;
}
.download-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}
.download-section .qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 30px auto;
  background: var(--bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-light);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-menu.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--theme);
    padding: 10px;
  }
  .mobile-toggle { display: block; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .article-detail { padding: 20px; }
  .article-detail h1 { font-size: 22px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero { padding: 40px 15px 30px; }
  .hero h1 { font-size: 20px; }
  .container { padding: 20px 15px; }
}
