.categories-custom {
    padding-top: 50px;
    
    @media (max-width: 1024px) {
        padding-top: 40px;
    }

    @media (max-width: 990px) {
        padding-top: 30px;
    }
}

@media screen and (max-width: 1024px) {
    .categories-custom {
        padding-top: 40px;
    }
}

@media screen and (max-width: 990px) {
    .categories-custom {
        padding-top: 30px;
    }
}


.categories-custom__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;

    @media (max-width: 990px) {
        margin-bottom: 23px;
    }
}

@media screen and (max-width: 990px) {
    .categories-custom__top {
        margin-bottom: 23px;
    }
}

.categories-custom__bottom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-column-gap: 16px;
    grid-row-gap: 16px;
    grid-auto-rows: 237px;
}

.categories-custom__item1 { grid-area: 1 / 1 / 2 / 3; }
.categories-custom__item2 { grid-area: 1 / 3 / 2 / 4; }
.categories-custom__item3 { grid-area: 1 / 4 / 2 / 5; }
.categories-custom__item4 { grid-area: 2 / 1 / 4 / 2; }
.categories-custom__item5 { grid-area: 2 / 2 / 3 / 3; }
.categories-custom__item6 { grid-area: 2 / 3 / 3 / 5; }
.categories-custom__item7 { grid-area: 3 / 2 / 4 / 4; }
.categories-custom__item8 { grid-area: 3 / 4 / 5 / 5; }
.categories-custom__item9 { grid-area: 4 / 1 / 5 / 2; }
.categories-custom__item10 { grid-area: 4 / 2 / 5 / 3; }
.categories-custom__item11 { grid-area: 4 / 3 / 5 / 4; }


@media (max-width: 1124px) {
    .categories-custom__bottom {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }

    .categories-custom__item1 { grid-area: 1 / 1 / 2 / 3; }
    .categories-custom__item2 { grid-area: 1 / 3 / 3 / 4; }
    .categories-custom__item3 { grid-area: 2 / 1 / 4 / 2; }
    .categories-custom__item4 { grid-area: 2 / 2 / 3 / 3; }
    .categories-custom__item5 { grid-area: 4 / 2 / 5 / 3; }
    .categories-custom__item6 { grid-area: 4 / 1 / 5 / 2; }
    .categories-custom__item7 { grid-area: 3 / 2 / 4 / 4; }
    .categories-custom__item8 { grid-area: 4 / 3 / 6 / 4; }
    .categories-custom__item9 { grid-area: 5 / 1 / 6 / 2; }
    .categories-custom__item10 { grid-area: 5 / 2 / 6 / 3; }
    .categories-custom__item11 { grid-area: 6 / 1 / 7 / 4; }
}

@media (max-width: 814px) {
    .categories-custom__bottom {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(11, 1fr);
    }

    .categories-custom__item1 { grid-area: 1 / 1 / 2 / 2; }
    .categories-custom__item2 { grid-area: 2 / 1 / 3 / 2; }
    .categories-custom__item3 { grid-area: 3 / 1 / 4 / 2; }
    .categories-custom__item4 { grid-area: 4 / 1 / 5 / 2; }
    .categories-custom__item5 { grid-area: 5 / 1 / 6 / 2; }
    .categories-custom__item6 { grid-area: 6 / 1 / 7 / 2; }
    .categories-custom__item7 { grid-area: 7 / 1 / 8 / 2; }
    .categories-custom__item8 { grid-area: 10 / 1 / 11 / 2; }
    .categories-custom__item10 { grid-area: 9 / 1 / 10 / 2; }
    .categories-custom__item9 { grid-area: 8 / 1 / 9 / 2; }
    .categories-custom__item11 { grid-area: 11 / 1 / 12 / 2; }
}

.categories-custom__card {
    position: relative;
    background-color: var(--color-white);
    padding: 14px 16px;
    border-radius: 5px;
    min-height: 237px;
    min-width: 250px;
    height: 100%;
    overflow: hidden;

    @media (max-width: 500px) {
        min-height: 264px;
    }
}

@media screen and (max-width: 500px) {
    .categories-custom__card {
        min-height: 264px;
    }
}

.categories-custom__card:hover {
    outline: 1px solid var(--color-blue-new);
}

.categories-custom__card:hover .categories-custom__card-title,
.categories-custom__card:hover .categories-custom__card-link {
    color: var(--color-blue-new);
}

