/* ============================================================
   SpinMac CN — Order / Configurator Page
   Layout: progress rail + split config / checkout panel
   ============================================================ */

:root {
    --od-blue:        #0052D9;
    --od-blue-dark:   #003399;
    --od-blue-soft:   #dbeafe;
    --od-blue-pale:   #eff6ff;
    --od-bg:          #f0f2f6;
    --od-surface:     #ffffff;
    --od-ink:         #111111;
    --od-ink-2:       #4a5568;
    --od-muted:       #7a828a;
    --od-border:      #e4e8ef;
    --od-green:       #16a34a;
    --od-amber:       #d97706;
    --od-radius:      4px;
    --od-nav-height:  64px;
    --font-family: 'Inter', "PingFang SC", "Microsoft YaHei",
                   -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.od-page {
    font-family: var(--font-family);
    color: var(--od-ink);
    background: var(--od-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Page shell ---- */
.od-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 32px 96px;
}

/* ---- Intro band ---- */
.od-intro {
    margin-bottom: 36px;
}

.od-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--od-muted);
    margin-bottom: 20px;
}
.od-crumb a:hover { color: var(--od-blue); }
.od-crumb-sep { color: var(--od-border); user-select: none; }

.od-intro-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: end;
}

.od-h1 {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.25;
    margin-bottom: 12px;
}
.od-h1 em {
    font-style: normal;
    color: var(--od-blue);
    font-weight: 400;
}

.od-lead {
    font-size: 16px;
    font-weight: 300;
    color: var(--od-muted);
    max-width: 520px;
    line-height: 1.75;
}

.od-spec-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-self: center;
}
.od-spec-chip {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    background: var(--od-surface);
    border: 1px solid var(--od-border);
    border-radius: 100px;
    color: var(--od-ink-2);
    white-space: nowrap;
}
.od-spec-chip--accent {
    background: var(--od-blue-pale);
    border-color: #bfdbfe;
    color: var(--od-blue-dark);
}

/* ---- Progress rail ---- */
.od-rail {
    display: flex;
    gap: 0;
    margin-top: 28px;
    background: var(--od-surface);
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    overflow: hidden;
}
.od-rail-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--od-muted);
    border-right: 1px solid var(--od-border);
}
.od-rail-step:last-child { border-right: none; }
.od-rail-step--active {
    background: var(--od-blue-pale);
    color: var(--od-blue-dark);
}
.od-rail-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    background: var(--od-border);
    color: var(--od-muted);
    flex-shrink: 0;
}
.od-rail-step--active .od-rail-num {
    background: var(--od-blue);
    color: #fff;
}

/* ---- Main grid ---- */
.od-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

/* ---- Config panel ---- */
.od-config {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.od-block {
    background: var(--od-surface);
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    overflow: hidden;
}

.od-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px 0;
}
.od-block-title {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.od-block-hint {
    font-size: 12px;
    color: var(--od-muted);
    font-weight: 400;
}
.od-block-body {
    padding: 20px 24px 24px;
}

.od-block-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--od-muted);
}

/* Region grid */
.od-region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.od-region-grid .od-region-card:nth-child(4),
.od-region-grid .od-region-card:nth-child(5) {
    grid-column: span 1;
}
@media (min-width: 720px) {
    .od-region-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.od-region-card input:checked + .od-region-face {
    border-color: var(--od-blue);
    background: var(--od-blue-pale);
    box-shadow: 0 0 0 1px var(--od-blue);
}
.od-region-card input:checked + .od-region-face .od-region-check {
    opacity: 1;
    transform: scale(1);
}
.od-region-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    text-align: center;
    position: relative;
}
.od-region-face:hover {
    border-color: #bfdbfe;
    background: #fafbff;
}
.od-region-flag { font-size: 22px; line-height: 1; }
.od-region-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--od-ink);
}
.od-region-tag {
    font-size: 10px;
    color: var(--od-muted);
    letter-spacing: 0.3px;
}
.od-region-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--od-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s, transform 0.15s;
}

/* Duration row */
.od-period-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.od-period-card { position: relative; }
.od-period-card input:checked + .od-period-face {
    border-color: var(--od-blue);
    background: var(--od-blue-pale);
    box-shadow: 0 0 0 1px var(--od-blue);
}
.od-period-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 12px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    text-align: center;
    height: 100%;
}
.od-period-face:hover {
    border-color: #bfdbfe;
    background: #fafbff;
}
.od-period-label {
    font-size: 14px;
    font-weight: 500;
}
.od-period-price {
    font-size: 20px;
    font-weight: 400;
    color: var(--od-blue);
    letter-spacing: -0.5px;
}
.od-period-equiv {
    font-size: 11px;
    color: var(--od-muted);
}
.od-period-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--od-blue);
    color: #fff;
    white-space: nowrap;
    z-index: 1;
}
.od-period-badge--save {
    background: var(--od-green);
}

