:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --text: #1b2430;
  --muted: #5b6776;
  --border: #d9e0e8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --digital: #7c3aed;
  --physical: #0891b2;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(20, 35, 60, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container { width: min(1120px, 92%); margin: 0 auto; }

.demo-banner {
  background: #fff7e6;
  border-bottom: 1px solid #f0e0b8;
  color: #8a6100;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}
.demo-banner-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d97706;
  margin-right: 8px;
  vertical-align: middle;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 18px; }
.brand { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--primary); }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-small { padding: 8px 14px; }
.btn-block { width: 100%; }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.hero { padding: 68px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--primary); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }
h1 { font-size: 42px; line-height: 1.18; margin: 12px 0 18px; letter-spacing: -0.02em; }
h2 { font-size: 28px; margin: 0 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 0 0 8px; }
h4 { font-size: 14px; margin: 22px 0 10px; }
.lede, .section-lede { color: var(--muted); font-size: 16px; margin-top: 0; }
.hero-actions { display: flex; gap: 12px; margin: 26px 0 14px; flex-wrap: wrap; }
.micro-note { color: var(--muted); font-size: 13px; margin-top: 0; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}
.hero-card-title { font-weight: 700; font-size: 14px; }
.hero-card-pill { font-size: 11px; color: var(--primary); background: #eef4ff; border-radius: 20px; padding: 3px 10px; }
.flow-mini { list-style: none; margin: 0; padding: 18px 20px 6px; }
.flow-mini li { display: flex; align-items: center; gap: 12px; font-size: 14px; margin-bottom: 12px; color: #334155; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: #eef4ff; color: var(--primary); font-size: 12px; font-weight: 700; flex: none;
}
.hero-card-foot { margin: 0; padding: 12px 20px 18px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--border); }

.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  cursor: pointer;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-visual {
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-visual.is-digital { background: linear-gradient(135deg, #f1e9ff, #e4ecff); color: var(--digital); }
.product-visual.is-physical { background: linear-gradient(135deg, #e0f5fa, #e6f0ff); color: var(--physical); }
.product-visual svg { width: 44px; height: 44px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.product-type-label {
  position: absolute; top: 12px; left: 12px;
  font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px; padding: 3px 10px;
  color: currentColor;
}
.product-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.product-desc { color: var(--muted); font-size: 13px; margin: 0 0 16px; flex: 1; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-price { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.product-unit { font-size: 12px; color: var(--muted); font-weight: 400; }
.product-add { padding: 8px 14px; font-size: 13px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); font-size: 14px; }
.channel-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.tag-digital { background: #f1e9ff; color: var(--digital); }
.tag-physical { background: #e0f5fa; color: var(--physical); }
.tag-future { background: #eef2f7; color: var(--muted); }
.channel-note { font-size: 12px !important; color: #8b96a5 !important; border-top: 1px dashed var(--border); padding-top: 10px; margin-bottom: 0; }

.flow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flow-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.flow-card p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.flow-index { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: 0.08em; }

.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.42); z-index: 30; }
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--surface);
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.14);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-head h3 { margin: 0; }
.icon-btn { border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.icon-btn:hover { color: var(--text); }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 56px 12px; }
.cart-line { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-line-main { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.cart-line-type { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-control button { border: none; background: #f8fafc; width: 28px; height: 28px; cursor: pointer; color: var(--text); font-size: 15px; }
.qty-control button:hover { background: #eef2f7; }
.qty-control span { min-width: 28px; text-align: center; font-size: 13px; }
.cart-line-price { font-size: 14px; font-weight: 700; white-space: nowrap; }
.cart-line-remove { border: none; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0 0; text-decoration: underline; }
.cart-foot { padding: 18px 20px 22px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.cart-total-row strong { font-size: 22px; }
.cart-hint, .field-hint { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, 0.5); overflow-y: auto; }
.modal-panel { background: var(--surface); border-radius: var(--radius); width: min(440px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 26px; padding: 6px 22px 24px; }
.form-main label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.required { color: #dc2626; }
.form-main input[type="text"], .form-main input[type="email"], .form-main textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 14px; background: #fff; color: var(--text);
}
.form-main textarea { resize: vertical; }
.form-main input.has-error, .form-main textarea.has-error { border-color: #dc2626; }
.pay-options { display: grid; gap: 8px; }
.pay-option { display: flex !important; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0 !important; cursor: pointer; }
.pay-option:hover { border-color: var(--primary); }
.pay-option input { accent-color: var(--primary); }
.pay-option span { display: flex; flex-direction: column; }
.pay-option small { color: var(--muted); font-weight: 400; font-size: 12px; }
.order-summary { border-left: 1px solid var(--border); padding-left: 24px; }
.order-summary h4 { margin-top: 4px; }
.summary-item { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.summary-item span:first-child { color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: center; margin: 16px 0; font-size: 15px; }
.summary-total strong { font-size: 22px; }
.success-lead { color: var(--muted); font-size: 14px; padding: 20px 22px 0; margin: 0; }
.order-meta { margin: 16px 22px; padding: 14px 16px; background: #f8fafc; border-radius: 10px; }
.order-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; }
.order-meta dt { color: var(--muted); }
.order-meta dd { margin: 0; font-weight: 600; }
#success-modal .field-hint { padding: 0 22px; }
#success-done { width: calc(100% - 44px); margin: 8px 22px 22px; }

.toast {
  position: fixed; right: 24px; bottom: 24px;
  background: #1b2430; color: #fff;
  padding: 12px 16px; border-radius: 10px;
  font-size: 13px; opacity: 0; transform: translateY(8px);
  pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .product-grid, .grid-3, .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .order-summary { border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 12px; }
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  h1 { font-size: 32px; }
  .nav { display: none; }
  .hero { padding-top: 44px; }
  .section { padding: 48px 0; }
}
@media (max-width: 560px) {
  .product-grid, .grid-3, .flow-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; }
}
