/* ══════════════════════════════════════════════════════════════════════════
 * آنية — صفحة السلة v2 (خاص بالصفحة). token-pure · الأصناف .ct-*.
 *   المشترك من aneya-ds.css: الهيدر، بطاقة العنصر .a-ci، شريط التوصيل .a-ship، «يمشي وياه» .a-up/.a-upadd، الكوبون .a-coupon،
 *   التفصيل .a-breakdown (+.a-totx)، الزرّ .a-btn، السطر الدقيق .a-fine، الثقة .a-trust، الشريط اللاصق .a-stick (رابط .a-sb)،
 *   الفارغ .ds-empty، الشبكة .a-rel، الحقول .ds-select، toast بزرّ فعل.
 *   هنا: تخطيط الصفحة + الإضافات المعتمدة (A1 A2 A3 A4 A7 A8؛ A5 في المكتبة). «أكمل الطلب» رابط إلى صفحة الدفع.
 * ══════════════════════════════════════════════════════════════════════════ */

/* ── الإطار ── */
.aneya-cart .ct-main { padding: var(--s4); }
.ct-notices:empty { display: none; }
.ct-notices { margin-bottom: var(--s3); }
.ct-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.ct-h1 { font-size: 23px; font-weight: 500; line-height: 1.4; margin: 0; display: flex; align-items: center; gap: var(--s2); }
.ct-h1 .a-dcount { font-size: 12.5px; }
.aneya-standalone a.ct-continue { font-size: 13.5px; color: var(--plum-600); display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap; }
.ct-grid { display: grid; gap: var(--s4); align-items: start; }
.ct-main .woocommerce-Price-currencySymbol { font-size: .78em; font-weight: 400; color: var(--ink-secondary); }

/* ── شريط التوصيل المجاني: نفس مكوّن الدرج، بطاقةً مستقلّة ── */
.ct-ship { border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.ct-ship .a-shiptxt { font-size: 13px; }

/* ── عناصر السلة (.a-ci من المكتبة) — صورة أكبر قليلاً من الدرج ── */
.ct-list .a-ci { margin-bottom: var(--s2); }
.ct-list > :last-child { margin-bottom: 0; }
.ct-list .a-ciimg { width: 72px; height: 72px; }
.ct-list .a-ciname { font-size: 14px; }
.ct-list .a-ciprice { font-variant-numeric: tabular-nums; text-align: left; }
.ct-list .a-ciqb:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ct-list .a-ciqb.dis { opacity: .35; pointer-events: none; }
.ct-unit { font-size: 11.5px; color: var(--ink-hint); font-weight: 400; margin-top: 2px; }

/* ── ملاحظة الباقة (حين يكتمل الطقم — الرسم السالب من Woo) ── */
.ct-bundlenote { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding: var(--s2) var(--s3); background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-control); font-size: 12.5px; color: var(--ok); line-height: 1.5; }
.ct-bundlenote svg { flex-shrink: 0; }
.ct-bundlenote b { font-weight: 500; }

/* ── «يمشي وياه» ── */
.ct-up { margin-top: var(--s6); }

/* ── الملخّص (a-card) ── */
.ct-summary { padding: var(--s4); }
.ct-sumh { font-size: 15px; font-weight: 500; margin-bottom: var(--s3); }
.ct-summary .a-coupon { margin: 0 0 var(--s3); }
.ct-summary .a-breakdown { margin-top: 0; }
.ct-summary .a-brv { font-variant-numeric: tabular-nums; }
.ct-summary .a-brv.ct-free { color: var(--ok); }
.ct-summary .a-btn { display: flex; margin-top: var(--s4); }
.ct-summary .a-fine { margin-top: var(--s3); }
.ct-summary .a-trust { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }

/* ── الحالة الفارغة ── */
.ct-empty .ds-empty { padding-top: var(--s8); }
.ct-empty .a-btn { width: auto; display: inline-flex; padding-inline: var(--s8); }
.ct-popular { margin-top: var(--s8); }
.ct-popular h2 { font-size: 17px; font-weight: 500; margin: 0 0 var(--s3); }
.ct-popular .a-rp { font-variant-numeric: tabular-nums; }

/* ── الشريط اللاصق (موبايل): المجموع + رابط «أكمل الطلب» ── */
.aneya-cart .a-stick .a-sp { display: flex; flex-direction: column; line-height: 1.25; font-variant-numeric: tabular-nums; }
.aneya-cart .a-stick .a-spl { font-size: 11px; color: var(--ink-hint); font-weight: 400; }
.aneya-cart .a-stick .a-spv { font-size: 16px; font-weight: 500; color: var(--ink); }
.aneya-cart .a-stick .a-sb { flex-shrink: 0; margin-inline-start: auto; }

