/* ===== صفحة التقسيط (مستقلة، بادئة installment-) ===== */

.installment-page {
    color: #1f2937;
    max-width: 1280px;
    font-family: 'Cairo', inherit, sans-serif;
}
.header {
    display: none !important;
}

/* شريط أدوات علوي بديل عن هيدر الموقع العام المخفي أعلاه في صفحات التقسيط - نفس
   أيقونة/شارة سلة الموقع (.icon-box/.cart-count) وزر تبديل اللغة (.lang-switch) المعرّفين
   عالميًا، فيبقى الشكل موحّدًا مع هوية الموقع دون إعادة تعريفها هنا. */
.installment-utility-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 4px;
    margin-bottom: 10px;
}

.installment-utility-bar__logo img {
    height: 80px;
    width: auto;
}

.installment-utility-bar__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.installment-utility-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #670756;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration:underline ;

}

.installment-utility-bar__link:hover {
    color: #883576;
    text-decoration: underline;
}


/* ===== هيدر الصفحة: صورة تسويقية جاهزة (نسخة حاسوب/جوال) بدل بطاقة نصية مبنية بـ HTML ===== */
.installment-hero-image {
    display: block;
    margin-bottom: 22px;
    border-radius: 20px;
    overflow: hidden;
}

.installment-hero-image__img {
    display: block;
    width: 100%;
    height: auto;
}

/* "لماذا تشتري من الشبكة الجديدة؟" - أسفل صورة الهيدر مباشرة */
.installment-why-section {
    margin-bottom: 24px;
}

.installment-why-section__title {
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: #670756;
    margin: 0 0 16px;
}

.installment-why-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.installment-why-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #faf5f9;
    border: 1px solid #f1e6ee;
    border-radius: 16px;
    padding: 20px 16px;
}

.installment-why-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(207deg, #faf5f9, #883576);
    /* background: linear-gradient(135deg, #670756, #883576); */
    font-size: 22px;
    margin-bottom: 12px;
}

.installment-why-card h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 4px;
}

.installment-why-card p {
    font-size: 14.5px;
    color: #000000;
    margin: 0;
    line-height: 1.6;
}

.installment-page__sub {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

/* مؤشر الخطوات */
.installment-stepper {
    margin: 8px 0 28px;
}

.installment-stepper__title {
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #670756;
    margin: 0 0 14px;
}

/* منيو الأقسام الخاص بصفحة التقسيط (مستقل تمامًا عن قائمة الموقع العامة) */
.installment-categories-wrap {
    background: #fcfafb;
    border: 1px solid #f1e6ee;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.installment-categories {
    display: flex;
    align-items: center;
    gap: 8px;
}

.installment-categories + .installment-categories {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #f1e6ee;
}

/* المنطقة القابلة للتمرير أفقيًا (الشرائح فقط) - الروابط الثابتة تبقى خارجها فلا تختفي أبدًا */
.installment-categories__scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    flex: 1 1 auto;
}

.installment-categories__scroll::-webkit-scrollbar {
    display: none;
}

.installment-categories__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.installment-categories__item:hover {
    border-color: #670756;
    color: #670756;
    text-decoration: none;
}

