/* Add custom CSS styles below */ 
/* تحسين ذيل متجر صقر نجد */
.store-footer {
  direction: rtl;
}

.store-footer-content {
  padding-top: 32px !important;
}

.store-footer .container > .grid {
  gap: 28px !important;
  align-items: start !important;
  margin-bottom: 28px !important;
}

/* الشعار والنبذة */
.store-footer .container > .grid > div:first-child img {
  width: 125px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto 16px !important;
}

.store-footer .container > .grid > div:first-child p {
  max-width: 430px !important;
  margin: 0 auto !important;
  line-height: 1.9 !important;
  font-size: 15px !important;
  text-align: center !important;
}

/* عناوين أقسام الذيل */
.store-footer h3 {
  margin: 0 0 16px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}

/* الروابط */
.store-footer a {
  line-height: 1.8 !important;
  transition: opacity 0.2s ease, color 0.2s ease !important;
}

.store-footer a:hover {
  opacity: 0.8 !important;
}

/* وسائل الدفع */
.store-footer img[alt="mada"],
.store-footer img[alt="credit_card"],
.store-footer img[alt="stc_pay"],
.store-footer img[alt="apple_pay"] {
  object-fit: contain !important;
}

/* سطر الحقوق */
.store-footer .footer-bottom {
  position: relative !important;
  z-index: 2 !important;
}

.store-footer .footer-bottom .container > div {
  padding: 18px 0 !important;
  min-height: 60px !important;
  text-align: center !important;
}

/* إخفاء قائمة الجوال السفلية على الكمبيوتر */
@media (min-width: 1024px) {
  .store-bottom-nav {
    display: none !important;
  }
}

