/* ==========================================================================
   CrezyKey Store — Master Stylesheet v5.3 (Header alignment)
   v5.3: محاذاة القائمة الرئيسية مع الشعار في الهيدر المثبت.
   v5.2: شعار المتجر في الفوتر.
   v5.1: فوتر من 4 أعمدة مرتبة بدون تكرار.
   v5.0: أُضيف القسم 18 لفوتر احترافي بنفس هوية الشريط العلوي.
   v4.9: أزيل إخفاء شريط الشراء المثبت حتى تعمل ميزة تثبيت زر الشراء على الجوال،
         وأُضيف القسم 17 لترتيب صفحة المنتج وإخفاء زر Apple Pay المكرر.
   متوافق بالكامل مع crezykey-custom-v5.7.js
   ========================================================================== */

/* ==========================================================================
   1. المتغيرات والخطوط والتهيئة العامة (Global Setup & Variables)
   ========================================================================== */
:root {
  --color-primary:   #1e3a8a;
  --color-secondary: #f97316;
  --color-accent:    #e4f18f;
  --ck-primary:      #3b82f6;
  --ck-primary-hover:#2563eb;
  --ck-primary-glow: rgba(59, 130, 246, 0.25);
  --shadow-light:    0 0 12px rgba(66, 66, 66, 0.24);
  --border-radius:   20px;
  --ck-radius:       14px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f8fafc;
  color: #0f172a;
}



/* ==========================================================================
   3. إخفاء شريط الحث على الشراء (ليش تنتظر؟ اطلبه الان)
   ========================================================================== */
.product-incentive,
.s-product-incentive,
.product-cta-banner,
.s-cta-banner,
.cta-box,
[class*="incentive"],
[class*="cta-banner"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* ==========================================================================
   4. بطاقات المنتجات الأصلية وزر إضافة للسلة
   ========================================================================== */
.s-product-card-entry, .product-entry {
  border-radius: var(--border-radius) !important;
  overflow: hidden !important; background: #fff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.10) !important;
  transition: transform .25s ease, box-shadow .25s ease !important;
  position: relative !important;
}
.s-product-card-entry:hover, .product-entry:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.16) !important;
}
.s-product-card-entry img, .product-entry img {
  width: 100% !important; height: auto !important;
  object-fit: contain !important; border-radius: 0 !important;
  transition: transform .3s ease !important;
}
.s-product-card-entry:hover img, .product-entry:hover img { transform: scale(1.03); }
.s-product-card-content { padding: 12px !important; }
.s-product-card-content-title, .s-product-card-content-title a {
  min-height: 44px !important; color: var(--color-primary) !important;
  font-size: 14px !important; font-weight: 700 !important;
  line-height: 1.55 !important; text-decoration: none !important;
  display: block !important; transition: color .3s ease !important;
}
.s-product-card-content-title a:hover { color: var(--color-secondary) !important; }
.s-product-card-content-subtitle { display: none !important; }
.s-product-card-price,
.s-product-card-content .total-price,
.s-product-card-content .price-wrapper {
  color: #111827 !important; font-size: 15px !important;
  font-weight: 800 !important; margin-top: 8px !important;
}

