.spike-store-page {
    --store-border: #dce4ef;
    --store-muted: #64748b;
    --store-soft: rgba(var(--spike-primary-rgb), 0.08);
    --store-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    min-height: 70vh;
    color: #0f172a;
    background: radial-gradient(circle at 10% 0%, rgba(var(--spike-primary-rgb), 0.09), transparent 31%), #f3f7fd;
}

.spike-store-workspace { width: calc(100% - 48px) !important; max-width: 1160px !important; margin-right: auto !important; margin-left: auto !important; }
.spike-store-hero { padding: 32px 0 22px; }
.spike-store-breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--store-muted); font-size: 14px; }
.spike-store-breadcrumb a { color: var(--spike-primary); text-decoration: none; }
.spike-store-breadcrumb a:hover { text-decoration: underline; }
.spike-store-heading { max-width: 760px; }
.spike-store-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border: 1px solid rgba(var(--spike-primary-rgb), .24); border-radius: 999px; color: var(--spike-primary); background: var(--store-soft); font-size: 13px; font-weight: 700; }
.spike-store-heading h1 { margin: 12px 0 7px; color: #0f172a; font-size: clamp(30px, 2.5vw, 38px); line-height: 1.18; letter-spacing: -.025em; }
.spike-store-heading p { margin: 0; color: var(--store-muted); font-size: 15px; line-height: 1.8; }
.spike-store-content { padding: 0 0 64px; }

.spike-store-status, .spike-store-error { min-height: 260px; border: 1px solid var(--store-border); border-radius: calc(var(--spike-radius) + 6px); background: rgba(255,255,255,.94); box-shadow: var(--store-shadow); }
.spike-store-status { display: flex; align-items: center; justify-content: center; gap: 13px; color: #475569; font-size: 15px; }
.spike-store-status[hidden], .spike-store-error[hidden], .spike-store-layout[hidden], .spike-store-notice[hidden], .spike-store-price-loading[hidden] { display: none !important; }
.spike-store-spinner { width: 23px; height: 23px; border: 3px solid rgba(var(--spike-primary-rgb), .18); border-top-color: var(--spike-primary); border-radius: 50%; animation: spike-store-spin .8s linear infinite; }
.spike-store-error { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 42px; text-align: left; }
.spike-store-error-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; color: var(--spike-primary-text); background: var(--spike-primary); font-size: 24px; font-weight: 800; }
.spike-store-error h2 { margin: 0 0 8px; font-size: 20px; }
.spike-store-error p { margin: 0; color: var(--store-muted); line-height: 1.7; }
.spike-store-error-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.spike-store-error-actions button, .spike-store-error-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: var(--spike-radius); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.spike-store-error-actions button { border: 1px solid var(--spike-primary); color: var(--spike-primary-text); background: var(--spike-primary); }
.spike-store-error-actions a { border: 1px solid var(--store-border); color: #334155; background: #fff; }

.spike-store-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 24px; }
.spike-store-config { min-width: 0; }
.spike-store-card, .spike-store-summary-card { border: 1px solid var(--store-border); border-radius: calc(var(--spike-radius) + 5px); background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.045); }
.spike-store-card { margin-bottom: 18px; padding: 26px 28px 12px; }
.spike-store-card-title { display: flex; align-items: center; min-height: 28px; margin-bottom: 10px; }
.spike-store-card-mark { width: 3px; height: 18px; flex: 0 0 auto; margin-right: 10px; border-radius: 999px; background: var(--spike-primary); }
.spike-store-card-title h2, .spike-store-summary-title h2 { margin: 0; color: #0f172a; font-size: 17px; line-height: 1.4; }
.spike-store-card-title p { margin: 0 0 0 10px; color: var(--store-muted); font-size: 12px; }

.spike-store-row { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 18px; padding: 17px 0; border-top: 1px solid #edf1f6; }
.spike-store-card-title + .spike-store-row { border-top: 0; }
.spike-store-row-label { padding-top: 10px; color: #243247; font-size: 14px; font-weight: 650; }
.spike-store-required { margin-left: 3px; color: #ef4444; }
.spike-store-row-field { min-width: 0; }
.spike-store-row-help, .spike-store-inline-message { margin: 9px 0 0; color: #94a3b8; font-size: 12px; line-height: 1.6; }

.spike-store-options { display: flex; flex-wrap: wrap; gap: 9px; }
.spike-store-option { display: inline-flex; align-items: center; justify-content: center; min-width: 104px; min-height: 42px; padding: 8px 15px; border: 1px solid var(--store-border); border-radius: var(--spike-radius); color: #1e293b; background: #f8fafc; font: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.spike-store-option:hover:not(:disabled) { border-color: rgba(var(--spike-primary-rgb), .6); color: var(--spike-primary); transform: translateY(-1px); }
.spike-store-option.is-active,
.spike-store-option.is-active:hover,
.spike-store-option.is-active:focus,
.spike-store-option.is-active:focus-visible { border-color: var(--spike-primary); color: var(--spike-primary-text) !important; background: var(--spike-primary); box-shadow: 0 8px 18px rgba(var(--spike-primary-rgb), .18); }
.spike-store-option:focus-visible, .spike-store-select:focus-visible, .spike-store-input:focus-visible, .spike-store-stepper button:focus-visible, .spike-store-stepper input:focus-visible { outline: 3px solid rgba(var(--spike-primary-rgb), .18); outline-offset: 2px; }
.spike-store-option:disabled, .spike-store-option.is-disabled { opacity: .48; cursor: not-allowed; }
.spike-store-option-icon { width: 30px; height: 30px; margin-right: 9px; object-fit: contain; }
.spike-store-option-badge { display: grid; place-items: center; width: 25px; height: 25px; margin-right: 8px; border-radius: 7px; color: var(--spike-primary); background: rgba(var(--spike-primary-rgb), .12); font-size: 12px; font-weight: 800; }
.spike-store-option.is-active .spike-store-option-badge { color: var(--spike-primary); background: var(--spike-primary-text); }
.spike-store-option-copy { display: flex; min-width: 0; flex-direction: column; }
.spike-store-option-copy strong { font-size: 14px; font-weight: 650; line-height: 1.4; }
.spike-store-option-copy small { max-width: 190px; overflow: hidden; color: #94a3b8; font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.spike-store-option.is-active .spike-store-option-copy small { color: rgba(255,255,255,.78); }
.spike-store-options--images { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.spike-store-options--images .spike-store-option { justify-content: flex-start; min-height: 72px; }
.spike-store-options--models { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.spike-store-options--models .spike-store-option { justify-content: flex-start; min-height: 64px; }

.spike-store-select, .spike-store-input { width: min(100%, 540px); height: 44px; padding: 0 13px; border: 1px solid var(--store-border); border-radius: var(--spike-radius); color: #1e293b; background: #fff; font: inherit; }
.spike-store-cascade { display: grid; width: min(100%, 540px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spike-store-cascade .spike-store-select { width: 100%; }
.spike-store-input::placeholder { color: #94a3b8; }
.spike-store-stepper { display: inline-flex; height: 42px; overflow: hidden; vertical-align: middle; border: 1px solid var(--store-border); border-radius: var(--spike-radius); background: #fff; }
.spike-store-stepper button { width: 39px; flex: 0 0 auto; border: 0; color: #334155; background: #edf2f8; font-size: 18px; cursor: pointer; }
.spike-store-stepper button:hover:not(:disabled) { color: var(--spike-primary); background: var(--store-soft); }
.spike-store-stepper button:disabled { color: #b5c0ce; cursor: not-allowed; }
.spike-store-stepper input { width: 64px; padding: 0 5px; border: 0; border-right: 1px solid var(--store-border); border-left: 1px solid var(--store-border); color: #0f172a; background: #fff; font: inherit; text-align: center; -moz-appearance: textfield; }
.spike-store-stepper input::-webkit-outer-spin-button, .spike-store-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.spike-store-unit { display: inline-flex; align-items: center; padding: 0 12px; color: var(--store-muted); font-size: 12px; }
.spike-store-range { width: min(100%, 540px); height: 28px; margin: 4px 0 10px; border: 0; background: transparent; accent-color: var(--spike-primary); cursor: pointer; -webkit-appearance: none; appearance: none; }
.spike-store-range::-webkit-slider-runnable-track { height: 6px; border: 0; border-radius: 999px; background: linear-gradient(90deg, var(--spike-primary), rgba(var(--spike-primary-rgb), .16)); }
.spike-store-range::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -8px; border: 3px solid #fff; border-radius: 50%; background: var(--spike-primary); box-shadow: 0 2px 7px rgba(15,23,42,.2); -webkit-appearance: none; }
.spike-store-range::-moz-range-track { height: 6px; border: 0; border-radius: 999px; background: rgba(var(--spike-primary-rgb), .16); }
.spike-store-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--spike-primary); }
.spike-store-range::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: var(--spike-primary); box-shadow: 0 2px 7px rgba(15,23,42,.2); }

.spike-store-disks { display: grid; gap: 10px; }
.spike-store-disk { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--store-border); border-radius: var(--spike-radius); background: #f8fafc; }
.spike-store-disk strong { min-width: 90px; font-size: 13px; }
.spike-store-disk-remove, .spike-store-add { border: 0; color: var(--spike-primary); background: transparent; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.spike-store-disk-remove { margin-left: auto; }
.spike-store-add { justify-self: start; padding: 9px 12px; border: 1px dashed rgba(var(--spike-primary-rgb), .55); border-radius: var(--spike-radius); }
.spike-store-add:disabled { opacity: .45; cursor: not-allowed; }
.spike-store-options--optional { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.spike-store-optional { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 13px; border: 1px solid var(--store-border); border-radius: var(--spike-radius); background: #f8fafc; cursor: pointer; }
.spike-store-optional input { width: 17px; height: 17px; accent-color: var(--spike-primary); }
.spike-store-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.spike-store-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.spike-store-toggle-track { position: relative; width: 42px; height: 23px; border-radius: 999px; background: #dbe3ed; transition: background .18s ease; }
.spike-store-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.2); content: ""; transition: transform .18s ease; }
.spike-store-toggle input:checked + .spike-store-toggle-track { background: var(--spike-primary); }
.spike-store-toggle input:checked + .spike-store-toggle-track::after { transform: translateX(19px); }
.spike-store-toggle em { color: #334155; font-size: 13px; font-style: normal; }

/* 右侧「当前配置」跟随页面滚动：reset.css 同时给 html 和 body 设置了 overflow-x:hidden，
   body 因此被计算成独立滚动容器，卡片的 position:sticky 会以 body 为参照而失效（看起来一直停在顶部不动）。
   订购页把 body 改为 clip（不创建滚动容器），横向溢出仍由 html 的 overflow-x:hidden 在视口层裁剪。 */
body:has(.spike-store-page) { overflow-x: clip; }
.spike-store-summary { position: relative; min-width: 0; align-self: stretch; }
.spike-store-summary-card { position: sticky; top: 92px; overflow: visible; padding: 0 22px 22px; box-shadow: var(--store-shadow); }
.spike-store-summary-title { display: flex; align-items: center; margin: 0 -22px; padding: 21px 22px; border-bottom: 1px solid var(--store-border); border-radius: calc(var(--spike-radius) + 5px) calc(var(--spike-radius) + 5px) 0 0; background: linear-gradient(135deg, rgba(var(--spike-primary-rgb), .07), rgba(255,255,255,.9)); }
.spike-store-summary-title p { margin: 2px 0 0; color: var(--store-muted); font-size: 12px; }
.spike-store-summary-list { display: grid; gap: 9px; margin: 18px 0; padding: 0 0 17px; border-bottom: 1px solid var(--store-border); }
.spike-store-summary-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; font-size: 13px; }
.spike-store-summary-row dt { overflow: hidden; color: var(--store-muted); text-overflow: ellipsis; white-space: nowrap; }
.spike-store-summary-row dd { max-width: 160px; margin: 0; color: #0f172a; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.spike-store-summary-controls { display: grid; gap: 13px; }
.spike-store-summary-controls > label, .spike-store-summary-control { display: grid; grid-template-columns: 78px minmax(0,1fr); align-items: center; gap: 10px; color: #475569; font-size: 13px; }
.spike-store-summary-controls .spike-store-select { width: 100%; height: 40px; }
.spike-store-summary-controls .spike-store-stepper { justify-self: end; height: 40px; }
.spike-store-summary-controls .spike-store-stepper input { width: 55px; }
.spike-store-duration-picker { position: relative; display: block; min-width: 0; }
.spike-store-native-select { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; opacity: 0 !important; pointer-events: none !important; }
.spike-store-duration-trigger { display: flex; width: 100%; height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid var(--store-border); border-radius: var(--spike-radius); color: #1e293b; background: #fff; font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.spike-store-duration-trigger:hover:not(:disabled) { border-color: rgba(var(--spike-primary-rgb), .6); background: rgba(var(--spike-primary-rgb), .035); }
.spike-store-duration-trigger:focus-visible { border-color: var(--spike-primary); outline: 3px solid rgba(var(--spike-primary-rgb), .16); outline-offset: 2px; }
.spike-store-duration-trigger:disabled { color: #94a3b8; background: #f8fafc; cursor: not-allowed; }
.spike-store-duration-chevron { width: 8px; height: 8px; flex: 0 0 8px; margin-top: -4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .16s ease, margin .16s ease; }
.spike-store-duration-picker.is-open .spike-store-duration-trigger { border-color: var(--spike-primary); box-shadow: 0 0 0 3px rgba(var(--spike-primary-rgb), .11); }
.spike-store-duration-picker.is-open .spike-store-duration-chevron { margin-top: 4px; transform: rotate(225deg); }
.spike-store-duration-menu { position: absolute; z-index: 60; top: calc(100% + 7px); right: 0; display: grid; width: max(100%, 188px); gap: 5px; padding: 7px; border: 1px solid var(--store-border); border-radius: calc(var(--spike-radius) + 2px); background: #fff; box-shadow: 0 14px 32px rgba(15,23,42,.16); }
.spike-store-duration-menu[hidden] { display: none !important; }
.spike-store-duration-option { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 0; border-radius: var(--spike-radius); color: #334155; background: transparent; font: inherit; font-size: 13px; text-align: left; cursor: pointer; transition: color .14s ease, background-color .14s ease; }
.spike-store-duration-option:hover, .spike-store-duration-option:focus-visible { color: var(--spike-primary); background: rgba(var(--spike-primary-rgb), .09); outline: none; }
.spike-store-duration-option.is-active, .spike-store-duration-option.is-active:hover, .spike-store-duration-option.is-active:focus-visible { color: var(--spike-primary-text); background: var(--spike-primary); box-shadow: 0 6px 14px rgba(var(--spike-primary-rgb), .2); }
.spike-store-duration-check { opacity: 0; font-weight: 800; }
.spike-store-duration-option.is-active .spike-store-duration-check { opacity: 1; }
.spike-store-promo { margin: 16px 0 0; font-size: 12px; }
.spike-store-promo summary { color: var(--spike-primary); cursor: pointer; list-style: none; }
.spike-store-promo summary::-webkit-details-marker { display: none; }
.spike-store-promo > div { display: flex; margin-top: 9px; }
.spike-store-promo input { min-width: 0; height: 36px; flex: 1; padding: 0 10px; border: 1px solid var(--store-border); border-radius: var(--spike-radius) 0 0 var(--spike-radius); }
.spike-store-promo button { min-width: 58px; border: 1px solid var(--spike-primary); border-radius: 0 var(--spike-radius) var(--spike-radius) 0; color: var(--spike-primary-text); background: var(--spike-primary); cursor: pointer; }
.spike-store-price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; color: var(--spike-primary); }
.spike-store-price strong { font-size: 34px; line-height: 1.1; letter-spacing: -.03em; }
.spike-store-price small { color: var(--store-muted); }
.spike-store-price-loading { position: absolute; margin-top: -19px; color: var(--store-muted); font-size: 11px; }
.spike-store-price-note { margin: 8px 0 17px; color: #94a3b8; font-size: 11px; line-height: 1.6; }
.spike-store-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--spike-radius); color: #334155; background: #f1f5f9; font-size: 12px; line-height: 1.5; }
.spike-store-notice.is-error { color: #b91c1c; background: #fef2f2; }
.spike-store-notice.is-success { color: #047857; background: #ecfdf5; }
.spike-store-notice a { margin-left: 8px; color: inherit; font-weight: 700; }
.spike-store-cart-button, .spike-store-buy-button { width: 100%; min-height: 43px; border-radius: var(--spike-radius); font: inherit; font-weight: 700; cursor: pointer; }
.spike-store-cart-button { margin-bottom: 9px; border: 1px solid var(--store-border); color: #334155; background: #f8fafc; }
.spike-store-buy-button { border: 1px solid var(--spike-primary); color: var(--spike-primary-text); background: var(--spike-primary); box-shadow: 0 8px 18px rgba(var(--spike-primary-rgb), .18); }
.spike-store-cart-button:hover:not(:disabled) { border-color: rgba(var(--spike-primary-rgb),.55); color: var(--spike-primary); }
.spike-store-buy-button:hover:not(:disabled) { filter: brightness(.96); }
.spike-store-cart-button:disabled, .spike-store-buy-button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.spike-store-page.is-updating .spike-store-config { opacity: .82; pointer-events: none; }

@keyframes spike-store-spin { to { transform: rotate(360deg); } }

/* 卡片高于可视区（笔记本等较矮屏幕）时只让配置明细列表内部滚动，
   价格与「加入购物车 / 立即购买」始终留在屏幕内。 */
@media (min-width: 768px) and (max-height: 910px) {
    .spike-store-summary-card { display: flex; max-height: calc(100vh - 108px); flex-direction: column; }
    .spike-store-summary-card > * { flex: 0 0 auto; }
    .spike-store-summary-list { min-height: 0; flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; }
}

@media (max-width: 1024px) {
    .spike-store-layout { grid-template-columns: minmax(0, 1fr) 286px; gap: 18px; }
    .spike-store-row { grid-template-columns: 92px minmax(0,1fr); gap: 14px; }
    .spike-store-options--images { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767px) {
    .spike-store-workspace { width: calc(100% - 24px) !important; }
    .spike-store-hero { padding: 20px 0 14px; }
    .spike-store-heading h1 { margin-top: 9px; font-size: 26px; }
    .spike-store-content { padding-bottom: 44px; }
    .spike-store-layout { display: flex; flex-direction: column; gap: 14px; }
    .spike-store-config, .spike-store-summary { width: 100%; }
    .spike-store-summary { order: -1; }
    .spike-store-summary-card { position: static; padding: 0 16px 16px; }
    .spike-store-summary-title { margin: 0 -16px; padding: 16px; }
    .spike-store-summary-list { gap: 7px; margin: 14px 0; padding-bottom: 14px; }
    .spike-store-summary-controls { gap: 10px; }
    .spike-store-summary-controls .spike-store-stepper { height: 44px; }
    .spike-store-card { margin-bottom: 14px; padding: 18px 16px 4px; }
    .spike-store-card-title { margin-bottom: 6px; }
    .spike-store-row { grid-template-columns: 1fr; gap: 8px; padding: 13px 0; }
    .spike-store-row-label { padding-top: 0; }
    .spike-store-options--images, .spike-store-options--models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .spike-store-option { min-width: 0; min-height: 40px; padding: 7px 10px; }
    .spike-store-option-copy { overflow: hidden; }
    .spike-store-select, .spike-store-input { width: 100%; }
    .spike-store-stepper { height: 44px; }
    .spike-store-stepper button { width: 42px; }
    .spike-store-stepper input { width: 62px; text-align: center; }
    .spike-store-range { width: 100%; }
    .spike-store-disk { align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
    .spike-store-disk strong { min-width: 72px; }
    .spike-store-disk-remove { margin-left: auto; }
    .spike-store-options--optional { grid-template-columns: 1fr; }
    .spike-store-error { align-items: flex-start; padding: 28px 20px; }
}

@media (max-width: 480px) {
    .spike-store-cascade { grid-template-columns: 1fr; }
    .spike-store-summary-controls > label, .spike-store-summary-control { grid-template-columns: 72px minmax(0, 1fr); }
    .spike-store-summary-controls .spike-store-stepper { justify-self: stretch; }
    .spike-store-summary-controls .spike-store-stepper input { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .spike-store-spinner { animation-duration: 1.8s; }
    .spike-store-option, .spike-store-toggle-track, .spike-store-toggle-track::after { transition: none; }
}
