:root {
  --primary: #4945FF;
  --primary-hover: #3734d9;
  --bg: #f6f6f9;
  --card: #ffffff;
  --border: #eaeaef;
  --text: #32324d;
  --text-secondary: #666687;
  --text-muted: #8e8ea0;
  --shadow: 0px 1px 4px rgba(0,0,0,.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1128px; margin: 0 auto; }

/* ── Header ── */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
}
.logo {
  font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none;
  letter-spacing: -.02em;
}
.header nav { display: flex; gap: 2px; }
.header nav a {
  padding: 8px 16px; border-radius: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all .15s;
}
.header nav a:hover { background: var(--bg); color: var(--text); }

.lang-switch { margin-left: 16px; }
.lang-switch a { padding: 4px 8px; font-size: 12px; border-radius: 4px; }
.lang-switch a.active { background: var(--primary); color: #fff; }

/* ── Hero ── */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  text-align: center; padding: 80px 24px 64px;
}
.hero h1 { font-size: 40px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 12px; }
.hero p { font-size: 16px; color: var(--text-secondary); margin-bottom: 28px; }
.hero .btn-group { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: auto; }
.hero .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; text-decoration: none;
  background: var(--primary); color: #fff; transition: all .15s;
  cursor: pointer; width: auto; flex: none; min-width: 140px;
}
.hero .btn:hover { background: var(--primary-hover); }
.hero .btn-outline {
  background: var(--card); color: var(--text-secondary); border-color: var(--border);
}
.hero .btn-outline:hover { border-color: var(--text-secondary); color: var(--text); }

/* ── Section ── */
.section { padding: 64px 24px; }
.section-title {
  font-size: 18px; font-weight: 600; text-align: center;
  margin-bottom: 32px; letter-spacing: -.02em;
}

/* ── Features / Cards ── */
.cards-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px; transition: box-shadow .15s;
}
.card:hover { box-shadow: var(--shadow); }
.card .icon { font-size: 28px; margin-bottom: 12px; display: block; }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ── Product Grid ── */
.prod-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.prod-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px; padding-bottom: 52px; overflow-wrap: break-word; word-wrap: break-word;
  transition: box-shadow .15s; position: relative; min-height: 220px;
}
.prod-card:hover { box-shadow: var(--shadow); }
.prod-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; height: 120px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; }
.prod-card .tag {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  background: #f0f0ff; color: var(--primary); font-size: 11px; font-weight: 500;
}
.prod-card-link { display: block; color: inherit; text-decoration: none; min-width: 0; }
.prod-card-link:hover { text-decoration: none; }
.prod-card-link:hover h3 { color: var(--primary); }
.prod-view-tag { position: absolute; bottom: 20px; right: 24px; cursor: pointer; }
.prod-card-link:hover .prod-view-tag { background: var(--primary); color: #fff; }

/* ── Page Header ── */
.page-header {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px; text-align: center;
}
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 6px; }
.page-header p { font-size: 14px; color: var(--text-secondary); }

/* ── Content ── */
.content-wrap { max-width: 768px; margin: 0 auto; padding: 40px 24px; }
.content-wrap h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.content-wrap p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.content-wrap ul { padding-left: 20px; margin-bottom: 16px; }
.content-wrap li { font-size: 14px; color: var(--text-secondary); margin-bottom: 6px; }

/* ── Contact ── */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 24px; }
.contact-layout label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 6px; display: block; }
.contact-layout input,.contact-layout textarea {
  display: block; width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; margin-bottom: 16px;
  background: var(--card); color: var(--text);
}
.contact-layout input:focus,.contact-layout textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(73,69,255,.12);
}
.contact-layout textarea { height: 120px; resize: vertical; }
.contact-layout .btn-submit {
  padding: 10px 24px; border-radius: 8px; border: none;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.contact-layout .btn-submit:hover { background: var(--primary-hover); }
.contact-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.contact-info p { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--card); padding: 48px 24px 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 32px; }
.footer h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.footer h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }
.footer p { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.footer a { display: block; font-size: 13px; color: var(--text-secondary); text-decoration: none; margin-bottom: 6px; }
.footer a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center; padding: 20px 0; font-size: 12px; color: var(--text-muted);
}

