﻿.customer-purchase-page {
    padding: 28px 16px 72px;
}

.customer-purchase-container {
    max-width: 1240px;
    margin: 0 auto;
}

.customer-purchase-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    border-radius: 20px;
    background: #fff3f3;
    border: 1px solid #f3c7cb;
    color: #a53a44;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(165, 58, 68, 0.08);
    margin-bottom: 26px;
}

.customer-purchase-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

    .customer-purchase-page-head h1 {
        margin: 0 0 8px;
        font-size: clamp(32px, 4vw, 46px);
        line-height: 1.15;
        color: #17212f;
    }

.customer-purchase-guide-card,
.customer-purchase-table-card,
.customer-purchase-summary-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 64px rgba(18, 58, 141, 0.12);
    backdrop-filter: blur(12px);
    border-radius: 28px;
}

.customer-purchase-guide-card {
    position: relative;
    overflow: hidden;
    padding: 26px;
    margin-bottom: 22px;
}

    .customer-purchase-guide-card::before {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        top: -130px;
        right: -130px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(31, 111, 255, 0.16), rgba(31, 111, 255, 0));
        pointer-events: none;
    }

.customer-purchase-guide-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.customer-purchase-step {
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #e4ebf4;
}

    .customer-purchase-step small {
        display: block;
        color: #123a8d;
        font-weight: 800;
        margin-bottom: 8px;
    }

    .customer-purchase-step strong {
        display: block;
        font-size: 20px;
        margin-bottom: 6px;
        color: #17212f;
    }

    .customer-purchase-step span {
        color: #66758a;
        font-size: 14px;
        line-height: 1.7;
    }

.customer-purchase-info-panel {
    position: relative;
    z-index: 1;
    padding: 20px 22px;
    border-radius: 22px;
    background: #f8fbff;
    border: 1px solid #dde9fb;
    line-height: 1.9;
    color: #30465f;
}

    .customer-purchase-info-panel h2 {
        margin: 0 0 10px;
        font-size: 28px;
        color: #17212f;
    }

    .customer-purchase-info-panel strong {
        color: #243246;
    }

.customer-purchase-validation {
    margin-bottom: 18px;
}

    .customer-purchase-validation .validation-summary-errors,
    .customer-purchase-validation .validation-summary-valid {
        margin: 0;
        border-radius: 16px;
        padding: 14px 16px;
        background: #fff4f4;
        border: 1px solid rgba(239, 68, 68, 0.2);
        color: #b42318;
    }

    .customer-purchase-validation ul {
        margin: 0;
        padding-left: 20px;
    }

.customer-purchase-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

.customer-purchase-table-card {
    overflow: hidden;
}

.customer-purchase-card-headline {
    padding: 22px 24px;
    border-bottom: 1px solid #e5edf6;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 255, 0.82));
}

    .customer-purchase-card-headline h2 {
        margin: 0 0 4px;
        font-size: 26px;
        color: #17212f;
    }

    .customer-purchase-card-headline p {
        margin: 0;
        color: #66758a;
        font-size: 14px;
    }


.customer-purchase-headline-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.customer-purchase-tax-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 56px;
    padding: 0 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #dff4ff, #c8ecff);
    color: #075985;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}


.customer-purchase-table-wrap {
    overflow-x: hidden;
}

