.yadak-child-cats {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 0 24px;
    padding: 2px 0 10px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    cursor: grab;
}

.yadak-child-cats.is-mouse-down,
.yadak-child-cats.is-mouse-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.yadak-child-cats.is-mouse-dragging * {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.yadak-child-cat {
    flex: 0 0 calc((100% - 36px) * .25);
    min-width: calc((100% - 36px) * .25);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    direction: ltr;
    scroll-snap-align: start;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.yadak-child-cat:hover {
    color: inherit;
    border-color: #d5d5d5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    transform: translateY(-1px);
}

.yadak-child-cat__image {
    flex: 0 0 66px;
    width: 66px;
    height: 66px;
    max-width: 66px;
    margin: 0;
    object-fit: contain;
    border-radius: 7px;
    -webkit-user-drag: none;
    user-select: none;
}

.yadak-child-cat__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    direction: rtl;
    text-align: right;
    font-size: 13px;
    line-height: 1.5;
}

.yadak-child-cat__title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    text-overflow: ellipsis;
}

.yadak-child-cat__count {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 400;
    color: #b8b8b8;
}

.yadak-child-cats::-webkit-scrollbar {
    height: 5px;
}

.yadak-child-cats::-webkit-scrollbar-track {
    background: transparent;
}

.yadak-child-cats::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.yadak-child-cats::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Tablet: approximately 2.5 cards visible. */
@media (min-width: 768px) and (max-width: 1024px) {
    .yadak-child-cats {
        gap: 10px;
        margin-bottom: 20px;
    }

    .yadak-child-cat {
        flex-basis: calc((100% - 20px) * .4);
        min-width: calc((100% - 20px) * .4);
        padding: 10px;
    }

    .yadak-child-cat__image {
        flex-basis: 62px;
        width: 62px;
        height: 62px;
        max-width: 62px;
    }
}

/* Mobile portrait: 2.5 cards visible at once. */
@media (max-width: 767px) and (orientation: portrait) {
    .yadak-child-cats {
        gap: 8px;
        margin-bottom: 18px;
        padding-bottom: 8px;
        cursor: auto;
        scroll-snap-type: x proximity;
    }

    .yadak-child-cat {
        flex-basis: calc((100% - 16px) * .4);
        min-width: calc((100% - 16px) * .4);
        gap: 7px;
        padding: 8px;
        border-radius: 9px;
    }

    .yadak-child-cat__image {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        max-width: 52px;
    }

    .yadak-child-cat__content {
        gap: 1px;
    }

    .yadak-child-cat__title {
        font-size: 11.5px;
        line-height: 1.35;
    }

    .yadak-child-cat__count {
        font-size: 9px;
    }
}

/* Mobile landscape: fit more cards naturally. */
@media (max-width: 767px) and (orientation: landscape) {
    .yadak-child-cats {
        gap: 9px;
        margin-bottom: 18px;
    }

    .yadak-child-cat {
        flex-basis: calc((100% - 27px) * .25);
        min-width: calc((100% - 27px) * .25);
        padding: 8px 9px;
    }

    .yadak-child-cat__image {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
        max-width: 54px;
    }
}
