/* ===== БЛОК КАРТОЧЕК ТОВАРОВ ===== */
.catalog {
    background-color: #f4f6fa;
    padding: 45px 0 135px;
    font-family: 'Roboto', Arial, sans-serif;
}

.catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.catalog__card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.catalog__card:hover {
    
}

/* Изображение */
.catalog__card-image {
    position: relative;
    aspect-ratio: 9 / 10; /* соответствует исходному padding-bottom: 111.111% */
    overflow: hidden;
}

.catalog__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catalog__card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #5a7aa3; /* цвет метки из Tilda */
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    z-index: 2;
    width: 80px;
}

/* Контент */
.catalog__card-content {
    padding: 27px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.catalog__card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #000;
    margin-bottom: 12px;
}

.catalog__card-description {
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #000;
    line-height: 1.55;
    margin-bottom: 12px;
}

.catalog__card-description p {
    margin: 0 0 8px;
}

.catalog__card-description ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 8px;
}

.catalog__card-description li {
    font-style: italic;
    margin-bottom: 2px;
}

.catalog__card-description strong {
    font-weight: 700;
    display: block;
    margin-top: 8px;
}

/* Цена */
.catalog__card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: auto; /* прижимаем кнопки к низу */
    margin-bottom: 20px;
}

.catalog__card-price-value {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: #000;
}

.catalog__card-price-currency {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    color: #000;
}

/* Кнопки */
.catalog__card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.catalog__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px; /* соответствует t-btnflex_sm: height 45px, padding 0 30px */
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-width: 130px;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

.catalog__button--primary {
    color: #7ba6db;
    background-color: #fff;
    border-color: #7ba6db;
}

.catalog__button--primary:hover {
    background-color: #f0f5ff;
}

.catalog__button--secondary {
    color: #fff;
    background-color: #7ba6db;
    border-color: #7ba6db;
}

.catalog__button--secondary:hover {
    background-color: #6a93c2;
    border-color: #6a93c2;
}

/* Адаптивность */
@media screen and (max-width: 960px) {
    .catalog {
        padding: 40px 0 90px;
    }

    .catalog__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        
    }

    .catalog__card-content {
        padding: 20px;
    }

    .catalog__card-title {
        font-size: 18px;
    }

    .catalog__card-description {
        font-size: 14px;
    }

    .catalog__card-price-value,
    .catalog__card-price-currency {
        font-size: 18px;
    }

    .catalog__button {
        padding: 10px 25px;
        min-width: 120px;
    }
       .catalog__grid {
        display:flex;
        gap: 20px;
        overflow-x: scroll;
    }
    .catalog__card{
        height: auto;
        width:320px;
    }
    .catalog__card-image{
        width:320px;
    }
    .catalog__card-content{
        width:320px;
    }
}

@media screen and (max-width: 640px) {
    .catalog {
        padding: 30px 0 60px;
    }

    .catalog__grid {
        display:flex;
        gap: 20px;
        overflow-x: scroll;
    }
    .catalog__card{
        height: auto;
    }
    .catalog__card-actions {
        flex-direction: column;
    }

    .catalog__button {
        width: 100%;
        white-space: normal;
    }
}

@media screen and (max-width: 480px) {
    .catalog__card-badge {
        font-size: 10px;
        padding: 5px 10px;
    }

    .catalog__card-content {
        padding: 15px;
    }

    .catalog__card-title {
        font-size: 18px;
    }
}

/* ===== БЛОК DISCOUNT-OFFER ===== */
.discount-offer {
    background-color: #2c3037;
    padding: 93px 0 70px;
    font-family: 'Roboto', Arial, sans-serif;
}

.discount-offer__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.discount-offer__title {
    color: #ffffff;
    font-size: 38px;
    font-family: 'Arial', Arial, sans-serif;
    line-height: 1.55;
    font-weight: 700;
    margin-bottom: 30px;
    max-width: 800px;
}

.discount-offer__subtitle {
    color: #ffffff;
    font-size: 19px;
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.55;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
}

/* Форма */
.discount-offer__form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 800px;
}

.discount-offer__form-group {
    flex: 1 1 300px;
    min-width: 250px;
}

.discount-offer__phone-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    border: 1px solid #ffffff;
    border-radius: 0;
    overflow: hidden;
    background-color: #ffffff;
    box-sizing: border-box;
}

.discount-offer__phone-select {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px 0 12px;
    background-color: transparent;
    border-right: 1px solid #ddd;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.discount-offer__phone-flag {
    width: 20px;
    height: 15px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480"><g fill-rule="evenodd" stroke-width="1pt"><path fill="%23fff" d="M0 0h640v480H0z"/><path fill="%230052b4" d="M0 160h640v320H0z"/><path fill="%23d62718" d="M0 320h640v160H0z"/></g></svg>');
    background-size: cover;
    margin-right: 5px;
}

.discount-offer__phone-code {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    color: #000;
    margin-right: 4px;
}

.discount-offer__phone-triangle {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #000;
    margin-left: 2px;
}

.discount-offer__phone-input {
    flex: 1;
    height: 100%;
    padding: 0 14px;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    color: #000;
    background-color: transparent;
    border: none;
    outline: none;
}

.discount-offer__phone-input::placeholder {
    color: #000;
    opacity: 0.5;
}

.discount-offer__error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
    text-align: left;
    display: none;
}

/* Кнопка */
.discount-offer__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #7ba6db;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 0 30px;
    height: 60px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    text-align: center;
    font-family: 'Roboto', Arial, sans-serif;
    min-width: 190px;
}

.discount-offer__submit:hover {
    background-color: #6a93c2;
}

/* Текст согласия */
.discount-offer__agreement {
    color: #ffffff;
    font-size: 13px;
    font-family: 'Arial', Arial, sans-serif;
    line-height: 1.7;
    font-weight: 500;
    opacity: 0.9;
    max-width: 600px;
}

.discount-offer__agreement-link {
    color: #fafafa;
    text-decoration: none;
    font-weight: 700;
}

.discount-offer__agreement-link:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media screen and (max-width: 960px) {
    .discount-offer__title {
        font-size: 32px;
        line-height: 1.35;
        max-width: 90%;
    }
    
    .discount-offer__subtitle {
        font-size: 18px;
    }
}

@media screen and (max-width: 640px) {
    .discount-offer {
        padding: 70px 0 50px;
    }
    
    .discount-offer__title {
        font-size: 29px;
        margin-bottom: 20px;
    }
    
    .discount-offer__subtitle {
        font-size: 17px;
        margin-bottom: 30px;
    }
    
    .discount-offer__form {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .discount-offer__form-group {
        width: 100%;
        flex: auto;
    }
    
    .discount-offer__submit {
        width: 100%;
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .discount-offer {
        padding: 60px 0 40px;
    }
    
    .discount-offer__title {
        font-size: 29px;
        line-height: 1.35;
    }
    
    .discount-offer__subtitle {
        font-size: 17px;
        line-height: 1.6;
    }
    
    .discount-offer__agreement {
        font-size: 13px;
        line-height: 1.6;
    }
}