/* .node__content .product-item img {
    width: 100%;
} */

.page-title-node h1 {
    margin: 0 0 36px;
    color: #1f1f1f;
    font-family: 'Bebas Neue Cyrillic';
    font-style: normal;
    font-weight: 400;
    font-size: 54px;
    line-height: 54px;
    text-transform: uppercase;
}

@media (max-width:787px) {
    .page-title-node h1 {
        font-size: 35px;
        /* margin-left: 5px; */
    }
}

/*#region Главная страница продукции */

.production-layout {
    display: grid;
    grid-template-columns: 20% 1fr;
    gap: 24px;
    align-items: start;
}

.production-layout a {
    text-decoration: none;
}

/* .production-layout img {
    border: 1px solid #e7e7e7cf;
} */
.table_of_production-wrapper {
    width: 100%;
    border: 1px solid #d7d7d7;
    padding: 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.table_of_production {
    margin: 0;
    padding: 0;
    list-style: none;
}

.table_of_production li {
    margin-bottom: 10px;
}

.table_of_production li a {
    display: block;
    text-decoration: none;
}

.production-items-wrapper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.production-items-wrapper h2 {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.production-items-wrapper span {
    font-size: 13px;
}

.to-back-button {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    gap: 7px;
    margin-bottom: 14px;
    cursor: pointer;
}

.to-back-button:before {
    content: "";
    width: 24px;
    height: 24px;
    background-image: url("../images/arrow-circle-red-left.svg");
    display: block;
}

/* планшеты */
@media (max-width: 1024px) {
    .production-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .production-items-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* мобильная версия */
@media (max-width: 767px) {
    .production-layout {
        grid-template-columns: 1fr;
    }

    .production-items-wrapper span,
    .table_of_production-wrapper.page-production {
        display: none;
    }

    .production-items-wrapper {
        grid-template-columns: 1fr;
        /* Это один ряд */
        grid-template-columns: 50% 1fr;
        /* Это два ряда */
        gap: 5px;
    }

    .production-items-wrapper a h2 {
        font-size: 14px;
        margin: 0;
    }

    .production-items-h2 {
        margin: 0 10px 20px;
    }


}

/*#endregion*/


/*#region*/
.catalog-page-item-title h2 {
    font-family: 'Montserrat SemiBold';
    font-weight: 400;
    font-size: 16px;
    color: #333;
    margin: 0;
}

.catalog-page-item-title img {
    padding-left: 5px;
}

.catalog-page-item-title {
    display: grid;
    grid-auto-flow: column;
    padding: 3px 4px;
    width: 100%;
    justify-content: space-between;
}

/*#endregion*/


a.all-catalogs-download-button-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 216px;
    height: 48px;
    padding: 0 22px;
    /* border: 1px solid #c8c8c8; */
    border-radius: 7px;
    background: transparent;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    background-color: #820000;
    gap: 8px;
}

.all-catalogs-download-button {
    /* display: grid; */
    /* grid-auto-flow: column; */
    /* align-content: end; */
    float: right;
    /* overflow: hidden; */
    /* clear: both; */
    margin: -81px 25px 30px 0;
}

@media (max-width:800px) {
    .all-catalogs-download-button {
        margin: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .all-catalogs-download-button a {
        width: 100%;
    }
}



.img-background-square {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 332 / 186;
    background: #fff;
    overflow: hidden;
}

.img-background-square>a {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.img-background-square img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Чтобы grid-элементы не распирало */
.product-item {
    min-width: 0;
}

.production-items-wrapper>* {
    min-width: 0;
}

/* Планшет и ниже: контейнер остаётся одинаковой формы */
@media (max-width: 1024px) {
    .img-background-square {
        aspect-ratio: 332 / 186;
    }
}

/* Мобилка:
   одинаковая высота у всех карточек,
   картинка заполняет контейнер по ширине,
   при необходимости режется */
@media (max-width: 767px) {
    .img-background-square {
        aspect-ratio: 332 / 186;
    }

    .img-background-square img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        object-fit: contain;
    }
}


.table_of_production-wrapper.page-production .production-items-h2 {
    /* text-align: center; */
    padding-left: 30px;
}

.page--content {
    /* Убираем пробл под шапкой */
    margin-top: -30px;
}

.carbid-cut-select-page .product-item img,
.path-carbide-inserts .product-item img {
    max-height: 227px;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}


.drill-insert-select-page .product-item,
.path-sel-drill-inserts .product-item {
    justify-content: space-between;
}

.drill-insert-select-page .product-item img,
.path-sel-drill-inserts .product-item img {
    max-height: 227px;
    object-fit: cover;
    min-height: 220px;
}

.drill-insert-select-page .production-items-wrapper,
.path-sel-drill-inserts .production-items-wrapper {
    column-gap: 50px;
}

/*
 * Мобилка: страницы с сеткой product-item (/sel-drill-inserts, /carbide-inserts):
 * картинка по ширине ячейки сетки, без вылезания за колонку
 */
@media (max-width: 767px) {

    .drill-insert-select-page .production-items-wrapper,
    .path-sel-drill-inserts .production-items-wrapper,
    .carbid-cut-select-page .production-items-wrapper,
    .path-carbide-inserts .production-items-wrapper {
        column-gap: 10px;
    }

    .drill-insert-select-page .product-item,
    .path-sel-drill-inserts .product-item,
    .carbid-cut-select-page .product-item,
    .path-carbide-inserts .product-item {
        min-width: 0;
        overflow: hidden;
        align-items: stretch;
    }

    .drill-insert-select-page .product-item>a,
    .path-sel-drill-inserts .product-item>a,
    .carbid-cut-select-page .product-item>a,
    .path-carbide-inserts .product-item>a {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .drill-insert-select-page .product-item img,
    .path-sel-drill-inserts .product-item img,
    .carbid-cut-select-page .product-item img,
    .path-carbide-inserts .product-item img {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: unset;
        max-height: none;
        object-fit: contain;
        object-position: center;
        display: block;
    }

    .drill-insert-select-page .product-item .img-background-square,
    .path-sel-drill-inserts .product-item .img-background-square,
    .carbid-cut-select-page .product-item .img-background-square,
    .path-carbide-inserts .product-item .img-background-square {
        width: 100%;
        max-width: 100%;
    }

    .drill-insert-select-page .product-item .img-background-square img,
    .path-sel-drill-inserts .product-item .img-background-square img,
    .carbid-cut-select-page .product-item .img-background-square img,
    .path-carbide-inserts .product-item .img-background-square img {
        object-fit: contain;
        width: 100%;
        height: 100%;
    }
}