/* =====================================================
   عام (كل الصفحات): خلفية بيضاء + إلغاء الزوايا الزخرفية
   ===================================================== */
.s-product-card-entry,
.s-product-card-horizontal,
.s-product-card-horizontal .s-product-card-content,
.s-product-card-entry .s-product-card-content {
  background-color: #ffffff !important;
}
 
.crest-corners,
.crest-corners-bottom,
.s-product-card-entry .crest-corners,
.s-product-card-entry .crest-corners-bottom {
  display: none !important;
}
 
/* إخفاء بانر / صورة تصنيفات الثيم */
#category-ads {
  display: none !important;
}
 
/* صورة التصنيف في قائمة الجوال */
@media (max-width: 1023px) {
  li.lg\:hidden.text-sm.font-bold a[href="https://shop.ayalena.com/ar/-/c1861969119"]::before {
    content: "";
    display: block;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background-image: url('https://cdn.salla.sa/ePjoQo/products/h3YQt7Nq06wWdDJFegZXYmzqh1549wekxVwFyOaT.jpg');
    background-size: cover;
    background-position: center;
    order: -1;
  }
}
 
/* =====================================================
   الجوال: الصفحة الرئيسية فقط (داخل .s-block)
   صفحة التصنيف ما تتأثر
   ===================================================== */
@media (max-width: 767px) {
 
  /* البطاقة عمودية: صورة ثم اسم ثم سعر */
  .s-block .s-product-card-entry,
  .s-block .s-product-card-entry.s-product-card-horizontal,
  .s-block .s-product-card-horizontal {
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    height: auto !important;
    overflow: hidden;
  }
 
  .s-block .s-product-card-horizontal .s-product-card-image,
  .s-block .s-product-card-entry .s-product-card-image {
    order: 1 !important;
    width: 100% !important;
  }
 
  .s-block .s-product-card-entry .s-product-card-image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4;
    object-fit: cover;
  }
 
  .s-block .s-product-card-horizontal .s-product-card-content,
  .s-block .s-product-card-entry .s-product-card-content {
    order: 2 !important;
    width: 100% !important;
    padding: 10px 8px !important;
    margin: 0 !important;
    text-align: center !important;
    background-color: #ffffff !important;
  }
 
  /* سلايدر أفقي: صف واحد تسحبه يمين ويسار */
  .s-block .s-products-list-wrapper,
  .s-block .s-products-list-vertical-cards,
  .s-block .s-products-list-horizontal-cards {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 10px !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
 
  /* عرض كل بطاقة داخل السلايدر */
  .s-block .s-products-list-wrapper > *,
  .s-block .s-products-list-vertical-cards > *,
  .s-block .s-products-list-horizontal-cards > * {
    flex: 0 0 46% !important;
    max-width: 46% !important;
    scroll-snap-align: start;
  }
 
  /* إخفاء شريط التمرير */
  .s-block .s-products-list-wrapper::-webkit-scrollbar,
  .s-block .s-products-list-vertical-cards::-webkit-scrollbar,
  .s-block .s-products-list-horizontal-cards::-webkit-scrollbar {
    display: none;
  }
}
 
/* =====================================================
   اللابتوب (من 1024px): الصفحة الرئيسية فقط
   ===================================================== */
@media (min-width: 1024px) {
 
  .s-block .s-products-list.horizontal-products .s-products-list-wrapper,
  .s-block .s-products-list-wrapper.s-products-list-horizontal-cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    grid-auto-flow: unset !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 16px !important;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 12px !important;
  }
 
  .s-block .s-products-list-wrapper.s-products-list-horizontal-cards::-webkit-scrollbar {
    display: none;
  }
 
  /* 4 بطاقات جنب بعض */
  .s-block .s-products-list-wrapper.s-products-list-horizontal-cards > custom-salla-product-card {
    flex: 0 0 calc(25% - 12px) !important;
    width: calc(25% - 12px) !important;
    max-width: calc(25% - 12px) !important;
    min-width: 0 !important;
    scroll-snap-align: start;
  }
 
  /* البطاقة عمودية: صورة ← اسم ← سعر */
  .s-block .s-products-list-horizontal-cards .s-product-card-entry {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
  }
 
  .s-block .s-products-list-horizontal-cards .s-product-card-image {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }
 
  .s-block .s-products-list-horizontal-cards .s-product-card-image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4;
    object-fit: cover;
  }
 
  .s-block .s-products-list-horizontal-cards .s-product-card-content {
    order: 2 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 8px !important;
    text-align: center !important;
  }
}
 