.installment-categories__item.is-active {
    background: linear-gradient(90deg, #670756, #883576);
    border-color: transparent;
    color: #fff;
}

/* روابط ثابتة (الشروط / الرجوع للكاش) تُميَّز بخط متقطّع، وتبقى مثبّتة خارج منطقة
   التمرير في طرفَي الصف حتى لا تختفي خلف شرائح الأقسام عند كثرتها */
.installment-categories__item--link {
    border-style: dashed;
    color: #670756;
    background: #faf5f9;
}

.installment-categories__item--pinned {
    flex: 0 0 auto;
}

/* يُخفي قائمة أقسام الموقع العامة (الكاش) في صفحات التقسيط فقط — هذا الملف لا يُحمَّل
   إلا هنا، فلا يمسّ القائمة في بقية صفحات الموقع. منيو installment-categories أعلاه
   يحلّ محلها هنا. */
.cats-strip {
    display: none !important;
}

/* صف الأقسام الفرعية (يظهر أسفل الرئيسية مع فاصل، وعنوان يوضّح أي قسم تتبعه) */
.installment-categories__sub-label {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
    color: #670756;
    white-space: nowrap;
}

.installment-categories--sub .installment-categories__item {
    font-size: 12px;
    padding: 6px 14px;
    background: #faf5f9;
}

.installment-categories--sub .installment-categories__item.is-active {
    background: linear-gradient(90deg, #670756, #883576);
}

.installment-stepper__list {
    display: flex;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.installment-stepper__list::-webkit-scrollbar {
    display: none;
}

.installment-stepper__item {
    flex: 0 0 auto;
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    color: #9ca3af;
    font-weight: 700;
    font-size: 11.5px;
    text-align: center;
}

/* خط الوصل بين خطوتين: عنصر حقيقي في تدفّق Flex (لا تموضع مطلق) فلا يعاني من مشاكل
   الهوامش الزائدة/الناقصة في الاتجاه RTL، ويتمدد تلقائيًا ليملأ المسافة بين أي عدد خطوات. */
.installment-stepper__connector {
    flex: 1 1 28px;
    min-width: 20px;
    height: 2px;
    margin-top: 13px;
    /* background: #ece4eb; */
    background:#000;
    border-radius: 2px;
}

.installment-stepper__connector--done {
    background: #c9a7c0;
}

.installment-stepper__dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
}

.installment-stepper__label {
    white-space: nowrap;
    color: #000;
}

.installment-stepper__item--done {
    color: #15803d;
}

.installment-stepper__item--done .installment-stepper__dot {
    background: #16a34a;
    color: #fff;
}

.installment-stepper__item--current {
    color: #670756;
}

.installment-stepper__item--current .installment-stepper__dot {
    background: linear-gradient(135deg, #670756, #b65aa0);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(103, 7, 86, 0.1);
}

/* الأزرار */
.installment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(90deg, #670756, #883576);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    line-height: 1.3;
}

.installment-btn:hover {
    color: #fff;
    filter: brightness(1.06);
}

.installment-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* تحييد تضارب مع button.btn في القالب العام (width:100%/font-size:1.5rem/display:block/
   margin-bottom:3rem) الذي يصيب أي <button class="btn ..."> في الموقع، بما فيها أزرارنا.
   تُبقي نفس درجة التخصيص (عنصر+صنف) حتى تستمر قواعد السياقات الأكثر تخصيصًا (مثل زر
   الإضافة للسلة بعرض 100%) في الفوز كما هي دون المساس بها. */
button.installment-btn,
button.installment-btn-outline,
button.installment-btn-link {
    width: auto;
    display: inline-flex;
    margin-bottom: 0;
    font-size: 14px;
    white-space: nowrap;
}

.installment-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: #670756;
    border: 1.5px solid #670756;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    padding: 8px 14px;
}

.installment-btn-outline:hover {
    color: #670756;
}

.installment-btn-link {
    background: none;
    border: 0;
    color: #b91c1c;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 6px;
}

.installment-btn-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(90deg, #670756, #883576);
    color: #fff;
    border: 0;
    font-size: 16px;
}

/* الفلاتر: سطر واحد (بحث + أقسام + براند + سعر + أزرار) يلتف تلقائيًا عند ضيق المساحة */
/* شريط بحث واحد أنيق بدل لوحة فلاتر متعددة الحقول (القسم/الترتيب يُضبطان من منيو
   الأقسام وقائمة الترتيب أعلى الشبكة، فلا داعي لتكرارهما هنا). */
.installment-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.installment-search-bar__box {
    display: flex;
    align-items: center;
    flex: 1 1 320px;
    background: #fff;
    /* border: 1.5px solid #e9d9e4;
    border-radius: 999px; */
    padding: 4px 4px 4px 20px;
    /* box-shadow: 0 4px 14px rgba(103, 7, 86, 0.06); */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.installment-search-bar__box:focus-within {
    border-color: #883576;
    box-shadow: 0 4px 16px rgba(103, 7, 86, 0.14);
}

.installment-search-bar__icon {
    flex: 0 0 auto;
    font-size: 15px;
    opacity: 0.55;
    margin-inline-end: 10px;
}

.installment-search-bar__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    height: 40px;
    padding: 0;
}

.installment-search-bar__input::placeholder {
    color: #aab0bb;
}

.installment-search-bar__btn {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 50px;
    margin: 0 8px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #670756, #883576);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: opacity 0.15s ease;
    width: fit-content !important;
}

.installment-search-bar__btn:hover {
    opacity: 0.92;
}

.installment-search-bar__clear {
    white-space: nowrap;
}

.installment-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 36px 16px;
    text-align: center;
    background: #fff;
    border: 1px dashed #e8d9e4;
    border-radius: 16px;
    color: #6b7280;
    font-size: 13px;
}

.installment-empty__icon {
    font-size: 28px;
    opacity: 0.5;
}

/* عنوان نتائج القسم الحالي + عدد الأجهزة + ترتيب حسب */
.installment-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.installment-results-head__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
}

