.checkout-section{
    padding:34px 0 54px;
    background:
        radial-gradient(circle at top left, rgba(33,45,92,.08), transparent 34%),
        linear-gradient(180deg, #f7f8fc 0%, #f1f4fb 100%);
}

.checkout-container{
    width:min(1180px, calc(100% - 24px));
    margin:auto;
    display:grid;
    grid-template-columns:minmax(0,1fr) 410px;
    gap:22px;
    align-items:start;
}

.checkout-form-panel,
.order-summary-panel{
    border:1px solid rgba(33,45,92,.10);
    border-radius:22px;
    background:#fff;
    box-shadow:0 18px 48px rgba(16,24,40,.08);
    overflow:hidden;
}

.checkout-form-panel{
    padding:26px;
}

.checkout-panel-head{
    margin-bottom:22px;
}

.checkout-kicker{
    display:inline-flex;
    min-height:28px;
    align-items:center;
    padding:0 11px;
    border-radius:999px;
    background:rgba(33,45,92,.08);
    color:var(--primary);
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    margin-bottom:12px;
}

.checkout-panel-head h1{
    margin:0 0 8px;
    color:#2d3448;
    font-size:36px;
    line-height:1.05;
}

.checkout-panel-head p{
    margin:0;
    color:#748097;
    font-size:14px;
    line-height:1.7;
}

.checkout-message{
    padding:14px 16px;
    border-radius:16px;
    font-size:14px;
    font-weight:800;
    margin-bottom:18px;
}

.checkout-message.error{
    background:#fff1f2;
    color:#be123c;
    border:1px solid #fecdd3;
}

.checkout-message.success{
    background:#ecfdf3;
    color:#166534;
    border:1px solid #bbf7d0;
}

.guest-note{
    margin-bottom:16px;
    padding:14px 16px;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#eff6ff;
}

.guest-note strong{
    display:block;
    color:#1d4ed8;
    font-size:14px;
    margin-bottom:4px;
}

.guest-note span{
    display:block;
    color:#475569;
    font-size:13px;
    line-height:1.6;
}

.guest-note a{
    color:var(--primary);
    font-weight:900;
    text-decoration:none;
}

.checkout-form{
    display:grid;
    gap:16px;
}

.checkout-progress{
    position:relative;
    padding:16px;
    border:1px solid #e6eaf2;
    border-radius:16px;
    background:
        linear-gradient(135deg,rgba(22,163,74,.08),rgba(59,130,246,.08)),
        linear-gradient(180deg,#ffffff,#f8fbff);
    box-shadow:0 12px 28px rgba(15,23,42,.06);
    margin-bottom:14px;
    overflow:hidden;
}

.checkout-progress:before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:5px;
    background:linear-gradient(180deg,#16a34a,#3b82f6);
}

.checkout-progress-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
}

.checkout-progress-top strong{
    color:#111827;
    font-size:14px;
}

.checkout-progress-top span{
    color:#16a34a;
    font-size:12px;
    font-weight:900;
    white-space:nowrap;
}

.checkout-progress-track{
    height:11px;
    border-radius:999px;
    background:#e8edf5;
    overflow:hidden;
    box-shadow:inset 0 1px 3px rgba(15,23,42,.08);
}

.checkout-progress-fill{
    width:20%;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,#16a34a,#22c55e,#3b82f6);
    transition:width .25s ease;
    box-shadow:0 0 18px rgba(34,197,94,.35);
}

.checkout-progress-steps{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:7px;
    margin-top:11px;
}

.checkout-progress-step{
    min-height:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:#f1f5f9;
    color:#64748b;
    font-size:10px;
    font-weight:900;
    text-align:center;
}

.checkout-progress-step.active{
    background:#dcfce7;
    color:#166534;
    box-shadow:0 8px 18px rgba(22,163,74,.12);
}

.checkout-progress-note{
    margin:10px 0 0;
    color:#475569;
    font-size:12px;
    font-weight:800;
    line-height:1.55;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    color:#3f4657;
    font-size:13px;
    font-weight:900;
}

.form-group input,
.form-group textarea{
    width:100%;
    border:1px solid #e5e7ef;
    background:#fff;
    color:#333;
    border-radius:16px;
    outline:none;
    font-size:14px;
    transition:border-color .2s ease, box-shadow .2s ease;
}

.form-group input{
    height:52px;
    padding:0 15px;
}

.form-group textarea{
    min-height:132px;
    padding:15px;
    line-height:1.7;
    resize:vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.coupon-form input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(33,45,92,.08);
}

/* Payment Method */
.payment-section{
    display:grid;
    gap:12px;
    padding:16px;
    border:1px solid #e7eaf2;
    border-radius:20px;
    background:linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
}

.payment-title{
    display:flex;
    align-items:center;
    gap:10px;
    color:#2d3448;
    font-size:14px;
    font-weight:900;
}

.payment-title::before{
    content:'';
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--primary);
    box-shadow:0 0 0 5px rgba(33,45,92,.08);
}