/* Add-ons */
.od-addon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.od-addon-card input:checked + .od-addon-face {
    border-color: var(--od-blue);
    background: var(--od-blue-pale);
    box-shadow: 0 0 0 1px var(--od-blue);
}
.od-addon-face {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    height: 100%;
}
.od-addon-face:hover {
    border-color: #bfdbfe;
    background: #fafbff;
}
.od-addon-name {
    font-size: 14px;
    font-weight: 500;
}
.od-addon-desc {
    font-size: 12px;
    color: var(--od-muted);
    flex: 1;
}
.od-addon-price {
    font-size: 13px;
    font-weight: 500;
    color: var(--od-blue);
    margin-top: 4px;
}

.od-tb5-row input:checked + .od-tb5-face {
    border-color: var(--od-blue);
    background: var(--od-blue-pale);
}
.od-tb5-row input:checked + .od-tb5-face .od-tb5-switch {
    background: var(--od-blue);
}
.od-tb5-row input:checked + .od-tb5-face .od-tb5-switch::after {
    transform: translateX(18px);
}
.od-tb5-face {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
.od-tb5-face:hover {
    border-color: #bfdbfe;
    background: #fafbff;
}
.od-tb5-switch {
    width: 40px;
    height: 22px;
    border-radius: 100px;
    background: #c8d0db;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}
.od-tb5-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.od-tb5-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--od-radius);
    background: var(--od-blue-pale);
    color: var(--od-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.od-tb5-text { flex: 1; min-width: 0; }
.od-tb5-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}
.od-tb5-desc {
    font-size: 12px;
    color: var(--od-muted);
    line-height: 1.5;
}
.od-tb5-price {
    font-size: 13px;
    font-weight: 500;
    color: var(--od-blue);
    white-space: nowrap;
}

/* ---- Checkout panel ---- */
.od-checkout {
    position: sticky;
    top: calc(var(--od-nav-height) + 16px);
}

.od-checkout-card {
    background: var(--od-surface);
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 30, 80, 0.06);
}

.od-checkout-top {
    background: linear-gradient(135deg, var(--od-blue-dark) 0%, var(--od-blue) 100%);
    color: #fff;
    padding: 24px;
}
.od-checkout-top-label {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}
.od-checkout-total {
    font-size: 40px;
    font-weight: 300;
    letter-spacing: -1px;
    line-height: 1;
}

.od-checkout-body {
    padding: 20px 24px;
}

.od-line-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.od-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
}
.od-line-label { color: var(--od-muted); }
.od-line-val {
    font-weight: 500;
    color: var(--od-ink);
    text-align: right;
}

.od-divider {
    height: 1px;
    background: var(--od-border);
    margin: 16px 0;
}

.od-pay-title-bar {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--od-ink-2);
}

.od-pay-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.od-pay-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--od-muted);
    padding: 12px 0;
}
.od-pay-empty {
    font-size: 13px;
    color: var(--od-muted);
    padding: 12px 0;
    text-align: center;
}

.od-pay-option input:checked + .od-pay-card {
    border-color: var(--od-blue);
    background: var(--od-blue-pale);
    box-shadow: 0 0 0 1px var(--od-blue);
}
.od-pay-option input:checked + .od-pay-card .od-pay-radio {
    border-color: var(--od-blue);
    background: var(--od-blue);
    box-shadow: inset 0 0 0 3px #fff;
}
.od-pay-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
}
.od-pay-card:hover {
    border-color: #bfdbfe;
    background: #fafbff;
}
.od-pay-logo {
    width: 36px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.od-pay-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.od-pay-meta { flex: 1; min-width: 0; }
.od-pay-title {
    font-size: 13px;
    font-weight: 500;
}
.od-pay-currencies {
    font-size: 11px;
    color: var(--od-muted);
    margin-top: 1px;
}
.od-pay-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--od-border);
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.od-renewal {
    font-size: 12px;
    color: var(--od-muted);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}
.od-renewal--once { color: var(--od-amber); }

.od-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    color: #fff;
    background: var(--od-blue);
    border: none;
    border-radius: var(--od-radius);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.od-btn-checkout:hover:not(:disabled) {
    background: var(--od-blue-dark);
    box-shadow: 0 6px 20px rgba(0, 82, 217, 0.25);
}
.od-btn-checkout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.od-trust-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--od-border);
}
.od-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--od-muted);
}
.od-trust-item svg { color: var(--od-green); flex-shrink: 0; }