.customer-purchase-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    table-layout: auto;
}

    .customer-purchase-table th,
    .customer-purchase-table td {
        word-break: normal;
    }

    .customer-purchase-table thead th {
        background: linear-gradient(180deg, #1f2732, #18202b);
        color: #fff;
        text-align: left;
        padding: 18px 16px;
        font-size: 15px;
        white-space: normal;
    }

    .customer-purchase-table tbody td {
        padding: 18px 16px;
        border-bottom: 1px solid #e7edf6;
        vertical-align: middle;
        background: rgba(255, 255, 255, 0.94);
    }

    .customer-purchase-table tbody tr:hover td {
        background: #f8fbff;
    }

    .customer-purchase-table thead th:nth-child(1),
    .customer-purchase-table tbody td:nth-child(1) {
        width: 28%;
    }

    .customer-purchase-table thead th:nth-child(2),
    .customer-purchase-table tbody td:nth-child(2) {
        width: 10%;
    }

    .customer-purchase-table thead th:nth-child(3),
    .customer-purchase-table tbody td:nth-child(3) {
        width: 12%;
    }

    .customer-purchase-table thead th:nth-child(4),
    .customer-purchase-table tbody td:nth-child(4) {
        width: 10%;
    }

    .customer-purchase-table thead th:nth-child(5),
    .customer-purchase-table tbody td:nth-child(5) {
        width: 14%;
    }

    .customer-purchase-table thead th:nth-child(6),
    .customer-purchase-table tbody td:nth-child(6) {
        width: 11%;
    }

    .customer-purchase-table thead th:nth-child(7),
    .customer-purchase-table tbody td:nth-child(7) {
        width: 15%;
    }

    .customer-purchase-table thead th:nth-child(5),
    .customer-purchase-table tbody td:nth-child(5),
    .customer-purchase-table thead th:nth-child(6),
    .customer-purchase-table tbody td:nth-child(6),
    .customer-purchase-table thead th:nth-child(7),
    .customer-purchase-table tbody td:nth-child(7) {
        white-space: nowrap;
    }

.customer-purchase-product-name {
    display: inline-block;
    max-width: 100%;
    font-weight: 800;
    color: #243246;
    overflow-wrap: anywhere;
}

.customer-purchase-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.customer-purchase-tag-type {
    background: rgba(17, 163, 106, 0.12);
    color: #0c7d50;
}

.customer-purchase-tag-node {
    background: rgba(31, 111, 255, 0.12);
    color: #123a8d;
}

.customer-purchase-tag-floating {
    background: rgba(255, 177, 0, 0.14);
    color: #946400;
}

.customer-purchase-select,
.customer-purchase-qty-input {
    width: 100%;
    min-width: 84px;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid #dbe4f0;
    background: #fff;
    padding: 0 12px;
    font-size: 16px;
    color: #17212f;
}

    .customer-purchase-select:focus,
    .customer-purchase-qty-input:focus {
        outline: none;
        border-color: #1f6fff;
        box-shadow: 0 0 0 4px rgba(31, 111, 255, 0.12);
    }

.customer-purchase-price-cell,
.customer-purchase-amount {
    text-align: right;
    font-weight: 800;
}

.customer-purchase-price {
    display: grid;
    gap: 4px;
    justify-items: end;
    text-align: right;
    min-width: 120px;
}

.customer-purchase-amount {
    text-align: right;
    font-weight: 800;
    min-width: 140px;
}

    .customer-purchase-price small,
    .customer-purchase-price strong,
    .customer-purchase-amount {
        white-space: nowrap;
    }

.customer-purchase-total-row td {
    background: #fbfdff !important;
    font-size: 18px;
    font-weight: 800;
}

.customer-purchase-total-label {
    text-align: right;
    color: #243246;
}

.customer-purchase-summary-card {
    padding: 22px;
    position: static;
}

    .customer-purchase-summary-card h3 {
        margin: 0 0 16px;
        font-size: 24px;
        color: #17212f;
    }

.customer-purchase-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.customer-purchase-summary-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #e4ebf4;
}

    .customer-purchase-summary-item small {
        display: block;
        color: #66758a;
        margin-bottom: 6px;
        font-weight: 700;
    }

    .customer-purchase-summary-item strong {
        display: block;
        color: #123a8d;
        font-size: 24px;
        font-weight: 800;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    .customer-purchase-summary-item span {
        color: #66758a;
        font-size: 13px;
        line-height: 1.7;
    }

.customer-purchase-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 24px 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 250, 255, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 64px rgba(18, 58, 141, 0.12);
    backdrop-filter: blur(12px);
    border-radius: 28px;
}

.customer-purchase-footer-note {
    color: #66758a;
    font-size: 14px;
    line-height: 1.7;
}