/* ── Responsive Nav ── */
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--text); padding: 4px 8px;
  line-height: 1;
}

/* ── CTA Section ── */
.cta-section {
  background: var(--primary);
  color: #fff;
}
.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,.85) !important; }
.cta-section .btn {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.cta-section .btn:hover {
  background: transparent;
  color: #fff;
}

/* ── Active Nav ── */
.header nav a.active { background: var(--primary); color: #fff; }
.header nav a.active:hover { background: var(--primary-hover); color: #fff; }

/* ── Prod Card Extras ── */
.prod-card a { color: inherit; text-decoration: none; display: block; }
.prod-card a:hover h3 { color: var(--primary); }
.prod-img {
  width: 100%; height: 180px; overflow: hidden; border-radius: 4px; margin-bottom: 12px;
  background: var(--bg);
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-date { font-size: 12px; color: var(--text-muted); }
.prod-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.prod-price { font-size: 14px; font-weight: 600; color: #e53935; }
.prod-price.warn { color: #f9a825; }
.prod-cat { font-size: 11px; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 4px; }

/* ── Post Meta ── */
.post-meta {
  font-size: 13px; color: var(--text-muted); margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap;
}
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-content { font-size: 15px; line-height: 1.8; color: var(--text); }
.post-content p { margin-bottom: 16px; }
.post-content img { max-width: 100%; height: auto; border-radius: 4px; }

/* ── Pagination ── */
.pagination-wrap { margin-top: 40px; text-align: center; }
.pagination-wrap a, .pagination-wrap span {
  display: inline-block; padding: 6px 14px; margin: 0 2px; border-radius: 6px;
  font-size: 13px; text-decoration: none; border: 1px solid var(--border); color: var(--text-secondary);
  transition: all .15s;
}
.pagination-wrap a:hover { border-color: var(--primary); color: var(--primary); }
.pagination-wrap .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Prod Filter ── */
.prod-filter { margin-bottom: 24px; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; }
.prod-filter-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text); margin-right: 4px; }
.filter-link {
  display: inline-block; padding: 4px 12px; border-radius: 4px;
  font-size: 13px; text-decoration: none; color: var(--text-secondary);
  background: var(--bg); transition: all .15s;
}
.filter-link:hover, .filter-link.active { background: var(--primary); color: #fff; }

/* ── Cate Group (category sub grouping) ── */
.cate-group { margin-bottom: 40px; }
.cate-group-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cate-group-title a { color: var(--text); text-decoration: none; }
.cate-group-title a:hover { color: var(--primary); }

/* ── Product Detail ── */
.prod-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.prod-main-img { background: var(--card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.prod-main-img img { width: 100%; display: block; }
.prod-info h1 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.prod-price-lg { font-size: 24px; font-weight: 700; color: #e53935; margin-bottom: 16px; }
.prod-price-lg.warn { color: #f9a825; }
.prod-desc-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.prod-param { display: flex; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.prod-param .param-key { width: 100px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.prod-param .param-val { color: var(--text-secondary); }
.prod-content { font-size: 15px; line-height: 1.8; }
.prod-content p { margin-bottom: 16px; }

@media (max-width: 768px) {
  .prod-detail { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Page Thumb ── */
.page-thumb { margin-bottom: 24px; text-align: center; }
.page-thumb img { max-width: 100%; height: auto; border-radius: 8px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: repeat(2,1fr); }
  .prod-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header nav { gap: 0; }
  .header nav a { padding: 8px 8px; font-size: 12px; }

  .nav-toggle { display: block; }
  .header .container { flex-wrap: wrap; height: auto; min-height: 56px; }
  .header nav { display: none; width: 100%; order: 3; flex-direction: column; padding: 4px 0 12px; }
  .header nav a { padding: 10px 0; border-radius: 0; border-top: 1px solid var(--border); }
  .lang-switch { display: none; width: 100%; order: 4; margin-left: 0; padding: 0 0 12px; }
  .header.nav-open nav { display: flex; }
  .header.nav-open .lang-switch { display: flex; gap: 4px; }
}
