
.categories {
    position: relative;
    margin-top: 60px;
}

.category-slider {
    position: relative;
    display: flex;
    overflow-x: auto;
    align-items: flex-start;
    justify-content: flex-start;
    scrollbar-width: none;
}

.category-slider::-webkit-scrollbar {
    display: none;
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 236px;
    min-width: 236px;
    height: 230px;
    padding: 20px 3px 3px 3px;
    border-radius: 15px;
    background: rgb(244, 244, 244);
    color: #000;
    text-decoration: none;
}

.category:not(:last-child) {
    margin-right: 15px;
}

.category:hover {
    background: linear-gradient(321.17deg, #E31E24 44.13%, #F39513 104.24%);
    color: #fff;
}

.category-name {
    padding: 0 17px;
    font-family: Inter;
    font-size: 20px;
    font-weight: 500;
    line-height: 26px;
    text-align: center;
}

.category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 15px;
    background-image: url(/bitrix/templates/aspro_max/new_images/category_background_white.png);
    background-position: bottom center;
    background-repeat: no-repeat;
}

.category:hover .category-image {
    background-image: url(/bitrix/templates/aspro_max/new_images/category_background_gray.png);
}

.category-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.category-nav {
    position: absolute;
    top: 87px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: rgba(209, 46, 40);
    cursor: pointer;
}

.category-nav:hover {
    background: rgba(255, 48, 40);
}

.category-nav-prev {
    left: -32px;
    transform: rotate(180deg);
}

.category-nav-next {
    right: -30px;
}

@media (max-width: 576px) {
    .category-nav {
        display: none;
    }
}

@media (min-width: 576px) and (max-width: 1348px) {
    .category-nav-prev {
        left: 0;
    }

    .category-nav-next {
        right: 0;
    }
}

.discounts {
    margin-top: 88px;
}

.discount-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.discount-all {
    position: relative;
    top: 1px;
    left: 1px;
    padding: 12.5px 20.5px;
    border-radius: 100px;
    background: rgba(209, 46, 40, 1);
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.discount-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: -3px;
    padding-top: 3px;
}

.discount-title-text {
    margin-left: 7px;
    padding-top: 1px;
    font-family: Inter;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

@media (max-width: 576px) {
    .discount-all {
        display: block;
        width: 100%;
        margin-top: 20px;
    }

    .discount-header {
        margin-bottom: 15px;
    }

    .discount-title-text {
        font-size: 22px;
    }

    .discount-title {
        align-items: flex-start;
    }
}

.brands {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 8px;
    padding-top: 60px;
    padding-block: 60px;
}

.brand-title {
    width: 219px;
    margin-right: 14px;
    padding-top: 13px;
    padding-left: 3px;
    font-family: Inter;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
}

.brand-divider {
    width: 1px;
    height: 88px;
    margin-right: 15px;
    background: rgba(217, 217, 217, 1);
}

.brand-items {
    display: flex;
    overflow-x: auto;
    align-items: center;
    justify-content: flex-start;
    width: calc(100% - 219px - 14px - 1px - 16px);
    padding-top: 12px;
    padding-left: 1px;
    scrollbar-width: none;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand:not(:last-child) {
    margin-right: 40px;
}

.brand img {
    max-width: 100px;
    max-height: 60px;
    object-fit: contain;
}

.custom-slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.custom-slider-track {
    display: flex;
    width: calc(200px * 28);
    animation: custom-slide-animation 30s linear infinite;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.custom-slide {
    visibility: visible !important;
    flex: 0 0 200px;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
    /* Гарантируем, что слайды всегда видны */
    opacity: 1 !important;
    transition: transform 0.3s ease;
}

.custom-slide:hover {
    transform: translateY(-5px);
}

.custom-slide img {
    display: block;
    visibility: visible !important;
    width: auto;
    max-width: 100px;
    height: auto;
    max-height: 60px;
    margin: 0 auto 15px;
    object-fit: contain;
    opacity: 1 !important;
    /* Гарантируем, что изображения всегда видны */
    filter: grayscale(30%);
    transition: filter 0.3s ease;
}

.custom-slide:hover img {
    filter: grayscale(0%);
}

.custom-slide-caption {
    color: #34495e;
    font-size: 15px;
    font-weight: 500;
}

@keyframes custom-slide-animation {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 14));
    }
}

/* Градиенты по краям для плавности */
.custom-slider-wrapper::before,
.custom-slider-wrapper::after {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 100px;
    height: 100%;
    content: '';
    pointer-events: none;
}

.custom-slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.custom-slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

/* Пауза при наведении */
.custom-slider-wrapper:hover .custom-slider-track {
    animation-play-state: paused;
}

