/* RubyRose V10.44 — طبقة إصلاح الاستايل النهائية.
   الهدف: تصحيح التعارضات الفعلية المكتشفة بالقياس، بدون إعادة كتابة الطبقات السابقة.
   ترتيب التحميل: آخر ملف CSS في _header.php حتى يتغلب على قواعد !important القديمة. */

/* ============================================================
   1) سلايدر عرض المنتجات (blush) — الصور كانت تخرج عن إطارها.
   السبب: العنصر display:grid والصورة height:100% داخل صف تلقائي،
   فيتحدد ارتفاع الصف من الارتفاع الطبيعي للصورة (984px داخل إطار 522px)
   فتظهر الصورة مقصوصة ومكبّرة. الحل: flex + قيود ارتفاع صريحة.
   ============================================================ */
html body .blush-left-item,
html body .blush-right-item{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:0!important;
}

html body .blush-left-item>img,
html body .blush-right-item>img{
  flex:0 1 auto!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  box-sizing:border-box!important;
}

/* منع خروج أي طبقة من السلايدر خارج إطاره. */
html body .blush-left-window,
html body .blush-right-window{overflow:hidden!important;}

/* ارتفاع ثابت (72vh) كان يقصّ اسم المنتج والسواتش وزر «أضف إلى السلة»،
   لأن القسم عليه overflow:hidden. نجعل الارتفاع يتبع المحتوى مع إبقاء 72vh حدًا أدنى. */
html body .blush-showcase-slider,
html body .blush-showcase-slider.category-product-showcase{
  height:auto!important;
  padding-bottom:clamp(26px,3.5vw,54px)!important;
}
html body .blush-showcase-slider.category-product-showcase{min-height:72vh!important;}

/* النقاط يجب أن تطفو فوق الصور لا أن تحجز صفًا في الشبكة وتزيد الارتفاع. */
html body .rr-has-swatch>.blush-slider-dots,
html body .blush-showcase-slider .blush-slider-dots{position:absolute!important;}

/* طبقة البيانات يجب أن تبقى فوق الصور وقابلة للضغط. */
html body .blush-caption-layer{
  min-width:0!important;
  margin-top:clamp(24px,3.2vw,58px)!important;
}
html body .blush-caption{max-width:min(100%,560px)!important;padding-inline:14px!important;}

@media(max-width:900px){
  html body .blush-showcase-slider.category-product-showcase{min-height:0!important;}
}

/* ============================================================
   2) زر العودة لأعلى — كان يفقد position:fixed.
   السبب: قاعدة عامة في style.css تفرض position:relative!important
   على كل عنصر button، فيسقط الزر داخل تدفق الصفحة أسفل الفوتر.
   ============================================================ */
html body .rr-back-to-top{
  position:fixed!important;
  z-index:880!important;
  inset-block-start:auto!important;
  overflow:visible!important;
}
html[dir="ltr"] body .rr-back-to-top{right:24px!important;left:auto!important;}
html[dir="rtl"] body .rr-back-to-top{left:24px!important;right:auto!important;}

@media(max-width:768px){
  html[dir="ltr"] body .rr-back-to-top{right:16px!important;left:auto!important;}
  html[dir="rtl"] body .rr-back-to-top{left:auto!important;right:16px!important;}
}

/* ============================================================
   3) زر فتح الشات — كان دائرة سوداء بلا أيقونة على الديسكتوب.
   السبب: إصلاح الأيقونة في V10.43 كان محبوسًا داخل @media(max-width:768px)،
   وعلى الشاشات الأكبر كانت القاعدة العامة للأزرار تفرض لونًا داكنًا،
   وأيقونة SVG بلا مقاس وبتعبئة سوداء بدل الحد الملوّن.
   ============================================================ */
