/* =========================================
   روابط التصنيفات – ثيم سيليا
========================================= */

/* إخفاء أيقونات روابط التصنيفات القديمة */
.slide--cat-entry i,
.slide--cat-entry i::before,
.slide--cat-entry [data-selia="home-main-links-item-icon"],
.slide--cat-entry [data-selia="home-main-links-item-icon"]::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
}

/* تنسيق روابط التصنيفات القديمة */
.slide--cat-entry {
    width: auto !important;
    min-width: max-content !important;
    height: auto !important;
    flex: 0 0 auto !important;
    gap: 0 !important;
    row-gap: 0 !important;
    padding: 6px 9px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* إزالة العناصر الزخرفية */
.slide--cat-entry::before,
.slide--cat-entry::after {
    display: none !important;
    content: none !important;
}

/* تنسيق نص التصنيف القديم */
.slide--cat-entry h2,
.slide--cat-entry h2[data-selia="home-main-links-item-title"] {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}

/* =========================================
   سلايدر روابط التصنيفات الجديد
========================================= */

/* إخفاء دائرة وأيقونة التصنيف */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide > a[href*="/c"] > div,

.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide > a[href*="/c"] > i,

.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide > a[href*="/c"] i.sicon-store {
    display: none !important;
}

/* كل شريحة تأخذ عرض النص */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide:not(.tilal-category-edge-spacer) {
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* تنسيق رابط التصنيف */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide:not(.tilal-category-edge-spacer)
> a[href*="/c"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    padding: 7px 11px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* تنسيق اسم التصنيف */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide > a[href*="/c"] span {
    display: block !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}

/*
 * لا نستخدم gap لأن Swiper لا يحسبه بصورة صحيحة.
 * المسافة بين الروابط موجودة داخل padding الرابط.
 */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

/* المساحة الفعلية في بداية ونهاية السلايدر */
.s-slider-container:has(.swiper-slide > a[href*="/c"])
.swiper-slide.tilal-category-edge-spacer {
    display: block !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 1px !important;
    flex: 0 0 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* منع خروج الصفحة نفسها أفقيًا */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* =========================================
   إخفاء المنتجات من التصنيفات غير المستثناة
========================================= */

/* إخفاء حاوية المنتجات */
html.hide-category-products .main-content salla-products-list,
body.hide-category-products .main-content salla-products-list,

html.hide-category-products .main-content .s-products-list-wrapper,
body.hide-category-products .main-content .s-products-list-wrapper,

html.hide-category-products .main-content .products-container,
body.hide-category-products .main-content .products-container,

html.hide-category-products .main-content .products-grid,
body.hide-category-products .main-content .products-grid {
    display: none !important;
}

/* إخفاء بطاقات المنتجات احتياطيًا */
html.hide-category-products .main-content custom-salla-product-card,
body.hide-category-products .main-content custom-salla-product-card,

html.hide-category-products .main-content salla-product-card,
body.hide-category-products .main-content salla-product-card,

html.hide-category-products .main-content .product-entry,
body.hide-category-products .main-content .product-entry,

html.hide-category-products .main-content .s-product-card-entry,
body.hide-category-products .main-content .s-product-card-entry {
    display: none !important;
}

/* إخفاء شريط عدد المنتجات والترتيب */
html.hide-category-products
.main-content
> .mb-4.sm\:mb-6.flex.justify-between.items-center,

body.hide-category-products
.main-content
> .mb-4.sm\:mb-6.flex.justify-between.items-center {
    display: none !important;
}

/* إخفاء الترقيم والتحميل */
html.hide-category-products .main-content salla-infinite-scroll,
body.hide-category-products .main-content salla-infinite-scroll,

html.hide-category-products .main-content .pagination,
body.hide-category-products .main-content .pagination {
    display: none !important;
}

/* =========================================
   إعدادات الجوال
========================================= */

@media screen and (max-width: 767px) {
    .slide--cat-entry {
        padding: 6px 8px !important;
    }

    .slide--cat-entry h2,
    .slide--cat-entry h2[data-selia="home-main-links-item-title"],
    .s-slider-container:has(.swiper-slide > a[href*="/c"])
    .swiper-slide > a[href*="/c"] span {
        font-size: 13px !important;
    }

    .s-slider-container:has(.swiper-slide > a[href*="/c"])
    .swiper-slide:not(.tilal-category-edge-spacer)
    > a[href*="/c"] {
        padding: 6px 9px !important;
    }

    .s-slider-container:has(.swiper-slide > a[href*="/c"])
    .swiper-slide.tilal-category-edge-spacer {
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        flex: 0 0 46px !important;
    }
}
/* تصغير عنوان عرض الكاش باك */
.s-block--offer-countdown .offer-countdown-title {
    font-size: 22px !important;
    line-height: 1.5 !important;
}

/* تصغير عداد الوقت */
.s-block--offer-countdown .s-count-down-item-value {
    font-size: 20px !important;
}

.s-block--offer-countdown .s-count-down-item-label {
    font-size: 11px !important;
}


/* للجوال */
@media (max-width: 768px) {
    .s-block--offer-countdown .offer-countdown-title {
        font-size: 17px !important;
    }

    .s-block--offer-countdown .s-count-down-item-value {
        font-size: 17px !important;
    }

    .s-block--offer-countdown .s-count-down-item-label {
        font-size: 10px !important;
    }
}
a.wa-s-n {
    display: none !important;
}