/* Контейнер карточки товара */
.main-cont {
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}
.year-group {
    margin-bottom: 40px; /* Отступ между группами */
    text-align: center;
    margin: 0;
    padding: 0;
}
.title-container {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, 365px);
    grid-auto-rows: 120px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}
.year-group-title {
    margin-bottom: 40px;
    width: 142px;
    height: 30px;
    margin: 0 0 20 0px;
    border: none;
    border-radius: 5px;
    background: #2175C5;
    color: white;
    font-weight: 500;
    font-size: 25px;
}
.yearmon-group-title {
    margin-bottom: 40px;
    width: 210px;
    height: 30px;
    margin: 0 0 20 0px;
    border: none;
    border-radius: 5px;
    background: #2175C5;
    color: white;
    font-weight: 500;
    font-size: 25px;
}
.products-container {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, 365px);
    grid-auto-rows: 200px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}
.product-card {
    width: 365px;
    height: 200px;
    box-sizing: border-box;
    position: relative;
    display: flex; /* Включаем Flexbox */
    flex-direction: row; /* Элементы идут в ряд (слева направо) */
    align-items: flex-start; /* Выравниваем элементы по верхнему краю */
    gap: 15px; /* Расстояние между колонками */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: transform 0.2s;
    text-align: left;
}
.product-media {
    flex: 0 0 auto; /* Не растёт, не сжимается, занимает нужный размер */
    width: 138px; /* Фиксированная ширина для изображения */
}
.product-info {
    flex: 1; /* Занимает всё оставшееся пространство */
    display: flex;
    flex-direction: column; /* Элементы внутри идут вертикально */
    justify-content: space-between; /* Распределяем элементы по вертикали */
}
.product-card:hover {
    transform: translateY(-5px);
}

.promo-badge {
    position: absolute;
    top: -24px; /* Выступает на 12 px за верхний край карточки */
    left: 142px; /* Отступ от левого края */
    background: #EB3246; /* Красный фон */
    color: white; /* Белый текст */
    padding: 0 9px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    border-radius: 5px 5px 0 0;
    z-index: -30;
    box-shadow: 0;
    white-space: nowrap;
}
/* Изображение товара */
.product-image img {
    display: block;
    padding: 0;
    height: auto;
    width: 142px;
}

/* Заголовок товара */
.product-title {
    color: #000;
    margin: 10px 10px 5px -3px;
    padding: 0;
    text-align: left;
    line-height: 1.1;
    font-weight: 600;
    font-size: 14px;
}


/* Описание товара */
.product-discription {
    color: #404141;
    line-height: 15px;
    margin: 0 10px 5px -3px;
    padding: 0;
    text-align: left;
    line-height: 1,25;
    font-weight: 400;
    font-size: 12px;
}
.product-number {
    color: #000;
    margin: 0 10px 5px -3px;
    padding: 0;
    text-align: left;
    line-height: 1.1;
    font-weight: 600;
    font-size: 14px;
}

/* Условия (если есть) */
.product-conditions {
    position: absolute;
    line-height: 15px;
    bottom: 70px;
    color: #000;
    margin: 0 15px 5px -3px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
}

/* Цена товара */
.product-price {
    position: absolute;
    top: 125px;
    color: #000;
    margin: 0 15px 5px -3px;
    font-weight: 700;
    font-size: 16px;
}
.price-strikethrough {
    text-decoration: line-through;
    text-decoration-thickness: 1px; /* Толщина линии */
    text-decoration-color: #777777;
    position: absolute;
    top: 125px;
    color: #777777;
    margin: 0 15px 5px -3px;
    font-weight: 700;
    font-size: 16px;
}
/* Цена товара со скидкой */
.product-promoprice {
    position: absolute;
    top: 125px;
    color: #EB3246;
    margin: 0 15px 5px 235px;
    font-weight: 700;
    font-size: 16px;
}

/* Блок с кнопками */
.product-actions {
    display: flex;
    gap: 10px;
    justify-content: left;
    flex-wrap: wrap;
}

/* Кнопка «Купить» */
.btn-buy {
    position: absolute;
    top: 175px;
    width: 210px;
    height: 25px;
    margin: 0 0 0 -3px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #2175C5;
    color: white;
    font-weight: 500;
    font-size: 16px;
}

.btn-buy:hover {
    background: #1A5E9E;
}

.btn-buy.added {
    background-color: #ccc;
    color: #666;
}

/* Ссылка «Подробнее» */
.btn-details {
    position: absolute;
    top: 148px;
    width: 210px;
    height: 25px;
    margin: 0 0 0 -3px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #000;
    color: white;
    font-weight: 500;
    font-size: 16px;
}

.btn-details:hover {
    background: #7f8c8d;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(365px, 1fr));
    gap: 20px;
    padding: 0;
}

.products-container-kons {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, 380px);
    grid-auto-rows: 200px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}
.title-container-kons {
    display: inline-grid;
    grid-template-columns: repeat(auto-fill, 380px);
    grid-auto-rows: 120px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}
.product-card-kons {
    width: 380px;
    height: 200px;
    box-sizing: border-box;
    position: relative;
    display: flex; /* Включаем Flexbox */
    flex-direction: row; /* Элементы идут в ряд (слева направо) */
    align-items: flex-start; /* Выравниваем элементы по верхнему краю */
    gap: 15px; /* Расстояние между колонками */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    transition: transform 0.2s;
    text-align: left;
}


/* Все нужное для архива номеров */

.arch-num {
    display: block;
    width: 100% !important;
    text-align: center;
    margin: 50px 0 50px;
    font-size: 25px;
    color: #2175C5;
    text-shadow: 2px 2px 4px #00000033;
    font-weight: bold;
    unicode-bidi: isolate;
}
.arch-num:hover {
    text-align: center;
    transform: translateY(-5px);
    font-size: 25px;
    color: #1a5e9e;
    text-shadow: 2px 2px 4px #00000033;
    font-weight: bold;
}
.products-container-ar {
    display: inline-grid;
    grid-template-columns: 480px 480px;
    grid-auto-rows: 200px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}

.title-container-ar {
    display: inline-grid;
    grid-template-columns: 480px 480px;
    grid-auto-rows: 120px;
    gap: 40px;
    padding: 0;
    max-width: 100%;
}

.product-card-ar {
    position: relative;
    display: flex; /* Включаем Flexbox */
    max-width: 480px;
    min-width: 480px;
    flex: 0 0 480px; 
    flex-direction: row; /* Элементы идут в ряд (слева направо) */
    align-items: flex-start; /* Выравниваем элементы по верхнему краю */
    gap: 15px; /* Расстояние между колонками */
    min-height: 162px; /* Минимальная высота карточки */
    box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px;
    transition: transform 0.2s;
    width: centre;
    text-align: left; 
}
.product-card-ar:hover {
    transform: translateY(-5px);
}

.product-media-ar {
    flex: 0 0 auto; /* Не растёт, не сжимается, занимает нужный размер */
    width: 220px; /* Фиксированная ширина для изображения */
}

.product-image-ar img {
    display: block;
    padding: 0;
    height: auto;
    width: 220px;
}
.product-price-ar {
    position: absolute;
    top: 85px;
    color: #000;
    margin: 0 15px 5px -3px;
    font-weight: 700;
    font-size: 16px;
}

@media (max-width: 930px) {
  .products-container {
    grid-template-columns: 1fr; /* одна колонка на мобильных */
  }
  .products-container-ar {
    grid-template-columns: 1fr; /* одна колонка на мобильных */
  }

}