@media (max-width: 576px) {

    .brands {
        flex-wrap: wrap;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .brand-title {
        width: 100%;
        font-size: 18px;
    }

    .brand-divider {
        display: none;
    }

    .brand-items {
        flex-wrap: nowrap;
        width: 100%;
        padding-top: 10px;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .custom-slide {
        flex: 0 0 150px;
    }

    .custom-slider-track {
        width: calc(150px * 28);
    }

    @keyframes custom-slide-animation {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-150px * 14));
        }
    }
}

@media (max-width: 480px) {
    .custom-slide {
        flex: 0 0 120px;
        padding: 15px 10px;
    }

    .custom-slider-track {
        width: calc(120px * 28);
    }

    @keyframes custom-slide-animation {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-120px * 14));
        }
    }

    .custom-slide img {
        max-width: 80px;
    }
}

.works {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 116px;
}

.work-header {
    padding-top: 0;
    padding-right: 40px;
}

.work-header-title {
    font-family: Inter;
    font-size: 32px;
    font-weight: 600;
    line-height: 38px;
    letter-spacing: 0.4px;
}

.work-header-description {
    margin-top: 15px;
    color: rgba(1, 1, 1, 0.6);
    font-family: Inter;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
}

.work-header-description p {
    margin-bottom: 7px;
}

.work-header-button-wrapper {
    margin-top: 35px;
}

.work-header-button {
    position: relative;
    left: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 210px;
    height: 49px;
    border-radius: 100px;
    background: rgba(209, 46, 40, 1);
    color: #fff;
    letter-spacing: 0.1px;
    text-decoration: none;
}

.work-items {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.work-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    margin-left: 20px;
}

.work {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
}

.work-multiple:not(:last-child) {
    margin-bottom: 20px;
}

.work-info {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 25px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 64.96%, rgba(0, 0, 0, 0.64) 84.54%, rgba(0, 0, 0, 0.8) 100%);
}

.work-name {
    position: relative;
    top: 4px;
    color: #fff;
    font-family: Inter;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.work-description {
    display: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: Inter;
    font-size: 16px;
    font-weight: 400;
}

.work-price {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 102px;
    height: 27px;
    margin-top: 20px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 1);
    color: #000;
    font-family: Inter;
    font-size: 14px;
    font-weight: 500;
}

.work-link {
    display: flex;
    display: none;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: rgba(209, 46, 40, 1);
}

/* =========================
   WORKS — TABLET
   ========================= */

@media (min-width: 577px) and (max-width: 1024px) {
    .works {
        flex-direction: column;
        align-items: stretch;
        padding-top: 70px;
    }

    .work-header {
        width: 100%;
        margin-bottom: 30px;
        padding-right: 0;
    }

    .work-header-title {
        max-width: 700px;
        font-size: 28px;
        line-height: 34px;
    }

    .work-header-description {
        max-width: 750px;
        font-size: 17px;
        line-height: 23px;
    }

    .work-header-button-wrapper {
        margin-top: 25px;
    }

    .work-items {
        display: block;
        width: 100%;
    }

    .work-single {
        width: 100%;
        height: 420px;
    }

    .work-single .work-image,
    .work-single .work-image picture,
    .work-single .work-image img {
        display: block;
        width: 100%;
        height: 100%;
    }

    .work-single .work-image img {
        object-fit: cover;
    }

    .work-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;

        width: 100%;
        margin-top: 16px;
        margin-left: 0;
    }

    .work-multiple {
        height: 260px;
        margin-bottom: 0 !important;
    }

    .work-multiple .work-image,
    .work-multiple .work-image picture,
    .work-multiple .work-image img {
        display: block;
        width: 100%;
        height: 100%;
    }

    .work-multiple .work-image img {
        object-fit: cover;
    }

    .work-info {
        padding: 20px;
    }

    .work-name {
        font-size: 21px;
        line-height: 25px;
    }
}


/* =========================
   WORKS — SMALL TABLET
   ========================= */

@media (min-width: 577px) and (max-width: 767px) {
    .works {
        padding-top: 50px;
    }

    .work-header-title {
        font-size: 25px;
        line-height: 30px;
    }

    .work-header-description {
        font-size: 16px;
        line-height: 21px;
    }

    .work-single {
        height: 340px;
    }

    .work-group {
        grid-template-columns: 1fr;
    }

    .work-multiple {
        height: 280px;
    }
}


/* =========================
   WORKS — MOBILE
   ========================= */

