/* ==========================================================================
   Промкомплект — theme/pk2/css/pk-addons.css
   Доработки: заявки, CTA, шапка, аккуратный контент (18–19.11.2026)
   ========================================================================== */

/* ---------- Кнопки ---------- */
.pk-btn {
  display: inline-block;
  background: linear-gradient(to bottom, #d32f2f, #b60404);
  border-radius: 20px;
  color: #fff;
  height: 45px;
  line-height: 43px;
  text-decoration: none;
  border: 0;
  padding: 0 23px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.pk-btn:hover { background: linear-gradient(to bottom, #b60404, #8a0303); color: #fff; text-decoration: none; }
.pk-btn:disabled { opacity: .6; cursor: default; }
.pk-btn--big { height: 52px; line-height: 50px; padding: 0 34px; font-size: 16px; }
.pk-btn--block { display: block; width: 100%; }

/* ---------- Шапка: логотип, поиск, контакты, кнопка ---------- */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
#header-logo { flex: 0 0 auto; }
#header-logo img { display: block; }
#header-search { float: none; margin-top: 0; flex: 0 0 auto; }
#header-contact {
  float: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}
#header-contact-info { text-align: right; line-height: 16px; }
#header-contact-cta { margin-top: 0; }
#header-contact-cta .pk-btn {
  height: 40px;
  line-height: 38px;
  font-size: 13px;
  padding: 0 18px;
  white-space: nowrap;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(182, 4, 4, 0.25);
}
#header-contact-cta .pk-btn:hover { box-shadow: 0 5px 14px rgba(182, 4, 4, 0.4); }
#menu { clear: both; }

/* Подсказка у e-mail в шапке */
#header-contact-email a { cursor: pointer; }
.pk-copy-hint { font-size: 11px; color: #999; }

/* Всплывающее уведомление «Скопировано» */
.pk-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 12000;
  pointer-events: none;
}
.pk-toast--visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---------- H1 главной и отступ hero ---------- */
#menu-big { padding-top: 25px; }
.pk-hero__title {
  max-width: 940px;
  margin: 0 auto 20px;
  padding: 0 15px;
  font-size: 26px;
  line-height: 32px;
  text-align: center;
  font-weight: 700;
  color: #222;
}

/* ---------- CTA-блок после контента ---------- */
.pk-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin: 40px 0 20px;
  padding: 26px 30px;
  background: linear-gradient(135deg, #fdf2f2, #fde8e8);
  border: 1px solid #f0c8c8;
  border-radius: 15px;
}
.pk-cta__text h2 { font-size: 21px; line-height: 26px; margin: 0 0 8px; }
.pk-cta__text p { margin: 0; font-size: 14px; line-height: 20px; color: #333; }
.pk-cta .pk-btn { flex: 0 0 auto; }

/* ---------- Модальное окно заявки ---------- */
.pk-modal { display: none; position: fixed; inset: 0; z-index: 10000; }
.pk-modal--open { display: block; }
.pk-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.pk-modal__dialog {
  position: relative;
  max-width: 420px;
  width: calc(100% - 30px);
  margin: 60px auto 0;
  background: #fff;
  border-radius: 15px;
  padding: 28px 28px 22px;
  box-shadow: 0 15px 50px rgba(0,0,0,.3);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.pk-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}
.pk-modal__close:hover { color: #b60404; }
.pk-modal__title { font-size: 22px; font-weight: 700; margin-bottom: 6px; color: #222; }
.pk-modal__subtitle { font-size: 13px; color: #666; margin: 0 0 16px; }

.pk-field { display: block; margin-bottom: 12px; }
.pk-field__label { display: block; font-size: 13px; margin-bottom: 4px; color: #333; }
.pk-field__label b { color: #b60404; }
.pk-field input,
.pk-field textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.pk-field input:focus,
.pk-field textarea:focus { border-color: #b60404; outline: none; }

/* Honeypot — скрытое поле от роботов */
.pk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.pk-form-error {
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #a01c1c;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.pk-modal__privacy { font-size: 11px; color: #999; margin: 10px 0 0; line-height: 15px; }

.pk-modal__success { text-align: center; padding: 20px 0 10px; }
.pk-modal__success-title { font-size: 20px; font-weight: 700; color: #2e7d32; margin-bottom: 10px; }
.pk-modal__success p { font-size: 14px; line-height: 20px; }

/* Кнопка заявки в плавающем виджете */
.pk-contact-widget__item--cta { background: linear-gradient(to bottom, #d32f2f, #b60404) !important; border: 0; cursor: pointer; padding: 0; font-family: inherit; color: #fff; }
.pk-contact-widget__item--cta:hover { background: linear-gradient(to bottom, #b60404, #8a0303) !important; }

/* ---------- Аккуратный контент страниц ---------- */
#content-main .pk-imgrow {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
}
#content-main .pk-imgrow img {
  flex: 0 1 auto;
  width: auto;
  max-width: 300px;
  height: 220px;
  object-fit: contain;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
  box-shadow: none;
}
/* Если картинка одна в абзаце — даём ей быть крупнее */
#content-main .pk-imgrow img:only-child {
  max-width: 100%;
  height: auto;
  max-height: 420px;
}

/* Пустые абзацы-«распорки» из старого редактора */
#content-main .pk-empty { display: none; }

/* Таблицы и картинки внутри текста — не вылезают за ширину */
#content-main table { max-width: 100%; }
#content-main td img { max-width: 100%; height: auto; }
#content-main img { border-radius: 6px; }

/* ---------- Адаптивность ---------- */
@media (max-width: 960px) {
  #header { flex-direction: column; gap: 10px; }
  #header-contact { flex-direction: column; gap: 8px; align-items: center; }
  #header-contact-info { text-align: center; }
  #header-contact-cta { margin-top: 4px; }
  .pk-cta { flex-direction: column; text-align: center; gap: 16px; }
  .pk-hero__title { font-size: 20px; line-height: 26px; }
  #menu-big { padding-top: 30px; }
  #content-main .pk-imgrow img { max-width: 45%; height: 160px; }
  #content-main .pk-imgrow img:only-child { max-width: 100%; height: auto; }
}
@media (max-width: 600px) {
  .pk-modal__dialog { margin-top: 20px; padding: 22px 18px 18px; }
  /* Широкие таблицы из старых текстов — горизонтальный скролл, вёрстка не ломается */
  #content-main table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
