/* ========================================================================== */
/* RubyRose V10.28 — الإصلاح الجذري: لا ومضات سوداء، أداء موبايل سلس، عربية   */
/* ========================================================================== */

/* ===== أ) جذر الصفحة فاتح: القضاء على الومضات السوداء أثناء التمرير ===== */
/* كان html بالكامل داكن #151015، فأي منطقة لم تُرسم بعد أثناء التمرير السريع
   كانت تظهر سوداء (التهنيج الأسود). الجذر الآن فاتح والفوتر يحمل لونه الداكن بنفسه. */
html{background:#fdf6f9!important;}
body.biagiotti-style{background:#fdf6f9!important;}
body.biagiotti-style>footer.site-footer.rr-premium-footer{background-color:#151015!important;} /* الفوتر يبقى داكنًا بذاته. */

/* ===== ب) أداء الموبايل: إزالة أثقل مستهلكات المعالج الرسومي ===== */
@media (max-width:900px){

  /* 1) إلغاء الزجاجية (backdrop-filter) نهائيًا على الموبايل — أكبر مصدر للتهنيج. */
  html body header.site-header,
  html body .mobile-nav-panel,
  html body .mobile-nav-backdrop,
  html body .rr-site-search-panel,
  html body .rr-site-search,
  html body .lang-modal,
  html body .rr-home-slider-dots,
  html body .rr-home-slider-arrow,
  html body .chatbot,
  html body .shop-card-media,
  html body .cat-tile-caption{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  } /* لا حسابات ضبابية مكلفة خلف العناصر. */

  /* 2) تعويض الزجاجية بخلفيات شبه مصمتة بنفس الإحساس البصري. */
  html body header.site-header.biagiotti-header{background:rgba(255,252,250,.97)!important;}
  html body .mobile-nav-panel{background:#fffcfa!important;}
  html body .rr-site-search-panel{background:#fffdfb!important;}

  /* 3) رسم الأقسام عند الحاجة فقط: قفزة أداء كبيرة أثناء التمرير. */
  html body.biagiotti-style main > section.section{
    content-visibility:auto;
    contain-intrinsic-size:auto 620px;
  } /* الأقسام خارج الشاشة لا تُحسب ولا تُرسم حتى الاقتراب منها. */

  /* 4) تخفيف الظلال الضخمة التي تجبر المتصفح على رسم طبقات كبيرة. */
  html body .shop-product-card,
  html body .cat-tile,
  html body .rr-home-offer-card,
  html body .rr-dyn-section .rr-dyn-media img{
    box-shadow:0 8px 22px rgba(42,20,30,.10)!important;
  } /* ظل خفيف أنيق بدل الظلال العميقة المتعددة. */

  /* 5) فواصل الماركيو أخف وأصغر على الموبايل. */
  html body .rr-section-divider{padding-block:10px!important;}
  html body .rr-div-word{font-size:15px!important;}
}

/* ===== ج) المساحات الفارغة: تغطية مدى التابلت أيضًا (كان الضغط ≤760 فقط) ===== */
@media (min-width:761px) and (max-width:1024px){
  html body.biagiotti-style main .section,
  html body.biagiotti-style main > section.section{
    padding-block:56px!important;
  } /* بدل 72-124px الضخمة على التابلت والموبايل العريض. */
  html body.biagiotti-style main > section:last-of-type{
    padding-bottom:36px!important;
    margin-bottom:0!important;
  } /* آخر قسم قريب من الفوتر. */
}

/* ===== د) العربية: خطوط ومحاذاة سليمة لكل نصوص السلايدر والواجهة ===== */
html[dir="rtl"] .rr-home-default-content .rr-type-text,
html[dir="rtl"] .rr-home-default-content p,
html[dir="rtl"] .rr-home-default-content span{
  font-family:'Cairo','Segoe UI',Tahoma,sans-serif!important;
  letter-spacing:0!important;
} /* لا تباعد أحرف لاتيني يشوّه العربية. */
html[dir="rtl"] .rr-maintenance-card h1,
html[dir="rtl"] .rr-dyn-title,
html[dir="rtl"] .section-heading h2{
  font-family:'Cairo','Segoe UI',sans-serif!important;
  letter-spacing:0!important;
} /* عناوين عربية واضحة في كل الأقسام. */
html[dir="rtl"] .qe-grid,
html[dir="rtl"] .sd-grid{direction:rtl;} /* شاشات الإدارة الجديدة تتبع الاتجاه. */

/* ===== هـ) مبدل اللغة داخل قائمة الموبايل ===== */
html body .mobile-nav-panel .mobile-lang-switch-link{
  display:block;
  margin-top:14px;
  padding:13px 16px;
  border:1.5px solid rgba(203,43,111,.28);
  border-radius:14px;
  text-align:center;
  font-weight:800;
  font-size:14px;
  color:#a10616;
  background:#fff;
  transition:background .2s ease,color .2s ease;
} /* زر تبديل اللغة واضح داخل الدرج الجانبي. */
html body .mobile-nav-panel .mobile-lang-switch-link:active{
  background:linear-gradient(135deg,#e0177a,#ff6aa8);
  color:#fff;
} /* تفاعل لمسي عند الضغط. */
@media (min-width:1321px){
  html body .mobile-lang-switch-link{display:none;}
} /* مخفي على الديسكتوب حيث يوجد مبدل الهيدر. */

/* ===== و) استقرار التمرير العام على الموبايل ===== */
@media (max-width:900px){
  html{
    scroll-behavior:auto;
    -webkit-text-size-adjust:100%;
  } /* لا حركات تمرير برمجية ثقيلة. */
  html body.biagiotti-style{
    overscroll-behavior-y:none;
  } /* منع ارتداد السحب الزائد الذي كان يكشف الجذر الداكن سابقًا. */
}
