* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a1a2e;
  --accent: #c9a227;
  --accent-hover: #b8921f;
  --bg: #f8f6f1;
  --card: #ffffff;
  --text: #2d2d2d;
  --text-muted: #666;
  --border: #e8e4dc;
  --success: #2e7d32;
  --danger: #c62828;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.site-header .inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d2d4a 100%);
  color: #fff;
  padding: 32px 16px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.hero p {
  font-size: 0.9rem;
  opacity: 0.9;
  max-width: 320px;
  margin: 0 auto;
}

/* Section */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Product card */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-card .thumb {
  width: 100px;
  min-height: 100px;
  background: linear-gradient(145deg, #3d3d5c, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.product-card .info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-card .name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.product-card .desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card .price {
  color: var(--danger);
  font-weight: 700;
  font-size: 1rem;
}

.product-card .price small {
  font-size: 0.75rem;
  font-weight: 400;
}

.tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  background: #f0ebe0;
  color: var(--text-muted);
  border-radius: 4px;
  margin-right: 4px;
}

/* Detail page */
.detail-header {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.detail-header .cover {
  width: 100%;
  height: 160px;
  background: linear-gradient(145deg, #3d3d5c, var(--primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 16px;
}

.detail-header h1 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.detail-header .price-lg {
  font-size: 1.5rem;
  color: var(--danger);
  font-weight: 700;
  margin: 12px 0;
}

.detail-content {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.detail-content h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.detail-content ul {
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.detail-content li {
  margin-bottom: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--accent-hover);
}

.btn-wechat {
  background: #07c160;
  color: #fff;
}

.btn-wechat:hover {
  background: #06ad56;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--primary);
}

.btn-block {
  display: block;
  width: 100%;
}

.fixed-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  padding: 12px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.1);
  z-index: 99;
}

.fixed-bottom-bar .inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fixed-bottom-bar .price-info {
  flex: 1;
}

.fixed-bottom-bar .price-info .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fixed-bottom-bar .price-info .amount {
  font-size: 1.25rem;
  color: var(--danger);
  font-weight: 700;
}

.fixed-bottom-bar .btn {
  flex: 1;
  max-width: 160px;
}

/* Order / Checkout */
.order-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.order-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.order-item .thumb {
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #3d3d5c, var(--primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.order-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.order-row.total .value {
  color: var(--danger);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

/* Pay page */
.pay-box {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.pay-box .amount {
  font-size: 2rem;
  color: var(--danger);
  font-weight: 700;
  margin: 16px 0;
}

.pay-box .order-no {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pay-methods {
  margin: 20px 0;
}

.pay-method-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fffef8;
}

.pay-method-item .icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
}

/* Result page */
.result-box {
  text-align: center;
  padding: 40px 20px;
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.result-box h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.result-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.download-box {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  text-align: left;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.download-box h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 8px;
}

.download-item .file-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-item .file-icon {
  font-size: 1.5rem;
}

.download-item .btn-download {
  padding: 8px 16px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.download-item .btn-download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tip-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.8rem;
  color: #5d4037;
  margin-top: 12px;
}

/* Footer info - required for WeChat audit */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.85);
  padding: 24px 16px 32px;
  margin-top: 32px;
  font-size: 0.8rem;
}

.site-footer .inner {
  max-width: 480px;
  margin: 0 auto;
}

.site-footer h4 {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.site-footer p {
  margin-bottom: 8px;
  line-height: 1.7;
}

.site-footer a {
  color: var(--accent);
  text-decoration: underline;
}

/* Service blocks on homepage */
.service-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.service-block {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.service-block h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.service-block p,
.service-block ul {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-block ul {
  padding-left: 18px;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 12px 0;
}

.breadcrumb a {
  color: var(--accent);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.success {
  background: #e8f5e9;
  color: var(--success);
}

.status-badge.pending {
  background: #fff3e0;
  color: #e65100;
}

.query-pay-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