/* ---- FAQ strip ---- */
.od-faq-strip {
    margin-top: 48px;
    padding: 28px 32px;
    background: var(--od-surface);
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.od-faq-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}
.od-faq-item-text {
    font-size: 13px;
    color: var(--od-muted);
    line-height: 1.65;
}
.od-faq-item-text a {
    color: var(--od-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Modals ---- */
.od-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.od-modal {
    background: var(--od-surface);
    border-radius: 8px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 20, 60, 0.18);
    overflow: hidden;
}
.od-modal--wide { max-width: 480px; }

.od-modal-hero {
    padding: 32px 28px 24px;
    text-align: center;
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
}
.od-modal-hero--blue {
    background: linear-gradient(180deg, var(--od-blue-pale) 0%, #fff 100%);
}
.od-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--od-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.od-modal-icon--blue {
    background: var(--od-blue-soft);
    color: var(--od-blue);
}
.od-modal-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
}
.od-modal-sub {
    font-size: 14px;
    color: var(--od-muted);
    line-height: 1.65;
}

.od-modal-body { padding: 0 28px 28px; }

.od-modal-notice {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--od-radius);
    font-size: 13px;
    color: #166534;
    line-height: 1.55;
    margin-bottom: 16px;
}
.od-modal-notice svg { flex-shrink: 0; margin-top: 2px; }

.od-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    border-radius: var(--od-radius);
    cursor: pointer;
    border: none;
    transition: background 0.18s;
}
.od-modal-btn--primary {
    background: var(--od-blue);
    color: #fff;
    text-decoration: none;
}
.od-modal-btn--primary:hover { background: var(--od-blue-dark); }

.od-modal-foot {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--od-muted);
}
.od-modal-foot a {
    color: var(--od-blue);
    font-weight: 500;
}

/* Guest modal header */
.od-modal-head {
    padding: 20px 24px 0;
    position: relative;
}
.od-modal-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.od-modal-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}
.od-modal-close {
    width: 28px;
    height: 28px;
    border: 1px solid var(--od-border);
    border-radius: var(--od-radius);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--od-muted);
    transition: background 0.15s;
}
.od-modal-close:hover { background: var(--od-bg); }

.od-modal-banner {
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--od-radius);
    margin-bottom: 4px;
}
.od-modal-banner-title {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 2px;
}
.od-modal-banner-body {
    font-size: 12px;
    color: #b45309;
}

.od-progress-steps {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}
.od-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}
.od-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--od-border);
    z-index: 0;
}
.od-progress-step--done:not(:last-child)::after,
.od-progress-step--active:not(:last-child)::after {
    background: var(--od-green);
}
.od-progress-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--od-border);
    background: var(--od-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
}
.od-progress-step--done .od-progress-dot {
    border-color: var(--od-green);
    background: #ecfdf5;
}
.od-progress-step--active .od-progress-dot {
    border-color: var(--od-amber);
    background: #fffbeb;
}
.od-progress-label {
    font-size: 11px;
    color: var(--od-muted);
}
.od-progress-step--done .od-progress-label { color: var(--od-green); }
.od-progress-step--active .od-progress-label { color: var(--od-amber); font-weight: 500; }

.od-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.od-feature-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--od-bg);
    border-radius: var(--od-radius);
    font-size: 12px;
    color: var(--od-ink-2);
}
.od-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--od-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.od-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--od-muted);
    margin-bottom: 10px;
}

.od-login-hint {
    text-align: center;
    font-size: 13px;
    color: var(--od-muted);
    margin-top: 12px;
}
.od-login-hint button {
    background: none;
    border: none;
    color: var(--od-blue);
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.od-ssl-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 14px;
    font-size: 11px;
    color: var(--od-muted);
}

/* ---- Animations ---- */
@keyframes od-spin {
    to { transform: rotate(360deg); }
}
.od-spin { animation: od-spin 0.9s linear infinite; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .od-grid {
        grid-template-columns: 1fr;
    }
    .od-checkout {
        position: static;
    }
    .od-intro-head {
        grid-template-columns: 1fr;
    }
    .od-spec-strip {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .od-shell { padding: 20px 16px 80px; }
    .od-h1 { font-size: 28px; }
    .od-rail { flex-direction: column; }
    .od-rail-step { border-right: none; border-bottom: 1px solid var(--od-border); }
    .od-rail-step:last-child { border-bottom: none; }
    .od-region-grid { grid-template-columns: repeat(2, 1fr); }
    .od-period-row { grid-template-columns: repeat(2, 1fr); }
    .od-addon-grid { grid-template-columns: 1fr; }
    .od-faq-strip { grid-template-columns: 1fr; padding: 20px; }
    .od-checkout-total { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .od-spin { animation: none; }
}
