/* R9 — شريط الشراء الثابت في صفحة المنتج (الجوال ≤768px)
   يتولّى pdp-sticky.js إظهاره وإخفاءه (فئة r9ps--on)؛ هذه القواعد تعلو قواعد Woodmart وr9-design القديمة
   (html.r9-sticky-on / wd-sticky-btn-shown) فلا يتنافس على الشريط إلا مصدر واحد. */
@media (max-width:768px){
	html body.single-product .wd-sticky-btn.r9ps{
		--r9ps-pad:10px;
		position:fixed!important;inset:auto 0 0 0!important;top:auto!important;bottom:0!important;z-index:340;
		display:block!important;height:auto!important;overflow:visible!important;margin:0!important;
		padding:var(--r9ps-pad) 0 calc(var(--r9ps-pad) + env(safe-area-inset-bottom,0px))!important;
		background:#fff!important;border:0!important;border-top:1px solid var(--r9-line,#e3e5e8)!important;border-radius:0!important;
		box-shadow:0 -10px 24px -14px rgba(22,24,29,.28)!important;
		transform:translate3d(0,calc(100% + 28px),0)!important;visibility:hidden!important;opacity:1!important;pointer-events:none!important;
		transition:transform .18s cubic-bezier(.4,0,1,1),visibility 0s linear .18s!important;
		will-change:transform;contain:layout style;backface-visibility:hidden
	}
	/* امتداد الخلفية أسفل الشريط: يغطي فجوة شريط Safari المتحرك وارتداد التمرير فلا يظهر محتوى الصفحة تحته */
	html body.single-product .wd-sticky-btn.r9ps::after{content:"";position:absolute;inset-inline:0;top:100%;height:140px;background:#fff;pointer-events:none}
	html body.single-product .wd-sticky-btn.r9ps.r9ps--on{
		transform:translate3d(0,0,0)!important;visibility:visible!important;pointer-events:auto!important;
		transition:transform .24s cubic-bezier(.2,.8,.2,1),visibility 0s linear 0s!important
	}
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-container{
		display:flex!important;align-items:center;gap:14px;max-width:none!important;width:auto!important;margin:0!important;
		padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))!important;box-sizing:border-box
	}
	/* الصورة المصغّرة: سياق بصري صغير بلا ازدحام */
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-content{display:flex!important;flex:none;margin:0!important;padding:0!important}
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-info{display:none!important}
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-thumbnail{display:block;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--r9-img-bg,#f5f6f7);border:1px solid var(--r9-line-2,#eceef1);box-sizing:border-box}
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-thumbnail img{width:100%!important;height:100%!important;min-width:0!important;max-width:none!important;max-height:none!important;object-fit:contain;border-radius:0!important;display:block}
	/* السعر: سطران يبدآن من اليمين — (1) الحالي بارز + القديم مشطوب، (2) «شامل الضريبة» + نسبة الخصم */
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-cart{display:flex!important;flex:1 1 auto;align-items:center;gap:14px;min-width:0;margin:0!important;width:auto!important}
	html body.single-product .wd-sticky-btn.r9ps .price{
		display:grid!important;grid-template-columns:auto auto;justify-content:start;align-items:baseline;column-gap:8px;row-gap:3px;
		flex:none;max-width:none!important;margin:0!important;padding:0!important;text-align:start!important;white-space:nowrap;line-height:1.1;font-size:inherit!important;color:var(--r9-ink,#16181d)!important;font-variant-numeric:tabular-nums
	}
	html body.single-product .wd-sticky-btn.r9ps .price>ins,html body.single-product .wd-sticky-btn.r9ps .price>.amount{grid-row:1;grid-column:1;display:block;text-decoration:none;font-size:19px!important;font-weight:800;letter-spacing:-.2px;color:var(--r9-ink,#16181d)!important;flex-basis:auto!important}
	html body.single-product .wd-sticky-btn.r9ps .price .woocommerce-Price-currencySymbol{font-size:.72em!important;font-weight:700;margin-inline-start:1px}
	html body.single-product .wd-sticky-btn.r9ps .price>del{grid-row:1;grid-column:2;display:block;font-size:13px!important;font-weight:400;color:var(--r9-muted,#646973)!important;opacity:1;text-decoration-thickness:1px}
	html body.single-product .wd-sticky-btn.r9ps .price del .woocommerce-Price-currencySymbol{display:inline!important;font-size:1em!important;font-weight:400}
	html body.single-product .wd-sticky-btn.r9ps .price>.woocommerce-price-suffix{grid-row:2;grid-column:1;display:block!important;font-size:13px!important;font-weight:400;color:var(--r9-muted,#646973)!important;margin:0!important}
	html body.single-product .wd-sticky-btn.r9ps .r9ps-pill{grid-row:2;grid-column:2;justify-self:start;display:block;font-size:13px;font-weight:700;color:var(--r9-red,#c8102e);line-height:1.1}
	/* المنتج المتغيّر قبل الاختيار: «من 1,992 ر.س» — كلمة «من» جزء من الحقيقة ولا تُحذف */
	html body.single-product .wd-sticky-btn.r9ps .price:has(>.r9-from){display:flex!important;flex-wrap:wrap;align-items:baseline;column-gap:4px;row-gap:3px;max-width:160px}
	html body.single-product .wd-sticky-btn.r9ps .price>.r9-from{display:inline;font-size:13px;font-weight:600;color:var(--r9-muted,#646973)}
	html body.single-product .wd-sticky-btn.r9ps .price:has(>.r9-from)>.woocommerce-price-suffix{flex-basis:100%}
	/* المنتج المتغيّر بعد الاختيار: الخيار المختار ظاهر في الشريط (مثل: يمين و يسار) حتى لا يُطلب جانب خاطئ */
	html body.single-product .wd-sticky-btn.r9ps .r9ps-opt{grid-row:2;grid-column:2;justify-self:start;max-width:110px;overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:700;color:var(--r9-ink,#16181d);line-height:1.1}
	html body.single-product .wd-sticky-btn.r9ps .price:has(.r9ps-opt) .r9ps-pill{display:none}
	html body.single-product .wd-sticky-btn.r9ps .r9ps-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
	/* زر الإضافة: بارز وبحالات واضحة */
	html body.single-product .wd-sticky-btn.r9ps form.cart{display:flex!important;flex:1 1 auto;min-width:0;margin:0!important;width:auto!important}
	html body.single-product .wd-sticky-btn.r9ps :is(.quantity,.wd-buy-now-btn,.wd-wishlist-btn,.wd-compare-btn,p.stock,.tabbyPromo,.r9g-bnpl,tamara-widget,.r9-pay){display:none!important}
	html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart){
		position:relative;flex:1 1 auto;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;
		width:100%;min-width:0;min-height:48px!important;height:48px!important;margin:0!important;padding:0 14px!important;
		border:0!important;border-radius:var(--r9-r-btn,10px)!important;background:var(--r9-red,#c8102e)!important;color:#fff!important;
		font-size:15px!important;font-weight:700!important;line-height:1!important;white-space:nowrap;text-transform:none;box-shadow:none!important;
		transition:background-color .15s ease,transform .1s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation
	}
	html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart)::before{
		content:""!important;position:static!important;inset:auto!important;opacity:1!important;transform:none;flex:none;width:20px;height:20px;margin:0!important;background:currentColor;
		-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a1.5 1.5 0 0 0 1.5 1.1h8.9a1.5 1.5 0 0 0 1.5-1.1L21 7H6.2'/%3E%3C/svg%3E") center/contain no-repeat;
		mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a1.5 1.5 0 0 0 1.5 1.1h8.9a1.5 1.5 0 0 0 1.5-1.1L21 7H6.2'/%3E%3C/svg%3E") center/contain no-repeat
	}
	html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart):active{transform:scale(.98);background:var(--r9-red-700,#a00d25)!important}
	html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart):focus-visible{outline:none!important;box-shadow:0 0 0 3px #fff,0 0 0 5px var(--r9-ink,#16181d)!important}
	/* جارٍ الإضافة: دوّار بدل الأيقونة، والنص باقٍ */
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.loading{opacity:1!important;pointer-events:none;color:#fff!important}
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.loading::before{-webkit-mask:none;mask:none;background:none;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;width:16px;height:16px;box-sizing:border-box;animation:r9ps-spin .7s linear infinite}
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.loading::after{display:none!important}
	/* أُضيف: أخضر مع علامة صح */
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.r9ps-added{background:var(--r9-green,#1e7e34)!important}
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.r9ps-added::before{
		-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
		mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
	}
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.added::after{display:none!important}
	/* المنتج المتغيّر: الزر يقود إلى الخيارات */
	html body.single-product .wd-sticky-btn.r9ps .wd-sticky-add-to-cart.r9ps-choose::before{
		-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E");
		mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h4M12 17h8'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='10' cy='17' r='2'/%3E%3C/svg%3E")
	}
	/* مساحة ثابتة أسفل الصفحة بارتفاع الشريط (لا تتغيّر عند الظهور → بلا إزاحة) */
	body.single-product.r9ps-page{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
	/* لوحة المفاتيح مفتوحة (iOS يرفع العناصر الثابتة فوقها): نخفي الشريط */
	html.r9ps-kb body.single-product .wd-sticky-btn.r9ps.r9ps--on{transform:translate3d(0,calc(100% + 28px),0)!important;visibility:hidden!important;pointer-events:none!important}
	/* إبراز خيارات المنتج المتغيّر بعد النقر */
	.r9ps-flash{border-radius:12px;animation:r9ps-flash 1.6s ease-out 1}
	@media (max-width:599px){html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-content{display:none!important}}
	/* شاشات ضيّقة جدًا (≤349px): الزر بلا أيقونة، والسعر القديم ينزل للسطر الثاني بدل نسبة الخصم */
	@media (max-width:349px){
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-container{gap:10px;padding-inline:12px!important}
		html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart):not(.loading)::before{display:none}
		html body.single-product .wd-sticky-btn.r9ps .price>del{grid-row:2;grid-column:2}
		html body.single-product .wd-sticky-btn.r9ps .r9ps-pill{display:none}
		html body.single-product .wd-sticky-btn.r9ps .price>ins,html body.single-product .wd-sticky-btn.r9ps .price>.amount{font-size:18px!important}
	}
	/* الجهاز اللوحي (600–768): اسم المنتج يملأ المساحة، والزر بعرض مريح لا يمتد على الشاشة كلها */
	@media (min-width:600px){
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-container{max-width:736px!important;margin-inline:auto!important;gap:16px}
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-content{flex:1 1 auto;min-width:0;gap:12px;align-items:center}
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-info{display:block!important;min-width:0}
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-info .wd-entities-title{margin:0!important;font-size:14px!important;font-weight:600;line-height:1.35;color:var(--r9-ink,#16181d);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-align:start;font-size:15px!important}
		html body.single-product .wd-sticky-btn.r9ps .wd-sticky-btn-cart{flex:none;gap:16px}
		html body.single-product .wd-sticky-btn.r9ps form.cart,html body.single-product .wd-sticky-btn.r9ps .wd-sticky-add-to-cart{flex:none;width:260px!important}
	}
}
@keyframes r9ps-spin{to{transform:rotate(360deg)}}
@keyframes r9ps-flash{0%,35%{box-shadow:0 0 0 2px rgba(200,16,46,.55),0 0 0 8px rgba(200,16,46,.10)}100%{box-shadow:0 0 0 2px rgba(200,16,46,0),0 0 0 8px rgba(200,16,46,0)}}
.r9ps-hint{display:flex;align-items:center;gap:6px;margin:8px 0 0;font-size:14px;font-weight:600;color:var(--r9-red-700,#a00d25)}
.r9ps-hint::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
@media (prefers-reduced-motion:reduce){
	html body.single-product .wd-sticky-btn.r9ps,html body.single-product .wd-sticky-btn.r9ps.r9ps--on{transition:none!important}
	html body.single-product .wd-sticky-btn.r9ps :is(.single_add_to_cart_button,.wd-sticky-add-to-cart){transition:none}
	html body.single-product .wd-sticky-btn.r9ps .single_add_to_cart_button.loading::before{animation-duration:1.6s}
	.r9ps-flash{animation:none;box-shadow:0 0 0 2px rgba(200,16,46,.55)}
}
/* سطح المكتب والجهاز اللوحي الأفقي (>768px): يبقى شريط Woodmart كما كان؛ إضافات الجوال لا تظهر فيه */
@media (min-width:769px){.wd-sticky-btn .r9ps-pill,.wd-sticky-btn .r9ps-opt{display:none!important}}
