/* Add custom CSS styles below */
/* ============================================================
   متجر وهج المناسبات
   الشريط المتحرك + تثبيت الهيدر والشعار
   نسخة محسّنة: أخف، بدون قفزة تخطيط، وتحترم تقليل الحركة
   ============================================================ */

:root {
  --wj-ticker-h: 48px;
  --wj-header-h: var(--wj-nav-h);
  --wj-nav-h: 104px;
  --wj-logo-w: 170px;
  --wj-logo-h: 96px;
  --wj-ticker-bg: #01313d;
  --wj-ticker-fg: #ffffff;
  --wj-speed: 68s;
  --wj-fixed-h: calc(var(--wj-ticker-h) + var(--wj-header-h));
}

@media (max-width: 1023px) {
  :root {
    --wj-ticker-h: 44px;
    --wj-nav-h: 76px;
    --wj-logo-w: 100px;
    --wj-logo-h: 68px;
    --wj-speed: 62s;
  }
}

@media (max-width: 390px) {
  :root {
    --wj-ticker-h: 42px;
    --wj-speed: 58s;
  }
}

/* حجز المساحة من الـ CSS نفسه، أي قبل أول رسم تمامًا،
   فلا تحدث أي قفزة في الصفحة مهما تأخّر تنفيذ الجافاسكربت */
body { padding-top: var(--wj-fixed-h); }
html { scroll-padding-top: calc(var(--wj-fixed-h) + 15px); }

/* شريط اللون يُرسم من الـ CSS، فحتى لو تعطّل الجافاسكربت
   يبقى المكان مملوءًا بلون الهوية بدل فراغ أبيض */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 998;
  height: var(--wj-ticker-h);
  background: var(--wj-ticker-bg);
  pointer-events: none;
}

/* ============================================================
   الشريط المتحرك
   ============================================================ */
#wahaj-ticker,
#wahaj-ticker * { box-sizing: border-box; }

#wahaj-ticker {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--wj-ticker-h);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--wj-ticker-bg);
  color: var(--wj-ticker-fg);
  font-family: "Tajawal", "Cairo", Arial, sans-serif;
  direction: ltr;
  touch-action: pan-y;
  contain: content;
}

.wj-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.wj-track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 100%;
  white-space: nowrap;
  animation: wj-move var(--wj-speed) linear infinite;
}

/* إيقاف الحركة عند المرور بالمؤشر أو التركيز بلوحة المفاتيح */
#wahaj-ticker:hover .wj-track,
#wahaj-ticker:focus-within .wj-track { animation-play-state: paused; }

.wj-cycle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
}

.wj-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  direction: rtl;
}

.wj-sep {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 400;
  opacity: 0.9;
}

.wj-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

@media (max-width: 1023px) {
  .wj-item { padding: 0 13px; gap: 17px; font-size: 13px; }
  .wj-sep { font-size: 14px; }
}

@media (max-width: 390px) {
  .wj-item { padding: 0 11px; gap: 15px; font-size: 12.5px; }
  .wj-sep { font-size: 13px; }
}

