/* =========================================
   DM SMART CART MODAL — «سبد و تسویه در یک صفحه»
   فقط روی صفحهٔ سبد و فقط وقتی چک‌اوت سریع روشن است (template override) لود می‌شود.
   ستون راست (دسکتاپ) = بخش‌های تسویه · ستون چپ = سبد، جوایز، کد تخفیف، جمع مبلغ.
   همه‌چیز زیر ریشهٔ .dm-scm-cart-page محدود است تا روی بقیهٔ سایت نشت نکند.
   ========================================= */

/* ویجت کارت المنتور پرو خودش روی کانتینر display:grid می‌گذارد که چیدمان ما را می‌شکند */
.elementor-widget-woocommerce-cart .e-cart__container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/*
 * ⚠ 2.38.0 — the cart page's palette is now READABLE BY A HOST THEME, and it had to be.
 *
 * These were plain locals, so a theme that needed to change one had no published name to set and
 * the only thing left was to re-declare our own internals from a higher-specificity selector —
 * which §5 of this plugin's doc forbids in as many words. That is exactly what a host theme was
 * driven to do on 2026-09-23, after its own measurement found FIVE texts on this page between
 * 3.76:1 and 3.86:1 (the item count, «جمع کالاها», the «طبق روش انتخابی» note, the trust line and
 * the shipping note) — one muted ink, five failures, on a page whose whole job is taking money.
 *
 * Every literal below is kept as the fallback, so no existing site changes by a single pixel.
 * The `--dm-scm-*` names are PUBLIC from 2.38.0 and are listed in the doc's §5.
 */