/* زر إضافة للسلة */
.s-product-card-entry button.s-button-element,
.product-entry button.s-button-element,
.s-product-card-entry .s-button-element,
.product-entry .s-button-element,
button.undefined.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center {
  position: static !important; width: 100% !important;
  margin-top: 10px !important; padding: 10px 14px !important;
  min-height: 40px !important;
  background: linear-gradient(135deg,rgba(249,115,22,.18),rgba(249,115,22,0) 38%),linear-gradient(135deg,#172554 0%,#1e3a8a 100%) !important;
  color: #fff !important; border: 1px solid rgba(249,115,22,.35) !important;
  border-radius: 16px !important; font-size: 14px !important;
  font-weight: 700 !important; box-shadow: 0 6px 16px rgba(30,58,138,.25) !important;
  transition: all .25s ease !important;
}
.s-product-card-entry .s-button-text, .product-entry .s-button-text,
.s-product-card-entry .s-button-icon, .product-entry .s-button-icon,
.s-product-card-entry svg, .product-entry svg {
  color: #fff !important; fill: #fff !important; font-weight: 700 !important;
}
.s-product-card-entry button.s-button-element:hover,
.product-entry button.s-button-element:hover,
.s-product-card-entry .s-button-element:hover,
.product-entry .s-button-element:hover {
  background: linear-gradient(135deg,rgba(249,115,22,.28),rgba(249,115,22,0) 40%),linear-gradient(135deg,#1e3a8a 0%,#0f172a 100%) !important;
  color: #fff !important; transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30,58,138,.30) !important;
}

.s-product-card-promotion-title, .promotion-title {
  background-color: #c2410c !important; /* v4.7: برتقالي أغمق — تباين 5.2:1 مع الأبيض بدل 2.8:1 */ color: #fff !important;
  padding: 5px 10px !important; border-radius: 999px !important;
  font-weight: 700 !important; font-size: .75rem !important;
}

/* ==========================================================================
   5. البنرات ثنائية اللغة المتوافقة مع العربية والإنجليزية
   ========================================================================== */
.ck-bilingual-banner-wrapper, .ck-bilingual-banner-wrapper * { 
  box-sizing: border-box; 
}
.ck-bilingual-banner-wrapper { 
  width: 100%; 
  max-width: 1240px; 
  margin: 24px auto; 
  padding: 0 16px; 
}
.ck-banner-en { display: none !important; }
.ck-banner-ar { display: block !important; }

html[lang="en"] .ck-banner-ar, 
html[dir="ltr"] .ck-banner-ar, 
body.ltr .ck-banner-ar { 
  display: none !important; 
}

html[lang="en"] .ck-banner-en, 
html[dir="ltr"] .ck-banner-en, 
body.ltr .ck-banner-en { 
  display: block !important; 
}

.ck-banner-link { 
  display: block; 
  position: relative; 
  width: 100%; 
  border-radius: 20px; 
  overflow: hidden; 
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(59, 130, 246, 0.12); 
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  text-decoration: none; 
  background: #0b1120; 
  border: 1px solid rgba(59, 130, 246, 0.18); 
}
.ck-banner-link:hover { 
  transform: translateY(-4px); 
  border-color: rgba(59, 130, 246, 0.5); 
  box-shadow: 0 18px 40px -8px rgba(59, 130, 246, 0.25); 
}
.ck-banner-img { 
  width: 100%; 
  height: auto; 
  display: block; 
  object-fit: cover; 
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
}
.ck-banner-link:hover .ck-banner-img { 
  transform: scale(1.02); 
}
.ck-banner-shine { 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 50%; 
  height: 100%; 
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0) 100%); 
  transform: skewX(-25deg); 
  pointer-events: none; 
  transition: all 0.75s ease; 
}
.ck-banner-link:hover .ck-banner-shine { 
  left: 150%; 
}

/* ==========================================================================
   6. الصفحات التعريفية وسياسات المتجر ثنائية اللغة (Bilingual Policy Pages)
   ========================================================================== */
.ck-bilingual-policy, .ck-bilingual-policy * {
  box-sizing: border-box;
}
.ck-bilingual-policy {
  width: 100%;
  max-width: 950px;
  margin: 20px auto 40px;
  padding: 0 16px;
}
.ck-bilingual-policy .ck-policy-en { display: none !important; }
.ck-bilingual-policy .ck-policy-ar { display: block !important; }

html[lang="en"] .ck-bilingual-policy .ck-policy-ar,
html[dir="ltr"] .ck-bilingual-policy .ck-policy-ar,
body.ltr .ck-bilingual-policy .ck-policy-ar {
  display: none !important;
}

