/* ============================================================
   دیجی آنی — سیستم طراحی صفحات خرید (سبد، تسویه، پرداخت، سفارش)
   اصل‌ها: پس‌زمینه کم‌رنگ، کارت‌های سفید با سایه نرم، رنگ‌های ملایم،
   یک رنگ تأکید برای هر نوع خرید (نقدی = سبز، اقساطی = نیلی برند).
   همه کلاس‌ها با پیشوند sx- هستند تا با استایل‌های قدیمی تداخل نکنند.
   ============================================================ */

:root {
    --sx-canvas: #f5f6fb;
    --sx-surface: #ffffff;
    --sx-ink: #1f2a44;
    --sx-ink-2: #4b5675;
    --sx-ink-3: #6b7794;
    --sx-line: #e6e9f2;
    --sx-line-2: #eff1f7;

    --sx-brand: #5459e0;
    --sx-brand-strong: #4347c6;
    --sx-brand-soft: #eff0ff;
    --sx-brand-ink: #3a3eab;

    --sx-cash: #0b8a67;
    --sx-cash-strong: #087354;
    --sx-cash-soft: #eaf8f2;
    --sx-cash-ink: #0a6a4e;

    --sx-ok-bg: #ecf9f2;   --sx-ok-line: #c6ebd8;   --sx-ok-ink: #0f6b47;
    --sx-warn-bg: #fff8e6; --sx-warn-line: #f5e2a8; --sx-warn-ink: #85560a;
    --sx-bad-bg: #fff0f0;  --sx-bad-line: #f6cdcd;  --sx-bad-ink: #b02a2a;
    --sx-info-bg: #eff3ff; --sx-info-line: #d3dcfb; --sx-info-ink: #34439c;

    --sx-radius: 18px;
    --sx-radius-md: 14px;
    --sx-radius-sm: 10px;
    --sx-shadow: 0 1px 2px rgba(31, 42, 68, .04), 0 12px 32px -16px rgba(31, 42, 68, .14);
    --sx-ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- پوسته صفحه ---------- */
.sx-page {
    background: var(--sx-canvas);
    color: var(--sx-ink);
    padding: 30px 0 80px;
    font-size: .95rem;
    line-height: 1.85;
}
.sx-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.sx-wrap--md { max-width: 820px; }
.sx-wrap--sm { max-width: 640px; }

.sx-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.sx-title { font-size: 1.5rem; font-weight: 700; line-height: 1.5; color: var(--sx-ink); }
.sx-subtitle { color: var(--sx-ink-3); font-size: .9rem; margin-top: 2px; }

.sx-i {
    width: 1.15em; height: 1.15em; flex: none;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- نوار مراحل (واقعاً یک توالی است، پس شماره‌دار) ---------- */
.sx-steps { display: flex; align-items: center; gap: 0; list-style: none; }
.sx-step { display: flex; align-items: center; gap: 8px; color: var(--sx-ink-3); font-size: .85rem; font-weight: 500; }
.sx-step + .sx-step::before {
    content: ''; width: 34px; height: 2px; margin-inline: 10px;
    background: var(--sx-line); border-radius: 2px;
}
.sx-step.is-done + .sx-step::before,
.sx-step.is-current + .sx-step::before { background: var(--sx-line); }
.sx-step.is-done + .sx-step.is-current::before,
.sx-step.is-done + .sx-step.is-done::before { background: var(--sx-brand); }
.sx-step__dot {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1.5px solid var(--sx-line); color: var(--sx-ink-3);
    font-size: .8rem; font-weight: 700; flex: none;
}
.sx-step__dot .sx-i { width: 14px; height: 14px; stroke-width: 2.6; }
.sx-step.is-current { color: var(--sx-ink); font-weight: 700; }
.sx-step.is-current .sx-step__dot { background: var(--sx-brand); border-color: var(--sx-brand); color: #fff; }
.sx-step.is-done { color: var(--sx-ink-2); }
.sx-step.is-done .sx-step__dot { background: var(--sx-brand-soft); border-color: var(--sx-brand-soft); color: var(--sx-brand-ink); }

/* ---------- کارت ---------- */
.sx-card {
    background: var(--sx-surface);
    border: 1px solid var(--sx-line);
    border-radius: var(--sx-radius);
    box-shadow: var(--sx-shadow);
}
.sx-card__body { padding: 26px; }
.sx-section {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.02rem; font-weight: 700; color: var(--sx-ink);
    margin-bottom: 18px;
}
.sx-section .sx-i { width: 20px; height: 20px; color: var(--sx-brand); }
.sx-section:not(:first-child) { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--sx-line-2); }

/* ---------- دکمه‌ها ---------- */
.sx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 22px;
    border: 1px solid transparent; border-radius: 12px;
    font-family: inherit; font-size: .95rem; font-weight: 700; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background-color .18s var(--sx-ease), border-color .18s var(--sx-ease), color .18s var(--sx-ease), box-shadow .18s var(--sx-ease);
}
.sx-btn--primary { background: var(--accent, var(--sx-brand)); color: #fff; }
.sx-btn--primary:hover { background: var(--accent-strong, var(--sx-brand-strong)); color: #fff; }
.sx-btn--soft { background: var(--accent-soft, var(--sx-brand-soft)); color: var(--accent-ink, var(--sx-brand-ink)); }
.sx-btn--soft:hover { filter: brightness(.97); }
.sx-btn--ghost { background: #fff; border-color: var(--sx-line); color: var(--sx-ink-2); }
.sx-btn--ghost:hover { border-color: #cdd3e6; background: #fafbfe; color: var(--sx-ink); }
.sx-btn--danger { background: var(--sx-bad-bg); color: var(--sx-bad-ink); }
.sx-btn--danger:hover { background: #ffe3e3; }
.sx-btn--sm { min-height: 36px; padding: 0 14px; font-size: .84rem; border-radius: 10px; }
.sx-btn--lg { min-height: 52px; font-size: 1rem; }
.sx-btn--block { width: 100%; }
.sx-btn[disabled], .sx-btn.is-loading { opacity: .6; cursor: not-allowed; }
.sx-btn:focus-visible { outline-offset: 3px; }

.sx-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; padding: 4px 2px; cursor: pointer;
    font-family: inherit; font-size: .82rem; font-weight: 500; color: var(--sx-ink-3);
    border-radius: 6px; transition: color .15s;
}
.sx-link .sx-i { width: 15px; height: 15px; }
.sx-link:hover { color: var(--sx-brand-ink); }
.sx-link--danger:hover { color: var(--sx-bad-ink); }

/* ---------- برچسب‌ها و نقطه رنگ ---------- */
.sx-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px; border-radius: 999px;
    background: var(--sx-line-2); color: var(--sx-ink-2);
    font-size: .75rem; font-weight: 500; line-height: 1.8; white-space: nowrap;
}
.sx-chip--wrap { white-space: normal; border-radius: 12px; padding: 3px 12px; line-height: 1.8; }
.sx-chip--ok { background: var(--sx-ok-bg); color: var(--sx-ok-ink); }
.sx-chip--warn { background: var(--sx-warn-bg); color: var(--sx-warn-ink); }
.sx-chip--bad { background: var(--sx-bad-bg); color: var(--sx-bad-ink); }
.sx-chip--brand { background: var(--sx-brand-soft); color: var(--sx-brand-ink); }
.sx-dot {
    width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none;
    border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(31, 42, 68, .18);
}

/* ---------- پیام‌ها ---------- */
.sx-note {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 16px; border-radius: var(--sx-radius-md);
    border: 1px solid var(--sx-info-line); background: var(--sx-info-bg); color: var(--sx-info-ink);
    font-size: .88rem; line-height: 1.9;
}
.sx-note > .sx-i { width: 20px; height: 20px; margin-top: 3px; }
.sx-note--ok { background: var(--sx-ok-bg); border-color: var(--sx-ok-line); color: var(--sx-ok-ink); }
.sx-note--warn { background: var(--sx-warn-bg); border-color: var(--sx-warn-line); color: var(--sx-warn-ink); }
.sx-note--bad { background: var(--sx-bad-bg); border-color: var(--sx-bad-line); color: var(--sx-bad-ink); }
.sx-note strong { font-weight: 700; }
.sx-note--tight { padding: 10px 14px; font-size: .82rem; line-height: 1.8; }

/* ---------- فرم ---------- */
.sx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sx-field { margin-bottom: 18px; }
.sx-field > label, .sx-label { display: block; margin-bottom: 7px; font-size: .86rem; font-weight: 500; color: var(--sx-ink-2); }
.sx-field input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.sx-field select,
.sx-field textarea {
    width: 100%; min-height: 46px; padding: 10px 14px;
    background: #fff; color: var(--sx-ink);
    border: 1.5px solid var(--sx-line); border-radius: 12px;
    font-family: inherit; font-size: .93rem; line-height: 1.7;
    transition: border-color .15s, box-shadow .15s;
}
.sx-field textarea { min-height: 112px; resize: vertical; }
.sx-field select {
    appearance: none; -webkit-appearance: none; padding-inline-end: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7794' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 14px center;
}
.sx-field input:hover, .sx-field select:hover, .sx-field textarea:hover { border-color: #cdd3e6; }
.sx-field input:focus, .sx-field select:focus, .sx-field textarea:focus {
    outline: none; border-color: var(--sx-brand); box-shadow: 0 0 0 4px rgba(84, 89, 224, .12);
}
.sx-field ::placeholder { color: #a1abc2; }
.sx-hint { margin-top: 6px; font-size: .78rem; color: var(--sx-ink-3); line-height: 1.7; }
.sx-error { margin-top: 6px; font-size: .8rem; color: var(--sx-bad-ink); }
.sx-ltr { direction: ltr; unicode-bidi: embed; text-align: right; }
.sx-num { font-variant-numeric: tabular-nums; }
.sx-muted { color: var(--sx-ink-3); }
.sx-stack > * + * { margin-top: 16px; }

/* ---------- ردیف‌های خلاصه مبلغ ---------- */
.sx-sum__rows { margin: 0; }
.sx-sum__row {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 7px 0; font-size: .9rem; color: var(--sx-ink-2);
}
.sx-sum__row dt { color: var(--sx-ink-2); }
.sx-sum__row dd { margin: 0; color: var(--sx-ink); font-weight: 500; text-align: end; white-space: nowrap; }
.sx-sum__row dd small { color: var(--sx-ink-3); font-size: .75rem; font-weight: 400; }
.sx-sum__row--save dt, .sx-sum__row--save dd { color: var(--sx-cash-ink); }
.sx-free { color: var(--sx-cash-ink); font-weight: 700; }
.sx-sum__sub { font-size: .76rem; color: var(--sx-ink-3); margin-top: -2px; padding-bottom: 6px; }
.sx-sum__total {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-top: 10px; padding-top: 16px; border-top: 1px dashed var(--sx-line);
    font-weight: 700; color: var(--sx-ink);
}
.sx-sum__total .sx-sum__amount { font-size: 1.2rem; color: var(--accent-ink, var(--sx-brand-ink)); }
.sx-sum__total small { font-size: .78rem; font-weight: 500; color: var(--sx-ink-3); margin-inline-start: 3px; }

/* ---------- نوار پیشرفت ارسال رایگان ---------- */
.sx-progress { margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--sx-radius-md); background: var(--accent-soft, var(--sx-brand-soft)); font-size: .8rem; color: var(--accent-ink, var(--sx-brand-ink)); line-height: 1.8; }
.sx-progress__bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .8); margin-top: 8px; overflow: hidden; }
.sx-progress__bar > span { display: block; height: 100%; border-radius: 6px; background: var(--accent, var(--sx-brand)); transition: width .5s var(--sx-ease); }
.sx-progress--done { display: flex; align-items: center; gap: 8px; }
.sx-progress--done .sx-i { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
    .sx-progress__bar > span { transition: none; }
}

/* ============================================================
   سبد خرید
   ============================================================ */
.sx-groups { display: grid; gap: 22px; }

.sx-group {
    --accent: var(--sx-brand); --accent-strong: var(--sx-brand-strong);
    --accent-soft: var(--sx-brand-soft); --accent-ink: var(--sx-brand-ink);
    background: var(--sx-surface); border: 1px solid var(--sx-line);
    border-radius: var(--sx-radius); box-shadow: var(--sx-shadow), inset 0 3px 0 var(--accent);
    overflow: hidden; overflow: clip;
}
.sx-group--cash {
    --accent: var(--sx-cash); --accent-strong: var(--sx-cash-strong);
    --accent-soft: var(--sx-cash-soft); --accent-ink: var(--sx-cash-ink);
}
.sx-group__head { display: flex; align-items: center; gap: 14px; padding: 22px 24px 16px; }
.sx-group__icon {
    width: 44px; height: 44px; border-radius: 13px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-ink);
}
.sx-group__icon .sx-i { width: 22px; height: 22px; }
.sx-group__head > div { flex: 1; min-width: 0; }
.sx-group__title { font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.sx-group__sub { font-size: .8rem; color: var(--sx-ink-3); }
.sx-group__count { margin-inline-start: auto; }

.sx-group__body { display: grid; grid-template-columns: minmax(0, 1fr); }
.sx-group__alert { padding: 0 24px 16px; }
.sx-group__alert form { margin-top: 10px; }

/* ---------- ردیف کالا ---------- */
.sx-items { list-style: none; }
.sx-item {
    display: grid; grid-template-columns: 80px minmax(0, 1fr) auto auto;
    align-items: center; gap: 8px 18px;
    padding: 18px 24px; border-top: 1px solid var(--sx-line-2);
}
.sx-item__media {
    display: block; width: 80px; height: 80px; border-radius: 14px; overflow: hidden;
    background: #f3f5fa; border: 1px solid var(--sx-line-2); color: #b3bbd0;
}
.sx-item__media img { width: 100%; height: 100%; object-fit: cover; }
.sx-item__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sx-item__ph .sx-i { width: 26px; height: 26px; stroke-width: 1.5; }
.sx-item__info { min-width: 0; }
.sx-item__title {
    display: block; font-size: .93rem; font-weight: 700; line-height: 1.7; color: var(--sx-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
a.sx-item__title:hover { color: var(--sx-brand-ink); }
.sx-item__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sx-item__oos { margin-top: 6px; font-size: .78rem; color: var(--sx-bad-ink); }
.sx-item__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; }
.sx-item__acts form { display: inline-flex; }
.sx-item__qty { justify-self: center; }
.sx-item__total { min-width: 112px; text-align: end; line-height: 1.6; }
.sx-item__price { font-weight: 700; font-size: .98rem; color: var(--sx-ink); }
.sx-item__price small { font-size: .74rem; font-weight: 400; color: var(--sx-ink-3); }
.sx-item__unit { font-size: .76rem; color: var(--sx-ink-3); }

/* ---------- انتخاب تعداد ---------- */
.sx-qty {
    display: inline-flex; align-items: center;
    border: 1.5px solid var(--sx-line); border-radius: 12px; background: #fff; overflow: hidden;
}
.sx-qty__btn {
    width: 38px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; cursor: pointer; color: var(--sx-ink-2); transition: background-color .15s, color .15s;
}
.sx-qty__btn:hover { background: var(--sx-brand-soft); color: var(--sx-brand-ink); }
.sx-qty__btn .sx-i { width: 16px; height: 16px; }
.sx-qty__input {
    width: 44px; height: 40px; border: 0; background: transparent; text-align: center;
    font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--sx-ink);
    -moz-appearance: textfield; appearance: textfield; padding: 0;
}
.sx-qty__input::-webkit-outer-spin-button, .sx-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sx-qty__input:focus { outline: none; background: var(--sx-brand-soft); }
.sx-qty.is-busy { opacity: .6; pointer-events: none; }

/* ---------- خلاصه سفارش هر کارت ---------- */
.sx-group__sum-wrap { background: #fbfcfe; border-top: 1px solid var(--sx-line-2); }
.sx-group__sum { padding: 20px 24px 24px; }
.sx-group__sum h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.sx-cta { margin-top: 18px; }
.sx-cta__hint { margin-top: 10px; font-size: .76rem; color: var(--sx-ink-3); text-align: center; line-height: 1.8; }

/* دسکتاپ: لیست کالا (راست) کنار خلاصه سفارش (چپ) */
@media (min-width: 960px) {
    .sx-group__body { grid-template-columns: minmax(0, 1fr) 340px; }
    .sx-group__sum-wrap { border-inline-start: 1px solid var(--sx-line-2); }
    .sx-group__sum { position: sticky; top: 100px; }
}

@media (max-width: 720px) {
    .sx-item {
        grid-template-columns: 68px minmax(0, 1fr);
        grid-template-areas: "media info" "qty total";
        padding: 16px 18px; gap: 12px 14px;
    }
    .sx-item__media { grid-area: media; width: 68px; height: 68px; border-radius: 12px; }
    .sx-item__info { grid-area: info; }
    .sx-item__qty { grid-area: qty; justify-self: start; }
    .sx-item__total { grid-area: total; text-align: end; min-width: 0; }
    .sx-group__head { padding: 18px 18px 14px; }
    .sx-group__alert, .sx-group__sum { padding-inline: 18px; }
}

.sx-cart-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* ---------- سبد خالی ---------- */
.sx-empty { text-align: center; padding: 64px 24px; }
.sx-empty__icon {
    width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sx-brand-soft); color: var(--sx-brand);
}
.sx-empty__icon .sx-i { width: 40px; height: 40px; stroke-width: 1.6; }
.sx-empty h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.sx-empty p { color: var(--sx-ink-3); margin-bottom: 24px; }

/* ============================================================
   تسویه حساب
   ============================================================ */
.sx-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 22px; padding: 12px 18px; border-radius: var(--sx-radius-md); background: #fff; border: 1px solid var(--sx-line); }
.sx-trust__item { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--sx-ink-2); }
.sx-trust__item .sx-i { width: 18px; height: 18px; color: var(--sx-brand); }

.sx-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.sx-aside { position: sticky; top: 100px; padding: 24px; }
.sx-aside__items { margin: 6px 0 14px; max-height: 300px; overflow-y: auto; padding-inline-end: 4px; }
.sx-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--sx-line-2); }
.sx-line:last-child { border-bottom: 0; }
.sx-line__img { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #f3f5fa; border: 1px solid var(--sx-line-2); flex: none; }
.sx-line__img img { width: 100%; height: 100%; object-fit: cover; }
.sx-line__main { flex: 1; min-width: 0; }
.sx-line__title { font-size: .84rem; font-weight: 500; color: var(--sx-ink); line-height: 1.6; }
.sx-line__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .75rem; color: var(--sx-ink-3); }
.sx-line__price { font-size: .86rem; font-weight: 700; color: var(--sx-ink); white-space: nowrap; }
.sx-line__price small { font-weight: 400; color: var(--sx-ink-3); font-size: .72rem; }

