/* ==========================================================================
   Правки верстки (обновление 2)
   Файл подключается последним и перекрывает main.css / new-layout.css
   ========================================================================== */

/* 1. Форма подбора размера: поле ФИО убрано, телефон остался один и по центру */
.contact_form form .input_block_one {
  grid-template-columns: 1fr;
  max-width: 278px;
  margin-left: auto;
  margin-right: auto;
}

/* 2. Шапка: меню (бургер) слева, «заказать звонок» и телефон справа */
.header .media_burger {
  display: none;
}
@media (max-width: 680px) {
  .header .container {
    gap: 8px;
  }
  .header .media_burger {
    display: flex;
    align-items: center;
    margin-right: auto;
  }
  .header .media_burger .burger {
    width: 55px;
    height: 55px;
    display: flex;
    flex-shrink: 0;
  }
  .header .media_burger .burger img {
    width: 100%;
  }
}
@media (max-width: 380px) {
  .header_contact_btn {
    width: 150px;
  }
}

/* 3. Логотип TULUPY.RU слева, монета «10 лет на рынке» справа и поверх логотипа.
      Надпись на монете усилена по контрасту для читаемости. */
.home_text_img {
  display: flex;
  align-items: center;
  height: 167px;
}
.home_text_img .two {
  position: static;
  left: auto;
  margin: 0;
}
.home_text_img .one {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  filter: contrast(1.45) saturate(1.7) brightness(1.06) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

/* 4. Мобильная версия: форма заказа идёт первой, значки (логотип и монета) под ней
      (перенос элемента в DOM выполняет js/layout-update2.js) */
@media (max-width: 800px) {
  /* отрицательный отступ был рассчитан на значки, форме он не нужен */
  .home_text {
    margin-top: 0;
  }
  .home_text .home_form {
    order: -1;
    margin: 0 auto 14px auto;
  }
}

/* 5. Кнопка «Перейти в каталог» под блоком с ценами */
.home_catalog_btn {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.home_catalog_btn .btn {
  width: auto;
  height: 60px;
  line-height: 46px;
  padding: 0 28px;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .home_catalog_btn .btn {
    height: 50px;
    line-height: 40px;
    font-size: 17px;
    padding: 0 20px;
    border-width: 5px;
  }
}

/* 6. Блок «Легендарные армейские бекеши»: заголовок в одну строку,
      текст не выходит за экран на узких экранах */
@media (max-width: 1024px) {
  .legendary_text h3 {
    padding-right: 0;
    white-space: nowrap;
    font-size: min(5.6vw, 21px);
  }
}
@media (max-width: 680px) {
  .legendary_text p {
    font-size: min(4.9vw, 22px);
    line-height: 1.35;
  }
}

/* 7. Слоган «Из года в год...! Выбирайте и вы!» — две строки на мобильных */
@media (max-width: 768px) {
  .lider_block .slogan {
    padding-left: 15px;
    padding-right: 15px;
  }
  .lider_block .slogan h3 {
    font-size: min(7vw, 30px);
    line-height: 1.15;
  }
  .lider_block .slogan h3 span {
    display: block;
    white-space: nowrap;
  }
  .lider_block .slogan .main_button {
    max-width: calc(100% - 10px);
    width: auto;
    height: auto;
    padding: 3px;
    box-sizing: border-box;
  }
  .lider_block .slogan .main_button .content {
    font-size: min(3.2vw, 13px) !important;
    padding: 6px 10px !important;
    line-height: 1.15 !important;
    white-space: nowrap;
    box-sizing: border-box;
    overflow: hidden;
  }
}

/* 9. Заголовок «Отправляем по всей России в день заказа»: в мобильной версии
      он оставался десктопного размера (старые правила были написаны для .contact h2) */
@media (max-width: 680px) {
  .contact p {
    font-size: 15px;
    line-height: 20px;
    margin-bottom: 16px;
  }
  .contact p span {
    font-size: 20px;
    line-height: 24px;
    max-width: 320px;
    margin: 0 auto 6px auto;
  }
  /* оставляем место под фигуру, которая выступает над оранжевой плашкой */
  .contact {
    padding-bottom: 80px;
  }
}

/* 8. Блок гарантии: текст уезжал за правый край экрана
      (ширина оставалась 640px при max-width 480px) */
@media (max-width: 640px) {
  section.guarantee .container.guarantee-block {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
  }
  section.guarantee .guarantee-block p {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 18px;
  }
}

/* 10. Блок «Тулупы.Ру — это»: оранжевая плашка по высоте текста,
       текст по центру плашки и на одной линии с заголовком (как в макете) */
@media (max-width: 680px) {
  .legendary_text h3 {
    text-align: left;
    padding-left: 130px;
    margin-bottom: 4px;
  }
  .legendary_text_in {
    min-height: 0;
    padding: 24px 12px 24px 130px;
    display: flex;
    align-items: center;
  }
  .legendary_text_in .user {
    width: 175px;
    left: -50px;
  }
}

/* 12. Оранжевая плашка первого экрана: нижний отступ 64px был рассчитан на значки,
       которые заходили на неё отрицательным margin. Теперь под ней идёт блок с фото,
       поэтому пустое место убираем. */
@media (max-width: 680px) {
  .home .title_coral {
    padding-bottom: 18px;
  }
}

/* 13. Значки (логотип и монета) центруем относительно текста под ними:
       у блока был сдвиг margin-left: -10px от десктопной раскладки */
@media (max-width: 800px) {
  .home_text_img {
    margin-left: 0;
  }
}

/* 14. Блок «Более 100 городов России / 10 стран мира»: размеры вынесены из
       inline-стилей в классы. На мобильных строки обрезались по краям экрана
       (nowrap + крупный кегль) и были выровнены по-разному. */
.contry .description .contry_big {
  font-weight: 900;
  font-size: clamp(40px, 6dvw, 60px);
  margin-bottom: 5px;
  white-space: nowrap;
}
.contry .description .contry_mid {
  font-weight: 900;
  font-size: clamp(22px, 3.5dvw, 32px);
  white-space: nowrap;
  text-align: center;
}
@media (max-width: 768px) {
  .contry .description {
    width: 100%;
    padding: 10px 15px 0 15px;
    box-sizing: border-box;
    text-align: center;
  }
  .contry .description p {
    text-align: center;
  }
  .contry .description .contry_big {
    font-size: min(12.5vw, 52px);
    margin-bottom: 2px;
  }
  .contry .description .contry_mid {
    font-size: min(7vw, 30px);
  }
  .contry .description .contry_world {
    margin-top: 10px;
    font-size: min(8.3vw, 39px);
  }
}

/* 11. Блок «Своя ведущая фабрика в России»: в мобильной версии заголовок
       оставался 31px (старое правило было написано для .blue_block_text h2) */
@media (max-width: 680px) {
  .blue_block .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .blue_block_text .blue_block_h {
    font-size: min(5vw, 19px);
    line-height: 1.3;
    margin-bottom: 12px;
  }
  .blue_block_text p {
    font-size: min(4.2vw, 15px);
    line-height: 1.4;
  }
}

/* 15. Кнопки «Заказывайте и вы!» / «Ходите в натуральном»: текст стоит в nowrap
       и на узких экранах не влезал в плашку (297px строки против 264px внутри) */
@media (max-width: 680px) {
  .banners .banner_item {
    font-size: min(5vw, 20px);
    padding: 13px 14px;
  }
}

/* 16. Форма на первом экране: дата красным, промокод в одну строку,
       контент по центру «шкуры», крупная кнопка */
.home_form .home_form_date {
  display: block;
  color: #e30613;
  font-weight: 700;
  margin-top: 0;
}
.home_form .home_form_promo {
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4px;
  white-space: nowrap;
  opacity: 0.95;
}
.home_form .home_form_in {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 48px 70px 42px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.home_form h2 {
  margin-bottom: 6px;
  line-height: 1.15;
}
.home_form h3 {
  margin-bottom: 12px;
  line-height: 1.15;
}
.home_form form {
  gap: 10px;
  width: 100%;
  max-width: 260px;
}
.home_form form button,
.home_form form .home_form_btn {
  margin: 6px auto 0 auto;
  width: 100%;
  max-width: 240px;
  min-height: 52px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  border-radius: 16px;
}
.home_form form > span {
  max-width: 230px;
  font-size: 9px;
  line-height: 1.25;
  margin-top: 4px;
}
.home_form_btn_short {
  display: none;
}
.home_form_btn_full {
  display: inline;
}

/* Мобильная форма: тоже по центру шкуры, крупнее «Узнать подробнее» */
@media (max-width: 480px) {
  .home_form .home_form_in {
    padding: 40px 36px 36px 36px;
    justify-content: center;
  }
  .home_form .home_form_promo {
    font-size: 9px;
  }
  .home_form h2 {
    font-size: 17px;
    margin-bottom: 8px;
    line-height: 1.2;
  }
  .home_form h3 {
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.2;
  }
  .home_form form {
    gap: 8px;
    margin-top: 0;
    width: 230px;
    max-width: 230px;
  }
  .home_form form input {
    height: 36px;
  }
  .home_form form button.home_form_btn,
  .home_form form .home_form_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 195px;
    max-width: 195px;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 1px 8px !important;
    font-size: 15px;
    line-height: 1;
    margin: 8px auto 0 auto;
    border-radius: 12px;
  }
  .home_form_btn_full {
    display: none;
  }
  .home_form_btn_short {
    display: block;
    font-size: 14px !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15 !important;
  }
  .home_form form > span {
    max-width: 210px;
    font-size: 8px;
    line-height: 1.2;
    margin-top: 4px;
  }
}

/* 18. «Лидер выбирает лучшее!» — на ПК текст не выходит за пунктир */
.lider_block .slogan .main_button {
  max-width: min(92%, 640px);
  width: auto;
  box-sizing: border-box;
}
.lider_block .slogan .main_button .content {
  font-size: clamp(16px, 2vw, 26px) !important;
  padding: 10px 22px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 19. Меньше пустоты между каталогами и блоком подарков (ПК и моб.) */
.wrapper > .catalog {
  padding-top: 16px;
  padding-bottom: 16px;
}
.wrapper > .catalog + .catalog {
  padding-top: 8px;
}
.wrapper > .catalog + .gift-section,
.wrapper > section.catalog + .gift-section {
  padding-top: 16px;
}
.gift-section {
  padding-top: 16px;
  padding-bottom: 24px;
}
@media (max-width: 768px) {
  .wrapper > .catalog {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .wrapper > .catalog + .catalog {
    padding-top: 4px;
  }
  .gift-section {
    padding-top: 10px;
    padding-bottom: 20px;
  }
  /* Слайдеры под карточками СССР давали лишний низ */
  #size_tulupy .using-slider {
    margin-bottom: 0;
  }
  #size_tulupy .catalog-item {
    margin-bottom: 12px;
    padding-bottom: 16px;
  }
}

/* 20. Внутренние статьи без .head-top-screen: заголовок не прячется под фиксированным хедером */
body.inner-page .wrapper > section.using,
body.inner-page .wrapper > section.experience {
  padding-top: 95px;
  box-sizing: border-box;
}
@media (max-width: 680px) {
  body.inner-page .wrapper > section.using,
  body.inner-page .wrapper > section.experience {
    padding-top: 100px;
  }
}



/* 17. «Специализированный магазин №1» — выравнивание по центру на мобильных */
@media (max-width: 800px) {
  .home_text_center {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    text-align: center;
  }
  .home_text_center h2 {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .home_text_center span {
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