/* ══ الإضافات المعتمدة (المالك 2026-09-11) — كلٌّ منها كتلة مستقلّة ══ */

/* A1 — مكمّل التوصيل المجاني: منتجان يغلقان الفرق، داخل بطاقة الشريط */
.ct-gap { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--line); }
.ct-gaph { font-size: 12px; color: var(--ink-secondary); margin-bottom: var(--s2); }
.ct-gaplist { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.ct-gapi { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-control); min-width: 0; }
.ct-gaptop { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.ct-gaptop img, .ct-gapph { width: 40px; height: 40px; border-radius: var(--r-control); object-fit: cover; flex-shrink: 0; background: var(--plum-50); }
.ct-gapn { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-gapbot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.ct-gapp { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-gapbot .a-upadd { padding: var(--s2) var(--s3); }

/* A2 — بطاقة إكمال الباقة: تحت المنتج الذي ينقصه شريكه */
.ct-bundleup { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); padding: var(--s3); background: var(--ok-bg); border: 1px dashed var(--ok-line); border-radius: var(--r-card); }
.ct-buimg { width: 44px; height: 44px; border-radius: var(--r-control); overflow: hidden; flex-shrink: 0; background: var(--surface-card); }
.ct-buimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ct-butxt { flex: 1; min-width: 0; }
.ct-buh { font-size: 13px; font-weight: 500; color: var(--ok); line-height: 1.45; }
.ct-bus { font-size: 12px; color: var(--ink-secondary); line-height: 1.5; margin-top: 2px; }

/* A3 — محافظة التوصيل في الملخّص */
.ct-prov { margin: 0 0 var(--s3); }
.ct-provnote { display: flex; align-items: center; gap: var(--s1); font-size: 11.5px; color: var(--ok); margin-top: var(--s1); }

/* A4 — سطر «وفّرت» تحت المجموع */
.ct-saved { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding: var(--s2) var(--s3); background: var(--ok-bg); border-radius: var(--r-control); color: var(--ok); font-size: 12.5px; line-height: 1.5; }
.ct-saved svg { flex-shrink: 0; }
.ct-saved b { font-weight: 500; }

/* A7 — عدد القطع المبيعة (total_sales ≥ 100 فقط) */
.ct-sold { font-size: 11px; color: var(--ink-hint); font-weight: 400; margin-top: 2px; }

/* ── الاستجابة ── */
@media (max-width: 767px) {
	.aneya-cart .ct-main { padding-bottom: var(--s6); }
	.aneya-cart .a-foot { padding-bottom: calc(var(--s16) + var(--s6)); }
	.aneya-cart.ct-nostick .a-foot { padding-bottom: var(--s6); }   /* الشريط اللاصق مُطفأ من اللوحة */
}
@media (min-width: 768px) {
	.aneya-cart .ct-main { padding: var(--s6) var(--s6) var(--s8); }
	.ct-notices, .ct-head, .ct-grid, .ct-empty { max-width: 680px; margin-inline: auto; }
	.ct-list .a-ciimg { width: 84px; height: 84px; }
	.ct-summary { padding: var(--s6); }
}
@media (min-width: 1024px) {
	.aneya-cart .ct-main { padding: var(--s8) var(--s8) var(--s12); }
	.ct-notices, .ct-head, .ct-grid, .ct-empty { max-width: 1120px; }
	.ct-grid { grid-template-columns: minmax(0, 1fr) 372px; gap: var(--s8); }
	.ct-side { position: sticky; top: calc(var(--s16) + var(--s4)); }
	.ct-h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .ct-list .a-ci { transition: none; } }

/* ══ نسخة أمان من إضافات المكتبة (2026-09-11) ══
   الإنتاج يحذف ?ver من روابط الأصول ويخزّنها في المتصفّح (CSS أسبوعاً) — فزائر يحمل aneya-ds.css قديماً لا يرى كتلة
   ANEYA-CART-CHECKOUT. هذه الأسطر (قيم المكتبة نفسها) تضمن الصفحة مهما كانت نسخة المكتبة المخزّنة. */
.aneya-standalone a.a-sb { color: #fff; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.a-toast.has-act { pointer-events: auto; display: inline-flex; align-items: center; gap: var(--s3); padding-inline-end: var(--s2); }
.a-toast-act { background: none; border: 0; color: var(--plum-200); font-family: var(--font); font-size: 13.5px; font-weight: 500; padding: var(--s1) var(--s2); border-radius: var(--r-control); cursor: pointer; }
.a-toast-act:focus-visible { outline: 2px solid var(--plum-200); outline-offset: 2px; }
.a-totx { font-size: 12px; color: var(--ink-hint); font-weight: 400; }
.a-fine { font-size: 11px; color: var(--ink-hint); text-align: center; line-height: 1.6; }