/* معالجة الجوال */
@media (max-width: 767px) {
  .store-footer-content {
    padding: 30px 18px 0 !important;
  }

  .store-footer .container > .grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  .store-footer .container > .grid > div {
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
  }

  .store-footer .container > .grid > div:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    gap: 26px !important;
  }

  .store-footer .container > .grid > div:first-child img {
    width: 110px !important;
  }

  .store-footer .container > .grid > div:first-child p {
    max-width: 340px !important;
    font-size: 14px !important;
    line-height: 1.9 !important;
  }

  .store-footer h3 {
    font-size: 18px !important;
    margin-bottom: 12px !important;
  }

  .store-footer .footer-bottom {
    padding-bottom: 75px !important;
  }

  .store-footer .footer-bottom .container > div {
    padding: 16px 10px !important;
    font-size: 13px !important;
  }

  /* منع زر واتساب من تغطية الحقوق */
  .store-footer ~ * [class*="whatsapp"],
  .store-footer [class*="whatsapp"] {
    bottom: 80px !important;
  }
}/* ترتيب عنوان روابط مهمة والروابط تحته مباشرة */
.store-footer .footer-menu {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.store-footer .footer-title {
  display: block !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

.store-footer .footer-menu salla-menu {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

.store-footer .s-menu-footer-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  columns: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.store-footer .s-menu-footer-item {
  display: block !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  line-height: 1.6 !important;
  text-align: center !important;
  font-size: 15px !important;
}

/* تقليل المسافة بين قسم الروابط وقسم التواصل على الجوال */
@media (max-width: 767px) {
  .store-footer .container > .grid > div:nth-child(2) {
    gap: 20px !important;
  }
}/* ضبط زر واتساب الأخضر العائم */
.wa-s-n {
  width: 54px !important;
  height: 54px !important;
  line-height: 54px !important;
  left: 18px !important;
  right: auto !important;
  bottom: 22px !important;
  border: 3px solid #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22) !important;
  z-index: 999 !important;
}

.wa-s-n svg {
  width: 27px !important;
  height: 27px !important;
}

/* الجوال: رفع الزر فوق شريط التنقل */
@media (max-width: 767px) {
  .wa-s-n {
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
    left: 14px !important;
    right: auto !important;
    bottom: 88px !important;
  }

  .wa-s-n svg {
    width: 25px !important;
    height: 25px !important;
  }
}/* ترتيب ذيل الصفحة على الكمبيوتر */
@media (min-width: 768px) {

  .store-footer .container > .grid {
    display: grid !important;
    grid-template-columns: 1fr 1.25fr 1fr !important;
    grid-template-areas:
      "links brand contact"
      "links brand trust" !important;
    column-gap: 55px !important;
    row-gap: 22px !important;
    align-items: start !important;
    direction: rtl !important;
  }

  /* جعل عناصر روابط مهمة والتواصل مستقلة */
  .store-footer .container > .grid > div:nth-child(2) {
    display: contents !important;
  }

  /* روابط مهمة: جهة اليمين */
  .store-footer .container > .grid > div:nth-child(2) > div:first-child {
    grid-area: links !important;
    width: 100% !important;
    align-items: flex-start !important;
    text-align: right !important;
  }

  .store-footer .footer-menu {
    align-items: flex-start !important;
    text-align: right !important;
  }

  .store-footer .footer-title,
  .store-footer .s-menu-footer-list,
  .store-footer .s-menu-footer-item {
    text-align: right !important;
    align-items: flex-start !important;
  }

  /* الشعار والنبذة: منتصف الصفحة */
  .store-footer .container > .grid > div:first-child {
    grid-area: brand !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  .store-footer .container > .grid > div:first-child img {
    display: block !important;
    width: 145px !important;
    max-width: 145px !important;
    height: auto !important;
    margin: 0 auto 14px !important;
  }

  .store-footer .container > .grid > div:first-child p {
    max-width: 450px !important;
    margin: 0 auto !important;
    text-align: center !important;
    line-height: 1.9 !important;
  }

  /* التواصل: الجهة اليسرى */
  .store-footer .container > .grid > div:nth-child(2) > div:nth-child(2) {
    grid-area: contact !important;
    width: 100% !important;
  }

  /* السجل التجاري والدفع: أسفل التواصل */
  .store-footer .container > .grid > div:nth-child(3) {
    grid-area: trust !important;
    width: 100% !important;
    align-items: center !important;
    text-align: center !important;
  }/* تحسين شعار ونصوص ذيل الصفحة على الكمبيوتر */
@media (min-width: 1024px) {

  /* تصغير شعار الذيل */
  .store-footer .footer-logo {
    display: block !important;
    width: 125px !important;
    height: 110px !important;
    max-width: 125px !important;
    margin: 0 auto 12px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  /* وصف المتجر أسفل الشعار */
  .store-footer .container > .grid > div:first-child p {
    width: 100% !important;
    max-width: 430px !important;
    margin: 0 auto !important;
    font-size: 14px !important;
    line-height: 1.9 !important;
    text-align: center !important;
  }

  /* حاوية روابط مهمة */
  .store-footer .footer-menu {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
  }

  /* عنوان روابط مهمة */
  .store-footer .footer-title {
    display: inline-block !important;
    width: auto !important;
    margin: 0 0 5px !important;
    padding: 0 0 7px !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    text-align: right !important;
    border-bottom: 2px solid #e96532 !important;
  }

  /* سياسة الاستبدال والاسترجاع */
  .store-footer .s-menu-footer-list {
    width: 100% !important;
    align-items: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .store-footer .s-menu-footer-item {
    display: inline-block !important;
    margin: 0 !important;
    padding: 5px 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    text-align: right !important;
  }

  .store-footer .s-menu-footer-item:hover {
    color: #e96532 !important;
  }/* محاذاة التواصل مع السجل التجاري على الكمبيوتر */
@media (min-width: 1024px) {

  /* قسم التواصل */
  .store-footer .container > .grid > div:nth-child(2) > div:nth-child(2) {
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  .store-footer salla-contacts {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* عنوان تواصل معنا */
  .store-footer .s-contacts-title {
    width: 100% !important;
    margin: 0 auto 14px !important;
    padding: 0 !important;
    font-size: 18px !important;
    line-height: 1.5 !important;
    font-weight: 700 !important;
    text-align: center !important;
  }

  /* أرقام التواصل */
  .store-footer .s-contacts-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    columns: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .store-footer .s-contacts-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 3px 0 !important;
    text-align: center !important;
  }

  /* السجل التجاري ووسائل الدفع */
  .store-footer .container > .grid > div:nth-child(3) {
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }/* =========================================
   تحسين قسم "تسوّق حسب الفئة" للجوال
   متجر صقر نجد
========================================= */

section.s-block--banners:has(h2:nth-child(1)) {
  --category-radius: 12px;
}

/* استهداف قسم تسوّق حسب الفئة */
section.s-block--banners:has(h2):has(
  h2.saji-main-title
) {
  overflow: hidden;
}

/* البطاقات */
section.s-block--banners:has(
  h2.saji-main-title
) .banner-entry {
  border-radius: var(--category-radius, 12px);
}

/* تخصيص قسم تسوّق حسب الفئة بالعنوان */
section.s-block--banners:has(
  h2.saji-main-title
):has(h2) .banner-entry > a {
  background-size: cover;
  background-position: center;
  border-radius: inherit;
}

/* الجوال الطولي: بطاقتان في الصف */
@media (max-width: 767px) {
  section.s-block--banners:has(
    h2.saji-main-title
  ) .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  section.s-block--banners .banner-entry {
    aspect-ratio: 16 / 10 !important;
    min-width: 0;
  }

  section.s-block--banners .banner-entry > a {
    padding: 10px !important;
  }

  section.s-block--banners .banner-entry h3 {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
}

/* الجوال بالوضع العرضي: 3 بطاقات في الصف */
@media (orientation: landscape) and (min-width: 568px) and (max-width: 1024px) {
  section.s-block--banners:has(
    h2.saji-main-title
  ) .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  section.s-block--banners .banner-entry {
    aspect-ratio: 16 / 9 !important;
  }
}

/* إبقاء أسماء البطاقات ظاهرة دائمًا على أجهزة اللمس */
@media (hover: none), (pointer: coarse) {
  section.s-block--banners .banner-entry h3 {
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: relative;
    z-index: 3;
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 1px 4px rgb(0 0 0 / 60%);
  }

  section.s-block--banners .banner-entry > a::before {
    opacity: 1 !important;
    background: linear-gradient(
      to top,
      rgb(0 0 0 / 65%) 0%,
      rgb(0 0 0 / 18%) 45%,
      transparent 72%
    ) !important;
  }
}

/* تحسين الحواف والظل */
section.s-block--banners .banner-entry {
  overflow: hidden;
  box-shadow: 0 3px 12px rgb(10 43 77 / 10%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* منع تأثير الضغط المبالغ فيه */
section.s-block--banners .banner-entry:active {
  transform: scale(0.98);
}

/* تقليل المسافات الرأسية على الجوال */
@media (max-width: 767px) {
  section.s-block--banners {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
  }

  section.s-block--banners .saji-block-titles {
    margin-bottom: 14px !important;
  }

  section.s-block--banners h2.saji-main-title {
    font-size: 22px !important;
  }/* ==================================================
   إزالة تعتيم بطاقات "تسوّق حسب الفئة" على الجوال
   استهداف دقيق للقسم فقط
================================================== */

@media (max-width: 1024px), (hover: none), (pointer: coarse) {

  /* إلغاء طبقة قالب ساجي السوداء بالكامل */
  #s-block--banners-3 .banner-entry > a::before,
  #s-block--banners-3 .banner-entry > a:before,
  #s-block--banners-3 .banner-entry > a:hover::before,
  #s-block--banners-3 .banner-entry > a:active::before,
  #s-block--banners-3 .banner-entry > a:focus::before {
    content: "" !important;
    opacity: 0 !important;
    visibility: hidden !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
  }

  /* منع تعتيم البطاقة نفسها عند اللمس */
  #s-block--banners-3 .banner-entry > a,
  #s-block--banners-3 .banner-entry > a:hover,
  #s-block--banners-3 .banner-entry > a:active,
  #s-block--banners-3 .banner-entry > a:focus {
    opacity: 1 !important;
    filter: none !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  /* إظهار اسم التصنيف دون تعتيم الصورة */
  #s-block--banners-3 .banner-entry h3 {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: relative !important;
    z-index: 5 !important;

    width: auto !important;
    padding: 6px 12px !important;
    margin-bottom: 2px !important;

    color: #fff !important;
    background-color: rgb(10 43 77 / 82%) !important;
    border-radius: 8px !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-shadow: none !important;
  }

  /* تحسين وضوح الصورة */
  #s-block--banners-3 .banner-entry {
    overflow: hidden !important;
    border-radius: 12px !important;
    background-color: #f2f7fb !important;
  }
}

/* منع بقاء تأثير اللمس بعد الضغط */
@media (hover: none) {
  #s-block--banners-3 .banner-entry:hover,
  #s-block--banners-3 .banner-entry:active {
    transform: none !important;
    filter: none !important;
  }
}