/* انتخاب روش پرداخت / پرداخت‌کننده کرایه */
.sx-methods { display: block; }
.sx-methods > * + .sx-method { margin-top: 12px; }
.sx-method, .sx-payer {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; background: #fff; cursor: pointer;
    border: 1.5px solid var(--sx-line); border-radius: var(--sx-radius-md);
    transition: border-color .18s var(--sx-ease), background-color .18s var(--sx-ease), box-shadow .18s var(--sx-ease);
}
.sx-method:hover, .sx-payer:hover { border-color: #c9cef2; background: #fbfbff; }
.sx-method.is-selected, .sx-payer.is-selected {
    border-color: var(--sx-brand); background: #f7f7ff; box-shadow: 0 0 0 4px rgba(84, 89, 224, .09);
}
.sx-method input[type="radio"], .sx-payer input[type="radio"] { width: 19px; height: 19px; accent-color: var(--sx-brand); flex: none; cursor: pointer; }
.sx-method__icon {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
}
.sx-method__icon .sx-i { width: 22px; height: 22px; }
.sx-method[data-type="online"] .sx-method__icon { background: #e8f0fe; color: #2c5bc4; }
.sx-method[data-type="torobpay"] .sx-method__icon { background: #f0f7dc; color: #55731a; }
.sx-method[data-type="digipay"] .sx-method__icon { background: #f3e8ff; color: #6d28d9; }
.sx-method[data-type="card_to_card"] .sx-method__icon { background: #fff2d6; color: #96620a; }
.sx-method[data-type="contact_request"] .sx-method__icon { background: #e4f6ee; color: #0e7a56; }
.sx-method__main { flex: 1; min-width: 0; display: block; }
.sx-method__title { display: block; font-size: .96rem; font-weight: 700; color: var(--sx-ink); line-height: 1.7; }
.sx-method__desc { display: block; font-size: .8rem; color: var(--sx-ink-3); line-height: 1.8; }

.sx-payers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sx-payer { align-items: flex-start; padding: 14px 16px; }
.sx-payer input[type="radio"] { margin-top: 4px; width: 18px; height: 18px; }
.sx-payer__title { font-size: .9rem; font-weight: 700; color: var(--sx-ink); }
.sx-payer__desc { font-size: .78rem; color: var(--sx-ink-3); line-height: 1.8; }

/* توضیح باز‌شونده هر روش (با انتخاب باز می‌شود) */
.sx-detail { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0; transition: grid-template-rows .35s var(--sx-ease), opacity .3s ease, margin-top .3s ease; }
.sx-method.is-selected + .sx-detail { grid-template-rows: 1fr; opacity: 1; margin-top: -2px; }
.sx-detail__inner { overflow: hidden; min-height: 0; }
.sx-detail__box { background: #fafbfe; border: 1px solid var(--sx-line-2); border-radius: var(--sx-radius-md); padding: 18px 20px; font-size: .88rem; line-height: 1.95; color: var(--sx-ink-2); }
.sx-detail__title { font-weight: 700; color: var(--sx-ink); margin-bottom: 10px; font-size: .92rem; }
.sx-detail__box > p { margin-bottom: 12px; }

.sx-list { list-style: none; counter-reset: sx; }
.sx-list li { position: relative; counter-increment: sx; padding: 3px 38px 3px 0; margin-bottom: 8px; }
.sx-list li::before {
    content: counter(sx); position: absolute; right: 0; top: 5px;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sx-brand-soft); color: var(--sx-brand-ink); font-size: .75rem; font-weight: 700;
}
.sx-detail__box .sx-note { margin-top: 12px; }

.sx-timeline { display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 16px; }
.sx-timeline__item { position: relative; text-align: center; padding-top: 34px; font-size: .76rem; color: var(--sx-ink-3); line-height: 1.7; }
.sx-timeline__item::before {
    content: ''; position: absolute; top: 4px; left: 50%; margin-left: -10px; z-index: 1;
    width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid #cfd2f6;
}
.sx-timeline__item:first-child::before { background: var(--sx-brand); border-color: var(--sx-brand); }
.sx-timeline__item::after { content: ''; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: #e2e5fa; }
.sx-timeline__item:last-child::after { display: none; }
.sx-timeline__item strong { display: block; color: var(--sx-ink); font-size: .82rem; }

.sx-submit-row { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--sx-line-2); }
.sx-help { margin-top: 14px; font-size: .82rem; color: var(--sx-ink-3); line-height: 1.9; }
.sx-help strong { color: var(--sx-brand-ink); }
.sx-estimate { display: inline-block; margin-inline-end: 6px; padding: 0 8px; border-radius: 6px; background: var(--sx-warn-bg); color: var(--sx-warn-ink); font-size: .7rem; font-weight: 500; }
.sx-collect-box { display: none; margin: 10px 0; }
.sx-payable-inline { display: none; }

@media (max-width: 1000px) {
    .sx-checkout { grid-template-columns: minmax(0, 1fr); }
    .sx-aside { position: static; }
    .sx-payable-inline { display: flex; }
}
@media (max-width: 640px) {
    .sx-grid-2, .sx-payers { grid-template-columns: minmax(0, 1fr); }
    .sx-card__body { padding: 20px 18px; }
    .sx-page { padding: 22px 0 64px; }
    .sx-wrap { padding-inline: 14px; }
    .sx-title { font-size: 1.3rem; }
    .sx-step__label { display: none; }
    .sx-step.is-current .sx-step__label { display: inline; }
    .sx-step + .sx-step::before { width: 20px; margin-inline: 6px; }
    .sx-method { padding: 14px; gap: 12px; }
    .sx-method__icon { width: 40px; height: 40px; }
}

/* ============================================================
   صفحات پرداخت (کارت‌به‌کارت، درگاه، ترب‌پی، تماس)
   ============================================================ */
.sx-pay { padding: 30px 28px; }
.sx-pay__head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.sx-pay__icon {
    width: 50px; height: 50px; border-radius: 15px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sx-brand-soft); color: var(--sx-brand-ink);
}
.sx-pay__icon .sx-i { width: 24px; height: 24px; }
.sx-pay__icon--ok { background: var(--sx-cash-soft); color: var(--sx-cash-ink); }
.sx-pay__icon--lime { background: #f0f7dc; color: #55731a; }
.sx-pay h1 { font-size: 1.3rem; font-weight: 700; line-height: 1.6; }
.sx-pay__lead { color: var(--sx-ink-2); margin: 10px 0 22px; line-height: 2; }
.sx-pay--center { text-align: center; }
.sx-pay--center .sx-pay__head { flex-direction: column; text-align: center; }
.sx-pay--center .sx-pay__icon { width: 64px; height: 64px; border-radius: 20px; }
.sx-pay--center .sx-pay__icon .sx-i { width: 30px; height: 30px; }

/* بلوک مبلغ و اقلام */
.sx-amount { background: #fafbfe; border: 1px solid var(--sx-line); border-radius: var(--sx-radius-md); padding: 16px 20px 18px; margin-bottom: 20px; text-align: start; }
.sx-amount .sx-sum__total { margin-top: 6px; }
.sx-amount .sx-note { margin-top: 12px; }
.sx-pay-items { list-style: none; margin-bottom: 22px; border: 1px solid var(--sx-line-2); border-radius: var(--sx-radius-md); text-align: start; }
.sx-pay-items li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; font-size: .86rem; border-top: 1px solid var(--sx-line-2); }
.sx-pay-items li:first-child { border-top: 0; }
.sx-pay-items li > span:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; color: var(--sx-ink); }
.sx-pay-items li > span:last-child { white-space: nowrap; font-weight: 700; }
.sx-pay-items small { color: var(--sx-ink-3); font-weight: 400; }

/* کارت بانکی */
.sx-bankcard {
    position: relative; overflow: hidden; margin-bottom: 22px;
    background: #353a96; color: #fff; border-radius: 18px; padding: 24px 26px;
    box-shadow: 0 18px 36px -20px rgba(53, 58, 150, .65);
}
.sx-bankcard::after {
    content: ''; position: absolute; inset-block-start: -60px; inset-inline-start: -40px;
    width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .06);
}
.sx-bankcard > * { position: relative; z-index: 1; }
.sx-bankcard__label { font-size: .82rem; opacity: .85; margin-bottom: 14px; }
.sx-bankcard__number { font-size: 1.55rem; font-weight: 700; letter-spacing: 2.5px; direction: ltr; text-align: right; margin-bottom: 18px; font-family: 'Courier New', monospace; }
.sx-bankcard__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .86rem; }
.sx-bankcard__copy {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 10px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
    font-family: inherit; font-size: .8rem; cursor: pointer; transition: background-color .15s;
}
.sx-bankcard__copy:hover { background: rgba(255, 255, 255, .26); }
.sx-bankcard__copy .sx-i { width: 15px; height: 15px; }

.sx-howto { background: #fafbfe; border: 1px solid var(--sx-line-2); border-radius: var(--sx-radius-md); padding: 18px 20px; margin-bottom: 22px; }
.sx-howto strong.sx-howto__title { display: block; margin-bottom: 10px; font-size: .92rem; }
.sx-howto .sx-list li { font-size: .88rem; color: var(--sx-ink-2); }

/* آپلود رسید */
.sx-upload {
    display: block; text-align: center; cursor: pointer; padding: 26px 18px;
    border: 1.5px dashed #c4cbe0; border-radius: var(--sx-radius-md); background: #fafbfe;
    transition: border-color .18s, background-color .18s;
}
.sx-upload:hover, .sx-upload:focus-within { border-color: var(--sx-brand); background: var(--sx-brand-soft); }
.sx-upload .sx-i { width: 34px; height: 34px; stroke-width: 1.5; color: var(--sx-ink-3); margin-bottom: 6px; }
.sx-upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sx-upload__text { color: var(--sx-ink-2); font-size: .88rem; line-height: 1.9; }
.sx-upload__text strong { color: var(--sx-brand-ink); }
.sx-upload.has-file { border-style: solid; border-color: var(--sx-ok-line); background: var(--sx-ok-bg); }
.sx-upload.has-file .sx-i, .sx-upload.has-file .sx-upload__text strong { color: var(--sx-ok-ink); }

.sx-secure { margin-top: 20px; padding: 12px 16px; border-radius: var(--sx-radius-md); background: #fafbfe; border: 1px solid var(--sx-line-2); color: var(--sx-ink-2); font-size: .82rem; line-height: 1.95; text-align: start; }
.sx-secure strong { color: var(--sx-ink); }
.sx-trustlist { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--sx-line-2); }
.sx-trustlist span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--sx-ink-3); }
.sx-trustlist .sx-i { width: 15px; height: 15px; color: var(--sx-cash); }
.sx-foot-contact { text-align: center; margin-top: 22px; font-size: .84rem; color: var(--sx-ink-3); }
.sx-foot-contact strong { color: var(--sx-brand-ink); }

/* بنر تلفن */
.sx-phone {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 16px 20px; margin: 16px 0 20px; border-radius: var(--sx-radius-md);
    background: var(--sx-cash-soft); border: 1px solid var(--sx-ok-line); color: var(--sx-cash-ink);
}
.sx-phone__icon { width: 44px; height: 44px; border-radius: 13px; background: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sx-phone__icon .sx-i { width: 22px; height: 22px; }
.sx-phone__main { flex: 1; min-width: 160px; }
.sx-phone__title { font-weight: 700; color: var(--sx-ink); }
.sx-phone__sub { font-size: .8rem; color: var(--sx-ink-2); }
.sx-phone__num { font-size: 1.15rem; font-weight: 700; direction: ltr; color: var(--sx-cash-ink); text-decoration: none; }

/* ============================================================
   سفارش ثبت شد
   ============================================================ */
.sx-done { padding: 40px 30px 34px; text-align: center; }
.sx-done__icon {
    width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--sx-ok-bg); color: var(--sx-ok-ink);
}
.sx-done__icon .sx-i { width: 38px; height: 38px; stroke-width: 2.2; }
.sx-done__icon--warn { background: var(--sx-warn-bg); color: var(--sx-warn-ink); }
.sx-done__icon--info { background: var(--sx-info-bg); color: var(--sx-info-ink); }
.sx-done h1 { font-size: 1.45rem; font-weight: 700; margin-bottom: 8px; }
.sx-done__lead { color: var(--sx-ink-2); line-height: 2; margin-bottom: 24px; }
.sx-code { margin: 0 auto 24px; max-width: 360px; padding: 16px; border: 1.5px dashed #c4c8f5; border-radius: var(--sx-radius-md); background: var(--sx-brand-soft); }
.sx-code__label { font-size: .8rem; color: var(--sx-ink-2); }
.sx-code__value { font-size: 1.45rem; font-weight: 700; color: var(--sx-brand-ink); letter-spacing: 2px; font-family: 'Courier New', monospace; direction: ltr; }
.sx-kv { text-align: start; border: 1px solid var(--sx-line-2); border-radius: var(--sx-radius-md); padding: 6px 18px; margin-bottom: 18px; }
.sx-kv__title { font-weight: 700; font-size: .92rem; padding: 12px 0 6px; }
.sx-kv__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px dashed var(--sx-line); font-size: .88rem; }
.sx-kv__title + .sx-kv__row { border-top: 0; }
.sx-kv__row > span { color: var(--sx-ink-3); }
.sx-kv__row > strong { font-weight: 500; color: var(--sx-ink); text-align: end; }
.sx-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.sx-contact-strip { margin-top: 22px; padding: 14px 16px; border-radius: var(--sx-radius-md); background: #fafbfe; border: 1px solid var(--sx-line-2); color: var(--sx-ink-2); font-size: .86rem; line-height: 1.95; }
.sx-contact-strip strong { color: var(--sx-brand-ink); direction: ltr; display: inline-block; }
.sx-subhead { text-align: start; font-size: .9rem; font-weight: 700; margin: 4px 0 10px; }

/* ============================================================
   پیگیری سفارش
   ============================================================ */
.sx-track-result { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--sx-line-2); }
.sx-track-result__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sx-track-result__code { font-size: 1.1rem; font-weight: 700; }
.sx-status { display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.sx-vsteps { list-style: none; margin-top: 8px; padding-inline-start: 4px; }
.sx-vstep { position: relative; display: flex; align-items: center; gap: 14px; padding-bottom: 20px; color: var(--sx-ink-3); font-size: .88rem; }
.sx-vstep:last-child { padding-bottom: 0; }
.sx-vstep::before { content: ''; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--sx-line); }
.sx-vstep:last-child::before { display: none; }
.sx-vstep.is-done::before { background: var(--sx-brand); }
.sx-vstep__dot { position: relative; width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid var(--sx-line); }
.sx-vstep__dot .sx-i { width: 14px; height: 14px; stroke-width: 2.6; }
.sx-vstep.is-done { color: var(--sx-ink); }
.sx-vstep.is-done .sx-vstep__dot { background: var(--sx-brand); border-color: var(--sx-brand); color: #fff; }
.sx-vstep.is-current { color: var(--sx-ink); font-weight: 700; }
.sx-vstep.is-current .sx-vstep__dot { border-color: var(--sx-brand); box-shadow: 0 0 0 4px rgba(84, 89, 224, .14); }
.sx-vstep.is-current .sx-vstep__dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sx-brand); }

/* ============================================================
   درگاه آزمایشی
   ============================================================ */
.sx-gateway-amount { text-align: center; padding: 16px; margin: 18px 0 22px; border-radius: var(--sx-radius-md); background: var(--sx-brand-soft); }
.sx-gateway-amount strong { display: block; font-size: 1.4rem; color: var(--sx-brand-ink); }

@media (max-width: 640px) {
    .sx-pay { padding: 24px 18px; }
    .sx-done { padding: 32px 18px 26px; }
    .sx-bankcard { padding: 20px; }
    .sx-bankcard__number { font-size: 1.2rem; letter-spacing: 1.5px; }
}

/* ---------- جزئیات تکمیلی ---------- */
.sx-qty__btn[disabled] { opacity: .35; cursor: not-allowed; background: none; color: var(--sx-ink-2); }

/* صفحه‌های خرید تمام ارتفاع باقی‌مانده را می‌گیرند تا بین محتوا و فوتر نوار سفید نیفتد */
.site-main:has(.sx-page) { display: flex; flex-direction: column; background: var(--sx-canvas); }
.site-main:has(.sx-page) .page-content { flex: 1 0 auto; display: flex; flex-direction: column; }
.site-main:has(.sx-page) .sx-page { flex: 1 0 auto; }
.site-main:has(.sx-page) .site-messages { padding-bottom: 4px; }