@keyframes wj-move {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* من يفعّل تقليل الحركة في جهازه يرى الجملتين ثابتتين في المنتصف */
@media (prefers-reduced-motion: reduce) {
  .wj-viewport { display: none; }
  .wj-sr {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 100%;
    margin: 0;
    overflow: visible;
    clip-path: none;
    font-size: 14px;
    font-weight: 600;
    direction: rtl;
  }
}

/* ============================================================
   تثبيت هيدر سلة أسفل الشريط مباشرة
   ============================================================ */
:is(header[data-testid="store-header"], header.store-header) {
  position: fixed !important;
  top: var(--wj-ticker-h) !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 999 !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: visible !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* تحييد حركة سلة أثناء السكرول وتثبيت ارتفاع الشريط الرئيسي */
:is(header[data-testid="store-header"], header.store-header) :is(
  .main-nav-container,
  .main-nav-container > .inner,
  .main-nav-container.animated > .inner,
  .main-nav-container.fixed-pinned > .inner,
  .main-nav-container.fixed-header > .inner
) {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: var(--wj-nav-h) !important;
  min-height: var(--wj-nav-h) !important;
  max-height: var(--wj-nav-h) !important;
  flex: 0 0 var(--wj-nav-h) !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: auto !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

:is(header[data-testid="store-header"], header.store-header) :is(
  .main-nav-container > .inner > .container,
  .main-nav-container > .inner > .container > .flex
) {
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  box-sizing: border-box !important;
}

/* مساحة الشعار ثابتة في كل حالات السكرول */
:is(header[data-testid="store-header"], header.store-header) :is(a[data-testid="store-header-logo"], .navbar-brand) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--wj-logo-w) !important;
  min-width: var(--wj-logo-w) !important;
  max-width: var(--wj-logo-w) !important;
  height: var(--wj-logo-h) !important;
  min-height: var(--wj-logo-h) !important;
  max-height: var(--wj-logo-h) !important;
  flex: 0 0 var(--wj-logo-w) !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* صورة الشعار نفسها لا تتغيّر ولا تنكمش */
:is(header[data-testid="store-header"], header.store-header) .navbar-brand img {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* ============================================================
   الأسئلة الشائعة بهوية المتجر
   بطاقات مطوية بلون الهوية #01313d في شبكة عمودين
   الكلاس wj-faq مضاف من إعدادات العنصر في محرر الثيم
   ============================================================ */

.wj-faq { direction: rtl; }

/* حاوية الأسئلة: أي حاوية داخل القسم فيها خمسة عناصر فأكثر
   هي قائمة الأسئلة نفسها، فنحولها إلى شبكة عمودين */
@media (min-width: 768px) {
  .wj-faq :is(ul, ol, div):has(> :nth-child(5)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

@media (max-width: 767px) {
  .wj-faq :is(ul, ol, div):has(> :nth-child(5)) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

/* البطاقة الواحدة */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * {
  background: #01313d !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(1, 49, 61, 0.12);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > *:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 6px 18px rgba(1, 49, 61, 0.22);
}

/* كل النصوص داخل البطاقة بيضاء */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * {
  color: #ffffff !important;
}

.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * :is(
  h1, h2, h3, h4, h5, h6, p, span, div, li, button, summary, strong, b, em, small
) {
  color: #ffffff !important;
  background-color: transparent !important;
}

/* السؤال */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * :is(summary, button, h3, h4) {
  font-weight: 700;
  line-height: 1.75;
  cursor: pointer;
}

/* الإجابة أخف قليلًا لتفريق المستويين */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * :is(p, li) {
  color: rgba(255, 255, 255, 0.86) !important;
  line-height: 2;
}

/* أيقونة السهم */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * svg {
  color: #ffffff !important;
  fill: currentColor;
  stroke: currentColor;
  opacity: 0.9;
}

/* روابط الأزرار داخل الإجابات */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * a {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
}

.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * a:hover {
  opacity: 0.85;
}

/* إزالة أي فواصل أو حدود داخلية من الثيم لأن البطاقة صارت هي الإطار */
.wj-faq :is(ul, ol, div):has(> :nth-child(5)) > * > * {
  border-color: rgba(255, 255, 255, 0.16) !important;
}

/* ============================================================
   الفوتر: أربعة أعمدة على النمط المرجعي
   العمود الأول للتعريف وبيانات التواصل وحسابات التواصل
   والثلاثة الباقية للصفحات، وتتحول إلى قوائم مطوية في الجوال
   البناء يتم من الجافاسكربت والكلاسات تبدأ بـ wj-f
   ============================================================ */

footer :is(.footer-menu, nav) ul { list-style: none; }
footer a { transition: opacity 0.18s ease; }
footer a:hover { opacity: 0.78; }

.wj-footer {
  font-family: "Tajawal", "Cairo", Arial, sans-serif;
  direction: rtl;
}

/* تحييد شبكة الثيم الأصلية لأن الشبكة الجديدة صارت بداخلها */
.wj-fcontainer {
  display: block !important;
  gap: 0 !important;
}

.wj-fgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 26px 34px;
  align-items: start;
  padding: 34px 0 10px;
}

@media (max-width: 1023px) {
  .wj-fgrid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 24px 0 6px;
  }
}

/* ---------- عمود التعريف ---------- */
.wj-fbrand > * {
  margin-top: 0 !important;
  grid-column: auto !important;
  inset: auto !important;
}

.wj-fbrand {
  font-size: 14px;
  line-height: 2;
}

@media (max-width: 1023px) {
  .wj-fbrand { padding-bottom: 20px; }
}

/* توسيط محتوى العمود الأول: الشعار في وسط النص والوصف متوسط تحته */
.wj-fbrand,
.wj-fbrand > * {
  text-align: center !important;
}

.wj-fbrand :is(.footer-description, .footer-badges) {
  text-align: center !important;
  justify-content: center !important;
  margin-bottom: 14px !important;
}

.wj-fbrand > * > a {
  justify-content: center !important;
}

/* شارة السجل التجاري أسفل الوصف، على نمط العمود الأول في الترتيب المطلوب */
.wj-fbrand .footer-badges {
  margin-top: 4px !important;
}

.wj-fbrand .footer-badges img {
  max-width: 128px;
  height: auto;
}

/* ---------- أعمدة الصفحات ---------- */
.wj-fcol {
  margin: 0;
  padding: 0;
}

.wj-fcol__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.8;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* إخفاء المثلث الافتراضي في كل المتصفحات */
.wj-fcol__head::-webkit-details-marker { display: none; }
.wj-fcol__head::marker { content: ""; }

.wj-fcol__arrow {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: center;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.wj-fcol[open] .wj-fcol__arrow { transform: rotate(135deg); }

@media (min-width: 1024px) {
  /* في الشاشات الكبيرة الأعمدة مفتوحة دائمًا بلا سهم ولا ضغط */
  .wj-fcol__head { cursor: default; }
  .wj-fcol__arrow { display: none; }
}

.wj-fcol__list {
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}

.wj-fcol__list li { margin: 0 0 11px; }
.wj-fcol__list li:last-child { margin-bottom: 0; }

.wj-fcol__list a {
  display: inline-block;
  font-size: 13.5px;
  line-height: 1.9;
  text-decoration: none;
  color: inherit;
  opacity: 0.88;
}

.wj-fcol__list a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* في الجوال يصبح كل عمود قائمة مطوية بفاصل بينها */
@media (max-width: 1023px) {
  .wj-fcol {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 0;
  }
  .wj-fcol__head { margin-bottom: 0; }
  .wj-fcol[open] .wj-fcol__head { margin-bottom: 13px; }
  .wj-fcol__list { padding-bottom: 2px; }
}

/* ---------- شريط وسائل التواصل السريعة ---------- */
/* عناصر هذا الشريط تبدأ شفافة بانتظار حركة الظهور من الثيم،
   وقد لا تصلها الحركة بعد إعادة ترتيب الفوتر فنُظهرها دائمًا */
.wj-footer .store-footer__contacts-row .anime-item {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.wj-footer .store-footer__contacts-row {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 6px;
  padding: 18px 0 4px;
}

/* ---------- الشريط السفلي ---------- */
.wj-footer .wj-fbottomwrap {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 8px;
}

.wj-fbottom {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 16px 0 !important;
  text-align: start !important;
}

.wj-fcopy {
  flex: 0 1 auto;
  order: 1;
  font-size: 13px;
  opacity: 0.82;
}

.wj-fcopy p { margin: 0 !important; }

.wj-fpay {
  flex: 1 1 auto;
  order: 2;
  display: flex;
  justify-content: center;
}

.wj-fpay ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wj-fpay img { height: 24px; width: auto; }

.wj-fsocial {
  flex: 0 0 auto;
  order: 3;
}

.wj-fsocial ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* أيقونات دائرية بحدود خفيفة كما في الترتيب المطلوب */
.wj-fsocial ul a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.wj-fsocial ul a:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}

@media (max-width: 1023px) {
  .wj-fbottom {
    justify-content: center;
    gap: 14px;
  }
  .wj-fcopy { order: 3; width: 100%; text-align: center; }
  .wj-fpay { order: 2; width: 100%; }
  .wj-fsocial { order: 1; width: 100%; justify-content: center; display: flex; }
}

/* ============================================================
   لون الهوية على خلفية الفوتر
   الثيم يعطي الفوتر لونًا داكنًا مستقلًا عن إعدادات الألوان،
   فنثبت لون الهوية هنا ليكون المتجر بلون واحد من أعلاه لأسفله
   ============================================================ */
footer.store-footer,
footer.store-footer .store-footer__inner,
footer.store-footer .store-footer__contacts-row,
footer.store-footer .footer-bottom,
footer.store-footer .bottom-footer,
footer.store-footer [class*="bottom-footer"] {
  background-color: #01313d !important;
}

/* منع أي طبقة داكنة أو قوس زخرفي يرسمه الثيم أعلى الفوتر */
footer.store-footer::before,
footer.store-footer::after,
footer.store-footer > div::before,
footer.store-footer > div::after {
  background-color: transparent !important;
  background-image: none !important;
}

footer.store-footer > * {
  background-color: #01313d !important;
}