.installment-results-head__count {
    font-size: 12px;
    font-weight: 700;
    color: #670756;
    background: #faf5f9;
    border-radius: 999px;
    padding: 3px 12px;
}

.installment-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.installment-sort__label {
    font-size: 12.5px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
}

.installment-sort select {
    font-size: 12.5px;
    height: 36px;
    min-width: 150px;
    border-radius: 9px;
}

/* الشبكة والكروت */
.installment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 18px;
}

.installment-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #f1e6ee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.installment-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.1);
}

.installment-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.installment-card__badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    background: #16a34a;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    z-index: 1;
}

.installment-card__badge--out {
    background: #9ca3af;
}

.installment-card__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.installment-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    flex: 1 1 auto;
}

/* يُرسم العنصر دائمًا (حتى فارغًا) فيحافظ على ارتفاع ثابت، لتبدأ بداية الاسم عند نفس
   المستوى في كل البطاقات بغض النظر عن وجود براند أم لا. */
.installment-card__brand {
    min-height: 14px;
    font-size: 11px;
    font-weight: 700;
    color: #883576;
    text-transform: uppercase;
}

.installment-card__name {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.installment-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    flex-wrap: wrap;
}

.installment-prices__plan {
    font-size: 17px;
    font-weight: 800;
    color: #670756;
    width: 100%;
}

.installment-prices__monthly {
    font-size: 11px;
    font-weight: 700;
    color: #883576;
    width: 100%;
}

.installment-add {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.installment-add select {
    font-size: 12.5px;
    height: 34px;
    border-radius: 8px;
}

/* دوائر ألوان حقيقية بدل كود الهكس (يطابق أسلوب صفحة المنتج في الموقع) */
.installment-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
}

