/* ===== تسوّق بالأقسام (الصفحة الرئيسية) ===== */


.category-main .categories-slider h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 22px;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: #670756 !important;
    padding-bottom: 10px;
}

.category-main .categories-slider h2::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #670756, #b65aa0);
}

/* الحاوية */
.categories-scroll {
    display: flex !important;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 6px 4px 18px;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* البطاقة */
.categories-scroll .category-item {
    flex: 0 0 clamp(150px, 22vw, 230px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 14px 16px;
    background: #fff;
    border: 1px solid #f1e6ee;
    border-radius: 22px;
    box-shadow: 0 8px 22px rgba(103, 7, 86, 0.08);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.categories-scroll .category-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(103, 7, 86, 0.16);
    border-color: #e4c6dc;
}

.categories-scroll .category-title {
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    font-size: clamp(14px, 1.4vw, 16px);
    font-weight: 800;
    color: #3b1a33;
    line-height: 1.3;
}

/* صورة المنتج داخل مربع ناعم، والزر أسفله */
.categories-scroll .category-bg {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background-color: #fdf7fb;
    background-repeat: no-repeat;
    background-position: center center;
    background-origin: content-box;
    background-clip: content-box;
    padding: 12px 12px 50px;
    box-sizing: border-box;
    background-size: contain;
    overflow: hidden;
    transition: none;
}

.categories-scroll .category-bg:hover {
    transform: none;
}

/* زر تسوق الآن */
.categories-scroll .btn-shop {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    transform: none;
    padding: 11px 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
    background: linear-gradient(90deg, #670756 0%, #883576 100%);
    border: 0;
    border-radius: 0 0 16px 16px;
    text-decoration: none;
    box-shadow: 0 -4px 12px rgba(103, 7, 86, 0.18);
    transition: filter 0.2s ease;
}

.categories-scroll .btn-shop:hover {
    filter: brightness(1.08);
    color: #fff;
}

/* الأسهم */
.category-main .arrow-btn {
    top: 45%;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #f1e6ee;
    color: #670756;
    box-shadow: 0 6px 16px rgba(103, 7, 86, 0.14);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-main .arrow-btn:hover {
    background: #670756;
    color: #fff;
}

.category-main .arrow-btn:active {
    transform: translateY(-50%) scale(0.94);
}

@media (max-width: 991px) {
    .categories-scroll {
        gap: 14px;
    }

    .categories-scroll .category-item {
        flex-basis: clamp(150px, 36vw, 210px);
    }
}

@media (max-width: 575px) {
    .categories-scroll {
        gap: 12px;
        padding: 4px 2px 14px;
    }

    .categories-scroll .category-item {
        flex-basis: 44vw;
        padding: 10px 10px 0;
        border-radius: 18px;
    }

    .categories-scroll .category-bg {
        border-radius: 14px;
    }

    .categories-scroll .btn-shop {
        font-size: 13px;
        padding: 9px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .categories-scroll,
    .categories-scroll .category-item,
    .category-main .arrow-btn {
        transition: none;
        scroll-behavior: auto;
    }
}