html[lang="en"] .ck-bilingual-policy .ck-policy-en,
html[dir="ltr"] .ck-bilingual-policy .ck-policy-en,
body.ltr .ck-bilingual-policy .ck-policy-en {
  display: block !important;
}

/* ==========================================================================
   7. الجداول وتنسيق المقارنات (Salla Tables)
   ========================================================================== */
.salla-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 24px 0 !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
  background: #ffffff !important;
}

.salla-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.salla-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

.salla-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.salla-table {
  width: 100% !important;
  min-width: 480px !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  text-align: right !important;
  direction: rtl !important;
}

html[lang="en"] .salla-table,
html[dir="ltr"] .salla-table {
  direction: ltr !important;
  text-align: left !important;
}

.salla-table thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  padding: 14px 18px !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  border: none !important;
  white-space: nowrap !important;
}

.salla-table thead th:first-child {
  width: 32% !important;
}

.salla-table tbody tr {
  border-bottom: 1px solid #f1f5f9 !important;
  transition: background-color 0.15s ease !important;
}

.salla-table tbody tr:last-child {
  border-bottom: none !important;
}

.salla-table tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

.salla-table tbody tr:hover {
  background-color: #eff6ff !important;
}

.salla-table tbody td {
  padding: 13px 18px !important;
  color: #1e293b !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  vertical-align: middle !important;
  border: none !important;
}

.salla-table tbody td:first-child {
  font-weight: 700 !important;
  color: #0f172a !important;
  background-color: rgba(241, 245, 249, 0.5) !important;
}