.installment-colors__item {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 50%;
    cursor: pointer;
    background: var(--swatch, #e5e7eb);
    box-shadow: 0 0 0 1.5px #e5e7eb, 0 0 0 3px #fff;
}

.installment-colors__item input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.installment-colors__item:has(input:checked) {
    box-shadow: 0 0 0 2px #670756, 0 0 0 4px #fff;
}

/* نقطة لون صغيرة بجانب النص (سلة التقسيط، المراجعة) لتوضيح اللون المختار فعليًا */
.installment-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-inline-end: 4px;
    background: var(--swatch, #e5e7eb);
    box-shadow: 0 0 0 1px #e5e7eb;
    vertical-align: middle;
}

/* "أضف للسلة": إطار بنفسجي وخلفية بيضاء بدل التدرج الصلب، يمتلئ بالبنفسجي عند مرور
   الماوس فقط، فتخفّ ثقل الصفحة البصري مع بقاء نفس لون الهوية. */
.installment-add .installment-btn {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
    color: #670756;
    border: 1.5px solid #670756;
}

.installment-add .installment-btn:hover {
    background: #670756;
    color: #fff;
}

.installment-pagination {
    margin-top: 20px;
}

.installment-pagination .pagination {
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.installment-pagination .page-link {
    border-radius: 10px;
    border-color: #e5e7eb;
    color: #670756;
    font-weight: 700;
}

.installment-pagination .page-item.active .page-link {
    background: linear-gradient(90deg, #670756, #883576);
    border-color: transparent;
    color: #fff;
}

.installment-pagination .page-item.disabled .page-link {
    color: #c3b9c0;
}

/* سلة التقسيط */
.installment-cart {
    position: sticky;
    top: 86px;
    background: #fff;
    border: 1px solid #f1e6ee;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(103, 7, 86, 0.08);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.installment-cart__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #670756;
}

.installment-cart__count {
    background: #670756;
    color: #fff;
    font-size: 11px;
    border-radius: 999px;
    padding: 1px 8px;
}

/* كل سطر سلة أصبح بطاقة مستقلة (بدل فاصل متقطّع بسيط) - أوضح بصريًا ويطابق أسلوب
   البطاقات المستخدم في باقي الصفحة (المنتجات، الشروط، "لماذا تشتري"). */
.installment-cart__line {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid #f1e6ee;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
}

.installment-cart__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* عنصر flex عادي ضمن الصف (لا تموضع مطلق) - يتجنّب تمامًا أي تداخل محتمل مع الاسم/الصورة
   بغضّ النظر عن طول النص، بعكس التموضع المطلق السابق الذي كان يتداخل مع النص فعليًا. */
.installment-cart__remove {
    flex: 0 0 auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #faf5f9;
    color: #b91c1c;
    border: 0;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}

.installment-cart__remove:hover {
    opacity: 1;
    background: #fde2e2;
}

.installment-cart__thumb {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 10px;
    background: #fdf7fb;
    object-fit: contain;
    padding: 3px;
}

.installment-cart__info {
    flex: 1 1 auto;
    min-width: 0;
}

.installment-cart__info .name {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
}

.installment-cart__info .meta {
   font-size: 12.5px;
    color: #000;
    font-weight: 500;
}

.installment-cart__controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* عداد الكمية (+/-) بدل حقل رقم يدوي وزر "تحديث" منفصل يُعيد تحميل الصفحة */
.installment-qty {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    overflow: hidden;
    flex: 0 0 auto;
}

.installment-qty__btn {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #faf5f9;
    color: #670756;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.installment-qty__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.installment-qty__btn:not(:disabled):hover {
    background: #f1e0ec;
}

.installment-qty__value {
    min-width: 26px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
}

.installment-qty.is-busy {
    opacity: 0.6;
}

.installment-cart__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
    padding: 20px 4px;
    text-align: center;
}

.installment-cart__empty-icon {
    color: #d8b9d0;
}

.installment-btn--disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border: 0 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* تفصيل التكلفة (المجموع الأساسي / رسوم المعالجة / الدفعات الشهرية التقديرية) */
.installment-cart__breakdown {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #efe3ec;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.installment-cart__breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}
.installment-cart__breakdown-row span{
        color: #000;
    font-size: 14px;
    font-weight: 500;
}

.installment-cart__breakdown-free {
    color: #16a34a;
    font-weight: 700;
}

.installment-cart__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
}

.installment-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.installment-cart__total strong {
    font-size: 17px;
    color: #670756;
}
.installment-cart__total span{
     font-size: 15px;
    color: #670756;
    font-weight: 700;
}

/* شريط السلة الثابت في الجوال */
.installment-cart-bar {
    display: none;
}

/* قسم "شروط وضوابط الموافقة على التقسيط" أسفل الصفحة */
.installment-terms-section {
    margin-top: 32px;
}

.installment-terms-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 16px;
}

.installment-terms-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.installment-terms-card {
    background: #faf5f9;
    border: 1px solid #f1e6ee;
    border-radius: 16px;
    padding: 18px;
}

.installment-terms-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(90deg, #670756, #883576);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
}

.installment-terms-card h3 {
    font-size: 14px;
    font-weight: 800;
    color: #670756;
    margin: 0 0 6px;
}

.installment-terms-card p {
    font-size: 12.5px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* عناصر النماذج: القالب الأساسي لا يصمّم form-control/form-select إطلاقًا (لذلك كانت
   تظهر كمربعات المتصفح الافتراضية الخام) — فنصمّمها هنا مرة واحدة لكل صفحات التقسيط. */
.installment-page input:not([type="radio"]):not([type="checkbox"]),
.installment-page select,
.installment-page textarea {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 13.5px;
    color: #1f2937;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.installment-page textarea {
    height: auto;
    padding: 10px 14px;
    resize: vertical;
}

.installment-page input:focus,
.installment-page select:focus,
.installment-page textarea:focus {
    outline: none;
    border-color: #670756;
    box-shadow: 0 0 0 3px rgba(103, 7, 86, 0.1);
}

.installment-page input::placeholder {
    color: #9ca3af;
}

.installment-page .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #4b5563;
}

/* خانات رمز التحقق (OTP): مربعات صغيرة متساوية بدل الحقل الممتد */
.installment-otp-input {
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 auto;
    padding: 0 !important;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
}

/* الأقسام والنماذج */
.installment-section {
    background: #fff;
    border: 1px solid #f1e6ee;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.installment-section__title {
    margin: 0 0 14px;
    font-size: 15.5px;
    font-weight: 800;
    color: #670756;
}

.installment-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.installment-choice__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    cursor: pointer;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    margin: 0;
}

