/* ==============================
   CATEGORIES - DESKTOP
   ============================== */

.olla-categories-category {
    width: 120px !important;
    flex: 0 0 120px !important;
    text-align: center;
}

/* توحيد حجم الصور */
.olla-categories-category .w-24.h-24 {
    width: 96px !important;
    height: 96px !important;
    margin: 0 auto !important;
}

/* توحيد مساحة العنوان */
.olla-categories-category .text {
    width: 120px !important;
    min-height: 48px !important;
    margin-top: 10px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

/* العنوان */
.olla-categories-category h4 {
    width: 100% !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    white-space: normal !important;
}


/* ==============================
   MOBILE
   3 عناصر + سحب أفقي
   ============================== */

@media (max-width: 767px) {

    /* الحاوية الرئيسية */
    .olla-categories-category {
        width: calc((100vw - 48px) / 3) !important;
        min-width: calc((100vw - 48px) / 3) !important;
        max-width: calc((100vw - 48px) / 3) !important;
        flex: 0 0 calc((100vw - 48px) / 3) !important;
    }

    /* إلغاء الـwrap */
    .olla-categories-category
    ~ .olla-categories-category {
        flex-shrink: 0 !important;
    }

    /* حجم الصورة يبقى ثابت */
    .olla-categories-category .w-24.h-24 {
        width: 96px !important;
        height: 96px !important;
        margin: 0 auto !important;
    }

    /* مساحة العنوان */
    .olla-categories-category .text {
        width: 100% !important;
        min-height: 52px !important;
        margin-top: 10px !important;
        padding: 0 2px !important;
    }

    .olla-categories-category h4 {
        font-size: 16px !important;
        line-height: 1.45 !important;
        text-align: center !important;
    }

    /*
       نخلي الحاوية أفقية وقابلة للسحب
       بدون تغيير الـHTML
    */
    .flex.md\:gap-6.gap-3.flex-wrap.justify-center.items-center {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        gap: 12px !important;

        padding-left: 12px !important;
        padding-right: 12px !important;

        scroll-behavior: smooth;

        /* إخفاء شريط السحب */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .flex.md\:gap-6.gap-3.flex-wrap.justify-center.items-center::-webkit-scrollbar {
        display: none;
    }

    /* منع العناصر من النزول لسطر جديد */
    .flex.md\:gap-6.gap-3.flex-wrap.justify-center.items-center
    > .olla-categories-category {
        flex-shrink: 0 !important;
    }
/* دمج عنوان "تسوقي حسب الخامة" مع قسم الخامات */
.olla-components-text.relative.py-10 {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* إزالة المسافة العلوية من قسم الخامات */
section.olla-categories {
    padding-top: 0 !important;
    margin-top: 0 !important;
}