.categories-custom__card-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.categories-custom__card-image {
    position: absolute;
    right: 0;
    bottom: 35%;
    transform: translateY(50%);
    max-width: 70%;
    z-index: 1;
}


@media screen and (max-width: 533px) {
    .categories-custom__card-image {
        max-width: 100%;
    }
}


@media screen and (max-width: 533px) {
    .categories-custom__card-image.categories-custom__card-image--isSmallOnMobile {
        max-width: 40%;
    }
}


.categories-custom__card-image--isBottom40 {
    bottom: 40%;
}

.categories-custom__card-image--isBottom50{
    bottom: 50%;
}

.categories-custom__card-image--isBottom32 {
    bottom: 32%;
}

.categories-custom__card-image--isBottom30Mobile{
    @media (max-width: 500px) {
        bottom: 30%;
    }
}

@media screen and (max-width: 500px) {
    .categories-custom__card-image--isBottom30Mobile {
        bottom: 30%;
    }
}

@media screen and (max-width: 1920px) {
    .categories-custom__card-image--isSmallOnAdaptive {
        max-width: 45%;
    }
}

@media screen and (max-width: 1480px) {
    .categories-custom__card-image--isSmallOnAdaptive {
        max-width: 40%;
    }
}

@media screen and (max-width: 1280px) {
    .categories-custom__card-image--isSmallOnAdaptive {
        max-width: 50%;
    }
}

@media screen and (max-width: 768px) {
    .categories-custom__card-image--isSmallOnAdaptive {
        max-width: 30%;
    }
}

.categories-custom__card-title {
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.categories-custom__card-subtitle {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--color-PayneGrayLight);
    position: relative;
    z-index: 1;
    max-height: 80%;
    overflow: hidden;
}

.categories-custom__card--short .categories-custom__card-subtitle {
    max-width: 270px;
    max-height: 80%;
    overflow: hidden;
}

@media screen and (max-width: 1280px) {
    .categories-custom__card--short .categories-custom__card-subtitle.categories-custom__card-subtitle--isShortOnTablet {
        max-width: 50%;
    }
}


@media screen and (max-width: 768px) {
    .categories-custom__card--short .categories-custom__card-subtitle.categories-custom__card-subtitle--isShortOnTablet {
        max-width: 100%;
    }
}

.categories-custom__card-link {
    display: inline-block;
    width: fit-content;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.categories-custom__card-title-link:before {
    content: "";
    inset: 0;
    position: absolute;
    z-index: 2;
}

.categories-custom__card--long .categories-custom__card-subtitle {
    max-width: 274px;
}

.categories-custom__card--isTablesCard .categories-custom__card-image{
    @media (max-width: 817px) {
        max-width: 100%;
        min-width: 320px;
        max-height: 114px;
    }
}

@media screen and (max-width: 817px) {
    .categories-custom__card--isTablesCard .categories-custom__card-image {
        max-width: 100%;
        min-width: 320px;
        max-height: 114px;
    }
}


.categories-custom__card--isManipulatorCard .categories-custom__card-image {
    @media (max-width: 817px) {
        max-width: 100%;
        min-width: 155px;
        max-height: 228px;
        bottom: 50%;
    }
}

@media  screen and (max-width: 817px) {
    .categories-custom__card--isManipulatorCard .categories-custom__card-image {
        max-width: 100%;
        min-width: 155px;
        max-height: 228px;
        bottom: 50%;
    }

}

.categories-custom__card--isDriveUnitCard .categories-custom__card-image {
    @media (max-width: 817px) {
        max-width: 100%;
        min-width: 200px;
        max-height: 162px;
        bottom: 40%;
    }
}

@media screen and (max-width: 817px) {
    .categories-custom__card--isDriveUnitCard .categories-custom__card-image {
        max-width: 100%;
        min-width: 200px;
        max-height: 162px;
        bottom: 40%;
    }
}


@media screen and (max-width: 500px) {
    .categories-custom__card--isTables .categories-custom__card-image img{
        width: 88%;
        position: relative;
        left: 6%;
        bottom: 33px
    }
}


@media screen and (max-width: 500px) {
    .categories-custom__card--isTables .categories-custom__card-image img{
        width: 88%;
        position: relative;
        left: 6%;
        bottom: 33px
    }
}
@media screen and (max-width: 425px) {
    .categories-custom__card--isTables .categories-custom__card-image img{
        width: 88%;
        position: relative;
        left: 6%;
        bottom: 17px
    }
}