.installment-choice__item input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.installment-choice__item:has(input:checked) {
    border-color: #670756;
    background: #faf5f9;
    box-shadow: 0 0 0 3px rgba(103, 7, 86, 0.12);
}

.installment-choice__item--static {
    cursor: default;
}

.installment-choice__text strong {
    display: block;
    font-size: 14px;
}

.installment-choice__text small {
     color: #000;
    font-size: 14.5px;
    font-weight: 400;
}

/* بطاقات بوابات الدفع: شعار البوابة الحقيقي بدل اسم نصي/إيموجي */
.installment-choice__item--logo {
    align-items: center;
    text-align: center;
}

.installment-choice__item--logo .installment-choice__text {
    align-items: center;
}

.installment-choice__logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 4px;
}

.installment-choice__item--logo:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.installment-branches__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.installment-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    /* flex-wrap: wrap; */
}

/* المراجعة */
.installment-review__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #efe3ec;
    font-size: 13.5px;
}

.installment-review__row:last-child {
    border-bottom: 0;
}

.installment-review__row span {
    color: #000;
    font-weight: 500 !important ;
}

.installment-review__product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #efe3ec;
}

.installment-review__product:last-child {
    border-bottom: 0;
}

.installment-review__product img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fdf7fb;
    border-radius: 10px;
    padding: 4px;
}

.installment-review__product .name {
    font-weight: 700;
    font-size: 13.5px;
}

.installment-review__product .meta {
      font-size: 13.5px;
    color: #000;
    font-weight: 500;
}

.installment-review__product .price {
    font-weight: 800;
    color: #670756;
    white-space: nowrap;
    font-size: 13.5px;
}

.installment-paymethods.installment-choice {
    margin-bottom: 4px;
}

/* النجاح */
.installment-success {
    text-align: center;
    padding: 20px 12px 24px;
}

.installment-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.3);
}

.installment-success__title {
    margin: 12px 0 6px;
    font-size: clamp(18px, 2.6vw, 23px);
    font-weight: 800;
    color: #670756;
}

.installment-success__order {
    margin: 0;
    color: #6b7280;
    font-size: 13.5px;
}

/* الجوال */
@media (max-width: 991px) {
    .installment-cart {
        position: static;
        max-height: none;
    }
}