.dm-scm-cart-page {
    --scm-primary: var(--dm-scm-primary, #ef3e63);
    --scm-text: var(--dm-scm-ink, #1a1a22);
    --scm-muted: var(--dm-scm-ink-muted, rgba(26, 26, 34, 0.55));
    --scm-line: var(--dm-scm-line, #ececf0);
    --scm-soft: var(--dm-scm-surface-soft, #f6f6f9);
    --scm-card: 16px;
    --scm-ctl: 12px;
    --scm-ok: var(--dm-scm-ok, #1a8f4a);
    font-family: var(--dm-scm-font, inherit);
    color: var(--scm-text);
    max-width: var(--dm-scm-cart-page-width, 1400px);
    margin: 0 auto;
    padding: 16px 0 48px;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-align: start;
}
.dm-scm-cart-page *,
.dm-scm-cart-page *::before,
.dm-scm-cart-page *::after { box-sizing: border-box; }
.dm-scm-cart-page [hidden] { display: none !important; }

.dm-scm-cp-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 800;
    color: var(--scm-text);
}

/* ── چیدمان ──
   DOM: سبد، بعد تسویه (ترتیب موبایل). در دسکتاپ و راست‌به‌چپ، ستون اول گرید سمت راست است و تسویه آن‌جا می‌نشیند. */
.dm-scm-cp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-areas: "main cart";
    gap: 24px;
    align-items: start;
}
.dm-scm-cp-grid.is-empty { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cart"; }
.dm-scm-cp-main { grid-area: main; min-width: 0; }
.dm-scm-cp-cart { grid-area: cart; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* چسبان فقط وقتی در تنظیمات روشن شده (پیش‌فرض خاموش) */
.dm-scm-cp-cart.is-sticky { position: sticky; top: 20px; }

/* ── ستون سبد ── */
.dm-scm-cp-box {
    background: #fff;
    border: 1px solid var(--scm-line);
    border-radius: var(--scm-card);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dm-scm-cp-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dm-scm-cp-box-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--scm-text); }
.dm-scm-cp-count {
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--scm-soft);
    font-size: 12px;
    font-weight: 700;
    color: var(--scm-muted);
}

#dm-scm-cart-page-items { display: flex; flex-direction: column; }
#dm-scm-cart-page-items.is-busy { opacity: .6; pointer-events: none; transition: opacity .15s; }

.dm-scm-cp-item { padding: 14px 0; border-bottom: 1px solid var(--scm-line); }
.dm-scm-cp-item:first-child { padding-top: 0; }
.dm-scm-cp-item:last-child { border-bottom: 0; padding-bottom: 0; }
.dm-scm-cp-item-row { display: flex; align-items: flex-start; gap: 12px; }
.dm-scm-cp-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--scm-soft);
}
.dm-scm-cp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.dm-scm-cp-item-body { flex: 1 1 auto; min-width: 0; }
.dm-scm-cp-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dm-scm-cp-item-title { font-size: 13.5px; font-weight: 700; line-height: 1.7; color: var(--scm-text); }
.dm-scm-cp-item-title a { color: inherit; text-decoration: none; }
.dm-scm-cp-remove {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    color: rgba(26, 26, 34, 0.35);
    text-decoration: none;
    transition: background .2s, color .2s;
}
.dm-scm-cp-remove:hover,
.dm-scm-cp-remove:focus-visible { background: #fdecec; color: #c62828; }
.dm-scm-cp-item-meta { margin-top: 2px; font-size: 11.5px; line-height: 1.8; color: var(--scm-muted); }
.dm-scm-cp-item-meta dl,
.dm-scm-cp-item-meta dd,
.dm-scm-cp-item-meta p { display: inline; margin: 0; }
.dm-scm-cp-item-meta dt { display: inline; font-weight: 600; }

.dm-scm-cp-addons { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
/* ردیف افزودنی: یک کادر دوبخشی — متن و قیمت در بخش اصلی، «×» بخش انتهاییِ تمام‌ارتفاعِ همان کادر با رنگ جدا */
.dm-scm-cp-addon-row {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 34px;
    border: 1px solid var(--scm-line);
    border-radius: 9px;
    background: var(--scm-soft);
    overflow: hidden;
}
.dm-scm-cp-addon-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0px 0px;
    padding: 5px;
    font-size: 10px;
    line-height: 1.7;
    color: var(--scm-muted);
}
.dm-scm-cp-addon-title b { color: var(--scm-text); white-space: nowrap; font-size: 12px; }
.dm-scm-cart-page .dm-scm-cp-addon-remove {
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-inline-start: 1px solid #f3c9c9;
    border-radius: 0;
    background: #fdeeee;
    font-size: 17px;
    line-height: 1;
    color: #c62828;
    text-decoration: none !important;
    transition: background .2s, color .2s;
}
.dm-scm-cart-page .dm-scm-cp-addon-remove:hover,
.dm-scm-cart-page .dm-scm-cp-addon-remove:focus-visible { background: #c62828; color: #fff; outline: none; }

.dm-scm-cp-item-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.dm-scm-cp-qty-stepper {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 3px;
    border: 1px solid var(--scm-line);
    border-radius: 10px;
    background: #fff;
}
/*
 * ⚠ `flex: none` — MEASURED 2026-09-23 at 17.9×28 on a real cart, against the 28px this rule asks
 * for and the 24px accessibility floor. The stepper is a flex row, so these two buttons were
 * shrinking below their own declared width: `width` is a base size a flex item is free to give up,
 * and the glyph inside («−» / «+») is narrow enough that min-content did not stop it. They are the
 * two controls a buyer presses most on this page, so they do not shrink.
 */
.dm-scm-cp-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: var(--scm-soft);
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    color: var(--scm-text);
    cursor: pointer;
    user-select: none;
}
.dm-scm-cp-qty-btn:hover { background: color-mix(in srgb, var(--scm-primary) 12%, #fff); color: var(--scm-primary); }
.dm-scm-cp-qty-input {
    width: 34px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.dm-scm-cp-qty-input::-webkit-outer-spin-button,
.dm-scm-cp-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-scm-cp-qty-single {
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--scm-soft);
    font-size: 13px;
    font-weight: 700;
    color: var(--scm-muted);
}
.dm-scm-cp-line-total { margin-inline-start: auto; font-size: 14px; font-weight: 800; color: var(--scm-text); white-space: nowrap; }
/* دکمهٔ تأیید تعداد تایپ‌شده؛ +/− خودکار ثبت می‌کنند، پس این فقط برای ورودی دستی است */
.dm-scm-cp-update-btn {
    order: 3;
    flex-basis: 100%;
    display: none;
}
.dm-scm-cp-item-footer:focus-within .dm-scm-cp-update-btn {
    display: block;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: var(--scm-primary);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.dm-scm-cp-empty { margin: 0; padding: 28px 12px; text-align: center; color: var(--scm-muted); }

/* جوایز */
.dm-scm-cp-rewards {
    padding: 12px 14px;
    border: 1px dashed #f0c14b;
    border-radius: 12px;
    background: #fff9ec;
}
.dm-scm-cp-rewards-title { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: var(--scm-text); }
.dm-scm-cp-reward-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; font-size: 12.5px; color: var(--scm-muted); }
.dm-scm-cp-reward-row b { color: var(--scm-primary); font-weight: 700; }

/* کد تخفیف */
.dm-scm-cp-coupon-form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--scm-line);
    border-radius: var(--scm-ctl);
    background: var(--scm-soft);
}
.dm-scm-cart-page .dm-scm-cp-coupon-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    box-shadow: none;
    outline: none;
}
.dm-scm-cart-page .dm-scm-cp-coupon-apply {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: var(--scm-text);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.dm-scm-cart-page .dm-scm-cp-coupon-apply:hover { background: var(--scm-primary); }

/* جمع مبلغ */
.dm-scm-cp-totals { border-top: 1px solid var(--scm-line); padding-top: 12px; }
.dm-scm-cp-totals-list { margin: 0; }
.dm-scm-cp-totals-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--scm-muted); }
.dm-scm-cp-totals-row dt,
.dm-scm-cp-totals-row dd { margin: 0; }
.dm-scm-cp-totals-row dd { font-weight: 700; color: var(--scm-text); text-align: end; }
.dm-scm-cp-totals-row.is-discount dd { color: var(--scm-ok); }
.dm-scm-cp-coupon-remove { margin-inline-start: 6px; font-size: 11.5px; color: #c62828; text-decoration: none; }
.dm-scm-cp-muted { font-size: 12px; font-weight: 600; color: var(--scm-muted); }
.dm-scm-cp-free { color: var(--scm-ok); }
.dm-scm-cp-totals-grand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1.5px solid var(--scm-line);
}
.dm-scm-cp-totals-grand span { font-size: 13.5px; font-weight: 800; }
.dm-scm-cp-totals-grand strong { font-size: 18px; font-weight: 900; color: var(--scm-primary); }