/* =====================================================
   صفحة التصنيف فقط (خارج .s-block): لابتوب + جوال
   صور أكبر بنسبة ثابتة وبدون تمطيط
   ===================================================== */
 
/* منطقة الصورة: نسبة 3:5 ثابتة (صورة أطول وأكبر) لكل أنواع البطاقات */
.s-product-card-entry:not(.s-block *) .s-product-card-image {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 3 / 5 !important;
  overflow: hidden !important;
}
 
.s-product-card-entry:not(.s-block *) .s-product-card-image a,
.s-product-card-entry:not(.s-block *) .s-product-card-image picture,
.s-product-card-entry:not(.s-block *) .s-product-card-image figure {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
 
/* الصورة نفسها: تملأ المنطقة بدون تشويه */
.s-product-card-entry:not(.s-block *) .s-product-card-image img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center top !important;
}
 
/* البطاقة العمودية: الصورة بعرض البطاقة كامل */
.s-product-card-entry:not(.s-product-card-horizontal):not(.s-block *) .s-product-card-image {
  width: 100% !important;
  max-width: 100% !important;
}
 
/* البطاقة الأفقية (صورة جنب النص): الصورة 58% لابتوب / 52% جوال */
.s-product-card-entry.s-product-card-horizontal:not(.s-block *) .s-product-card-image {
  flex: 0 0 58% !important;
  width: 58% !important;
  max-width: 58% !important;
}
 
.s-product-card-entry.s-product-card-horizontal:not(.s-block *) .s-product-card-content {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}
 
@media (max-width: 767px) {
  .s-product-card-entry.s-product-card-horizontal:not(.s-block *) .s-product-card-image {
    flex: 0 0 52% !important;
    width: 52% !important;
    max-width: 52% !important;
  }
}
 
/* مسافات أقل بين بطاقات صفحة التصنيف (صور أعرض) */
.s-products-list-wrapper:not(.s-block *) {
  gap: 10px !important;
}
 
@media (max-width: 767px) {
  .s-products-list-wrapper:not(.s-block *) {
    gap: 8px !important;
  }
}
 
/* =====================================================
   الصفحة الرئيسية: الأقسام ذات البطاقات العمودية (مثل البلوزات)
   نفس نسبة الصورة 3:4 بدون قص أو تشويه
   (ما تلمس الأقسام الأفقية اللي تضبطت قبل)
   ===================================================== */
.s-block .s-product-card-entry:not(.s-product-card-horizontal) .s-product-card-image {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 3 / 4 !important;
  overflow: hidden !important;
}
 
.s-block .s-product-card-entry:not(.s-product-card-horizontal) .s-product-card-image a,
.s-block .s-product-card-entry:not(.s-product-card-horizontal) .s-product-card-image picture,
.s-block .s-product-card-entry:not(.s-product-card-horizontal) .s-product-card-image figure {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
 
.s-block .s-product-card-entry:not(.s-product-card-horizontal) .s-product-card-image img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center top !important;
}
 
/* =====================================================
   اللابتوب فقط: فك الارتفاع الثابت لصندوق الصورة في الرئيسية
   (يحل قص الصور بقسم البلوزات وغيره)
   ===================================================== */
@media (min-width: 1024px) {
 
  .s-block .s-products-list-horizontal-cards .s-product-card-image,
  .s-block .s-product-card-entry .s-product-card-image {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 3 / 4 !important;
    overflow: hidden !important;
  }
 
  .s-block .s-products-list-horizontal-cards .s-product-card-image a,
  .s-block .s-products-list-horizontal-cards .s-product-card-image picture,
  .s-block .s-products-list-horizontal-cards .s-product-card-image figure {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }
 
  .s-block .s-products-list-horizontal-cards .s-product-card-image img,
  .s-block .s-product-card-entry .s-product-card-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
}
/* =====================================================
   قسم القائمة البريدية: بدون لون (شفاف، يأخذ خلفية الصفحة)
   (النصوص والزر بألوانهم الأصلية، لا تضف قواعد ألوان نصوص هنا)
   ===================================================== */
.s-block--newsletter,
.store-footer__newsletter,
section:has(input[type="email"]):not(:has(custom-salla-product-card)):not(:has(footer)) {
  background: transparent !important;
  background-color: transparent !important;
}
/* =====================================================
   الجوال فقط: روابط الفوتر "روابط مهمة" بعمودين
   ===================================================== */
