.vodoley-action-view .vodoley-action-category-grid {
    display: grid;
    grid-template-columns: repeat(var(--vodoley-action-cols-desktop, 4), minmax(var(--vodoley-action-tile-min, 130px), 1fr));
    gap: var(--vodoley-action-gap, 16px);
}

.vodoley-action-view .vodoley-action-category-card {
    min-width: 0;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .5rem;
    background: var(--bs-body-bg, #fff);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.vodoley-action-view .vodoley-action-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .08);
    border-color: rgba(0, 96, 153, .35);
}

.vodoley-action-view .vodoley-action-category-link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .8rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

/*
 * 1.2.3+: category artwork follows the real tile width instead of using one
 * fixed thumbnail height. With the default 4-column floor an image grows to
 * roughly 175-180px; with 7-8 columns the same rule naturally settles around
 * 105-120px, preserving the eight-column layout without tiny previews when
 * only a few promotional sections exist.
 */
.vodoley-action-view .vodoley-action-category-media {
    display: flex;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 104px;
    max-height: 180px;
    align-items: center;
    justify-content: center;
    margin-bottom: .65rem;
    overflow: hidden;
}

.vodoley-action-view .vodoley-action-category-media > [itemscope] {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vodoley-action-view .vodoley-action-category-image {
    display: block;
    width: min(82%, 180px);
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
    margin-inline: auto;
    transform: scale(1);
    transform-origin: center center;
    transition: transform .24s ease;
    will-change: transform;
}

/* Same interaction family as VP Neoteric's add-hover-effect category cards. */
.vodoley-action-view .vodoley-action-category-card:hover .vodoley-action-category-image,
.vodoley-action-view .vodoley-action-category-link:focus-visible .vodoley-action-category-image {
    transform: scale(1.07);
}

.vodoley-action-view .vodoley-action-category-name {
    display: block;
    font-size: .94rem;
    line-height: 1.25;
    font-weight: 500;
}

.vodoley-action-view .vodoley-action-category-count {
    display: block;
    margin-top: .35rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: .78rem;
    line-height: 1.2;
}

.vodoley-action-view .vodoley-action-toolbar .form-select {
    width: auto;
    min-width: 170px;
}

.vodoley-action-view .vodoley-action-back a {
    text-decoration: none;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .vodoley-action-view .vodoley-action-category-grid {
        grid-template-columns: repeat(var(--vodoley-action-cols-medium, 6), minmax(var(--vodoley-action-tile-min, 130px), 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .vodoley-action-view .vodoley-action-category-grid {
        grid-template-columns: repeat(var(--vodoley-action-cols-tablet, 4), minmax(var(--vodoley-action-tile-min, 130px), 1fr));
    }

    .vodoley-action-view .vodoley-action-category-media {
        max-height: 155px;
    }

    .vodoley-action-view .vodoley-action-category-image {
        width: min(84%, 155px);
    }
}

@media (max-width: 767.98px) {
    .vodoley-action-view .vodoley-action-category-grid {
        grid-template-columns: repeat(var(--vodoley-action-cols-mobile, 2), minmax(0, 1fr));
    }

    .vodoley-action-view .vodoley-action-category-link {
        padding: .65rem;
    }

    .vodoley-action-view .vodoley-action-category-media {
        aspect-ratio: 4 / 3;
        min-height: 88px;
        max-height: 132px;
    }

    .vodoley-action-view .vodoley-action-category-image {
        width: min(86%, 140px);
    }

    .vodoley-action-view .vodoley-action-toolbar,
    .vodoley-action-view .vodoley-action-toolbar .form-select {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vodoley-action-view .vodoley-action-category-card,
    .vodoley-action-view .vodoley-action-category-image {
        transition: none;
    }

    .vodoley-action-view .vodoley-action-category-card:hover .vodoley-action-category-image,
    .vodoley-action-view .vodoley-action-category-link:focus-visible .vodoley-action-category-image {
        transform: none;
    }
}
