﻿/* ===== General ===== */
.modern-checkout {
    background: #f8fafc;
    padding-bottom: 80px;
}

.checkout-header {
    padding: 60px 0 30px 0;
}

    .checkout-header h1 {
        font-weight: 700;
        font-size: 34px;
    }

.subtitle {
    color: #6b7280;
    margin-bottom: 25px;
}

.checkout-illustration {
    max-width: 80%;
}

/* ===== Alert ===== */
.checkout-alert {
    background: #fff7ed;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 15px 18px;
}

    .checkout-alert .badge {
        background: #f59e0b;
        color: #fff;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
        display: inline-block;
        margin-bottom: 10px;
    }

    .checkout-alert.error {
        background: #fef2f2;
        border: 1px solid #fecaca;
        margin-bottom: 20px;
    }

/* ===== Cards ===== */
.checkout-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,.06);
}

/* ===== Summary ===== */
.summary-card {
    text-align: right;
}

.brand-logo {
    max-width: 140px;
    margin-bottom: 30px;
}

.summary-item span {
    font-size: 13px;
    color: #6b7280;
}

.summary-item h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
    line-height: 1.4;
}

.price-box h3 {
    font-size: 32px;
    color: #ec4899;
    margin-top: 10px;
}

.price-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
}

/* ===== IG Badge ===== */
.ig-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af);
    color: #fff;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
    width: 100%;
}

    .ig-badge i {
        font-size: 18px;
    }

/* ===== Form ===== */
.form-group {
    margin-bottom: 22px;
}

    .form-group label {
        font-size: 14px;
        color: #374151;
        margin-bottom: 6px;
        display: block;
    }

.form-control {
    height: 52px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 0 15px;
    font-size: 15px;
}

    .form-control:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 4px rgba(99,102,241,.15);
    }

/* ===== Checkbox (FIXED) ===== */
.checkbox-group .checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    padding-right: 36px; /* جا برای چک‌باکس */
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    line-height: 1.8;
}

    /* مخفی کردن input */
    .checkbox-group .checkbox-container input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        margin: 0;
        cursor: pointer;
    }

    /* باکس چک */
    .checkbox-group .checkbox-container .checkmark {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        background: #fff;
        transition: all .2s ease;
    }

    .checkbox-group .checkbox-container a {
        margin-left: 5px;
    }
    /* Hover */
    .checkbox-group .checkbox-container:hover .checkmark {
        border-color: #6366f1;
    }

    /* Checked */
    .checkbox-group .checkbox-container input:checked ~ .checkmark {
        background: #6366f1;
        border-color: #6366f1;
    }

    /* تیک */
    .checkbox-group .checkbox-container .checkmark:after {
        content: "";
        position: absolute;
        display: none;
    }

    .checkbox-group .checkbox-container input:checked ~ .checkmark:after {
        display: block;
        right: 7px;
        top: 3px;
        width: 6px;
        height: 12px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

/* ===== Buttons ===== */
.payment-buttons {
    margin-top: 30px;
}

.btn-lg {
    height: 54px;
    border-radius: 14px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg,#6366f1,#4f46e5);
    border: none;
}

.btn-outline {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111;
}

.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

    .btn-loading::after {
        content: " ⏳";
    }

/* ===== Trust ===== */
.trust-note {
    margin-top: 18px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* ===== Sticky Summary ===== */
@media (min-width: 992px) {
    .summary-card {
        position: sticky;
        top: 30px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 767px) {

    .checkout-wrapper {
        display: flex;
        flex-direction: column;
    }

        /* Summary first */
        .checkout-wrapper > .col-md-4 {
            order: 1;
            margin-bottom: 20px;
        }

        /* Form after */
        .checkout-wrapper > .col-md-8 {
            order: 2;
        }

    .checkout-header {
        padding: 30px 0;
        text-align: center;
    }

        .checkout-header .checkout-header-image-container {
            text-align: center;
        }

        .checkout-header img {
            width: 50%;
        }

        .checkout-header h1 {
            font-size: 26px;
        }

        .checkout-header .checkout-alert {
            text-align: right;
        }

    .summary-card {
        position: sticky;
        top: 10px;
        z-index: 2;
    }
}