@media (max-width: 576px) {
    .works {
        display: block;
        padding-top: 35px;
    }

    .work-header {
        width: 100%;
        margin-bottom: 20px;
        padding-right: 0;
    }

    .work-header-title {
        font-size: 22px;
        line-height: 27px;
        letter-spacing: 0;
    }

    .work-header-description {
        margin-top: 12px;
        font-size: 15px;
        line-height: 20px;
    }

    .work-header-description p {
        margin-bottom: 6px;
    }

    .work-items.only-mobile {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;

        align-items: stretch;
        width: 100%;

        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .work-items.only-mobile::-webkit-scrollbar {
        display: none;
    }

    .work {
        flex: 0 0 calc(100vw - 48px);
        min-width: 280px;
        max-width: 360px;

        height: auto;
        margin-right: 15px;

        border-radius: 0;

        scroll-snap-align: start;
    }

    .work:last-child {
        margin-right: 0;
    }

    .work-image {
        display: flex;
        overflow: hidden;

        align-items: center;
        justify-content: center;
        width: 100%;

        height: 210px;
        border-radius: 20px;
    }

    .work-image picture {
        display: block;
        width: 100%;
        height: 100%;
    }

    .work-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .work-info {
        position: relative;

        top: auto;
        right: auto;
        bottom: auto;
        left: auto;

        display: block;

        padding: 14px 0 0;
        background: none;
    }

    .work-body {
        width: 100%;
    }

    .work-name {
        position: static;

        color: #000;
        font-size: 18px;
        line-height: 22px;
        letter-spacing: 0;
    }

    .work-description {
        display: block;
        margin-top: 6px;
        color: rgba(1, 1, 1, 0.6);
        font-size: 14px;
        line-height: 18px;
    }

    .work-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;

        margin-top: 12px;
    }

    .work-price {
        width: auto;
        min-width: 102px;
        height: 30px;
        margin-top: 0;
        padding: 0 12px;
        background: #f5f5f5;
        color: #000;
    }

    .work-link {
        display: flex;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
    }

    .work-header-button-wrapper {
        width: 100%;
        margin-top: 20px;
    }

    .work-header-button {
        left: 0;

        width: 100%;
        height: 48px;
    }
}


/* Совсем маленькие телефоны */
@media (max-width: 360px) {
    .work {
        flex-basis: calc(100vw - 32px);
        min-width: 0;
    }

    .work-image {
        height: 190px;
    }

    .work-header-title {
        font-size: 20px;
        line-height: 25px;
    }
}

@media (max-width: 576px) {
    .works {
        flex-wrap: wrap;
        padding-top: 0;
    }

    .work-header {
        width: 100%;
    }

    .work-header-title {
        font-size: 22px;
        line-height: 26px;
    }

    .work-header-description {
        font-size: 16px;
        line-height: 19px;
    }

    .work-items {
        flex-wrap: nowrap;
        width: 100%;
    }

    .work-body {
        width: 100%;
    }

    .work {
        min-width: 290px;
        height: auto;
        margin-right: 15px;
        border-radius: 0;
    }

    .work-image {
        display: flex;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        max-height: 210px;
        border-radius: 25px;
    }

    .work-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .work-info {
        position: relative;
        padding: 14px 0 0 0;
        background: none;
    }

    .work-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
    }

    .work-name {
        color: #000;
        font-size: 18px;
        line-height: 22px;
    }

    .work-description {
        margin-top: 5px;
        color: #000;
        font-size: 14px;
        line-height: 16px;
    }

    .work-price {
        margin-top: 0;
        background: rgba(245, 245, 245, 1);
        color: #000;
    }

    .work-header-button-wrapper {
        width: 100%;
        margin-top: 15px;
    }

    .work-header-button {
        width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 1348px) {
    .works {
        flex-wrap: wrap;
    }

    .work-header {
        width: 100%;
    }

    .work-items {
        flex-wrap: wrap;
        width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 920px) {
    .work-group {
        width: 100%;
        margin-left: 0;
    }

    .work {
        margin-bottom: 20px;
    }
}

.product-recomendations {
    margin-top: 80px;
    padding-top: 55px;
    padding-bottom: 50px;
    background: rgba(245, 245, 245, 1);
}

.product-recomendations-header {
    margin-top: -4px;
    font-family: Inter;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.product-category-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    margin-top: 34px;
    margin-bottom: 30px;
    margin-left: 4px;
}

.product-category {
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 11px 20px 11px 20px;
    border-radius: 100px;
    background: #fff;
    color: #000;
    font-family: Inter;
    font-size: 16px;
    font-weight: 500;
    line-height: 19px;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.product-category:hover {
    background: rgba(255, 107, 0, 1);
    color: #fff;
}

.product-category.active {
    background: rgba(251, 142, 0, 1);
    color: #fff;
}

@media (max-width: 576px) {
    .product-recomendations {
        margin-top: 30px;
        padding-top: 35px;
        padding-bottom: 35px;
    }

    .product-recomendations-header {
        font-size: 22px;
        line-height: 26px;
    }

    .product-category-selector {
        flex-wrap: nowrap;
        width: 100%;
        margin-top: 15px;
        margin-bottom: 20px;
    }

    .product-category {
        white-space: nowrap;
    }

}
