/* J&V Criminal Law display patch v1.3.0
 * Scope: criminal-law archive only. The catalog already uses the same 3-row
 * horizontal grid rules from the site's Additional CSS.
 */

.tm-criminal-archive .tm-tabs-content__item-active .tm-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-template-rows: repeat(3, auto) !important;
    grid-auto-columns: calc(33.333% - 14px) !important;
    gap: 16px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
    padding-bottom: 20px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
}

.tm-criminal-archive .tm-tabs-content__item-active .tm-grid::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.tm-criminal-archive .tm-tabs-content__item-active .tm-grid > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
}

.tm-criminal-archive .tm-grid.tm-service-rows-1 {
    grid-template-rows: repeat(1, auto) !important;
}

.tm-criminal-archive .tm-grid.tm-service-rows-2 {
    grid-template-rows: repeat(2, auto) !important;
}

.tm-criminal-archive .tm-grid.tm-service-rows-3 {
    grid-template-rows: repeat(3, auto) !important;
}

.tm-criminal-archive .jv-ncl-service-scrollbar {
    display: block !important;
    width: 100% !important;
    height: 4px !important;
    background: rgba(255,255,255,.20) !important;
    border-radius: 10px !important;
    margin: 8px 0 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.tm-criminal-archive .jv-ncl-service-scrollbar__thumb {
    height: 100% !important;
    min-width: 42px !important;
    background: #fff !important;
    border-radius: 10px !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    will-change: transform, width;
}

.tm-criminal-archive .jv-ncl-service-scrollbar.is-static {
    display: none !important;
}

@media (max-width: 767px) {
    .tm-criminal-archive .tm-tabs-content__item-active .tm-grid {
        grid-auto-columns: 82% !important;
        grid-template-rows: repeat(3, auto) !important;
    }
}
