@media (min-width: 768px) {
  a.relative.block.w-full.overflow-hidden.rounded {
    height: 320px !important;
  }

  a.relative.block.w-full.overflow-hidden.rounded img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* صفحة جميع المنتجات - جعل الصور مربعة */
/* توحيد صور المنتجات وجعلها مربعة بخلفية بيضاء */
a.relative.block.w-full.overflow-hidden.rounded,
[data-grid-root] [data-product-card] > a:first-child {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background-color: #FFFFFF !important;
    overflow: hidden !important;
}

/* ضبط صورة المنتج داخل المربع */
a.relative.block.w-full.overflow-hidden.rounded img,
[data-grid-root] [data-product-card] > a:first-child > img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    background-color: #FFFFFF !important;
}
/* إخفاء جميع المنتجات */
a.text-foreground.text-sm.py-2[href="/products/"] {
    display: none !important;
}

/* إخفاء جميع التصنيفات */
a.text-foreground.text-sm[href="/categories/"] {
    display: none !important;
}


/* =========================================
   توحيد معرض صور صفحة المنتج
   مربع + خلفية بيضاء + بدون قص
========================================= */

/* إطار معرض الصور */
.product-gallery {
    background-color: #FFFFFF !important;
}

/* كل سلايد يصبح مربعًا */
.product-gallery__slide {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    background-color: #FFFFFF !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;
}

/* صورة المنتج الرئيسية */
.product-gallery__slide > img {
    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    background-color: #FFFFFF !important;
}


/* =========================================
   الصور المصغرة أسفل المنتج
========================================= */

.product-gallery-thumbs__slide {
    aspect-ratio: 1 / 1 !important;
    background-color: #FFFFFF !important;
}

/* منع قص الصور المصغرة */
.product-gallery-thumbs__slide img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center center !important;

    background-color: #FFFFFF !important;
}


/* إعدادات عامة */
section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide {
    position: relative !important;
}

section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide a.btn {
    position: absolute !important;
    right: auto !important;
    top: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    white-space: nowrap !important;
    z-index: 30 !important;
}

/* =========================
   اللابتوب - يسار أسفل
   ========================= */
@media (min-width: 768px) {

    /* البنر الأول */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(1) a.btn {
        left: 16% !important;
        top: auto !important;
        bottom: 34px !important;
        transform: translateX(-50%) !important;
    }

    /* البنر الثاني */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(2) a.btn {
        left: 16% !important;
        top: auto !important;
        bottom: 34px !important;
        transform: translateX(-50%) !important;
    }

    /* البنر الثالث */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(3) a.btn {
        left: 16% !important;
        top: auto !important;
        bottom: 34px !important;
        transform: translateX(-50%) !important;
    }
}

/* =========================
   الجوال - أسفل المنتصف
   ========================= */
@media (max-width: 767px) {

    /* البنر الأول */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(1) a.btn {
        left: 50% !important;
        top: auto !important;
        bottom: 24px !important;
        transform: translateX(-50%) !important;
    }

    /* البنر الثاني */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(2) a.btn {
        left: 50% !important;
        top: auto !important;
        bottom: 24px !important;
        transform: translateX(-50%) !important;
    }

    /* البنر الثالث */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(3) a.btn {
        left: 50% !important;
        top: auto !important;
        bottom: 24px !important;
        transform: translateX(-50%) !important;
    }
}

/* =========================
   اللابتوب - عرض كل زر
   ========================= */
@media (min-width: 768px) {

    /* البنر الأول */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(1) a.btn {
        width: 200px !important;
        max-width: 90% !important;
    }

    /* البنر الثاني */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(2) a.btn {
        width: 200px !important;
        max-width: 90% !important;
    }

    /* البنر الثالث */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(3) a.btn {
        width: 200px !important;
        max-width: 90% !important;
    }
}

/* =========================
   الجوال - عرض كل زر
   ========================= */
@media (max-width: 767px) {

    /* البنر الأول */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(1) a.btn {
        width: 170px !important;
        max-width: 90% !important;
    }

    /* البنر الثاني */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(2) a.btn {
        width: 170px !important;
        max-width: 90% !important;
    }

    /* البنر الثالث */
    section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
    .embla__slide:nth-child(3) a.btn {
        width: 170px !important;
        max-width: 90% !important;
    }
}



/*اعادة تموضع الصور الجوال فقط */