.dm-scm-cp-trust-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    color: var(--scm-muted);
}

/* پیام حذف + بازگردانی */
.dm-scm-cp-notice {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1a1a22;
    color: #fff;
    font-size: 12.5px;
}
.dm-scm-cp-notice.is-visible { display: flex; }
.dm-scm-cp-notice-msg { line-height: 1.7; }
.dm-scm-cart-page .dm-scm-cp-notice-undo {
    flex: 0 0 auto;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--scm-primary);
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* ── ستون تسویه: بخش‌های شماره‌دار ── */
.dm-scm-ck { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.dm-scm-ck-section {
    background: #fff;
    border: 1px solid var(--scm-line);
    border-radius: var(--scm-card);
    padding: 20px;
}
.dm-scm-ck-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--scm-line);
}
.dm-scm-ck-num {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--scm-primary) 10%, #fff);
    color: var(--scm-primary);
    font-size: 14px;
    font-weight: 800;
}
.dm-scm-ck-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--scm-text); }

/* فیلدها */
.dm-scm-ck-fields .woocommerce-billing-fields > h3,
.dm-scm-ck-fields .woocommerce-shipping-fields > h3,
.dm-scm-ck-fields .woocommerce-additional-fields > h3 { display: none; }
.dm-scm-ck-fields .woocommerce-billing-fields__field-wrapper,
.dm-scm-ck-fields .woocommerce-additional-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
}
.dm-scm-ck-fields .woocommerce-additional-fields { margin-top: 14px; }
.dm-scm-cart-page .dm-scm-ck .form-row { grid-column: 1 / -1; float: none; width: auto; margin: 0; padding: 0; }
.dm-scm-cart-page .dm-scm-ck .form-row.form-row-first,
.dm-scm-cart-page .dm-scm-ck .form-row.form-row-last { grid-column: auto; }
.dm-scm-cart-page .dm-scm-ck .form-row::before,
.dm-scm-cart-page .dm-scm-ck .form-row::after { content: none; }
.dm-scm-cart-page .dm-scm-ck .form-row label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; line-height: 1.6; color: #333; }
.dm-scm-cart-page .dm-scm-ck .form-row label.screen-reader-text { position: absolute; }
.dm-scm-cart-page .dm-scm-ck .form-row .required { color: var(--scm-primary); text-decoration: none; border: 0; }
.dm-scm-cart-page .dm-scm-ck .form-row .optional { font-weight: 500; font-size: 12px; color: var(--scm-muted); }
.dm-scm-cart-page .dm-scm-ck .form-row .input-text,
.dm-scm-cart-page .dm-scm-ck .form-row select,
.dm-scm-cart-page .dm-scm-ck .form-row textarea,
.dm-scm-cart-page .dm-scm-ck .select2-container--default .select2-selection--single {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 12px;
    border: 1.5px solid var(--scm-line);
    border-radius: var(--scm-ctl);
    background: #fafafa;
    font-family: inherit;
    font-size: 14px;
    color: var(--scm-text);
    box-shadow: none;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.dm-scm-cart-page .dm-scm-ck .form-row textarea { height: auto; min-height: 90px; padding: 10px 12px; line-height: 1.9; }
.dm-scm-cart-page .dm-scm-ck .form-row .input-text:focus,
.dm-scm-cart-page .dm-scm-ck .form-row select:focus,
.dm-scm-cart-page .dm-scm-ck .form-row textarea:focus,
.dm-scm-cart-page .dm-scm-ck .select2-container--open .select2-selection--single {
    border-color: var(--scm-primary);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--scm-primary) 10%, transparent);
}
.dm-scm-cart-page .dm-scm-ck .select2-container { width: 100% !important; }
.dm-scm-cart-page .dm-scm-ck .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 43px; color: var(--scm-text); }
.dm-scm-cart-page .dm-scm-ck .select2-container--default .select2-selection--single .select2-selection__arrow { height: 43px; }
.dm-scm-cart-page .dm-scm-ck .woocommerce-invalid .input-text,
.dm-scm-cart-page .dm-scm-ck .woocommerce-invalid .select2-selection--single { border-color: #e28a8a; background: #fff8f8; }

/* نشانگر انتخاب مشترک کارت ارسال و درگاه */
.dm-scm-ck-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d6d6dc;
    background: #fff;
    transition: background .2s, border-color .2s;
}
.dm-scm-ck-check::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
}

