*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #f5f7fa; --card: #ffffff; --ink: #1d2733; --muted: #6b7684;
  --accent: #2f6fed; --accent-dark: #1f56c4; --line: #dfe5ec;
  --ok: #2e7d4f; --err: #c0392b; --radius: 14px; --shadow: 0 6px 24px rgba(29,39,51,.08);
}
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
a { color: var(--accent-dark); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.announce { background: var(--ink); color: #e8eef6; text-align: center; font-size: 13px; letter-spacing: .04em; padding: 8px 16px; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(245,247,250,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 10px; min-height: 64px; flex-wrap: wrap; padding: 6px 0; }
.brand { font-size: 19px; font-weight: 800; letter-spacing: .1em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--accent); }
.main-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.main-nav a:hover { color: var(--ink); background: #e9eef5; }
.header-spacer { flex: 1 1 auto; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.lang-btn { border: none; background: transparent; color: var(--muted); padding: 10px 14px; font-size: 13px; font-weight: 700; min-height: 44px; }
.lang-btn.active { background: var(--ink); color: #fff; }
.pill-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; font-size: 14px; }
.pill-btn:hover { border-color: var(--accent); }
.cart-badge { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.btn-primary { background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 14px 30px; font-size: 16px; font-weight: 700; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 12px 24px; min-height: 44px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.hero { padding: 40px 0 28px; }
.hero-grid { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); gap: 32px; align-items: center; }
.hero-copy h1 { font-size: clamp(28px,4.4vw,46px); line-height: 1.15; margin: 0 0 14px; }
.hero-copy p { color: var(--muted); font-size: 16px; margin: 0 0 24px; max-width: 46ch; }
.hero-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-fallback { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); background: linear-gradient(135deg,#dce6f5,#9db8e0); display: flex; align-items: center; justify-content: center; color: #33507e; font-weight: 700; letter-spacing: .1em; }
.trust-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.trust-item { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--muted); }
.shop { padding: 26px 0 56px; }
.shop-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.shop-head h2 { font-size: 26px; margin: 0; }
.shop-head p { color: var(--muted); margin: 0; font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { background: var(--card); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 9px 18px; font-size: 14px; min-height: 44px; }
.chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.product-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%,250px),1fr)); }
.product-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.thumb { position: relative; aspect-ratio: 1/1; background: #eef2f7; cursor: pointer; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg,#e3ebf6,#c2d2e8); color: #3d5a86; }
.img-fallback span { font-size: 12px; letter-spacing: .08em; font-weight: 600; text-align: center; padding: 0 10px; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.card-cat { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); font-weight: 700; }
.card-name { font-size: 16px; font-weight: 700; margin: 0; color: var(--ink); text-decoration: none; }
.card-name:hover { color: var(--accent-dark); text-decoration: underline; }
.card-desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1 1 auto; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.card-price { font-size: 18px; font-weight: 800; }
.add-btn { background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; min-height: 44px; }
.add-btn:hover { background: var(--accent-dark); }
.page-view { padding: 32px 0 64px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 18px; padding: 8px 0; }
.back-link:hover { color: var(--accent-dark); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.panel h2 { margin: 0 0 18px; font-size: 22px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0,7fr) minmax(0,5fr); gap: 28px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 48px; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.field-err { display: none; color: var(--err); font-size: 12px; margin-top: 5px; }
.field.invalid .field-err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { margin-top: 20px; }
.form-actions .btn-primary { width: 100%; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--muted); }
.sum-row.total { font-size: 17px; font-weight: 800; color: var(--ink); margin: 10px 0 4px; }
.ship-note { font-size: 12px; color: var(--ok); margin: 0 0 12px; }
.sum-item { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.sum-item .si-name { min-width: 0; color: var(--ink); flex: 1 1 auto; }
.sum-item .si-line { font-weight: 700; white-space: nowrap; }
.qty-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-size: 15px; line-height: 1; color: var(--ink); }
.qty-btn:disabled { opacity: .4; }
.ci-remove { background: none; border: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 4px; }
.ci-remove:hover { color: var(--err); }
.ship-options { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; }
.ship-option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; min-height: 48px; }
.ship-option.selected { border-color: var(--accent); background: #eef4ff; }
.ship-option input { width: 20px; height: 20px; accent-color: var(--accent); }
.ship-option .so-name { font-weight: 700; font-size: 14px; display: block; }
.ship-option .so-eta { font-size: 12px; color: var(--muted); }
.ship-option .so-price { font-weight: 800; font-size: 14px; white-space: nowrap; margin-left: auto; }
.demo-note { background: #eef4ff; border: 1px solid #d4e0f5; color: #33507e; border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-top: 14px; }
.hosted-frame { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.hosted-bar { background: var(--ink); color: #e8eef6; font-size: 12.5px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hosted-body { padding: 24px; background: var(--card); }
.hosted-amount { font-size: 30px; font-weight: 800; margin: 4px 0 18px; }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pay-method { flex: 1 1 120px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--bg); min-height: 48px; }
.pay-method.selected { border-color: var(--accent); background: #eef4ff; color: var(--accent-dark); }
.pay-status { font-size: 14px; font-weight: 600; margin: 14px 0 0; min-height: 22px; }
.success-panel { max-width: 640px; margin: 0 auto; text-align: center; }
.success-icon { width: 72px; height: 72px; border-radius: 999px; background: #e3f0e7; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.success-summary { text-align: left; background: var(--bg); border-radius: 10px; padding: 16px 18px; margin-bottom: 20px; }
.success-address { text-align: left; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.detail-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-dark); font-weight: 800; font-size: 15px; border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0,6fr) minmax(0,6fr); gap: 32px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 1/1; background: #eef2f7; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-main video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.gallery-thumbs { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.g-arrow { flex: 0 0 auto; width: 40px; height: 56px; border: none; border-radius: 8px; background: var(--ink); color: #fff; font-size: 18px; }
.g-arrow:hover { background: var(--accent-dark); }
.g-thumbs { display: flex; gap: 8px; flex: 1 1 auto; overflow-x: auto; padding: 2px; }
.g-thumb { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); background: #eef2f7; padding: 0; }
.g-thumb.active { border-color: #e8a13c; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb .g-vid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-size: 18px; }
.g-thumb .g-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#e3ebf6,#c2d2e8); color: #3d5a86; font-size: 10px; font-weight: 700; text-align: center; padding: 2px; }
.detail-info h1 { font-size: clamp(24px,3vw,34px); margin: 0 0 6px; }
.detail-sub { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.spec-list { margin: 0 0 14px; padding: 0; list-style: none; font-size: 14.5px; }
.spec-list li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.variant-note { font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.detail-price { font-size: 26px; font-weight: 800; margin: 0 0 18px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-actions .btn-primary, .detail-actions .btn-ghost { flex: 1 1 160px; }
.detail-tabs { margin-top: 40px; }
.tab-bar { display: flex; gap: 6px; border-bottom: 2px solid var(--line); }
.tab-btn { border: none; background: #e9eef5; color: var(--muted); font-weight: 700; padding: 12px 26px; border-radius: 10px 10px 0 0; min-height: 48px; font-size: 15px; }
.tab-btn.active { background: var(--ink); color: #fff; }
.tab-panel { padding: 24px 4px; }
.tab-panel h3 { color: #e8641c; font-size: 17px; margin: 0 0 4px; border-bottom: 2px solid #e8641c; display: inline-block; padding-bottom: 4px; }
.desc-long { font-size: 15px; max-width: 78ch; margin: 16px 0; white-space: pre-wrap; }
.desc-long img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }
.works-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.works-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 700; }
.works-dot { width: 12px; height: 12px; border-radius: 999px; }
.matter-banner { background: linear-gradient(135deg,#5b84c4,#7fa3d8); border-radius: var(--radius); color: #fff; text-align: center; padding: 34px 20px; margin: 18px 0; }
.matter-banner .mb-title { font-size: clamp(22px,3vw,32px); font-weight: 800; margin: 0 0 12px; }
.matter-banner .mb-pill { display: inline-block; background: #fff; color: #2f6fed; font-weight: 800; border-radius: 999px; padding: 8px 26px; font-size: 16px; margin-bottom: 12px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 16px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 34%; color: var(--muted); font-weight: 700; background: var(--bg); }
.sample-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tab { flex: 1 1 0; border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 10px; padding: 10px; font-weight: 700; min-height: 44px; }
.auth-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; }
.pw-rules li { padding: 3px 0; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: '○'; font-size: 11px; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: '●'; }
.auth-error { display: none; color: var(--err); font-size: 13px; margin: 10px 0 0; }
.auth-error.show { display: block; }
.auth-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.blocked-banner { background: #fbe7e4; border: 1px solid #f0c4bd; color: var(--err); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; margin: 0 0 16px; }
.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 36px 0 44px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 28px; }
.site-footer h4 { margin: 0 0 10px; font-size: 14px; letter-spacing: .1em; }
.site-footer p { color: var(--muted); font-size: 13px; margin: 0 0 8px; max-width: 52ch; }
.footer-demo { font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%,20px); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 860px) { .hero-grid, .checkout-grid, .detail-grid, .footer-grid { grid-template-columns: 1fr; } .hero { padding-top: 26px; } }
@media (max-width: 560px) { .main-nav a { padding: 10px 8px; font-size: 13px; } .brand { font-size: 16px; } .field-row { grid-template-columns: 1fr; gap: 0; } .panel { padding: 18px; } .tab-btn { padding: 12px 16px; font-size: 14px; } }