/* الجوال فقط - تحريك الصورة دون تغيير البنر */
@media (max-width: 767px) {

  /* الحفاظ على إطار البنر الأصلي */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide {
    min-height: 458px !important;
    overflow: hidden !important;
  }

  /* تثبيت حاوية الصورة داخل البنر */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide > .absolute.inset-0 {
    overflow: hidden !important;
  }

  /* الصورة تملأ الإطار */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide picture,
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide picture img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
  }

  /* البنر الأول */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide:nth-child(1) picture img {
    object-fit: cover !important;
    object-position: center !important;
    transform: translateY(-5px) !important;
  }

  /* البنر الثاني */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide:nth-child(2) picture img {
    object-fit: cover !important;
    object-position: center !important;
    transform: translateY(-15px) !important;
  }

  /* البنر الثالث */
  section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
  .embla__slide:nth-child(3) picture img {
    object-fit: cover !important;
    object-position: center !important;
    transform: translateY(-5px) !important;
  }
}

/* ===================================
   التحكم بزوايا أزرار البنرات
   كل بنر بشكل مستقل
=================================== */

/* إعداد عام */
section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide a.btn {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* البنر الأول */
section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide:nth-child(1) a.btn {
    border-radius: 12px !important;
}

/* البنر الثاني */
section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide:nth-child(2) a.btn {
    border-radius: 12px !important;
}

/* البنر الثالث */
section[section-id="6ffdeef8-f716-44fc-bdbb-71b3e0727dc5"]
.embla__slide:nth-child(3) a.btn {
    border-radius: 12px !important;
}


/* كيان جو - زر المنتج في الواجهة الرئيسية */
/* زر المنتج - اللون البنفسجي افتراضيًا فقط */
main:has(> h1.hidden)
button.btn-outlined[data-open-quick-view="true"]:not(:hover) {
    background-color: #520a99 !important;
    color: #FFFFFF !important;
    border-color: #520a99 !important;
}

/* كيان جو - زر أضف إلى السلة بالواجهة الرئيسية فقط */
/* الحفاظ على تأثير التمرير الأصلي */

main:has(> h1.hidden)
button.btn-outlined[data-add-to-cart]:not(:hover) {
    background: #520a99 !important;
    background-color: #520a99 !important;
    color: #FFFFFF !important;
    border-color: #520a99 !important;
}


/* كيان جو - إطار بطاقات المنتجات */
/* الواجهة الرئيسية + صفحة جميع المنتجات */

main:has(> h1.hidden) [data-product-card],
[data-grid-root] [data-product-card] {
    border: 1px solid #EEEEEE !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: none !important;
}



/* كيان جو - توحيد لون الفوتر في جميع الصفحات */

footer,
footer.bg-primary {
    background-color: #520a99 !important;
    color: #FFFFFF !important;
}

/* جميع النصوص والروابط والأيقونات داخل الفوتر */
footer p,
footer span,
footer h1,
footer h2,
footer h3,
footer h4,
footer a,
footer li,
footer svg {
    color: #FFFFFF !important;
}

/* لون أيقونات SVG */
footer svg {
    stroke: #FFFFFF !important;
}

/* الحفاظ على النص الأبيض عند التمرير */
footer a:hover {
    color: #FFFFFF !important;
}


/* كيان جو - إطار خفيف حول اسم المنتج */

[data-product-card] h3.text-foreground {
    border: 1px solid #EEEEEE !important;
    border-radius: 8px !important;
    padding: 8px 10px !important;
}



/* =====================================
   كيان جو - القائمة الرئيسية للجوال
   نفس هوية الفوتر
===================================== */

/* خلفية القائمة */
#mobile-drawer,
#mobile-drawer .bg-background {
    background-color: #520a99 !important;
}

/* النصوص والروابط والأزرار */
#mobile-drawer a,
#mobile-drawer button,
#mobile-drawer .text-foreground {
    color: #FFFFFF !important;
}

/* الحفاظ على اللون الأبيض عند التمرير */
#mobile-drawer a:hover,
#mobile-drawer button:hover {
    color: #FFFFFF !important;
}

/* أيقونات القائمة */
#mobile-drawer svg {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

/* لون أيقونة القائمة (الثلاثة خطوط) */
#mobile-drawer-dialog > button {
    color: #520a99 !important;
}

/* الفاصل داخل القائمة */
#mobile-drawer .border-border-light {
    border-color: rgba(255,255,255,0.20) !important;
}