/* روش ارسال */
/* ۲٫۴۰٫۰ — auto-fit به‌جای دو ستونِ ثابت: با یک روش ارسال نیمی از جا خالی می‌ماند و در ستونی
   باریک نامِ روش تا ۸ پیکسل له می‌شد (اندازه‌گیری‌شده روی سایت استادی‌ز، ۲۰۲۶-۰۹-۲۷). */
.dm-scm-ck-ship-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dm-scm-ck-ship-pkg { margin: 18px 0 10px; font-size: 14px; font-weight: 800; }
.dm-scm-ck-empty { margin: 0; padding: 14px; border-radius: var(--scm-ctl); background: var(--scm-soft); font-size: 13px; line-height: 1.9; color: #555; }
.dm-scm-cart-page .dm-scm-ck-ship-item {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0;
    border: 1.5px solid var(--scm-line);
    border-radius: 14px;
    background: #fff;
    list-style: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.dm-scm-cart-page .dm-scm-ck-ship-item:has(.dm-scm-ck-ship-input:checked) {
    border-color: var(--scm-primary);
    background: color-mix(in srgb, var(--scm-primary) 4%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--scm-primary) 10%, transparent);
}
.dm-scm-ck-ship-input,
.dm-scm-pay-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
}
/* ⚠ ووکامرس «ul#shipping_method li label{display:inline}» با یک شناسه در انتخابگر دارد؛ فقط !important از آن رد می‌شود */
.dm-scm-cart-page .dm-scm-ck-ship-card {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    cursor: pointer;
}
.dm-scm-ck-ship-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--scm-soft);
    color: var(--scm-primary);
}
.dm-scm-ck-ship-name { font-size: 13.5px; font-weight: 700; line-height: 1.8; color: var(--scm-text); }
.dm-scm-ck-ship-name .amount { color: var(--scm-primary); font-weight: 800; white-space: nowrap; }
.dm-scm-ck-ship-input:checked + .dm-scm-ck-ship-card .dm-scm-ck-check,
.dm-scm-pay-input:checked + .dm-scm-pay-card .dm-scm-ck-check { border-color: var(--scm-primary); }
.dm-scm-ck-ship-input:checked + .dm-scm-ck-ship-card .dm-scm-ck-check::after,
.dm-scm-pay-input:checked + .dm-scm-pay-card .dm-scm-ck-check::after { background: var(--scm-primary); }
.dm-scm-ck-ship-input:focus-visible + .dm-scm-ck-ship-card,
.dm-scm-pay-input:focus-visible + .dm-scm-pay-card { outline: 2px solid var(--scm-primary); outline-offset: 2px; }
/* خروجی افزونه‌های ارسال زیر کارت (زیرنویس، دکمهٔ نقشه) */
.dm-scm-ck-ship-item > :not(input):not(label) {
    margin: -4px 0 0;
    padding: 0 14px 12px;
    padding-inline-start: 64px;
    font-size: 12px;
    line-height: 1.9;
    color: #6f6f78;
}