@media (max-width: 767px) {
    .installment-page {
        padding-bottom: 76px;
    }

    /* شريط الأدوات العلوي على الجوال: أيقونات فقط (بدون نصوص) بحجم موحّد داخل شريط
       واحد بخلفية وحدود واضحة، بدل نصوص متفاوتة الطول تكسر التجانس مع حجم الشعار. */
    .installment-utility-bar {
        padding: 8px 2px;
        gap: 8px;
    }

    .installment-utility-bar__logo img {
        height: 77px;
    }

    .installment-utility-bar__actions {
        gap: 13px;
        /* background: #faf5f9; */
        /* border: 1px solid #f1e6ee; */
        /* border-radius: 999px; */
        padding: 4px;
        /* box-shadow: 0 2px 8px rgba(103, 7, 86, 0.06); */
    }
    
.installment-utility-bar__actions i{
    color: #b14b96 !important;
    font-size: 3rem !important;
}
    .installment-utility-bar__link,
    .installment-utility-bar .lang-switch--pill,
    .installment-utility-bar .icon-box {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        padding: 0 !important;
    }

    .installment-utility-bar .lang-switch--pill {
        border: 0 !important;
        background: transparent !important;
    }

    .installment-utility-bar__link-text,
    .installment-utility-bar .lang-switch__label {
        display: none;
    }
    .installment-utility-bar__link-text{
        display: block !important;
    }

    .installment-utility-bar__link i {
               font-size: 2.5rem;
        font-weight: 900;
    }
    .installment-utility-bar__link{
        width: fit-content !important;
    }

    /* .installment-utility-bar .icon-box i {
        font-size: 20px !important;
    } */

    .installment-utility-bar .icon-box .cart-count {
        top: -2px;
        right: -2px;
    }

    .installment-hero-image {
        border-radius: 14px;
    }

    .installment-stepper__item {
        min-width: 64px;
        font-size: 10.5px;
    }

    /* .installment-stepper__label {
        display: none;
    } */

    .installment-stepper__connector {
        flex: 1 1 14px;
        min-width: 10px;
            margin-top: 21px;
    }

    .installment-search-bar {
        gap: 8px;
    }

    .installment-search-bar__box {
        flex: 1 1 100%;
        padding: 3px 3px 3px 16px;
    }

    .installment-search-bar__btn {
        height: 38px;
        padding: 0 30px;
        font-size: 12.5px;
        width:fit-content !important;
    }

    .installment-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .installment-choice {
        grid-template-columns: 1fr;
    }

    /* سلة الجوال تتحول لشريط سفلي ثابت، والبطاقة الكاملة تُخفى */
    .installment-cart-aside .installment-cart {
        display: none;
    }

    .installment-cart-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 1040;
        background: #fff;
        padding: 10px 14px;
        /* يحجز مساحة فارغة من الجهة اليمنى الفعلية حتى لا تغطّي أيقونة واتساب العائمة
           الثابتة في الموقع (z-index: 10000, right: 12px, width: 85px) نص السلة. */
        padding-right: 108px;
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #f1e6ee;
    }

    /* غلاف قابل لإعادة الرسم عبر AJAX بعد الحذف، لا يشارك في تخطيط flex نفسه
       (يبقى أبناؤه الحقيقيون flex items مباشرة داخل installment-cart-bar). */
    .installment-cart-bar__content {
        display: contents;
    }

    .installment-cart-bar__info {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        flex: 1 1 auto;
        /* تصفير مظهر <button> الافتراضي، فهي هنا زر يفتح نافذة تعديل السلة */
        background: none;
        border: 0;
        padding: 0;
        text-align: start;
        font: inherit;
        cursor: pointer;
    }

    .installment-cart-bar__thumbs {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
    }

    .installment-cart-bar__thumb {
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        object-fit: contain;
        background: #fdf7fb;
        border: 2px solid #fff;
        border-radius: 9px;
        padding: 2px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .installment-cart-bar__thumbs .installment-cart-bar__thumb:not(:first-child) {
        margin-inline-start: -10px;
    }

    .installment-cart-bar__thumb--more {
        background: #670756;
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        padding: 0;
    }

    .installment-cart-bar__text {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
        line-height: 1.3;
    }

    .installment-cart-bar__label {
        display: block;
        max-width: 100%;
        font-size: 11.5px;
        font-weight: 700;
        color: #374151;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .installment-cart-bar__extra {
        color: #883576;
        font-weight: 800;
    }

    .installment-cart-bar__total {
        font-size: 15px;
        font-weight: 800;
        color: #670756;
    }

    .installment-cart-bar .installment-btn {
        /* flex: 0 0 auto; */
    }
}

@media (prefers-reduced-motion: reduce) {
    .installment-card {
        transition: none;
    }
}

