:root {
    --ink: #232323;
    --muted: #777;
    --line: #eee;
    --surface: #fff;
    --page: #f5f5f5;
    --red: #e52d3b;
    --deep-red: #c71f2e;
    --orange: #f58b20;
    --green: #178451;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
.page { min-height: 100vh; padding-bottom: 128px; }
.page.loading > * { opacity: .35; pointer-events: none; }
.commerce-view, .classic-view { max-width: 640px; margin: 0 auto; }
.commerce-view { background: var(--page); }
.commerce-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.commerce-topbar-title { font-size: 16px; font-weight: 700; }
.commerce-topbar-secure { color: var(--green); font-size: 12px; }

.commerce-gallery { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1 / 1; background: #fff; }
.gallery-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; background: #fff; scroll-snap-align: start; }
.gallery-dots { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 5px; padding: 6px 7px; border-radius: 12px; background: rgba(34, 34, 34, .42); }
.gallery-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.gallery-dots button.active { background: #fff; }
.deal-bubble { position: absolute; z-index: 2; top: 13px; left: 12px; max-width: calc(100% - 24px); padding: 8px 11px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .85); border-radius: 7px; background: rgba(34, 34, 34, .72); color: #fff; font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transform: translateY(-8px); transition: opacity .26s ease, transform .26s ease; }
.deal-bubble.show { opacity: 1; transform: translateY(0); }

.commerce-main-info { padding: 14px 14px 13px; background: #fff; }
.promotion-countdown { display: flex; align-items: center; gap: 7px; min-height: 29px; margin: -14px -14px 13px; padding: 0 14px; background: var(--red); color: #fff; font-size: 12px; }
.promotion-countdown strong { display: inline-block; padding: 2px 6px; border-radius: 3px; background: #fff; color: var(--red); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.commerce-title { margin: 0; color: #202020; font-size: 18px; line-height: 1.45; font-weight: 700; }
.commerce-subtitle { min-height: 19px; margin: 6px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.commerce-price-row { display: flex; align-items: baseline; min-height: 44px; color: var(--red); white-space: nowrap; }
.price-symbol { font-size: 18px; font-weight: 700; }
.commerce-price { display: inline-block; font-size: 34px; line-height: 1; font-weight: 800; }
.commerce-price.price-revealed { animation: price-reveal .72s cubic-bezier(.18, .76, .2, 1); }
.commerce-original { margin-left: 7px; color: #999; font-size: 13px; }
.commerce-save { margin-left: 8px; padding: 3px 5px; border: 1px solid #f7b6bb; border-radius: 3px; color: var(--red); font-size: 11px; }
.commerce-stats { display: flex; align-items: center; gap: 9px; color: #888; font-size: 12px; }
.commerce-stats i { width: 1px; height: 11px; background: #ddd; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 0; margin: 8px 0; padding: 11px 14px; background: #fff; color: #555; }
.trust-badges span { display: inline-flex; align-items: center; margin-right: 15px; font-size: 12px; line-height: 20px; }
.trust-badges span:before { content: '✓'; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 4px; border-radius: 50%; background: #edf8f1; color: var(--green); font-size: 10px; font-weight: 800; }

.commerce-section { margin-top: 8px; padding: 14px; background: #fff; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 16px; }
.section-heading span { color: #999; font-size: 12px; }
.package-list { display: grid; gap: 9px; }
.package-option { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 67px; padding: 11px 12px; border: 1px solid #e3e3e3; border-radius: 7px; background: #fff; color: var(--ink); text-align: left; }
.package-option:before { content: ''; position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; border: 1px solid #c9c9c9; border-radius: 50%; transform: translateY(-50%); }
.package-option.selected { border-color: var(--red); background: #fff9f9; }
.package-option.selected:before { border: 5px solid var(--red); }
.package-copy { display: grid; gap: 4px; min-width: 0; margin-left: 27px; padding-right: 8px; }
.package-copy strong, .package-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-copy strong { font-size: 14px; line-height: 18px; }
.package-copy small { color: #888; font-size: 12px; line-height: 16px; }
.package-amount { flex: 0 0 auto; color: var(--red); font-size: 17px; font-weight: 700; }
.package-badge { position: absolute; top: -1px; right: -1px; padding: 2px 6px; border-radius: 0 6px 0 5px; background: var(--red); color: #fff; font-size: 10px; font-style: normal; }
.deal-ticker { display: flex; align-items: center; gap: 7px; min-height: 40px; margin-top: 8px; padding: 0 14px; overflow: hidden; background: #fff8ec; color: #81520e; font-size: 12px; white-space: nowrap; }
.ticker-icon { display: inline-grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; background: #f8d69f; color: #81520e; font-size: 10px; font-weight: 800; }
.deal-ticker span:last-child { overflow: hidden; text-overflow: ellipsis; }

.commerce-detail-section { padding: 17px 0 24px; }
.detail-heading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px 16px; }
.detail-heading h2 { flex: 0 0 auto; margin: 0; font-size: 16px; }
.detail-heading span { display: block; width: 45px; height: 1px; background: #d5d5d5; }
.commerce-detail { overflow: hidden; color: #333; font-size: 15px; line-height: 1.8; }
.commerce-detail > *:first-child { margin-top: 0; }
.commerce-detail h2, .commerce-detail h3, .commerce-detail h4 { margin: 22px 14px 9px; color: #222; line-height: 1.4; }
.commerce-detail h2 { font-size: 18px; }
.commerce-detail h3 { font-size: 16px; }
.commerce-detail h4 { font-size: 15px; }
.commerce-detail p, .commerce-detail ul, .commerce-detail ol, .commerce-detail blockquote { margin: 10px 14px; }
.commerce-detail ul, .commerce-detail ol { padding-left: 21px; }
.commerce-detail li { margin: 4px 0; }
.commerce-detail blockquote { padding: 9px 11px; border-left: 3px solid var(--red); background: #fff6f6; color: #666; }
.commerce-detail img { display: block; max-width: 100%; height: auto; margin: 12px auto; }
.commerce-detail a { color: #256fd0; text-decoration: none; }
.commerce-detail table { width: calc(100% - 28px); margin: 12px 14px; border-collapse: collapse; }
.commerce-detail th, .commerce-detail td { padding: 8px; border: 1px solid #e6e6e6; text-align: left; }
.commerce-detail th { background: #f7f7f7; }

.action { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid #ededed; box-shadow: 0 -3px 12px rgba(0, 0, 0, .05); text-align: center; }
.notice { min-height: 18px; max-width: 640px; margin: 0 auto 5px; overflow: hidden; color: #7f5a3c; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.wechat-pay-button { display: block; width: min(100%, 616px); min-height: 45px; margin: 0 auto; border: 0; border-radius: 6px; background: var(--red); color: #fff; font-size: 17px; font-weight: 700; }
.wechat-pay-button:active { background: var(--deep-red); }
.wechat-pay-button:disabled { background: #d9a0a5; }
.action small { display: block; margin-top: 5px; color: #999; font-size: 11px; line-height: 15px; }

@keyframes price-reveal { 0% { transform: scale(.72); opacity: .3; color: var(--orange); } 58% { transform: scale(1.14); opacity: 1; color: var(--orange); } 100% { transform: scale(1); color: var(--red); } }

.classic-view { padding: 28px 16px 12px; background: #f7f7fb; }
.hero, .offer, .benefit, .trust, .social { max-width: 560px; margin: 0 auto 14px; }
.hero { padding: 25px 8px 13px; }
.eyebrow { display: inline-block; padding: 5px 10px; border-radius: 5px; background: #fff0eb; color: #d65026; font-size: 12px; font-weight: 700; }
.hero h1 { margin: 12px 0 8px; font-size: 28px; line-height: 1.3; }
.hero p { margin: 0; color: #6b778c; line-height: 1.7; }
.social { display: flex; justify-content: space-between; gap: 8px; padding: 12px 15px; border: 1px solid #eee; background: #fff; color: #777; font-size: 12px; }
.social strong { color: #202020; }
.offer, .benefit, .trust { padding: 20px; border: 1px solid #eee; background: #fff; }
.offer-label { color: #d65026; font-size: 12px; font-weight: 700; }
.offer b { display: inline-block; margin: 6px 7px 3px 0; color: #d65026; font-size: 40px; }
.offer del { color: #aaa; }
.offer p { margin: 4px 0 0; color: #777; }
.benefit h2 { margin: 0 0 12px; font-size: 18px; }
.benefit ul { padding: 0; margin: 0; list-style: none; }
.benefit li { padding: 10px 0; border-top: 1px solid #f0f0f0; }
.benefit li:before { content: '✓'; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: #e8f8ef; color: var(--green); font-size: 11px; }
.trust { display: flex; align-items: center; gap: 12px; }
.seal { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: #e8f8ef; color: var(--green); font-weight: 800; }
.trust strong { font-size: 14px; }
.trust p { margin: 3px 0 0; color: #777; font-size: 12px; line-height: 1.5; }
.page.trust .classic-view { background: #f5f8fd; }
.page.trust .offer { border-color: #cfe0fa; }
.page.limited .classic-view { background: #fff5f5; }
.page.limited .offer { border-color: #f3ced1; }

@media (min-width: 641px) { .commerce-view, .classic-view { box-shadow: 0 0 0 1px #e9e9e9; } .commerce-topbar { position: sticky; top: 0; z-index: 3; } .action { left: 50%; width: 640px; transform: translateX(-50%); border-right: 1px solid #eee; border-left: 1px solid #eee; } }
@media (max-width: 380px) { .commerce-title { font-size: 17px; } .commerce-price { font-size: 31px; } .commerce-stats { gap: 6px; } .trust-badges span { margin-right: 10px; } .package-option { padding-right: 9px; } .package-amount { font-size: 16px; } }
