/* ============ Базовые стили ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FFFFFF;
  color: #555555;
  font-family: 'PT Sans Narrow', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: #3598DB; }

.container {
  max-width: 1022px;
  margin: 0 auto;
  padding: 0 15px;
}

#top, #buy, #about, #contacts, #lead-form { scroll-margin-top: 24px; }

/* ============ Шапка ============ */
.header { background: #FFFFFF; }

.header__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  padding-bottom: 8px;
}

.header__logo img {
  display: block;
  width: 93px;
  height: auto;
}

.header__brand { margin-left: 8px; }

.brand {
  margin: 0;
  font-size: 60px;
  line-height: 1.05;
  letter-spacing: 3px;
  font-weight: 700;
}
.brand__blue { color: #3598DB; }
.brand__gray { color: #BDC3C7; }

.tagline {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .5px;
}

.header__contacts {
  margin-left: auto;
  text-align: right;
}

.phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  color: #3598DB;
  text-decoration: none;
}
.phone img { width: 24px; height: auto; }

.address {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.35;
  color: #555555;
}

.burger { display: none; }

/* ============ Hero-баннер ============ */
.hero { background: #3598DB; }

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cats {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 0;
  padding: 16px 0 4px;
  list-style: none;
}

.cat a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #FFFFFF;
  text-decoration: none;
}
.cat img {
  height: 32px;
  width: auto;
  opacity: .63;
  transition: opacity .2s ease;
}
.cat a:hover img, .cat a:focus-visible img { opacity: 1; }
.cat span { font-size: 15px; line-height: 18px; text-decoration: underline; }

.hero-nav { white-space: nowrap; }
.hero-nav a {
  color: #FFFFFF;
  font-size: 16px;
  line-height: 19px;
  text-decoration: underline;
  margin-left: 20px;
}
.hero-nav a:hover { color: #EAF5FC; }

.hero__pic {
  display: block;
  width: 100%;
  max-width: 1111px;
  height: auto;
  margin: -8px auto 0;
}

/* ============ Основной контент ============ */
.main { padding-bottom: 20px; }

.page-title {
  margin: 46px 0 18px;
  font-size: 36px;
  line-height: 43px;
  font-weight: 700;
  color: #3598DB;
  text-align: center;
}

.intro p { margin: 0; padding: 10px 0; }

/* ============ Страницы категорий ============ */
.breadcrumbs {
  margin: 26px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #999999;
}
.breadcrumbs a { color: #3598DB; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.sub .page-title {
  margin-top: 26px;
  font-size: 34px;
  line-height: 40px;
  text-align: left;
}

.faq { margin-top: 2px; }
.faq details { border-bottom: 1px solid #E5E8EA; padding: 4px 0; }
.faq summary {
  position: relative;
  cursor: pointer;
  padding: 10px 30px 10px 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  color: #3598DB;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 8px;
  font-size: 26px;
  line-height: 24px;
  color: #3598DB;
}
.faq details[open] summary::after { content: '\2013'; }
.faq details p, .faq details ul { margin: 0; padding-bottom: 12px; }

/* ============ Карточка формы ============ */
.card {
  position: relative;
  border: 5px solid #3598DB;
  background: transparent;
  margin-top: 36px;
  padding: 22px 0 34px;
}

.card__title {
  margin: 8px 0 26px 96px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
  color: #3598DB;
}
.card__title span { text-decoration: underline; }

.card__body { position: relative; }

.card__fields {
  position: relative;
  z-index: 1;
  padding-left: 96px;
}

.field {
  display: grid;
  grid-template-columns: 158px minmax(0, 454px);
  column-gap: 6px;
  align-items: center;
  margin-bottom: 22px;
}
.field--btn { margin-bottom: 0; }

.field__label { font-size: 22px; line-height: 26px; }

.field__input {
  width: 100%;
  border: 1px solid #BDC3C7;
  background: transparent;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 16px;
  color: #666666;
  transition: border-color .15s ease, background-color .15s ease;
}
.field__input:hover, .field__input:focus {
  outline: none;
  border-color: #666666;
  background: #FFFFFF;
}
textarea.field__input { resize: vertical; min-height: 82px; max-width: 362px; }

.submit-btn {
  grid-column: 2;
  justify-self: center;
  margin-top: 4px;
  border: 1px solid #666666;
  background: #666666;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 20px;
  line-height: 20px;
  padding: 8px 36px;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.submit-btn:hover { background: #3598DB; border-color: #141414; }
.submit-btn:active { background: #1B5073; border-color: #141414; }
.submit-btn[disabled] { opacity: .6; cursor: wait; }

.card__photo {
  position: absolute;
  right: 0;
  bottom: 32px;
  width: 419px;
  height: 143px;
  object-fit: cover;
  z-index: 0;
}

.form-status {
  min-height: 20px;
  margin: 16px 0 0 96px;
  font-size: 14px;
  line-height: 1.4;
  font-style: italic;
  color: #999999;
}
.form-status.is-error { color: #D7244C; }

/* ============ Блок «Скупаем дорого» ============ */
.section-title {
  margin: 34px 0 6px;
  font-size: 32px;
  line-height: 38px;
  font-weight: 400;
  color: #3598DB;
}

.about p { margin: 0; padding: 10px 0; }
.about__lead, .about__bold { font-weight: 700; }

.rule {
  border: none;
  height: 5px;
  background: #3598DB;
  margin: 24px 0;
}

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { padding: 10px 0; }
.steps li::before { content: '- '; }

.about__row { display: flex; align-items: flex-start; gap: 28px; }
.about__text { flex: 1; min-width: 0; }
.about__photo {
  width: 167px;
  height: 167px;
  object-fit: cover;
  border: 1px solid #3598DB;
  margin-right: 14px;
}

/* ============ Футер-навигация ============ */
.footer-nav { background: #3598DB; margin-top: 46px; }

.footer-nav__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 67px;
}
.footer-nav__inner a {
  color: #FFFFFF;
  font-size: 16px;
  line-height: 19px;
  text-decoration: underline;
  padding: 8px 12px;
  border-left: 1px solid #FFFFFF;
}
.footer-nav__inner a:last-child { border-right: 1px solid #FFFFFF; }
.footer-nav__inner a:hover { color: #EAF5FC; }

/* ============ Нижний футер ============ */
.footer-bottom { background: #BDC3C7; }

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.footer-bottom p { margin: 0; font-size: 16px; line-height: 1.45; }
.footer-bottom__ip { color: #555555; }
.footer-bottom__contacts { text-align: right; color: #555555; }
.footer-bottom__contacts a {
  font-weight: 700;
  color: #555555;
  text-decoration: none;
}
.footer-bottom__contacts a:hover { color: #3598DB; }

/* ============ Мобильное меню ============ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 90;
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #3598DB;
  color: #FFFFFF;
  padding: 18px 22px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease;
  z-index: 100;
  overflow-y: auto;
}
.mobile-menu.open { transform: none; visibility: visible; }

.mobile-menu__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: #FFFFFF;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

.mobile-menu__phone {
  display: block;
  margin-top: 26px;
  font-size: 28px;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
}

.mobile-menu__address {
  margin: 10px 0 22px;
  font-size: 15px;
  line-height: 1.45;
  opacity: .9;
}

.mobile-menu nav a {
  display: block;
  padding: 13px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  color: #FFFFFF;
  font-size: 19px;
  text-decoration: none;
}

/* ============ Планшеты (<=1024) ============ */
@media (max-width: 1024px) {
  .cats { gap: 16px; }
  .cat span { font-size: 15px; }
  .hero__pic { margin-top: 0; }
  .card__fields { padding-left: 48px; }
  .field { grid-template-columns: 132px minmax(0, 1fr); }
  textarea.field__input { max-width: none; }
  .card__title, .form-status { margin-left: 48px; }
  .card__photo { width: 360px; height: 125px; }
}

/* ============ Мобильные (<=768) ============ */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .header__inner { flex-wrap: wrap; row-gap: 4px; padding-top: 12px; }
  .header__logo img { width: 56px; }
  .brand { font-size: 34px; letter-spacing: 2px; }
  .tagline { font-size: 12px; margin-top: 0; }

  .burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: none;
    background: transparent;
    cursor: pointer;
    align-self: flex-start;
  }
  .burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #3598DB;
    border-radius: 2px;
  }

  .header__contacts {
    margin-left: 0;
    flex-basis: 100%;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 4px;
  }
  .phone {
    display: inline-flex;
    background: #3598DB;
    color: #FFFFFF;
    font-size: 20px;
    padding: 8px 18px;
    border-radius: 3px;
  }
  .address { font-size: 13px; margin-top: 6px; }

  /* Hero */
  .hero__inner { display: block; }
  .cats {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 16px 12px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 auto; min-width: 78px; scroll-snap-align: start; }
  .hero-nav { display: none; }
  .hero__pic {
    width: 100%;
    height: 235px;
    margin-top: 0;
    object-fit: cover;
    object-position: center 68%;
  }

  /* Контент */
  .page-title { font-size: 26px; line-height: 32px; margin-top: 30px; }
  .sub .page-title { margin-top: 20px; text-align: left; }
  .intro p, .about p { font-size: 15px; line-height: 1.55; }
  .breadcrumbs { margin-top: 18px; }
  .faq summary { font-size: 17px; line-height: 23px; padding-right: 24px; }

  /* Форма */
  .card { border-width: 3px; padding: 18px 0 26px; margin-top: 28px; }
  .card__title { margin-left: 0; font-size: 24px; line-height: 30px; }
  .card__body { padding: 0 16px; }
  .card__fields { padding: 0; }
  .field { display: block; margin-bottom: 18px; }
  .field--btn { margin-bottom: 0; }
  .field--btn .field__label { display: none; }
  .field__label { display: block; font-size: 17px; margin-bottom: 6px; }
  .field__input, textarea.field__input { max-width: none; width: 100%; }
  .submit-btn { width: 100%; padding: 13px; font-size: 19px; }
  .card__photo { position: static; width: 100%; height: auto; margin-top: 22px; }
  .form-status { margin-left: 0; padding: 0 16px; }

  .section-title { font-size: 24px; line-height: 30px; margin-top: 28px; }
  .rule { margin: 20px 0; }
  .about__row { display: block; }
  .about__photo { width: 190px; height: 190px; margin: 14px auto 6px; display: block; }

  /* Футеры */
  .footer-nav { margin-top: 34px; }
  .footer-nav__inner {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 8px;
  }
  .footer-nav__inner::-webkit-scrollbar { display: none; }
  .footer-nav__inner a { flex: 0 0 auto; }

  .footer-bottom__inner { flex-direction: column; text-align: center; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
  .footer-bottom__contacts { text-align: center; }
}
