/* 명세: 신규 검사와 업그레이드 검사 상품 목록을 전환하는 라디오 선택 영역을 구매 화면의 기존 색상 체계에 맞게 표시합니다. */
.purchase-kind-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
}

.purchase-kind-options label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    color: #d9d6ef;
    background: #151426;
    border: 1px solid #302e4d;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.purchase-kind-options input {
    accent-color: #8365f5;
}

.purchase-kind-options label:has(input:checked) {
    color: #ffffff;
    background: #282250;
    border-color: #8669fc;
}

/* 명세: 기존 .product-options의 display:grid 선언보다 우선하여 선택하지 않은 상품 그룹을 레이아웃에서 완전히 제외합니다. */
.product-options[hidden] {
    display: none !important;
}

/* 명세: 복수 상품 장바구니에서 상품별 선택·수량 입력과 주문 항목별 금액을 읽기 쉽게 배치합니다. */
.cart-product-options {
    max-height: 680px;
    overflow-y: auto;
    padding-right: 3px;
}

.cart-product-option {
    position: relative;
}

.cart-product-option > input {
    position: absolute;
    top: 17px;
    left: 14px;
    z-index: 1;
    opacity: 1;
    accent-color: #8e78ff;
}

.cart-product-option > span {
    padding-left: 42px;
}

.cart-product-option > input:checked + span {
    border-color: #8e78ff;
    background: rgba(112, 83, 255, .16);
}

.product-item-quantity {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.product-item-quantity button {
    width: 27px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    background: #282442;
    color: #fff;
    cursor: pointer;
}

.product-item-quantity input {
    width: 52px;
    height: 27px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    background: #101020;
    color: #fff;
    text-align: center;
}

.product-item-quantity small {
    margin-left: 4px;
    color: #92e9da !important;
    font-size: 11px !important;
}

.summary-items {
    display: grid;
    gap: 8px;
    margin: 0 0 13px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.summary-items > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #d9d4e5;
    font-size: 12px;
}

.summary-items > div > span {
    min-width: 0;
    flex: 1;
}

.summary-items small,
.empty-cart {
    color: #aaa3ba;
}

.summary-items strong {
    color: #f3f0fa;
    white-space: nowrap;
}

/* 명세: 장바구니 항목별 삭제 버튼을 금액 옆에 작게 표시해 해당 상품만 제거할 수 있게 합니다. */
.remove-cart-item {
    width: 24px;
    height: 24px;
    margin: -2px 0 -2px 2px;
    border: 1px solid rgba(255, 175, 184, .35);
    border-radius: 7px;
    background: rgba(255, 175, 184, .08);
    color: #ffafb8;
    cursor: pointer;
}

.remove-cart-item:hover {
    border-color: rgba(255, 175, 184, .8);
    background: rgba(255, 175, 184, .18);
}

.empty-cart {
    margin: 0;
    font-size: 13px;
}

/* 명세: 장바구니 추가와 최종 결제 버튼을 같은 영역에서 명확히 구분해 표시합니다. */
.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
}

.add-to-cart-button {
    border: 1px solid rgba(146, 233, 218, .55);
    border-radius: 11px;
    background: rgba(100, 222, 198, .12);
    color: #92e9da;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.purchase-panel .add-to-cart-button {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
}

/* 명세: 구매 요약의 이메일 주문 버튼은 최종 결제 버튼과 분리해 오작동을 줄이고 같은 폭으로 표시합니다. */
.purchase-summary .add-to-cart-button {
    width: 100%;
    margin-top: 12px;
    padding: 14px;
}

/* 명세: 비활성화된 이메일 주문 버튼은 화면에 남기되 현재 접수할 수 없음을 시각적으로 알립니다. */
.purchase-summary .add-to-cart-button:disabled {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .06);
    color: #898398;
    cursor: not-allowed;
}

.cart-actions .payment-button {
    margin: 0;
}

@media (max-width: 640px) {
    .cart-actions {
        grid-template-columns: 1fr;
    }

    .add-to-cart-button {
        min-height: 48px;
    }
}
