/* ============================================================
   十藏古籍 — 商城样式
   古典书卷配色：宣纸底、墨褐字、暗金点缀
   ============================================================ */

:root {
  --bg:         #f7f3ec;
  --bg-card:    #fffdf8;
  --bg-alt:     #f0ebe0;
  --text:       #3a2a18;
  --text-soft:  #7a6a55;
  --text-muted: #a89880;
  --accent:     #8b6914;
  --accent-d:   #6b4f0e;
  --border:     #e0d5c5;
  --danger:     #c0392b;
  --success:    #2d7a4a;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(58, 42, 24, 0.08);
  --shadow-lg:  0 8px 32px rgba(58, 42, 24, 0.12);
}

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

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 560px; }

/* ---- Header ---- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
}
.logo-text { font-size: 18px; font-weight: 600; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ---- Hero ---- */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-eyebrow {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--accent); }
.hero-desc {
  color: var(--text-soft);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto 24px;
}

/* Hero 中央的产品形态提示条 */
.hero-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 105, 20, 0.08);
  border: 1px solid rgba(139, 105, 20, 0.25);
  color: var(--text);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  margin: 0 auto 32px;
  max-width: 580px;
}
.hero-notice strong { color: var(--accent); }
.notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Collections ---- */
.collections { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-title { font-size: 28px; font-weight: 700; }
.section-sub { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

/* ---- 产品网格 ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* ---- 产品卡片 ---- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* 封面区（图片 + 徽章） */
.product-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;     /* 16:9 比例 */
  background: var(--bg-alt);
  overflow: hidden;
}
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* 裁剪填满 */
  display: block;
  transition: transform 0.3s;
}
.product-card:hover .product-cover img { transform: scale(1.03); }

/* 顶部徽章 — 数字下载 */
.cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(139, 105, 20, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  backdrop-filter: blur(4px);
}
.cover-badge.badge-featured {
  background: linear-gradient(135deg, #c0392b, #8b6914);
  font-size: 13px;
  padding: 5px 12px;
}

/* 右下角 — 文件格式 */
.cover-format {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(58, 42, 24, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* 卡片正文 */
.product-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.product-subtitle {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.product-desc {
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* 三个卖点标签 */
.selling-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.selling-points li {
  font-size: 12px;
  color: var(--accent);
  background: rgba(139, 105, 20, 0.08);
  border: 1px solid rgba(139, 105, 20, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 500;
}

.product-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.meta-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 3px 10px;
  border-radius: 4px;
}

/* 价格 + 购买按钮 */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.price-wrap { display: flex; flex-direction: column; gap: 2px; }
.price { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.download-note {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* 首推卡：金色边框 */
.product-card-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, #fffbf0 0%, var(--bg-card) 50%);
  box-shadow: 0 4px 20px rgba(139, 105, 20, 0.15);
}

/* 集合底部统一提示 */
.collection-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(139, 105, 20, 0.06);
  border: 1px dashed rgba(139, 105, 20, 0.3);
  color: var(--text);
  font-size: 13px;
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-top: 40px;
  text-align: left;
}
.collection-notice strong { color: var(--accent); }

/* ---- About ---- */
.about { padding: 64px 0; background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.about-item { text-align: center; }
.about-icon {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.about-item h3 { font-size: 17px; margin-bottom: 8px; }
.about-item p { color: var(--text-soft); font-size: 14px; }

/* ---- FAQ ---- */
.faq { padding: 72px 0; }
.faq-list { margin-top: 32px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item summary {
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 18px;
  color: var(--accent);
}
.faq-item[open] summary::after { content: '-'; }
.faq-item p {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 12px;
}
.faq-item strong { color: var(--text); }

/* ---- Footer ---- */
.site-footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.site-footer p { color: var(--text-muted); font-size: 13px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 42, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal-desc { color: var(--text-soft); font-size: 14px; margin-bottom: 24px; }
.modal label { display: block; margin-bottom: 20px; }
.modal label span {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.modal input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.modal input:focus {
  outline: none;
  border-color: var(--accent);
}
.modal-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
}

/* ---- Success page ---- */
.success-section { padding: 80px 0; text-align: center; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.success-desc { color: var(--text-soft); margin: 16px 0 32px; }
.success-actions { display: flex; gap: 16px; justify-content: center; }
.redownload-form { text-align: left; margin-top: 24px; }
.redownload-form label { display: block; margin-bottom: 16px; }
.redownload-form label span {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.redownload-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
}
.redownload-form input:focus { outline: none; border-color: var(--accent); }
.rd-message {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
}
.rd-message.error { color: var(--danger); }
.rd-message.success { color: var(--success); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero-title { font-size: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-links { gap: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-notice { font-size: 13px; padding: 8px 14px; }
}