.customer-purchase-action-group {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-purchase-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 14px 22px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.customer-purchase-btn-outline {
    background: #fff;
    color: #123a8d;
    border: 1px solid #cfe0ff;
    box-shadow: 0 10px 22px rgba(18, 58, 141, 0.06);
}

.customer-purchase-btn-primary {
    background: linear-gradient(135deg, #1f6fff, #52a3ff);
    color: #fff;
    box-shadow: 0 14px 28px rgba(31, 111, 255, 0.22);
}

.customer-purchase-btn-disabled {
    background: #a8afb7;
    color: #fff;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .customer-purchase-guide-top {
        grid-template-columns: 1fr;
    }

    .customer-purchase-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .customer-purchase-table-wrap {
        overflow-x: auto;
    }

    .customer-purchase-table {
        min-width: 980px;
        table-layout: auto;
    }

        .customer-purchase-table thead th,
        .customer-purchase-table tbody td {
            width: auto !important;
            white-space: nowrap;
        }
}

@media (max-width: 720px) {
    .customer-purchase-guide-card,
    .customer-purchase-card-headline,
    .customer-purchase-summary-card,
    .customer-purchase-footer-actions {
        padding-left: 18px;
        padding-right: 18px;
    }
}



/* 購入遷移バー用 */
.purchase-step-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.purchase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.purchase-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 6px;
}

.purchase-step-label {
    font-size: 12px;
    text-align: center;
}

.purchase-step-line {
    height: 2px;
    background: #dee2e6;
    flex: 1;
}

/* 状態別 */
.purchase-step.done .purchase-step-circle {
    background: #198754;
    color: white;
}

.purchase-step.current .purchase-step-circle {
    background: #0d6efd;
    color: white;
}

.purchase-step.current .purchase-step-label {
    font-weight: bold;
}

.purchase-step.done + .purchase-step-line {
    background: #198754;
}




/* 購入画面お客様情報用 */
.purchase-customer-form-body {
    padding: 28px 32px 8px;
}

.purchase-customer-form-wrap {
    max-width: 980px;
}

.purchase-customer-form-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    column-gap: 36px;
    row-gap: 16px;
    align-items: center;
}

.customer-account-label {
    font-weight: 600;
    color: #334155;
    padding-left: 4px;

    display: flex;
    align-items: center;
    gap: 4px;
}

    .customer-account-label .text-danger {
        line-height: 1;
    }

.customer-account-input,
.customer-account-select {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #fff;
    font-size: 16px;
}

    .customer-account-input[readonly] {
        background: #f8fafc;
        color: #475569;
    }

.customer-purchase-footer-actions {
    padding: 20px 32px 28px;
}

.customer-purchase-layout-customer {
    display: block;
}

.customer-purchase-summary-card-above {
    margin-bottom: 16px;
}



/* 支払い方法ページ専用 */
.purchase-payment-method-body {
    padding: 24px 32px 8px;
}

.purchase-payment-method-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.purchase-payment-method-grid {
    display: grid;
    gap: 14px;
}

