/* ============================================================
   SHARED SECTIONS — quality · map · form · faq
   Загружается на: front-page.php и single-product.php
   Обе страницы идентичны — НЕ добавляйте page-specific оверрайды здесь.
============================================================ */

/* ============================================================
   HOME QUALITY (ISO)
============================================================ */
.home-quality {
  background: #434446;
  color: var(--white);
  padding: 159px 0 210px;
}
.home-quality .container.home-quality__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 202px;
  padding-right: 188px;
}
.home-quality__title {
  max-width: 1011px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  font-size: 55px;
  line-height: 67px;
  margin: 0 0 38px;
}
.home-quality__lead {
  max-width: 1488px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
  color: #fff;
  margin: 0 0 57px;
}
.home-quality__body {
  max-width: 1530px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-size: 24px;
  font-weight: 400;
  line-height: 29px;
  color: #fff;
  margin: 0;
}

.home-quality__dots {
  display: none;
}

/* ============================================================
   HOME MAP (delivery)
============================================================ */
.home-map {
  background: #434446;
  color: var(--white);
  margin-top: -1px;
  padding: 0 0 246px;
  border-top: 0;
  box-shadow: none;
}
.home-map__inner {
  position: relative;
  display: block;
  width: min(1646px, calc(100% - 40px));
  max-width: 1646px;
  height: auto;
  margin: 0 auto;
  padding: 0;
}
.home-map__dots {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1646 / 838;
  background-image: url('../demo/map.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: contain;
  opacity: 1;
}
.home-map__message {
  position: absolute;
  left: 605px;
  top: 252px;
  margin: 0;
  width: 887px;
  max-width: calc(100% - 605px);
  text-align: left;
  z-index: 2;
}
.home-map__tagline {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-size: 55px;
  font-weight: 700;
  line-height: 67px;
  margin: 0;
  color: #fff;
}
.home-map__accent {
  margin-top: 33px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-size: 36px;
  font-weight: 900;
  line-height: 44px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #F1BB36;
  margin-bottom: 0;
}

/* ============================================================
   HOME FORM
============================================================ */
.home-form {
  background: #262626;
  color: var(--white);
  padding: 248px 0 158px;
}
.home-form__inner {
  max-width: none;
  margin: 0 auto;
  text-align: center;
}
.home-form__title {
  width: 802px;
  max-width: 100%;
  margin: 0 auto 123px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-size: 64px;
  font-weight: 600;
  line-height: 101%;
}

.home-form__form {
  width: min(1195px, calc(100% - 80px));
  max-width: 1195px;
  margin: 0 auto;
  text-align: left;
}
.home-form__fields {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  flex-direction: row;
  gap: 44px;
}
@media (min-width: 580px) {
  .home-form__fields { flex-direction: row; align-items: stretch; }
}
.home-form__input {
  flex: 0 0 369px;
  width: 369px;
  min-height: 71px;
  padding: 0 18px;
  font-size: 24px;
  border: 0;
  background: #585858;
  color: #cfcfcf;
  outline: none;
  border-radius: 0;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: 500;
  line-height: 29px;
}
.home-form__input::placeholder { color: #cfcfcf; opacity: 1; }
.home-form__input:focus { border-color: var(--yellow); }

.home-form__fields .btn--yellow {
  flex: 0 0 369px;
  width: 369px;
  min-height: 71px;
  padding: 0 28px;
  font-size: 24px;
  border-radius: 0;
  border: 0;
  background: #F1BB36;
  color: #000;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-style: normal;
  font-weight: 500;
  line-height: 29px;
}

.home-form__fields .btn--yellow:hover {
  background: #F1BB36;
  color: #000;
}

.home-form__pdn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 752px;
  max-width: 100%;
  margin-top: 47px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
}
.home-form__pdn input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-right: 0;
  background: #8E8E8E;
  border: 1px solid #8E8E8E;
  border-radius: 0;
  vertical-align: top;
  position: relative;
}

