/* تحسينات سلايدر التصنيفات */
.categories-slider-container {
    position: relative;
    overflow: hidden;
}

.categories-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 0.5rem 0;
}

.categories-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-slide {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.category-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.category-card:hover::after {
    transform: translateX(100%);
}

.category-image {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .category-image {
    transform: scale(1.1) rotate(5deg);
}

.category-card.active .category-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* تأثيرات التحميل */
.category-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.category-image[src] {
    background: none;
    animation: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* تحسينات الأزرار */
.categories-nav-arrows .btn {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff7a00;
}

.categories-nav-arrows .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 122, 0, 0.3);
}

.categories-nav-arrows .btn:disabled {
    opacity: 0.3;
    transform: scale(0.9);
    cursor: not-allowed;
}

/* تأثيرات النقر */
.category-card:active {
    transform: translateY(-1px) scale(0.98);
}

/* تحسينات للأجهزة اللوحية */
@media (max-width: 992px) {
    .categories-slider {
        gap: 0.75rem;
    }
    
    .category-slide {
        min-width: 180px;
        width: 180px;
    }
}

/* تحسينات للهواتف */
@media (max-width: 576px) {
    .categories-slider {
        gap: 0.5rem;
        padding: 0.25rem 0;
    }
    
    .category-slide {
        min-width: 130px;
        width: 130px;
    }
    
    .categories-nav-arrows .btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* تأثيرات السحب */
.categories-slider.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.categories-slider.dragging .category-card {
    pointer-events: none;
}

/* تحسين الأداء */
.category-card {
    will-change: transform;
    backface-visibility: hidden;
}

.category-image {
    will-change: transform;
    backface-visibility: hidden;
}
