/* ========================================
   智仪全球 - 结算/支付页面样式
   ======================================== */

/* 结算进度条 */
.checkout-steps {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
}
.cs-bar {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-step {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cs-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}
.cs-step.active .cs-num {
    background: #e2001a;
    color: #fff;
}
.cs-step.done .cs-num {
    background: #07c160;
    color: #fff;
}
.cs-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}
.cs-step.active .cs-label {
    color: #e2001a;
    font-weight: 600;
}
.cs-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 12px;
}
.cs-line.done {
    background: #07c160;
}

/* 结算主体 */
.checkout-main {
    padding: 30px 0 60px;
    background: #f5f5f5;
    min-height: 60vh;
}
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
.checkout-left, .checkout-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 结算区块 */
.checkout-block {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
}
.cb-title {
    font-size: 1.05rem;
    color: #1a1a2e;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cb-num {
    width: 24px;
    height: 24px;
    background: #e2001a;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* 地址 */
.address-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2001a;
    border-radius: 10px;
    margin-bottom: 12px;
    position: relative;
}
.ai-tag {
    background: #e2001a;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
}
.ai-info {
    flex: 1;
}
.ai-info p {
    margin: 0 0 4px;
    font-size: 0.9rem;
    color: #333;
}
.ai-detail {
    color: #666 !important;
    font-size: 0.85rem !important;
}
.ai-edit {
    background: none;
    border: 1px solid #e0e0e0;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
}
.ai-edit:hover {
    border-color: #e2001a;
    color: #e2001a;
}
.add-address-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed #d0d0d0;
    border-radius: 10px;
    background: none;
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.add-address-btn:hover {
    border-color: #e2001a;
    color: #e2001a;
}

/* 地址表单 */
.address-form {
    margin-top: 12px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
}
.af-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.af-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}
.af-input:focus {
    border-color: #e2001a;
}
.af-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}
.af-textarea:focus {
    border-color: #e2001a;
}
.af-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary {
    background: #e2001a;
    color: #fff;
}
.btn-primary:hover {
    background: #c00018;
}
.btn-outline {
    background: #fff;
    color: #333;
    border: 1px solid #d0d0d0;
}
.btn-outline:hover {
    border-color: #e2001a;
    color: #e2001a;
}
.btn-sm {
    padding: 6px 16px;
    font-size: 0.82rem;
}
.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}
.btn-block {
    width: 100%;
}

/* 订单明细 */
.order-items {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}
.order-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.order-item-row:last-child {
    border-bottom: none;
}
.oir-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.oir-info {
    flex: 1;
}
.oir-name {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
}
.oir-spec {
    font-size: 0.78rem;
    color: #999;
}
.oir-price {
    text-align: right;
}
.oir-price .oir-unit {
    font-size: 0.82rem;
    color: #666;
}
.oir-price .oir-total {
    font-size: 1rem;
    color: #e2001a;
    font-weight: 700;
}
.oir-qty {
    font-size: 0.82rem;
    color: #999;
}
.order-empty {
    text-align: center;
    padding: 40px 20px;
}
.order-empty p {
    color: #999;
    margin-bottom: 12px;
    font-size: 1rem;
}

/* 发票 */
.invoice-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.invoice-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #555;
}
.invoice-option input[type="radio"] {
    accent-color: #e2001a;
}
.invoice-form {
    padding: 16px;
    background: #f8f8f8;
    border-radius: 10px;
}

/* 支付方式 */
.payment-block {
    border: 2px solid #e2001a;
}
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pay-option {
    display: block;
    cursor: pointer;
    position: relative;
}
.pay-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.pay-opt-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
}
.pay-option:hover .pay-opt-content {
    border-color: #ccc;
}
.pay-option input:checked + .pay-opt-content {
    border-color: #e2001a;
    background: #fff5f5;
}
.pay-opt-icon {
    font-size: 1.8rem;
}
.pay-opt-info {
    flex: 1;
}
.pay-opt-info h4 {
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 2px;
    font-weight: 600;
}
.pay-opt-info p {
    font-size: 0.78rem;
    color: #999;
}
.pay-opt-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
}
.pay-opt-tag-blue {
    background: #00a0e9;
}
.pay-opt-tag-green {
    background: #07c160;
}

/* 对公汇款详情 */
.bank-transfer-detail {
    margin-top: 16px;
    padding: 20px;
    background: #1a1a2e;
    border-radius: 12px;
    color: #fff;
}
.bank-transfer-detail h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}
.btd-info {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.btd-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.15);
}
.btd-row:last-child {
    border-bottom: none;
}
.btd-row label {
    width: 80px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.btd-value {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.btd-value span {
    font-size: 0.88rem;
    font-weight: 500;
}
.btd-account {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #ff4459 !important;
    letter-spacing: 2px;
}
.copy-btn-sm {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    flex-shrink: 0;
}
.copy-btn-sm:hover {
    background: #e2001a;
}
.copy-btn-sm.copied {
    background: #07c160;
}
.btd-notice {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}
.btd-notice p {
    margin-bottom: 4px;
}
.btd-upload {
    margin-top: 16px;
}
.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px dashed rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
}
.upload-label:hover {
    background: rgba(226,0,26,0.2);
}
.upload-label input {
    display: none;
}
.receipt-preview {
    margin-top: 8px;
}
.receipt-preview img {
    max-width: 200px;
    border-radius: 8px;
}
.receipt-preview .receipt-name {
    font-size: 0.8rem;
    color: #07c160;
}

/* 二维码支付 */
.qr-pay-area {
    margin-top: 16px;
    text-align: center;
}
.qr-pay-box {
    display: inline-block;
    padding: 24px;
    background: #f8f8f8;
    border-radius: 12px;
    text-align: center;
}
.qr-pay-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.qr-pay-box h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 16px;
}
.qr-pay-code {
    width: 200px;
    height: 200px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.qr-loading {
    color: #999;
    font-size: 0.85rem;
}
.qr-pay-tip {
    font-size: 0.82rem;
    color: #666;
}

/* 金额汇总 */
.summary-block {
    position: sticky;
    top: 20px;
}
.summary-rows {
    margin-bottom: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.88rem;
    color: #666;
}
.summary-row span:first-child {
    color: #999;
}
.sr-amount {
    font-weight: 500;
    color: #333;
}
.sr-discount {
    color: #07c160 !important;
}
.summary-total {
    border-top: 2px solid #f0f0f0;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 1rem;
}
.summary-total span:first-child {
    color: #1a1a2e;
    font-weight: 600;
    font-size: 1rem;
}
.summary-total .sr-amount {
    color: #e2001a;
    font-size: 1.4rem;
    font-weight: 700;
}
.submit-order-btn {
    margin-bottom: 8px;
}
.summary-tip {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
}

/* 支付成功弹窗 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}
.pay-success-modal .psm-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.pay-success-modal h3 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.pay-success-modal p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.psm-order-info {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}
.psm-order-info p {
    margin: 0 0 4px;
    font-size: 0.85rem;
    color: #666;
}
.psm-order-info strong {
    color: #333;
}
.psm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 响应式 */
@media (max-width: 968px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    .summary-block {
        position: static;
    }
}
@media (max-width: 600px) {
    .af-row {
        flex-direction: column;
    }
    .cs-line {
        width: 30px;
    }
    .cs-label {
        display: none;
    }
}
