.checkout-container {
    display: flex;
    gap: 0 32px;
    justify-content: center;
    margin: 33px auto 0;
    padding: 0 30px;
    color: rgb(18, 18, 18);
}

.details-section {
    flex: 1;
    max-width: 508px;
    width: 100%;
}

h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group .required {
    margin-left: 4px;
    font-size: 12px;
    vertical-align: text-top;
}


.form-group label {
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    height: 22px;
    padding: 8px;
    font-size: 16px;
    border: 1px solid rgb(148, 148, 148);
    border-radius: 4px;
}

.form-group select {
    height: 40px;
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
}


.form-row {
    display: flex;
    justify-content: space-between;
}

.form-row .form-group {
    width: 48%;
}

.shipping-methods,.payment-methods {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-radius: 4px;
}


.radio-selected {
    border: 1px solid rgb(21, 102, 224);
    padding: 15px 16px;
    background-color: rgba(21, 102, 224, 0.1);
}

.payment-option {
    display: flex;
    width: 100%;
    /* 确保容器宽度100% */
}

.payment-img {
    background-color: #fff;
    border-radius: 4px;
    height: 32px;
    margin: 0 8px;
    width: 48px;
    border: 1px solid #ddd;
}

.payment-label {
    display: flex;
    align-items: center;
    width: 100%;
    /* label占满剩余空间 */
}

.paymen-options-label-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.payment-imgs {
    display: flex;
    gap: 0 8px;
}

/* 空间不足时隐藏最后一张 */
@media (max-width: 450px) {
    .payment-imgs div:last-child {
        display: none;
    }
}


#credit-card-info {
    margin-top: 10px;
    background: rgba(0, 0, 0, .06);
    padding: 15px 16px 1px 16px;
}

.billing-checked {
    margin: 0;
}

#billing-address-form {
    margin-top: 20px;
}

.hr {
    /* border: 1px solid gray; */
    margin: 32px 0;
}

.pay-button {
    padding: 9.6px 16px;
    background: rgb(21, 102, 224);
    border: none;
    border-radius: 4px;
    width: 100%;
    height: 48px;
    cursor: pointer;
}

.pay-button-text {
    color: #fff;
}

.pay-button-text:hover {
    text-decoration: underline;
}



.order-summary {
    /* 默认显示（大屏幕） */
    min-width: 320px;
    width: 400px;
    background: rgba(0, 0, 0, .06);
    border-radius: 4px;
    padding: 20px;
    position: sticky;
    top: 30px;
    height: fit-content;
    box-sizing: border-box;
}

.summary-toggle {
    display: none;
    /* 默认隐藏 */
}

@media only screen and (max-width: 950px) {
    .order-summary {
        display: none;
        /* 小于1000px时隐藏 */
    }

    .summary-toggle {
        display: block;
    }
}

.order-item {
    /* display: flex;
    justify-content: space-between;
    gap: 0 12px;
    margin-bottom: 10px; */
}

.order-item-details {
    display: flex;
    justify-content: space-between;
}

.quantity {
    margin-top: 12px;
    font-size: 14px;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 12px;
}

.error-message {
    color: red;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    /* 默认隐藏 */
}

input.error,
select.error {
    border: 1px solid red;
    border-radius: 4px;
}

.toggle {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

.toggle-left {
    color: rgb(21, 102, 224);
}

.summary-toggle {

    background: rgba(0, 0, 0, .06);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    cursor: pointer;
}



/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    margin: auto;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(20, 20, 20, 0.2);
    border-radius: 50%;
    border-top-color: #141414;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: #222;
    font-weight: 600;
}