/* پرداخت: جدول بازبینی پنهان (جمع در ستون سبد است) */
.dm-scm-cart-page .dm-scm-ck-review .woocommerce-checkout-review-order-table { display: none; }
.dm-scm-cart-page .dm-scm-ck #payment { padding: 0; background: none; border-radius: 0; }
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row dense;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    list-style: none;
}
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods::before,
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods::after,
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods li.dm-scm-pay::before,
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods li.dm-scm-pay::after { content: none; display: none; }
/* li کنار گذاشته می‌شود تا کارت و توضیح، خانه‌های مستقیم گرید باشند و توضیح زیر کل ردیف بنشیند */
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods li.dm-scm-pay { display: contents; }
.dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods > li:not(.dm-scm-pay) { grid-column: 1 / -1; margin: 0; }
.dm-scm-pay-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 112px;
    margin: 0;
    padding: 18px 8px 12px;
    border: 1.5px solid var(--scm-line);
    border-radius: 14px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.dm-scm-pay-card:hover { border-color: #d6d6dc; }
.dm-scm-pay-input:checked + .dm-scm-pay-card {
    border-color: var(--scm-primary);
    background: color-mix(in srgb, var(--scm-primary) 4%, #fff);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--scm-primary) 10%, transparent);
}
.dm-scm-pay-card .dm-scm-ck-check { position: absolute; top: 9px; inset-inline-start: 9px; }
.dm-scm-pay-icon { display: flex; align-items: center; justify-content: center; gap: 4px; height: 42px; color: var(--scm-primary); }
.dm-scm-cart-page .dm-scm-ck #payment .dm-scm-pay-icon img {
    display: block;
    width: auto;
    max-width: 96px;
    max-height: 38px;
    margin: 0;
    padding: 0;
    float: none;
    object-fit: contain;
    box-shadow: none;
}
.dm-scm-pay-name { font-size: 12.5px; font-weight: 700; line-height: 1.7; color: var(--scm-text); }
.dm-scm-pay-desc,
.dm-scm-cart-page .dm-scm-ck #payment .payment_box.dm-scm-pay-box {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--scm-ctl);
    border: 1px solid color-mix(in srgb, var(--scm-primary) 22%, #fff);
    background: color-mix(in srgb, var(--scm-primary) 5%, #fff);
    font-size: 12.5px;
    line-height: 2;
    color: #5e5e66;
}
.dm-scm-pay-desc { position: relative; display: none; margin-top: 4px; text-align: start; }
.dm-scm-pay-input:checked ~ .dm-scm-pay-desc { display: block; }
/* فلش بالای توضیح، زیر کارت همان درگاه (--dm-scm-pay-arrow را JS می‌گذارد) */
.dm-scm-pay-desc::before {
    content: "";
    position: absolute;
    top: -7px;
    left: calc(var(--dm-scm-pay-arrow, 50%) - 7px);
    width: 12px;
    height: 12px;
    background: inherit;
    border-top: 1px solid color-mix(in srgb, var(--scm-primary) 22%, #fff);
    border-left: 1px solid color-mix(in srgb, var(--scm-primary) 22%, #fff);
    transform: rotate(45deg);
}
.dm-scm-pay-desc-name { font-weight: 800; color: var(--scm-primary); }
.dm-scm-cart-page .dm-scm-ck #payment .payment_box::before { content: none; display: none; }
.dm-scm-cart-page .dm-scm-ck #payment .place-order { margin: 0; padding: 0; }
.dm-scm-cart-page .dm-scm-ck .woocommerce-privacy-policy-text,
.dm-scm-cart-page .dm-scm-ck .woocommerce-terms-and-conditions-wrapper { font-size: 12px; line-height: 1.9; color: var(--scm-muted); margin-bottom: 12px; }
.dm-scm-cart-page .dm-scm-ck #payment #place_order {
    display: block;
    float: none;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: var(--scm-ctl);
    background: var(--dm-scm-pay-btn-bg, var(--scm-primary));
    color: var(--dm-scm-pay-btn-text, #fff);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    /* سایه هم‌رنگ پس‌زمینهٔ دکمه (رنگ از تنظیمات: دکمهٔ پرداخت) */
    box-shadow: 0 6px 16px -6px var(--dm-scm-pay-btn-bg, var(--scm-primary));
    transition: filter .2s, transform .1s;
}
.dm-scm-cart-page .dm-scm-ck #payment #place_order:hover {
    background: var(--dm-scm-pay-btn-hover-bg, var(--scm-primary));
    color: var(--dm-scm-pay-btn-hover-text, #fff);
    box-shadow: 0 6px 16px -6px var(--dm-scm-pay-btn-hover-bg, var(--scm-primary));
    filter: brightness(.94);
}
.dm-scm-cart-page .dm-scm-ck #payment #place_order:active { transform: translateY(1px); }

/* دسکتاپ: وقتی جای طبیعی دکمه زیر صفحه است، JS کلاس is-floating می‌دهد و دکمه
   با عرض همان ستون تسویه پایین صفحه می‌چسبد؛ جای خالی‌اش با min-height نگه داشته می‌شود. */
.dm-scm-cart-page .dm-scm-ck #payment .place-order.is-floating { min-height: 44px; }
.dm-scm-cart-page .dm-scm-ck #payment .place-order.is-floating #place_order {
    position: fixed;
    bottom: 14px;
    left: var(--dm-scm-po-left, 0);
    width: var(--dm-scm-po-width, 100%);
    z-index: 50;
}

/* موبایل: دکمه همیشه پایین صفحه ثابت است، کوچک و مینیمال */
@media (max-width: 767.98px) {
    .dm-scm-cart-page { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
    .dm-scm-cart-page .dm-scm-ck #payment #place_order {
        position: fixed;
        inset-inline: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: auto;
        height: 44px;
        z-index: 50;
    }
}

/* ── ورود کاربر مهمان (ستون تسویه) ── */
.dm-scm-cp-login-step {
    padding: 22px;
    border: 1px solid var(--scm-line);
    border-radius: var(--scm-card);
    background: #fff;
}
.dm-scm-cp-login-title { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--scm-text); }
.dm-scm-cp-login-desc { margin: 0 0 16px; font-size: 13px; line-height: 1.9; color: var(--scm-muted); }
.dm-scm-cp-pay-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: var(--scm-ctl);
    background: var(--scm-primary);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.dm-scm-cp-pay-btn:hover { color: #fff; filter: brightness(.94); }
.dm-scm-cp-resume-notice {
    margin-bottom: 14px;
    padding: 11px 14px;
    border: 1px solid #abefc6;
    border-radius: 10px;
    background: #ecfdf3;
    font-size: 12.5px;
    line-height: 1.8;
    color: #17663b;
}

/* قوانین (وقتی خود ووکامرس برگهٔ قوانین ندارد) */
.dm-scm-cp-terms-label { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12.5px; color: var(--scm-muted); cursor: pointer; }
.dm-scm-cp-terms-native { position: absolute; opacity: 0; width: 16px; height: 16px; margin: 0; cursor: pointer; }
.dm-scm-cp-terms-box { position: relative; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.25); }
.dm-scm-cp-terms-native:checked + .dm-scm-cp-terms-box { background: var(--scm-primary); border-color: var(--scm-primary); }
.dm-scm-cp-terms-native:focus-visible + .dm-scm-cp-terms-box { outline: 2px solid var(--scm-primary); outline-offset: 2px; }
.dm-scm-cp-terms-error .dm-scm-cp-terms-box { border-color: #d63638; box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.15); }
.dm-scm-cp-terms-statement { margin: 0 0 12px; font-size: 12.5px; color: var(--scm-muted); }

/* پیام‌های ووکامرس روی این صفحه */
.dm-scm-cart-page .woocommerce-message,
.dm-scm-cart-page .woocommerce-error,
.dm-scm-cart-page .woocommerce-info {
    margin: 0 0 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--scm-soft);
    border-inline-start: 4px solid var(--scm-primary);
    font-size: 13px;
    list-style: none;
}
.dm-scm-cart-page .woocommerce-message { border-inline-start-color: #2ecc71; }
.dm-scm-cart-page .woocommerce-error { border-inline-start-color: #e74c3c; }

/* ── واکنش‌گرا ── */
@media (max-width: 991.98px) {
    .dm-scm-cp-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cart" "main"; }
    .dm-scm-cp-cart.is-sticky { position: static; }
}
@media (max-width: 767.98px) {
    .dm-scm-cart-page { padding: 10px 12px 32px; }
    .dm-scm-cp-title { font-size: 20px; }
    .dm-scm-cp-box,
    .dm-scm-ck-section { padding: 16px 14px; }
    .dm-scm-ck-fields .woocommerce-billing-fields__field-wrapper,
    .dm-scm-ck-fields .woocommerce-additional-fields__field-wrapper { grid-template-columns: minmax(0, 1fr); }
    .dm-scm-cart-page .dm-scm-ck .form-row.form-row-first,
    .dm-scm-cart-page .dm-scm-ck .form-row.form-row-last { grid-column: 1 / -1; }
    .dm-scm-ck-ship-list { grid-template-columns: minmax(0, 1fr); }
    .dm-scm-cart-page .dm-scm-ck #payment ul.payment_methods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .dm-scm-pay-card { min-height: 100px; }
}