@media (max-width: 767px) {
 
  /* العمود اللي ما فيه روابط اتصال (tel / mailto / واتساب) = عمود "روابط مهمة" */
  .store-footer .footer-title-color > :not(:has(a[href^="tel:"])):not(:has(a[href^="mailto:"])):not(:has(a[href*="wa.me"])):not(:has(a[href*="whatsapp"])) :is(ul, ol, nav, div):is(:has(> li + li), :has(> a + a)) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 16px !important;
    row-gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
 
  .store-footer .footer-title-color > :not(:has(a[href^="tel:"])):not(:has(a[href^="mailto:"])):not(:has(a[href*="wa.me"])):not(:has(a[href*="whatsapp"])) :is(ul, ol, nav, div):is(:has(> li + li), :has(> a + a)) > li {
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
  }
 /* عكس مكان "سياسة الاستخدام والخصوصية" (الثالث) و"الأسئلة الشائعة" (الخامس) */
  .store-footer .footer-title-color > :not(:has(a[href^="tel:"])):not(:has(a[href^="mailto:"])):not(:has(a[href*="wa.me"])):not(:has(a[href*="whatsapp"])) :is(ul, ol, nav, div):is(:has(> li + li), :has(> a + a)) > :nth-child(3) {
    order: 5 !important;
  }
 
  .store-footer .footer-title-color > :not(:has(a[href^="tel:"])):not(:has(a[href^="mailto:"])):not(:has(a[href*="wa.me"])):not(:has(a[href*="whatsapp"])) :is(ul, ol, nav, div):is(:has(> li + li), :has(> a + a)) > :nth-child(5) {
    order: 3 !important;
  }
  /* ===== "تواصل معنا": جوال يمين + واتساب يسار + إيميل بالنص تحتهم ===== */
  .store-footer :is(ul, ol, nav, div):is(:has(> li > a[href^="tel:"]), :has(> a[href^="tel:"]), :has(> li > * > a[href^="tel:"]), :has(> div > a[href^="tel:"]), :has(> div > * > a[href^="tel:"]), :has(> li > a[href^="mailto:"]), :has(> a[href^="mailto:"]), :has(> div > a[href^="mailto:"])):not(:has(a[href*="facebook"], a[href*="instagram"], a[href*="tiktok"], a[href*="twitter"], a[href*="x.com"])) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
    row-gap: 14px !important;
    padding: 0 !important;
    list-style: none !important;
  }
 
  /* العنصر الأول (واتساب) يروح لليسار */
  .store-footer :is(ul, ol, nav, div):is(:has(> li > a[href^="tel:"]), :has(> a[href^="tel:"]), :has(> li > * > a[href^="tel:"]), :has(> div > a[href^="tel:"]), :has(> div > * > a[href^="tel:"]), :has(> li > a[href^="mailto:"]), :has(> a[href^="mailto:"]), :has(> div > a[href^="mailto:"])):not(:has(a[href*="facebook"], a[href*="instagram"], a[href*="tiktok"], a[href*="twitter"], a[href*="x.com"])) > :nth-child(1) {
    order: 2 !important;
  }
 
  /* العنصر الثاني (الجوال) يروح لليمين */
  .store-footer :is(ul, ol, nav, div):is(:has(> li > a[href^="tel:"]), :has(> a[href^="tel:"]), :has(> li > * > a[href^="tel:"]), :has(> div > a[href^="tel:"]), :has(> div > * > a[href^="tel:"]), :has(> li > a[href^="mailto:"]), :has(> a[href^="mailto:"]), :has(> div > a[href^="mailto:"])):not(:has(a[href*="facebook"], a[href*="instagram"], a[href*="tiktok"], a[href*="twitter"], a[href*="x.com"])) > :nth-child(2) {
    order: 1 !important;
  }
 
  /* الإيميل: بالنص تحتهم بعرض كامل */
  .store-footer :is(ul, ol, nav, div):is(:has(> li > a[href^="tel:"]), :has(> a[href^="tel:"]), :has(> li > * > a[href^="tel:"]), :has(> div > a[href^="tel:"]), :has(> div > * > a[href^="tel:"]), :has(> li > a[href^="mailto:"]), :has(> a[href^="mailto:"]), :has(> div > a[href^="mailto:"])):not(:has(a[href*="facebook"], a[href*="instagram"], a[href*="tiktok"], a[href*="twitter"], a[href*="x.com"])) > :nth-child(3) {
    order: 3 !important;
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 0 !important;
  }
}