/* ===== Categories Slider ===== */
.byanati-categories-slider {
    padding: 20px 0 60px 0;
    background: transparent;
    direction: rtl;
    font-family: inherit;
}

.cats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Bar */
.cats-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.cats-section-title {
    font-size: 26px;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
    position: relative;
    padding-right: 15px;
}

.cats-section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 26px;
    background: linear-gradient(180deg, #118fa6, #5fc9df);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(17, 143, 166, 0.4);
}

/* Controls */
.cats-controls {
    display: flex;
    gap: 10px;
}

.cats-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.cats-nav-btn:hover {
    background: linear-gradient(135deg, #118fa6, #5fc9df);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(17, 143, 166, 0.3);
}

.cats-next svg { transform: rotate(180deg); }

/* Track Wrapper for edge fading */
.cats-track-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

/* Track */
.cats-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 20px 5%;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.cats-track::-webkit-scrollbar {
    display: none;
}

/* Specific item */
.cat-slide-item {
    flex: 0 0 calc(16.666% - 25px); /* desktop 6 visible items */
    min-width: 140px;
    scroll-snap-align: center;
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    text-align: center;
}

/* Circle Image */
.cat-img-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.cat-img-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #118fa6, #5fc9df) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: 0.4s ease;
}

.cat-card:hover .cat-img-wrap::after {
    opacity: 1;
    transform: scale(1.05);
}

.cat-card:hover .cat-img-wrap {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(17, 143, 166, 0.25);
}

.cat-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
}

.cat-card:hover .cat-img-wrap img {
    transform: scale(1.15) rotate(-2deg);
}

/* Information Text */
.cat-name {
    color: #e2e8f0;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px 0;
    transition: color 0.3s;
}

.cat-card:hover .cat-name {
    color: #5fc9df;
}

.cat-count {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Responsive constraints */
@media (max-width: 1024px) {
    .cat-slide-item {
        flex: 0 0 calc(20% - 24px); /* 5 items */
        min-width: 130px;
    }
}

@media (max-width: 900px) {
    .cat-slide-item {
        flex: 0 0 calc(25% - 22.5px); /* 4 items */
    }
    .cat-img-wrap {
        width: 120px;
        height: 120px;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .cats-header-bar {
        margin-bottom: 25px;
    }
    .cats-section-title {
        font-size: 22px;
    }
    .cat-slide-item {
        flex: 0 0 calc(33.333% - 20px); /* 3 items */
        min-width: 100px;
    }
    .cat-img-wrap {
        width: 100px;
        height: 100px;
        padding: 18px;
    }
    .cat-name {
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .cat-slide-item {
        flex: 0 0 calc(45% - 15px); /* 2 items with overflow peek */
    }
}