.payment-method-list{
    display:grid;
    gap:10px;
}

.payment-method-card{
    position:relative;
    display:grid;
    grid-template-columns:22px minmax(0,1fr);
    gap:12px;
    align-items:start;
    padding:15px;
    border:1px solid #e5e7ef;
    border-radius:18px;
    background:#fff;
    cursor:pointer;
    transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.payment-method-card:hover{
    border-color:rgba(33,45,92,.28);
    background:#fbfcff;
    transform:translateY(-1px);
}

.payment-method-card input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.payment-radio{
    width:20px;
    height:20px;
    border:1px solid #d7dce8;
    border-radius:50%;
    background:#fff;
    margin-top:2px;
    position:relative;
}

.payment-method-card input:checked + .payment-radio{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(33,45,92,.08);
}

.payment-method-card input:checked + .payment-radio::after{
    content:'';
    position:absolute;
    inset:4px;
    border-radius:50%;
    background:var(--primary);
}

.payment-method-card:has(input:checked){
    border-color:var(--primary);
    background:#f8faff;
    box-shadow:0 12px 32px rgba(33,45,92,.10);
}

.payment-method-card:has(input:checked)::after{
    content:'Selected';
    position:absolute;
    top:12px;
    right:12px;
    min-height:22px;
    display:inline-flex;
    align-items:center;
    padding:0 9px;
    border-radius:999px;
    background:rgba(22,163,74,.10);
    color:#15803d;
    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}

.payment-method-content{
    min-width:0;
    display:grid;
    gap:5px;
    padding-right:70px;
}

.payment-method-content strong{
    color:#2d3448;
    font-size:14px;
    line-height:1.35;
}

.payment-method-content em{
    width:max-content;
    max-width:100%;
    min-height:24px;
    display:inline-flex;
    align-items:center;
    padding:0 9px;
    border-radius:999px;
    background:rgba(33,45,92,.08);
    color:var(--primary);
    font-size:11px;
    font-weight:900;
    font-style:normal;
}

.payment-method-content small{
    display:block;
    color:#748097;
    font-size:12px;
    line-height:1.45;
    overflow-wrap:anywhere;
}

.payment-reference-group{
    padding:14px;
    border:1px solid #e5e7ef;
    border-radius:18px;
    background:#fbfcff;
}

.payment-reference-group label{
    margin-bottom:8px;
}

.payment-reference-group input{
    background:#fff;
}

.payment-reference-group.optional{
    background:#fff;
}

.payment-reference-group.is-hidden{
    display:none !important;
}

.payment-reference-help{
    display:block;
    margin-top:8px;
    color:#748097;
    font-size:12px;
    line-height:1.5;
}

/* Coupon Code */
.coupon-box{
    margin:0 16px 14px;
    padding:16px;
    border:1px solid #e7eaf2;
    border-radius:20px;
    background:
        linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    box-shadow:0 10px 28px rgba(16,24,40,.04);
}

.coupon-box h3{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 6px;
    color:#2d3448;
    font-size:16px;
}

.coupon-box h3::before{
    content:'';
    width:10px;
    height:10px;
    border-radius:3px;
    background:#16a34a;
    box-shadow:0 0 0 5px rgba(22,163,74,.10);
}

.coupon-box p{
    margin:0 0 13px;
    color:#7b8497;
    font-size:12px;
    line-height:1.5;
}

.coupon-form{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
}

.coupon-form input{
    width:100%;
    height:46px;
    border:1px solid #e5e7ef;
    border-radius:999px;
    padding:0 15px;
    outline:none;
    font-size:13px;
    background:#fff;
}

.coupon-form button,
.applied-coupon button{
    min-height:46px;
    border:0;
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    padding:0 17px;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
    transition:background .2s ease, transform .2s ease;
}

.coupon-form button:hover,
.applied-coupon button:hover{
    transform:translateY(-1px);
}

.applied-coupon{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px;
    border-radius:18px;
    background:#ecfdf3;
    border:1px solid #bbf7d0;
}

.applied-coupon strong{
    display:block;
    color:#166534;
    font-size:14px;
    margin-bottom:3px;
}

.applied-coupon span{
    display:block;
    color:#15803d;
    font-size:12px;
}

.applied-coupon button{
    background:#fff;
    color:#be123c;
    border:1px solid #fecdd3;
}

/* Selected Payment */
.selected-payment-box{
    margin:0 16px 14px;
    padding:16px;
    border:1px solid #e7eaf2;
    border-radius:20px;
    background:
        linear-gradient(180deg, #fbfcff 0%, #ffffff 100%);
    box-shadow:0 10px 28px rgba(16,24,40,.04);
}

.selected-payment-box h3{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 10px;
    color:#2d3448;
    font-size:16px;
}

.selected-payment-box h3::before{
    content:'';
    width:10px;
    height:10px;
    border-radius:50%;
    background:#2563eb;
    box-shadow:0 0 0 5px rgba(37,99,235,.10);
}

.selected-payment-box strong{
    display:block;
    width:max-content;
    max-width:100%;
    margin-bottom:8px;
    padding:7px 10px;
    border-radius:999px;
    background:rgba(33,45,92,.08);
    color:var(--primary);
    font-size:13px;
    font-weight:900;
    overflow-wrap:anywhere;
}

.selected-payment-box span{
    display:block;
    color:#748097;
    font-size:12px;
    line-height:1.55;
    overflow-wrap:anywhere;
}

#summaryPaymentDetails{
    display:grid;
    gap:5px;
    padding:11px;
    border-radius:14px;
    background:#fff;
    border:1px dashed #dbe1ee;
}

.payment-fallback{
    margin:0;
    padding:15px;
    border:1px solid #edf0f6;
    border-radius:18px;
    background:#fbfcff;
}

.payment-fallback strong{
    display:block;
    color:#2d3448;
    font-size:14px;
    margin-bottom:5px;
}

.payment-fallback span{
    display:block;
    color:#748097;
    font-size:12px;
    line-height:1.55;
    overflow-wrap:anywhere;
}

.checkbox-container{
    display:flex;
    align-items:flex-start;
    gap:10px;
    color:#687386;
    font-size:13px;
    line-height:1.6;
    cursor:pointer;
    user-select:none;
}

.checkbox-container input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.checkmark{
    width:20px;
    height:20px;
    flex:0 0 20px;
    border-radius:6px;
    border:1px solid #d7dce8;
    background:#fff;
    margin-top:1px;
    position:relative;
}

.checkbox-container input:checked + .checkmark{
    background:var(--primary);
    border-color:var(--primary);
}

.checkbox-container input:checked + .checkmark::after{
    content:'';
    position:absolute;
    left:6px;
    top:3px;
    width:5px;
    height:10px;
    border:solid #fff;
    border-width:0 2px 2px 0;
    transform:rotate(45deg);
}

.error-text{
    display:none;
    margin-top:-8px;
    color:#be123c;
    font-size:12px;
    font-weight:700;
}

.error-text.show{
    display:block;
}

.confirm-btn{
    width:100%;
    min-height:54px;
    border:0;
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    font-size:15px;
    font-weight:900;
    cursor:pointer;
    transition:background .2s ease, transform .2s ease;
}

.confirm-btn:hover{
    background:var(--primary-dark);
    transform:translateY(-1px);
}

.summary-head{
    padding:20px;
    border-bottom:1px solid #edf0f6;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:linear-gradient(180deg, #fff, #f9fbff);
}

.summary-head h2{
    margin:0;
    color:#2d3448;
    font-size:20px;
}

.summary-head a{
    color:var(--primary);
    font-size:13px;
    font-weight:900;
    text-decoration:none;
    white-space:nowrap;
}

.summary-products{
    padding:16px;
    display:grid;
    gap:12px;
    max-height:360px;
    overflow:auto;
}

.summary-product-card{
    display:grid;
    grid-template-columns:70px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    padding:12px;
    border:1px solid #edf0f6;
    border-radius:18px;
    background:#fff;
}

.summary-product-card img{
    width:70px;
    height:70px;
    border-radius:14px;
    object-fit:cover;
    border:1px solid #edf0f6;
    background:#f8fafc;
}

.summary-product-info{
    min-width:0;
}

.summary-product-info strong{
    display:-webkit-box;
    color:#3b4254;
    font-size:14px;
    line-height:1.4;
    margin-bottom:5px;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.summary-product-info span{
    display:block;
    color:#7b8497;
    font-size:12px;
}

.summary-product-card b{
    color:var(--primary);
    font-size:13px;
    white-space:nowrap;
}

.summary-list{
    list-style:none;
    margin:0;
    padding:4px 20px 14px;
    display:grid;
    gap:0;
}

.summary-list li{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:11px 0;
    border-bottom:1px dashed #e7eaf2;
    color:#727c8f;
    font-size:14px;
}

.summary-list li strong{
    color:#394154;
    text-align:right;
}

.discount-text{
    color:#16a34a !important;
}

.total-box{
    margin:0 20px 20px;
    padding:18px;
    border-radius:18px;
    background:linear-gradient(135deg, rgba(33,45,92,.96), rgba(33,45,92,.84));
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    color:#fff;
}

.total-box span{
    font-size:14px;
    color:rgba(255,255,255,.78);
}

.total-box strong{
    font-size:22px;
    color:#fff;
    white-space:nowrap;
}

.checkout-empty{
    padding:36px 18px;
    text-align:center;
    border:1px solid #edf0f6;
    border-radius:18px;
    background:#fff;
}

.checkout-empty h2{
    margin:0 0 8px;
    color:#333;
}

.checkout-empty p{
    margin:0 0 18px;
    color:#777;
    font-size:14px;
}

.checkout-empty a{
    min-height:44px;
    padding:0 22px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--primary);
    color:#fff;
    text-decoration:none;
    font-weight:900;
}

@media (max-width:991px){
    .checkout-container{
        grid-template-columns:1fr;
    }
}

@media (max-width:560px){
    .checkout-section{
        padding:20px 0 34px;
    }

    .checkout-container{
        width:min(100% - 16px, 1180px);
    }

    .checkout-form-panel{
        padding:18px;
        border-radius:18px;
    }

    .order-summary-panel{
        border-radius:18px;
    }

    .checkout-panel-head h1{
        font-size:28px;
    }

    .payment-section{
        padding:14px;
        border-radius:18px;
    }

    .payment-method-card{
        border-radius:16px;
    }

    .payment-method-card:has(input:checked)::after{
        position:static;
        grid-column:2;
        width:max-content;
        margin-top:4px;
    }

    .payment-method-content{
        padding-right:0;
    }

    .selected-payment-box,
    .coupon-box{
        margin:0 14px 14px;
        border-radius:18px;
    }

    .summary-head{
        flex-direction:column;
        align-items:flex-start;
        padding:16px;
    }

    .summary-products{
        padding:14px;
    }

    .summary-product-card{
        grid-template-columns:62px minmax(0,1fr);
    }

    .summary-product-card b{
        grid-column:2;
    }

    .coupon-form{
        grid-template-columns:1fr;
    }

    .coupon-form button{
        width:100%;
    }

    .applied-coupon{
        flex-direction:column;
        align-items:flex-start;
    }

    .applied-coupon form,
    .applied-coupon button{
        width:100%;
    }

    .summary-list{
        padding:0 16px 12px;
    }

    .total-box{
        margin:0 16px 16px;
        flex-direction:column;
        align-items:flex-start;
    }

    .total-box strong{
        font-size:24px;
    }
}