.salla-table .yes,
.salla-table .no {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.salla-table .yes {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}

.salla-table .no {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

/* ==========================================================================
   8. الأسئلة الشائعة (Salla FAQ Accordion) - يعمل 100% بدون أي تعليق
   ========================================================================== */
.salla-faq {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin: 24px 0 !important;
  width: 100% !important;
}

.salla-faq-item {
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.salla-faq-item:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.1) !important;
}

.salla-faq-item[open] {
  border-color: #2563eb !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12) !important;
}

.salla-faq-question {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 16px 20px !important;
  background: #f8fafc !important;
  color: #1e293b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
  outline: none !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

.salla-faq-question::-webkit-details-marker,
.salla-faq-question::marker {
  display: none !important;
}

.salla-faq-question:hover {
  color: #2563eb !important;
  background: #f1f5f9 !important;
}

.salla-faq-item[open] .salla-faq-question {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-bottom: 1px solid #dbeafe !important;
}

.salla-faq-toggle-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-inline-start: 12px;
}

.salla-faq-toggle-icon::before,
.salla-faq-toggle-icon::after {
  content: '';
  position: absolute;
  background-color: #3b82f6;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.salla-faq-toggle-icon::before {
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
}

.salla-faq-toggle-icon::after {
  top: 0;
  left: 7px;
  width: 2px;
  height: 16px;
}

.salla-faq-item[open] .salla-faq-toggle-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.salla-faq-answer {
  padding: 16px 20px !important;
  font-size: 14.5px !important;
  line-height: 1.8 !important;
  color: #334155 !important;
  background: #ffffff !important;
}

.salla-faq-answer p {
  margin: 0 !important;
  color: inherit !important;
  line-height: inherit !important;
}

/* ==========================================================================
   9. صندوق التنبيه المهم [SALLA_WARNING]
   ========================================================================== */
.salla-warning {
  margin: 22px 0; border-radius: 16px; overflow: hidden;
  border: 1px solid #f0c96b; box-shadow: 0 10px 26px rgba(239,159,39,.14);
  background: #fffaf0;
}
.salla-warning-title {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: linear-gradient(135deg, #fef3d9 0%, #fbe4ad 100%);
  border-bottom: 1px solid #f0c96b; font-size: 15px; font-weight: 700; color: #7a4a06;
}
.salla-warning-icon-badge {
  width: 30px; height: 30px; min-width: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #f4b03f, #ef9f27); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(239,159,39,.35);
}
.salla-warning-icon-badge svg { width: 16px; height: 16px; }
.salla-warning-body { padding: 16px 18px; }
.salla-warning-body p {
  position: relative; font-size: 13.5px; line-height: 1.85; color: #5c4013;
  margin: 0 0 12px; padding-inline-start: 16px;
}
.salla-warning-body p:last-child { margin-bottom: 0; }
.salla-warning-body p::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: #ef9f27;
}

/* ==========================================================================
   10. مميزات المنتج وزر استفسار واتساب (Product Page Features)
   ========================================================================== */
.custom-features-wrapper { margin-top: 20px; }
.custom-features-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.feature-box {
  background: #fff; border: 1px solid #e7e7e7; border-radius: 16px;
  min-height: 50px; padding: 10px 15px; display: flex; align-items: center;
  gap: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: all .2s ease;
}
.feature-box:hover { transform: translateY(-1px); border-color: #2fd35e; box-shadow: 0 4px 12px rgba(47,211,94,.15); }
.feature-box span { font-size: 14px; font-weight: 600; color: #222; line-height: 1.4; flex: 1; }
.feature-icon {
  width: 28px; height: 28px; min-width: 28px; display: flex; align-items: center; justify-content: center;
  color: #34b464; flex-shrink: 0;
}
.feature-box:nth-child(1) .feature-icon { color: #1e3a8a; }
.feature-box:nth-child(2) .feature-icon { color: #f97316; }
.feature-box:nth-child(3) .feature-icon { color: #25D366; }
.feature-box:nth-child(4) .feature-icon { color: #7c3aed; }

html[lang="ar"] .feature-box, [dir="rtl"] .feature-box { flex-direction: row-reverse; }

.ask-product-btn {
  display: block; width: 100%; margin-top: 15px; padding: 10px 20px;
  background: #2fd35e; color: #fff !important; text-align: center;
  text-decoration: none; border-radius: 18px; font-size: 18px;
  font-weight: 700; line-height: 1.4; transition: all .25s ease;
}
.ask-product-btn:hover {
  background: #29c756; color: #fff !important; transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(47,211,94,.25);
}


/* ==========================================================================
   12. رمز الريال التلقائي حسب اللغة (SAR Currency Auto)
   ========================================================================== */
.sicon-sar::before {
  font-family: 'Tajawal', Tahoma, sans-serif !important; /* v4.3: كان Arial ويظهر بخط مختلف عن الموقع */ font-style: normal !important;
  font-weight: 600 !important; font-size: 0.85em !important; line-height: 1 !important;
  display: inline-block !important; width: auto !important; direction: ltr !important;
  unicode-bidi: isolate !important; white-space: nowrap !important;
}
html[lang^="ar"] .sicon-sar::before, html[dir="rtl"] .sicon-sar::before { content: "ر.س" !important; }
html[lang^="en"] .sicon-sar::before, html[dir="ltr"] .sicon-sar::before { content: "SAR" !important; }



/* ==========================================================================
   15. الهيدر والشريط العلوي (Header & Top Bar) — v4.3
   ========================================================================== */
/* الشريط العلوي: داكن بهوية المتجر (نفس لون الفوتر والبنر) */
.store-header .top-navbar {
  background: #0b1120 !important;
  border-bottom: 1px solid rgba(245, 179, 1, 0.18) !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
.store-header .top-navbar .s-menu-topnav-item,
.store-header .top-navbar .s-contacts-topnav-link {
  color: #cbd5e1 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  transition: color 0.2s ease;
}
.store-header .top-navbar .s-menu-topnav-item:hover,
.store-header .top-navbar .s-contacts-topnav-link:hover {
  color: #f5b301 !important;
}
.store-header .top-navbar .s-localization-modal-trigger-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
  height: 34px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: border-color 0.2s ease;
}
.store-header .top-navbar .s-localization-modal-trigger-btn:hover {
  border-color: rgba(245, 179, 1, 0.6) !important;
}
.store-header .top-navbar .header-search {
  max-width: 440px;
}
.store-header .top-navbar .s-search-input {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 999px !important;
  color: #f8fafc !important;
  height: 34px !important;
  font-size: 13.5px !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.store-header .top-navbar .s-search-input::placeholder { color: #94a3b8 !important; }
.store-header .top-navbar .s-search-input:focus {
  border-color: rgba(245, 179, 1, 0.7) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  outline: none !important;
}
.store-header .top-navbar .s-search-icon svg,
.store-header .top-navbar .s-search-icon path { fill: #94a3b8 !important; }

/* الهيدر الرئيسي: أبيض واضح يفصل عن خلفية الصفحة */
.store-header #mainnav,
.store-header #mainnav .inner {
  background-color: #ffffff !important;
}
.store-header #mainnav {
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 6px 24px -12px rgba(15, 23, 42, 0.12) !important;
}

/* روابط القائمة الرئيسية: خط أزرق تحت الرابط عند التمرير (v4.6)
   (بخلفية متدرجة، لأن ::after مستخدم لسهم القوائم المنسدلة) */
.main-menu > li.root-level > a {
  color: #0f172a !important;
  font-weight: 700 !important;
  background-image: linear-gradient(#2563eb, #2563eb) !important;
  background-repeat: no-repeat !important;
  background-position: center bottom 10px !important;
  background-size: 0% 2px !important;
  transition: color 0.2s ease, background-size 0.25s ease;
}
.main-menu > li.root-level:hover > a {
  color: #1e3a8a !important;
  background-size: calc(100% - 24px) 2px !important;
}

/* محاذاة القائمة الرئيسية مع الشعار (v5.3)
   عند تثبيت الهيدر أثناء التمرير كانت القائمة تلتصق بأعلى الهيدر (أعلى من الشعار بـ12px)،
   لأن حاوية القائمة ليست flex والرابط له حشوة سفلية فقط. */
#mainnav custom-main-menu {
  display: flex !important;
  align-items: center;
}
.fixed-header .main-menu > li.root-level > a {
  padding-top: 20px !important;   /* مساوية للحشوة السفلية فيتوسط النص */
}

/* عدّاد السلة بلون الهوية */
.store-header .s-cart-summary-count {
  background: #f5b301 !important;
  color: #0b1120 !important;
  font-weight: 800 !important;
}

@media (prefers-reduced-motion: reduce) {
  .main-menu > li.root-level > a { transition: none; }
}

/* زر اللغة والعملة: أيقونة كرة أرضية + اللغة + فاصل + العملة على خط واحد (v4.4) */
.store-header .s-localization-modal-trigger-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.store-header .s-localization-modal-trigger-btn::before {
  content: '';
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  background-color: #f5b301;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%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='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.store-header .s-localization-modal-trigger-btn > span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  margin: 0 !important;
}
.store-header .s-localization-modal-trigger-btn > span:first-of-type {
  font-weight: 700 !important;
  color: #f8fafc !important;
}
.store-header .s-localization-modal-trigger-separator {
  width: 1px !important;
  height: 14px !important;
  background: rgba(255, 255, 255, 0.28) !important;
  font-size: 0 !important;
  color: #cbd5e1 !important; /* النص مخفي بحجم 0، واللون فقط لاجتياز فحص التباين */
  overflow: hidden !important;
}
.store-header .s-localization-modal-trigger-btn .sicon-sar {
  display: inline-flex !important;
  align-items: center !important;
  font-style: normal !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}
.store-header .s-localization-modal-trigger-btn .sicon-sar::before {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #cbd5e1 !important;
  vertical-align: middle !important;
  letter-spacing: 0.3px;
}

/* القوائم المنسدلة في الهيدر: خلفية بيضاء ونص داكن، والتمرير بالأزرق التقني (v4.6، للكمبيوتر فقط) */
@media (min-width: 1024px) {
  .main-menu .sub-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 2px solid #2563eb !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.22) !important;
    padding: 8px !important;
    overflow: hidden;
  }
  .main-menu .sub-menu ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .main-menu .sub-menu li {
    background: transparent !important;
  }
  .main-menu .sub-menu li > a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px;
    padding: 11px 14px !important;
    border-radius: 10px;
    background: transparent !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  .main-menu .sub-menu li > a::before {
    content: '';
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.45);
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  .main-menu .sub-menu li > a:hover,
  .main-menu .sub-menu li > a:focus-visible {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
  }
  .main-menu .sub-menu li > a:hover::before,
  .main-menu .sub-menu li > a:focus-visible::before {
    background: #2563eb;
    transform: scale(1.3);
  }
}
@media (prefers-reduced-motion: reduce) {
  .main-menu .sub-menu li > a,
  .main-menu .sub-menu li > a::before { transition: none; }
}

/* ==========================================================================
   16. تحسين تباين الألوان (Accessibility Contrast) — v4.7
   كل النصوص التالية كانت أقل من 4.5:1 في فحص Lighthouse
   ========================================================================== */
/* قسم "أقسام وتصنيفات المتجر" */
.ck-brand-categories-section .ck-bcat-all-btn { color: #1d4ed8 !important; }            /* 3.5 → 6.4 */
.ck-brand-categories-section .ck-bcat-all-btn:hover { color: #ffffff !important; background: #1d4ed8 !important; }
.ck-brand-categories-section .ck-bcat-desc { color: #64748b !important; }                /* 2.6 → 4.8 */
.ck-brand-categories-section .ck-bcat-card:hover .ck-bcat-desc { color: #475569 !important; }
.ck-brand-categories-section .ck-bcat-badge { color: #475569 !important; }               /* 4.3 → 6.9 */
/* تقييم المنتج في بطاقات المنتجات */
.s-product-card-entry .s-product-card-rating span { color: #4b5563 !important; }         /* 2.5 → 7.6 */

/* صور العملاء في "آراء العملاء": كانت مضغوطة 80×45 وهي مربعة (v4.8) */
.s-reviews-testimonial__avatar img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* ==========================================================================
   14. التجاوب مع الجوال والتابلت (Mobile Responsive)
   ========================================================================== */
@media (max-width: 1024px) {
  .ck-zone-col { flex: 1 1 45%; }
}

@media (max-width: 768px) {
  .s-product-card-entry, .product-entry { border-radius: 14px !important; }
  .s-product-card-content { padding: 9px !important; }
  .s-product-card-content-title, .s-product-card-content-title a { min-height: 40px !important; font-size: 12.5px !important; line-height: 1.45 !important; }
  .s-product-card-price, .s-product-card-content .total-price, .s-product-card-content .price-wrapper { font-size: 13px !important; }
  .s-product-card-entry button.s-button-element, .product-entry button.s-button-element { min-height: 36px !important; font-size: 12.5px !important; border-radius: 12px !important; padding: 8px 10px !important; }
  
  /* شريط المميزات الـ 3 المطور على الجوال */
  .ck-store-features-section { padding: 0 10px !important; margin: 14px auto 20px !important; }
  .ck-sfeat-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .ck-sfeat-card { padding: 14px 6px 12px !important; border-radius: 14px !important; }
  .ck-sfeat-icon-box { width: 40px !important; height: 40px !important; border-radius: 12px !important; }
  .ck-sfeat-title { font-size: 12px !important; line-height: 1.3 !important; }
  .ck-sfeat-desc { font-size: 11px !important; line-height: 1.4 !important; } /* v4.2: كان 9.5px وصعب القراءة */

}

@media (max-width: 640px) {
  .ck-brand-bottom-zone { padding: 40px 16px 24px !important; }
  .ck-zone-col { flex: 1 1 100%; }
  .ck-zone-logo { width: 140px; }
  .ck-zone-title { font-size: 15.5px; }
  .ck-zone-bottom { margin-top: 30px; padding-top: 18px; }
}

@media print {
  .ask-product-btn, .custom-features-wrapper { display: none !important; }
}



/* خلفية الأقسام البيضاء بلون خلفية الصفحة (كما كانت)، مع إبقاء بطاقة الشراء
   في صفحة المنتج بيضاء واضحة */
.bg-white {
    --tw-bg-opacity: 1;
    background-color: #f8fafc;
}
.ck-product-page .product-form {
    background-color: #ffffff;
}

/* ==========================================================================
   17. صفحة المنتج على الجوال (Product Page) — v4.9
   الترتيب: السعر ← زر الشراء ← شارات الثقة ← الوصف
   ========================================================================== */
/* عنصر يخفيه السكربت (زر Apple Pay المكرر، صف رقم الموديل) */
.ck-hidden { display: none !important; }

/* زر الشراء السريع (Apple Pay) المتبقي بعرض كامل ومسافة واضحة */
.ck-product-page .ck-quickbuy-keep {
  display: block !important;
  width: 100% !important;
  margin-top: 10px !important;
}

/* شارات الثقة مباشرة تحت أزرار الشراء */
.ck-product-page .custom-features-wrapper { margin-top: 14px; }

@media (max-width: 768px) {
  .ck-product-page .custom-features-grid { gap: 8px; }
  .ck-product-page .feature-box { min-height: 46px; padding: 8px 12px; border-radius: 14px; }
  .ck-product-page .feature-box span { font-size: 13px; }
  .ck-product-page .ask-product-btn { font-size: 16px; padding: 12px 16px; border-radius: 14px; }
}

/* ==========================================================================
   18. الفوتر الاحترافي (Footer Pro) — v5.0
   بنفس هوية الشريط العلوي: خلفية #0b1120 ولمسات ذهبية #f5b301.
   يعمل مع crezykey-custom-v5.7.js (بطاقة بيانات الشركة وتنسيق التواصل)
   ========================================================================== */

/* ---------- الخلفية العامة ---------- */
footer.store-footer {
  background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%) !important; /* نفس لون الشريط العلوي */
  color: #cbd5e1;
  position: relative;
  margin-top: 48px;
}
footer.store-footer::before {               /* خط علوي بلون الهوية */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #f5b301, #f97316 45%, #2563eb);
}
.store-footer .store-footer__inner {
  background: transparent !important;
  padding-top: 56px;
  padding-bottom: 40px;
}

/* ---------- العناوين ---------- */
.store-footer h3,
.store-footer .s-contacts-title {
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 22px !important;
  position: relative;
  padding-bottom: 12px;
}
.store-footer h3::after,
.store-footer .s-contacts-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 36px;
  height: 3px;
  border-radius: 3px;
  background: #f5b301;
}
.store-footer a.flex h3 { font-size: 1.35rem; }   /* اسم المتجر */

/* شعار المتجر (v5.7) — على بطاقة بيضاء ليظهر بوضوح فوق الخلفية الداكنة */
.store-footer .ck-footer-logo {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.store-footer .ck-footer-logo img { height: 42px; width: auto; display: block; }
.ck-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* ---------- وصف المتجر ---------- */
.store-footer .max-w-sm {
  color: #94a3b8 !important;
  font-size: .92rem;
  line-height: 1.9 !important;
}

/* ---------- تخطيط 4 أعمدة مرتبة (v5.6) ---------- */
@media (min-width: 1024px) {
  .store-footer .ck-footer-grid {
    grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr !important;
    gap: 48px !important;
    align-items: start;
  }
  .store-footer .ck-footer-grid > * {
    grid-column: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ---------- عمود بيانات المنشأة ---------- */
.store-footer .ck-legal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.store-footer .ck-legal-list li { display: flex; flex-direction: column; gap: 2px; line-height: 1.5; }
.store-footer .ck-legal-k { font-size: .75rem; color: #94a3b8; }
.store-footer .ck-legal-v { font-size: .9rem; color: #ffffff; font-weight: 600; }
.store-footer .ck-legal-badges { margin-top: 18px; }
.store-footer .ck-legal-list .ck-ltr { align-self: flex-start; }
.store-footer .ck-legal-badges .s-trust-badges-wrapper { display: inline-flex !important; width: auto !important; }

/* ---------- شعار السجل التجاري ---------- */
.store-footer .s-trust-badges-wrapper {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  padding: 10px 14px;
  align-items: center;
}
.store-footer .s-trust-badges-image { border-radius: 8px; background: #fff; }
.store-footer .s-trust-badges-label { color: #94a3b8 !important; }
.store-footer .s-trust-badges-number { color: #ffffff !important; letter-spacing: .5px; }

/* ---------- الروابط المهمة ---------- */
.store-footer .s-menu-footer-item {
  color: #cbd5e1 !important;
  font-size: .93rem;
  padding: 6px 0 !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.store-footer .s-menu-footer-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5b301;
  opacity: .45;
  transition: opacity .2s, transform .2s;
  flex: 0 0 6px;
}
.store-footer .s-menu-footer-item:hover { color: #f5b301 !important; }
.store-footer .s-menu-footer-item:hover::before { opacity: 1; transform: scale(1.4); }

/* ---------- تواصل معنا ---------- */
.store-footer .s-contacts-list { gap: 12px; display: flex; flex-direction: column; }
.store-footer .s-contacts-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: background .2s, border-color .2s, transform .2s;
}
.store-footer .s-contacts-item:hover {
  background: rgba(245, 179, 1, .08);
  border-color: rgba(245, 179, 1, .45);
  transform: translateY(-2px);
}
.store-footer .s-contacts-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #fff !important;
  border: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
}
.store-footer .s-contacts-icon svg,
.store-footer .s-contacts-icon i { color: #fff !important; fill: currentColor; }
.store-footer a[href*="wa.me"] .s-contacts-icon {
  background: linear-gradient(135deg, #22c55e, #15803d) !important;
}
.store-footer .ck-contact-label { color: #94a3b8 !important; }
.store-footer .ck-contact-value { color: #ffffff !important; }
.store-footer .ck-contact-value { white-space: nowrap; }      /* الرقم في سطر واحد */
.store-footer .s-contacts-item { min-width: 230px; }

/* ---------- الشريط السفلي ---------- */
footer.store-footer > div:last-child,
.store-footer .store-footer__inner + div {
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.store-footer .copyright-text p,
.store-footer .ck-copyright { color: #94a3b8 !important; }
.store-footer .copyright-text a { color: #ffffff !important; }

/* وسائل الدفع: بطاقات بيضاء موحّدة */
.store-footer .s-payments-list { gap: 8px; }
.store-footer .s-payments-list-item {
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  height: 34px;
  display: inline-flex !important;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.store-footer .s-payments-list-item img { max-height: 20px; width: auto; }

/* أيقونات التواصل الاجتماعي (إن أُضيفت لاحقاً) */
.store-footer .s-social-list a {
  background: rgba(255, 255, 255, .06) !important;
  color: #fff !important;
  border-radius: 10px;
}

/* ---------- الجوال ---------- */
@media (max-width: 1023px) {
  .store-footer .store-footer__inner { padding-top: 40px; }
  .store-footer .container.grid > div { margin-bottom: 28px; }
  .store-footer .ck-legal { max-width: 100% !important; }
}