/* 支払い方法カード共通 */
.purchase-payment-card {
    display: block;
    position: relative;
    border: 1px solid #cfd9e8;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .purchase-payment-card:hover {
        border-color: #94a3b8;
        box-shadow: 0 8px 20px rgba(18, 58, 141, 0.08);
    }

    .purchase-payment-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .purchase-payment-card:has(input:checked) {
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

    .purchase-payment-card:has(input:focus-visible) {
        outline: 3px solid #93c5fd;
        outline-offset: 2px;
    }

.purchase-payment-card-body {
    padding: 18px 24px 18px 72px;
}

    .purchase-payment-card-body h4 {
        margin: 0 0 6px;
        font-size: 20px;
        color: #17212f;
    }

    .purchase-payment-card-body p {
        margin: 0;
        font-size: 14px;
        line-height: 1.7;
        color: #64748b;
    }

/* ラジオボタン */
.purchase-payment-radio {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.purchase-payment-card:has(input:checked) > .purchase-payment-radio {
    border-color: #2563eb;
    background: #2563eb;
}

    .purchase-payment-card:has(input:checked) > .purchase-payment-radio::after {
        content: "";
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        background: #fff;
    }

/* クレジットカード枠 */
.purchase-payment-card-group {
    padding: 0 12px 12px;
}

    .purchase-payment-card-group:has(input:checked) {
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

.purchase-payment-card-group-head {
    padding-bottom: 4px;
    padding-left: 20px;
}

/* Stripe / PayPal の内側カード */
.purchase-payment-sub-card {
    position: relative;
    display: block;
    margin-left: 65px;
    padding: 12px 18px 12px 56px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

    .purchase-payment-sub-card + .purchase-payment-sub-card {
        margin-top: 8px;
    }

    .purchase-payment-sub-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .purchase-payment-sub-card .purchase-payment-radio {
        left: 18px;
        top: 18px;
    }

    .purchase-payment-sub-card h4 {
        margin: 0 0 4px;
        font-size: 20px;
        color: #17212f;
    }

    .purchase-payment-sub-card p {
        margin: 0;
        font-size: 14px;
        line-height: 1.6;
        color: #64748b;
    }

    .purchase-payment-sub-card:has(input:checked) {
        border-color: #2563eb;
        background: #eff6ff;
    }

        .purchase-payment-sub-card:has(input:checked) .purchase-payment-radio {
            border-color: #2563eb;
            background: #2563eb;
        }

            .purchase-payment-sub-card:has(input:checked) .purchase-payment-radio::after {
                content: "";
                position: absolute;
                inset: 4px;
                border-radius: 50%;
                background: #fff;
            }

/* 無効状態 */
.purchase-payment-card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

    .purchase-payment-card-disabled:hover {
        border-color: #cbd5e1;
        box-shadow: none;
    }

.purchase-payment-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
}

/* 下部ボタン */
.customer-payment-footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding: 20px 32px 28px;
    border-top: 1px solid #e5edf6;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 250, 255, 0.72));
    border-radius: 0 0 28px 28px;
}

/* スマホ対応 */
@media (max-width: 720px) {
    .purchase-payment-method-body {
        padding: 20px 16px 8px;
    }

    .purchase-payment-sub-card {
        margin-left: 0;
    }

    .purchase-payment-card-body {
        padding-right: 16px;
    }

    .customer-payment-footer-actions {
        padding: 20px 16px 24px;
    }
}




/* 銀行振込確定画面 */
.purchase-bank-confirm-note-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

    .purchase-bank-confirm-note-list li + li {
        margin-top: 0.35rem;
    }

.purchase-bank-confirm-section + .purchase-bank-confirm-section {
    margin-top: 2rem;
}

.purchase-bank-confirm-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.purchase-bank-confirm-info-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0.75rem 2rem;
    align-items: start;
}

.purchase-bank-confirm-label {
    font-weight: 700;
    color: #334155;
    text-align: right;
    padding-right: 8px;
}

.purchase-bank-confirm-value {
    min-height: 1.5rem;
    word-break: break-word;
    color: #0f172a;
}

    .purchase-bank-confirm-value:empty::before {
        content: "—";
        color: #94a3b8;
    }

.customer-purchase-table td .text-muted {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.875rem;
}

.customer-purchase-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.customer-purchase-footer-note {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
}

.customer-purchase-bank-summary-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #e4ebf4;
}

    .customer-purchase-bank-summary-item small {
        display: block;
        color: #66758a;
        margin-bottom: 6px;
        font-weight: 700;
    }

    .customer-purchase-bank-summary-item strong {
        display: block;
        color: #123a8d;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.35;
        margin-bottom: 4px;
    }

    .customer-purchase-bank-summary-item span {
        color: #66758a;
        font-size: 13px;
        line-height: 1.7;
    }

@media (max-width: 768px) {
    .purchase-bank-confirm-info-grid {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .customer-purchase-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-purchase-action-group {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

        .customer-purchase-action-group .customer-purchase-btn {
            width: 100%;
        }
}



/* 銀行振込完了ページ */
.purchase-bank-complete-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0.75rem 1rem;
    margin: 0;
    padding-left: 24px;
    padding-right: 24px;
}

    .purchase-bank-complete-grid dt {
        font-weight: 700;
        color: #334155;
    }

    .purchase-bank-complete-grid dd {
        margin: 0;
        color: #0f172a;
        word-break: break-word;
    }