.home-form__pdn-text {
  display: block;
  min-width: 0;
}
.home-form__pdn input:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 15px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.home-form__pdn a { color: #4a9eff; text-decoration: underline; }
.home-form__pdn a:hover { color: #4a9eff; opacity: 0.85; }

/* CF7 bottom form */
.home-form__cf7 {
  display: block;
  width: min(1195px, calc(100% - 80px));
  max-width: 1195px;
  margin: 0 auto;
}
.home-form__cf7 .wpcf7 { width: 100%; }
.home-form__cf7 .wpcf7 form,
.home-form__cf7 .wpcf7-form {
  display: block;
  width: 100%;
  margin: 0;
  max-width: none;
  text-align: left;
}

/* Гарантируем flex на .home-form__fields внутри CF7 */
.home-form__cf7 .home-form__fields {
  display: flex;
}

/* CF7 может оборачивать шорткоды в <p> — делаем их прозрачными */
.home-form__cf7 .home-form__fields > p {
  display: contents;
}
.home-form__cf7 .home-form__fields > p > br { display: none; }

/* Инпуты: прямые flex-элементы .home-form__fields */
.home-form__cf7 .home-form__fields .wpcf7-form-control-wrap {
  flex: 0 0 369px;
  width: 369px;
  min-width: 0;
  display: block;
}
.home-form__cf7 .wpcf7-form input[type="text"],
.home-form__cf7 .wpcf7-form input[type="tel"] {
  display: block;
  width: 100%;
  min-height: 71px;
  height: 71px;
  padding: 0 18px;
  font-size: 24px;
  border: 0;
  background: #585858;
  color: #cfcfcf;
  outline: none;
  border-radius: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  line-height: 29px;
}
.home-form__cf7 .wpcf7-form input[type="text"]::placeholder,
.home-form__cf7 .wpcf7-form input[type="tel"]::placeholder { color: #cfcfcf; opacity: 1; }

/* Кнопка submit */
.home-form__cf7 .home-form__fields input[type="submit"],
.home-form__cf7 .home-form__fields button[type="submit"] {
  flex: 0 0 369px;
  width: 369px;
  min-height: 71px;
  height: 71px;
  padding: 0 28px;
  font-size: 24px;
  border-radius: 0;
  border: 0;
  background: #F1BB36;
  color: #000;
  cursor: pointer;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 500;
  line-height: 29px;
  box-sizing: border-box;
}
.home-form__cf7 .home-form__fields input[type="submit"]:hover,
.home-form__cf7 .home-form__fields button[type="submit"]:hover {
  background: #F1BB36;
  color: #000;
}

/* Acceptance (ПДн) через CF7 */
.home-form__cf7 .cf7-pdn {
  width: 752px;
  max-width: 100%;
  margin: 50px 0 0;
}
.home-form__cf7 .wpcf7-acceptance {
  display: block;
  width: 100%;
  max-width: 752px;
  margin: 50px 0 0;
}
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: #fff;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0;
  background: #8E8E8E;
  border: 1px solid #8E8E8E;
  border-radius: 0;
  position: relative;
  cursor: pointer;
}
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 15px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item-label {
  display: block;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  overflow-wrap: anywhere;
}
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item-label a { color: #4a9eff; text-decoration: underline; }
.home-form__cf7 .wpcf7-acceptance .wpcf7-list-item-label a:hover { color: #4a9eff; opacity: 0.85; }

/* Fallback for CF7 markup variations without explicit .wpcf7-acceptance wrapper class path */
.home-form__cf7 .wpcf7-list-item-label {
  display: block;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  overflow-wrap: anywhere;
}
.home-form__cf7 .wpcf7-list-item-label a { color: #4a9eff; text-decoration: underline; }
.home-form__cf7 .wpcf7-list-item-label a:hover { color: #4a9eff; opacity: 0.85; }
.home-form__cf7 .wpcf7-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0;
  background: #8E8E8E;
  border: 1px solid #8E8E8E;
  border-radius: 0;
  position: relative;
  cursor: pointer;
}
.home-form__cf7 .wpcf7-list-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 15px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Spinner / response */
.home-form__cf7 .wpcf7-spinner { display: none; }
.home-form__cf7 .wpcf7-response-output {
  margin: 16px 0 0;
  width: 100%;
  text-align: center;
}

.home-form__form .alucat-form-status,
.home-form__cf7 .alucat-form-status {
  width: min(752px, 100%);
}

.home-form__form .alucat-form-status.is-pending,
.home-form__cf7 .alucat-form-status.is-pending {
  background: linear-gradient(135deg, rgba(245, 200, 0, 0.18), rgba(245, 200, 0, 0.08));
  border-color: rgba(245, 200, 0, 0.42);
  color: #fff0bf;
}

.home-form__form .alucat-form-status.is-success,
.home-form__cf7 .alucat-form-status.is-success {
  background: linear-gradient(135deg, rgba(62, 206, 232, 0.2), rgba(62, 206, 232, 0.08));
  border-color: rgba(62, 206, 232, 0.42);
  color: #d5fbff;
}

.home-form__form .alucat-form-status.is-error,
.home-form__cf7 .alucat-form-status.is-error {
  background: linear-gradient(135deg, rgba(255, 110, 110, 0.2), rgba(255, 110, 110, 0.08));
  border-color: rgba(255, 110, 110, 0.38);
  color: #ffd7d7;
}

.home-form__cf7 .wpcf7-response-output,
.home-form__cf7 .wpcf7-spinner {
  display: none !important;
}

/* ============================================================
   HOME FAQ (front-page only overrides)
============================================================ */
.home-faq {
  background: #434446;
  padding: 119px 0 180px;
}

.home-faq .container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: clamp(100px, calc(100vw - 1174px), 743px);
  padding-right: clamp(60px, 15.9vw, 306px);
}

.home-faq__title {
  max-width: none;
  margin: 0 0 33px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 78px;
  color: #fff;
}

.faq-list {
  max-width: 868px;
  margin-left: 0;
}

.faq-item {
  border-bottom: 2px solid #5B5B5B;
}

.faq-item:first-child {
  border-top: 0;
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 35px 0;
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 53px;
  height: 51px;
  margin-top: 0;
  background: #F1BB36;
  position: relative;
  font-size: 0;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 24px;
  width: 27px;
  height: 4px;
  background: #fff;
}

.faq-item__icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-item__icon {
  background: #000;
}

.faq-item[open] .faq-item__icon::after {
  display: none;
}

.faq-item__answer {
  width: 667px;
  max-width: 100%;
  padding: 0 0 40px;
  font-size: 24px;
  line-height: 29px;
  font-weight: 400;
  color: #fff;
}

@media (max-width: 1280px) {
  .home-faq .container {
    padding-left: 100px;
    padding-right: 100px;
  }

  /* Form: начинаем враппинг до того, как 3×369px + 2×44px выйдут за край */
  .home-form__form {
    width: calc(100% - 80px);
  }
  .home-form__fields {
    flex-wrap: wrap;
    gap: 18px;
  }
  .home-form__input,
  .home-form__fields .btn--yellow {
    flex: 1 1 280px;
    width: auto;
    min-width: 0;
  }
  /* CF7 form */
  .home-form__cf7 {
    width: calc(100% - 80px);
  }
  .home-form__cf7 .home-form__fields {
    flex-wrap: wrap;
    gap: 18px;
  }
  .home-form__cf7 .home-form__fields .wpcf7-form-control-wrap {
    flex: 1 1 280px;
    width: auto;
    min-width: 0;
  }
  .home-form__cf7 .home-form__fields input[type="submit"],
  .home-form__cf7 .home-form__fields button[type="submit"] {
    flex: 1 1 280px;
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 992px) {
  .home-quality {
    padding: 90px 0 72px;
  }

  .home-quality .container.home-quality__inner {
    padding-left: 60px;
    padding-right: 40px;
  }

  .home-quality__title {
    font-size: 40px;
    line-height: 1.15;
    margin-bottom: 24px;
  }

  .home-quality__lead {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 28px;
  }

  .home-quality__body {
    font-size: 20px;
    line-height: 1.35;
  }

  .home-form {
    padding: 130px 0 96px;
  }

  .home-form__title {
    margin-bottom: 56px;
    font-size: 44px;
  }

  .home-form__form {
    width: calc(100% - 80px);
  }

  .home-form__fields {
    flex-wrap: wrap;
    gap: 18px;
  }

  /* CF7 bottom form — планшет */
  .home-form__cf7 .home-form__fields {
    flex-wrap: wrap;
    gap: 18px;
  }

  .home-form__pdn {
    margin-top: 24px;
    width: 100%;
  }

  .home-faq {
    padding: 84px 0 108px;
  }

  .home-faq .container {
    padding-left: 60px;
    padding-right: 40px;
  }

  .home-faq__title {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .faq-list {
    max-width: none;
  }

  .faq-item__question {
    font-size: 30px;
    line-height: 1.2;
  }

  .faq-item__answer {
    width: 100%;
    font-size: 20px;
    line-height: 1.35;
  }

  .home-map__inner {
    width: calc(100% - 40px);
    max-width: none;
    height: auto;
  }

  .home-map__dots {
    width: 100%;
    height: auto;
    background-size: contain;
    background-position: center top;
  }

  .home-map__message {
    position: relative;
    left: auto;
    top: auto;
    width: min(100%, 700px);
    max-width: none;
    text-align: center;
    margin: -170px auto 0;
  }

  .home-map__tagline {
    font-size: 42px;
    line-height: 1.15;
  }

  .home-map__accent {
    margin-top: 16px;
    font-size: 28px;
    line-height: 1.2;
  }
}

@media (max-width: 767px) {
  .home-quality {
    padding: 64px 0 54px;
  }

  .home-quality .container.home-quality__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-quality__title {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 39px;
    margin-bottom: 14px;
  }

  .home-quality__lead {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 27px;
    margin-bottom: 16px;
  }

  .home-quality__body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
  }

  .home-form {
    padding: 80px 0 64px;
  }

  .home-form__title {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.01;
    max-width: 295px;
    margin-bottom: 30px;
  }

  .home-form__form {
    width: 100%;
    max-width: none;
  }

  .home-form__cf7 {
    width: 100%;
    max-width: none;
  }

  .home-form__input,
  .home-form__fields .btn--yellow {
    width: 100%;
    flex-basis: auto;
    min-height: 63px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 21px;
    line-height: 26px;
  }

  /* CF7 bottom form — мобилка: вертикальный стек */
  .home-form__cf7 .home-form__fields {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .home-form__cf7 .home-form__fields .wpcf7-form-control-wrap {
    flex: 0 0 auto;
    width: 100%;
  }
  .home-form__cf7 .home-form__fields input[type="text"],
  .home-form__cf7 .home-form__fields input[type="tel"] {
    min-height: 63px;
    font-size: 21px;
    line-height: 26px;
  }
  .home-form__cf7 .home-form__fields input[type="submit"],
  .home-form__cf7 .home-form__fields button[type="submit"] {
    flex: 0 0 auto;
    width: 100%;
    min-height: 63px;
    font-size: 21px;
    line-height: 26px;
  }
  .home-form__cf7 .cf7-pdn { width: 100%; }

  .home-form__pdn {
    margin-top: 16px;
    gap: 8px;
  }

  .home-form__pdn input {
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
  }

  .home-form__pdn-text {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.4;
  }

  .home-map {
    padding: 0 0 54px;
  }

  .home-map__inner {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    min-height: 0;
  }

  .home-map__dots {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    background-size: contain;
    background-position: center top;
  }

  .home-map__message {
    position: relative;
    z-index: 1;
    left: auto;
    top: auto;
    width: auto;
    max-width: calc(100% - 48px);
    text-align: left;
    margin: 0;
    padding: 49px 0 32px 48px;
  }

  .home-map__tagline {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
  }

  .home-map__accent {
    margin-top: 10px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 900;
    font-size: 16px;
    line-height: 20px;
    color: #F1BB36;
  }

  .home-faq {
    padding: 64px 0 72px;
  }

  .home-faq .container {
    padding-left: 28px;
    padding-right: 20px;
  }

  .home-faq__title {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.25;
    color: #fff;
  }

  .faq-item__question {
    display: flex;
    align-items: center;
    /* Chrome ≥89 даёт <summary> UA justify-content:space-between — явно сбрасываем */
    justify-content: flex-start;
    gap: 9px;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    padding: 14px 0;
  }

  .faq-item__icon {
    order: -1;
    flex-shrink: 0;
    width: 25px;
    height: 24.06px;
    margin-top: 0;
  }

  .faq-item__icon::before,
  .faq-item__icon::after {
    left: 6.13px;
    top: 11.09px;
    width: 12.74px;
    height: 1.89px;
  }

  .faq-item__answer {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    padding-bottom: 14px;
    width: 100%;
  }
}
