/* ========================================================================== */
/* RubyRose V10.24 — Mobile Viewport Fit (إصلاح الفراغات السوداء والتحجيم)     */
/* المشكلة: القائمة الجانبية بارتفاع 100svh لا تلاحق اختفاء شريط العنوان،      */
/* فيظهر فراغ أسود أسفلها (خلفية الصفحة #151015 الداكنة)، وبعض المقاسات       */
/* المبنية على svh تترك فجوات عند تغيّر ارتفاع المتصفح الفعلي.                 */
/* ========================================================================== */

@media (max-width:1320px){

  /* 1) القائمة الجانبية: تمتد دائمًا من أعلى الشاشة لأسفلها مهما تغيّر شريط العنوان. */
  html body .mobile-nav-panel{
    top:0!important;
    bottom:0!important;
    height:auto!important;            /* الارتفاع يُحسب من التثبيت أعلى/أسفل وليس من svh الثابت. */
    min-height:100%!important;
    max-height:none!important;
  } /* الدرج الجانبي يلاصق حافتي الشاشة العلوية والسفلية دائمًا. */

  @supports (height:100dvh){
    html body .mobile-nav-panel{min-height:100dvh!important;} /* ضمان إضافي بالارتفاع الديناميكي للمتصفحات الداعمة. */
  }

  /* 2) خلفية الإغلاق خلف القائمة تغطي الشاشة الفعلية كاملة بلا فجوة سفلية. */
  html body .mobile-nav-backdrop{
    top:0!important;bottom:0!important;left:0!important;right:0!important;
    width:auto!important;height:auto!important;
  } /* تغطية كاملة تتبع نافذة العرض الحقيقية. */

  /* 3) منع أي تمدد أفقي يجعل الصفحة أعرض من الشاشة فتظهر حواف داكنة. */
  html body.biagiotti-style{
    width:100%!important;
    max-width:100%!important;
    overflow-x:clip!important;
  } /* قفل العرض على مقاس الشاشة تمامًا. */
  html body.biagiotti-style main{
    width:100%!important;
    max-width:100%!important;
    overflow-x:clip!important;
    flex:1 0 auto!important;
    background:#fdf6f9!important;
  } /* جسم الصفحة فاتح ويملأ الفراغ الرأسي، فلا يظهر الأسود إلا خلف الفوتر المقصود. */

  /* 4) كل الوسائط لا تتجاوز عرض الشاشة أبدًا. */
  html body.biagiotti-style main img,
  html body.biagiotti-style main video,
  html body.biagiotti-style main iframe,
  html body.biagiotti-style main canvas{
    max-width:100%!important;
  } /* حماية عامة من الصور أو الفيديوهات الأعرض من الشاشة. */

  /* 5) فواصل الماركيو وأي مسارات عرضها max-content تُقص داخل الشاشة. */
  html body .rr-section-divider{
    max-width:100%!important;
    overflow:hidden!important;
  } /* منع مسار الماركيو من دفع عرض الصفحة. */

  /* 6) الأقسام الممتدة لا تتجاوز حدود الشاشة. */
  html body.biagiotti-style main > section,
  html body.biagiotti-style main > .rr-home-image-slider{
    max-width:100%!important;
    overflow-x:clip!important;
  } /* كل قسم محصور داخل عرض الجهاز. */
}

/* 7) V10.26: أُزيلت أوامر min-height القسرية للسلايدرات لأنها كانت تنفخ
   الأقسام لملء الشاشة وتخلق مساحات فارغة كبيرة قبل الفوتر على الموبايل.
   نُبقي فقط تحويل واجهة التصنيف من svh إلى dvh بنفس المقاس (76). */
@media (max-width:900px){
  @supports (height:100dvh){
    html body .category-product-showcase{
      height:76dvh!important;
    } /* نفس مقاس 76 السابق لكن بوحدة ديناميكية تلاحق شريط العنوان. */
  }
}

/* 8) صفحات غير الرئيسية: سلايدر Canvas يعتمد dvh بدل svh لتغطية كاملة. */
@media (max-width:900px){
  @supports (height:100dvh){
    html body:not(.page-index) main > .rr-home-image-slider.rr-home-pro-slider{
      height:calc(100dvh - 68px)!important;
    } /* لا فجوة أسفل السلايدر عند اختفاء شريط العنوان. */
  }
}

/* 9) V10.26: ضغط المسافات الرأسية على الموبايل — إلغاء الفراغات الكبيرة قبل الفوتر. */
@media (max-width:760px){
  html body.biagiotti-style main .section,
  html body.biagiotti-style main > section.section{
    padding-block:42px!important;
  } /* بدل 72-124px الضخمة القادمة من طبقة luxury على الموبايل. */
  html body.biagiotti-style main > section:last-of-type,
  html body.biagiotti-style main > .section:last-of-type{
    padding-bottom:30px!important;
    margin-bottom:0!important;
  } /* آخر قسم يلتصق بالفوتر بمسافة صغيرة أنيقة فقط. */
  html body.biagiotti-style main{
    padding-bottom:0!important;
  } /* لا حشو سفلي إضافي على جسم الصفحة. */
  html body .rr-section-divider{
    margin-block:0!important;
  } /* فواصل الماركيو بلا هوامش خارجية تضخم المسافات. */
}