html body .rr-chatbot .rr-chat-toggle{
  display:grid!important;
  place-items:center!important;
  width:60px!important;
  min-width:60px!important;
  height:60px!important;
  min-height:60px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:linear-gradient(140deg,#ef5f97 0%,#c62c68 100%)!important;
  color:#fff!important;
  box-shadow:0 16px 38px rgba(176,38,90,.34),inset 0 1px 0 rgba(255,255,255,.28)!important;
  line-height:1!important;
  overflow:visible!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transition:transform .25s ease,box-shadow .25s ease,background .25s ease!important;
}

html body .rr-chatbot .rr-chat-toggle:hover{
  background:linear-gradient(140deg,#f57aab 0%,#d6376f 100%)!important;
  box-shadow:0 20px 44px rgba(176,38,90,.42),inset 0 1px 0 rgba(255,255,255,.32)!important;
  transform:translateY(-3px)!important;
}

html body .rr-chatbot .rr-chat-toggle::before,
html body .rr-chatbot .rr-chat-toggle::after{display:none!important;content:none!important;}

html body .rr-chat-toggle-icon,
html body .rr-chat-toggle-close{
  position:relative!important;
  z-index:2!important;
  width:27px!important;
  height:27px!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  color:#fff!important;
  line-height:1!important;
}

html body .rr-chatbot:not(.open) .rr-chat-toggle-icon{display:grid!important;}
html body .rr-chatbot.open .rr-chat-toggle-icon{display:none!important;}
html body .rr-chatbot:not(.open) .rr-chat-toggle-close{display:none!important;}
html body .rr-chatbot.open .rr-chat-toggle-close{
  display:grid!important;
  font-size:21px!important;
  font-weight:600!important;
}

/* الأيقونة مرسومة بالحدود لا بالتعبئة، فبدون هذه القاعدة تظهر كتلة سوداء. */
html body .rr-chat-toggle-icon svg{
  display:block!important;
  width:27px!important;
  height:27px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

html body .rr-chat-pulse{border-color:rgba(239,95,151,.5)!important;}

/* ============================================================
   4) بطاقات المنتجات داخل الشات — كانت مقصوصة لشريط رفيع.
   السبب: منطقة الرسائل flex عمودي، وشريط المنتجات عنصر مرن
   قابل للانكماش (flex-shrink:1) فينضغط إلى ~76px بدل 350px
   فلا تظهر صور المنتجات إلا كخط رفيع.
   ============================================================ */
html body .rr-chat-messages>*{flex-shrink:0!important;}

html body .rr-chat-products{
  flex:0 0 auto!important;
  align-items:stretch!important;
  min-height:366px!important;
  overscroll-behavior-x:contain;
}

html body .rr-chat-product{
  flex:0 0 min(248px,74%)!important;
  min-height:366px!important;
  height:auto!important;
}

html body .rr-chat-product-image{
  position:relative!important;
  flex:0 0 208px!important;
  height:208px!important;
  min-height:208px!important;
  border-bottom:1px solid #f6e4ed!important;
}

html body .rr-chat-product-image img{
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
  padding:12px!important;
  object-fit:contain!important;
  box-sizing:border-box!important;
}

/* صورة بديلة نظيفة لو مسار الصورة غير صالح. */
html body .rr-chat-product-image img[data-rr-fallback]{
  padding:26px!important;
  opacity:.45!important;
}

html body .rr-chat-cart-summary,
html body .rr-chat-checkout,
html body .rr-chat-order-actions{flex:0 0 auto!important;}

/* ============================================================
   5) لمسات احترافية على نافذة الشات.
   ============================================================ */
html body .rr-chat-panel{
  background:#fff!important;
  border:1px solid rgba(198,44,104,.14)!important;
  box-shadow:0 30px 80px rgba(84,20,48,.2)!important;
}

html body .rr-chat-head{
  background:linear-gradient(135deg,#c62c68 0%,#ef5f97 100%)!important;
  box-shadow:0 6px 18px rgba(160,32,84,.16)!important;
}

html body .rr-chat-avatar{color:#c62c68!important;}

/* رقاقة اقتراح واضحة ومتباينة بدل النص الباهت. */
html body .rr-chat-action-chip{
  border-color:#eebbd2!important;
  background:#fff!important;
  color:#a72862!important;
  font-size:11.5px!important;
  transition:background .2s ease,border-color .2s ease,color .2s ease!important;
}
html body .rr-chat-action-chip:hover,
html body .rr-chat-action-chip:focus-visible{
  background:#c62c68!important;
  border-color:#c62c68!important;
  color:#fff!important;
}

/* شريط تمرير أنيق داخل المحادثة. */
html body .rr-chat-messages::-webkit-scrollbar,
html body .rr-chat-products::-webkit-scrollbar{width:7px;height:7px;}
html body .rr-chat-messages::-webkit-scrollbar-thumb,
html body .rr-chat-products::-webkit-scrollbar-thumb{background:#f0bed4;border-radius:999px;}
html body .rr-chat-messages::-webkit-scrollbar-track,
html body .rr-chat-products::-webkit-scrollbar-track{background:transparent;}

/* رقاقة «هل تقصدين» للمرادفات المقترحة. */
html body .rr-chat-didyoumean{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  align-self:flex-start;
  max-width:94%;
  color:#8a5a70;
  font-size:11px;
  font-weight:700;
}
html body .rr-chat-didyoumean b{color:#a72862;}

/* ============================================================
   6) كارت المنتج: صورة الموديل تظهر عند الوقوف على الصورة نفسها فقط،
   وليس عند الوقوف على إطار الكارت الذي يحوي السعر والألوان وزر الشراء.
   ============================================================ */

/* أولًا: تعطيل التبديل المرتبط بالكارت كله. */
html body .shop-product-card:hover .shop-card-img-main,
html body.biagiotti-style .shop-product-card:hover .shop-card-img-main{
  opacity:1!important;
  transform:scale(1)!important;
}
html body .shop-product-card:hover .shop-card-img-hover,
html body.biagiotti-style .shop-product-card:hover .shop-card-img-hover{
  opacity:0!important;
  transform:scale(1)!important;
}

/* ثانيًا: تفعيل التبديل عند الوقوف على منطقة الصورة وحدها. */
html body .shop-product-card .shop-card-media:hover .shop-card-img-main,
html body.biagiotti-style .shop-product-card .shop-card-media:hover .shop-card-img-main{
  opacity:0!important;
  transform:scale(1.025)!important;
}
html body .shop-product-card .shop-card-media:hover .shop-card-img-hover,
html body.biagiotti-style .shop-product-card .shop-card-media:hover .shop-card-img-hover{
  opacity:1!important;
  transform:scale(1.025)!important;
}

/* ثالثًا: بعد اختيار درجة لون تبقى صورة اللون ظاهرة ولا يعلوها الموديل. */
html body.biagiotti-style .shop-product-card.is-color-selected .shop-card-media:hover .shop-card-img-main{
  opacity:1!important;
  transform:scale(1)!important;
}
html body.biagiotti-style .shop-product-card.is-color-selected .shop-card-media:hover .shop-card-img-hover{
  opacity:0!important;
  transform:scale(1)!important;
}

/* صورة الموديل المصغّرة تتبع نفس القاعدة لو كانت مفعّلة في أي طبقة. */
html body .shop-product-card:hover .shop-model-peek{opacity:0!important;transform:translateY(8px)!important;}
html body .shop-product-card .shop-card-media:hover .shop-model-peek{opacity:1!important;transform:none!important;}

/* على الأجهزة التي تعمل باللمس لا يوجد hover حقيقي، فتبقى الصورة الأساسية. */
@media(hover:none){
  html body .shop-product-card .shop-card-media:hover .shop-card-img-main,
  html body.biagiotti-style .shop-product-card .shop-card-media:hover .shop-card-img-main{opacity:1!important;transform:scale(1)!important;}
  html body .shop-product-card .shop-card-media:hover .shop-card-img-hover,
  html body.biagiotti-style .shop-product-card .shop-card-media:hover .shop-card-img-hover{opacity:0!important;}
}

/* ============================================================
   7) عناصر الزينة يجب ألا تتسبب في تمدد أفقي.
   ============================================================ */
html body .site-footer,
html body .site-footer.rr-premium-footer{overflow:hidden!important;}
html body .rr-sec-swatches{overflow:hidden!important;}

/* ============================================================
   8) الموبايل: إبقاء زر الشات وزر الأعلى فوق الشريط السفلي وبدون تداخل.
   ============================================================ */
@media(max-width:768px){
  html body .rr-chatbot .rr-chat-toggle{
    width:54px!important;
    min-width:54px!important;
    height:54px!important;
    min-height:54px!important;
  }
  html body .rr-chat-toggle-icon,
  html body .rr-chat-toggle-close{width:25px!important;height:25px!important;}
  html body .rr-chat-toggle-icon svg{width:25px!important;height:25px!important;}
  html body .rr-chat-products{min-height:348px!important;}
  html body .rr-chat-product{min-height:348px!important;}
}

/* ============================================================
   وضع خدمة العملاء داخل نافذة الشات عند العميلة (يُحمَّل في صفحات المتجر).
   ============================================================ */
.rr-chat-support-bar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:9px 14px;
  background:linear-gradient(135deg,#1f8a53,#2fae6c);color:#fff;
  font-size:12px;font-weight:800;
}
.rr-chat-support-end{
  margin-inline-start:auto;
  padding:5px 11px;border:1px solid rgba(255,255,255,.55);border-radius:999px;
  background:rgba(255,255,255,.16);color:#fff;
  font:inherit;font-size:11px;font-weight:800;cursor:pointer;
}
.rr-chat-support-end:hover{background:rgba(255,255,255,.3)}

.rr-chat-messages .rr-chat-agent{
  border-color:#bfe6d1!important;
  background:#f2fbf6!important;
}
.rr-chat-messages .rr-chat-agent small{
  display:block;margin-top:4px;color:#1f8a53;font-size:10px;font-weight:800;
}
.rr-chat-messages .rr-chat-system{
  align-self:center!important;max-width:100%!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  color:#8a7480!important;font-size:11px!important;font-weight:700;text-align:center;
}

.rr-chat-rate{
  display:grid;gap:9px;width:100%;padding:14px;
  border:1px solid #f0d4e1;border-radius:18px;background:#fff;
  box-shadow:0 12px 30px rgba(74,26,48,.07);
}
.rr-chat-rate b{font-size:12.5px;color:#52303f}
.rr-chat-rate-stars{display:flex;gap:6px;justify-content:center}
.rr-chat-rate-star{
  width:40px;height:40px;border:0;border-radius:50%;
  background:#f6eef2;color:#d9c4ce;font-size:22px;line-height:1;cursor:pointer;
  transition:color .15s ease,background .15s ease,transform .15s ease;
}
.rr-chat-rate-star.on{color:#e8a92a;background:#fdf4e3;transform:scale(1.06)}
.rr-chat-rate-note{
  width:100%;padding:9px 11px;border:1px solid #eed5e0;border-radius:12px;
  font:inherit;font-size:12px;resize:vertical;outline:none;
}
.rr-chat-rate-note:focus{border-color:#e85b95;box-shadow:0 0 0 3px rgba(232,91,149,.1)}
.rr-chat-rate-actions{display:flex;gap:8px}
.rr-chat-rate-send,.rr-chat-rate-skip{
  flex:1;min-height:38px;border:0;border-radius:11px;
  font:inherit;font-size:12px;font-weight:800;cursor:pointer;
}
.rr-chat-rate-send{background:linear-gradient(135deg,#c62c68,#e0518a);color:#fff}
.rr-chat-rate-send:disabled{opacity:.6;cursor:wait}
.rr-chat-rate-skip{background:#fff;color:#9b7386;border:1px solid #eed5e0}

/* ============================================================
   V10.45 — كود تحقق التسليم وخدمة ما بعد البيع بعد الاستلام.
   ============================================================ */
.rr-delivery-code{
  display:grid;gap:6px;justify-items:center;text-align:center;
  margin:18px auto;padding:20px 18px;max-width:520px;
  border:1px dashed #e2a8c2;border-radius:20px;
  background:linear-gradient(160deg,#fff7fb,#fff);
  box-shadow:0 14px 36px rgba(120,30,70,.07);
}
.rr-delivery-code>span{font-size:12px;font-weight:800;color:#a3436e;letter-spacing:.04em}
.rr-delivery-code>b{
  font-size:40px;font-weight:900;letter-spacing:.34em;color:#c62c68;
  line-height:1.2;padding-inline-start:.34em;
}
.rr-delivery-code>p{margin:0;max-width:400px;color:#7d6672;font-size:12.5px;line-height:1.7}
.rr-delivery-code>small{color:#8a7480;font-size:11.5px;font-weight:700}

.order-returns-status{max-width:820px;margin:18px auto;display:grid;gap:8px}
.order-returns-status h2{font-size:16px;margin:0 0 4px}
.order-returns-status>div{
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;
  padding:10px 14px;border:1px solid #f0dce6;border-radius:14px;background:#fff;
  font-size:12.5px;color:#7d6672;
}
.order-returns-status>div b{color:#2a1a22}

.aftercare-block{
  padding:16px;margin-bottom:14px;
  border:1px solid #f0dce6;border-radius:18px;background:#fff;
}
.aftercare-block h3{margin:0 0 8px;font-size:15px}
.aftercare-block .hint{color:#8a7480;font-size:12.5px;margin:0 0 10px}
.order-rating-form .rating-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.order-rating-form label,.return-form label{display:block;margin-bottom:10px;font-size:12.5px;font-weight:700;color:#5d4552}
.order-rating-form select,.order-rating-form textarea,.return-form textarea,.return-form input{
  width:100%;margin-top:5px;padding:9px 11px;
  border:1px solid #eed5e0;border-radius:12px;background:#fff;
  font:inherit;font-size:13.5px;outline:none;
}
.order-rating-form textarea,.return-form textarea{min-height:64px;resize:vertical}
.order-rating-form select:focus,.order-rating-form textarea:focus,.return-form textarea:focus,.return-form input:focus{
  border-color:#e85b95;box-shadow:0 0 0 3px rgba(232,91,149,.1);
}
.return-form .return-line{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:8px 0;border-bottom:1px solid #f6e8ee;margin-bottom:0;
}
.return-form .return-line span{flex:1;font-weight:600}
.return-form .return-line input{width:80px;margin-top:0;text-align:center}

@media(max-width:560px){
  .order-rating-form .rating-row{grid-template-columns:1fr}
  .rr-delivery-code>b{font-size:34px}
}

/* ============================================================
   V10.46 — زر مشاركة المنتج داخل صفحة المنتج.
   ============================================================ */
.rr-share-block{display:grid;gap:8px;margin-top:14px}
.rr-share-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 18px;border:1px solid #eec4d6;border-radius:999px;
  background:#fff;color:#a72862;cursor:pointer;
  font:inherit;font-size:13px;font-weight:800;
  transition:background .2s ease,border-color .2s ease,color .2s ease;
}
.rr-share-btn:hover{background:#c62c68;border-color:#c62c68;color:#fff}
.rr-share-btn:disabled{opacity:.6;cursor:wait}
.rr-share-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.rr-share-url{
  width:100%;padding:9px 12px;border:1px solid #eed5e0;border-radius:12px;
  background:#fff7fb;font:inherit;font-size:12px;color:#7d6672;
}
.rr-share-note{color:#8a7480;font-size:11.5px;line-height:1.6}

/* ============================================================
   V10.48 — سؤال حل المشكلة قبل الإنهاء + تنبيه الخمول.
   ============================================================ */
.rr-chat-resolve{
  display:grid;gap:10px;width:100%;padding:14px;
  border:1px solid #cfe7da;border-radius:18px;
  background:linear-gradient(160deg,#f4fbf7,#fff);
  box-shadow:0 12px 30px rgba(31,138,83,.08);
}
.rr-chat-resolve b{font-size:13px;color:#1f6f47;line-height:1.6}
.rr-chat-resolve-actions{display:flex;gap:8px;flex-wrap:wrap}
.rr-chat-resolve-yes,.rr-chat-resolve-no{
  flex:1;min-width:120px;min-height:40px;
  border:0;border-radius:12px;cursor:pointer;
  font:inherit;font-size:12.5px;font-weight:800;
}
.rr-chat-resolve-yes{background:linear-gradient(135deg,#1f8a53,#38b06f);color:#fff}
.rr-chat-resolve-no{background:#fff;color:#b3253f;border:1px solid #f0c9d2}
.rr-chat-resolve-yes:disabled,.rr-chat-resolve-no:disabled{opacity:.55;cursor:wait}

.rr-chat-idle-bar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:9px 14px;
  background:linear-gradient(135deg,#a86a12,#d19a3c);color:#fff;
  font-size:11.5px;font-weight:800;
}
.rr-chat-idle-text{flex:1;min-width:150px;line-height:1.5}
.rr-chat-idle-stay{
  padding:5px 12px;border:1px solid rgba(255,255,255,.6);border-radius:999px;
  background:rgba(255,255,255,.18);color:#fff;
  font:inherit;font-size:11px;font-weight:800;cursor:pointer;
}
.rr-chat-idle-stay:hover{background:rgba(255,255,255,.32)}

/* ============================================================
   V10.49 — كود الاستلام داخل قائمة «طلباتي» في حساب العميلة.
   ============================================================ */
.account-order-code{
  display:inline-flex;align-items:center;gap:7px;
  padding:5px 12px;border-radius:999px;
  border:1px dashed #e2a8c2;background:#fff7fb;
  white-space:nowrap;
}
.account-order-code small{
  color:#a3436e;font-size:10px;font-weight:800;letter-spacing:.02em;
}
.account-order-code b{
  color:#c62c68;font-size:16px;font-weight:900;letter-spacing:.22em;
  line-height:1;padding-inline-start:.22em;
}
@media(max-width:640px){
  .account-order-code{padding:4px 10px}
  .account-order-code b{font-size:15px}
}
