/*
Theme Name: Kontarex Theme
Description: Custom WordPress theme for Kontarex
Author: Frontend Dev
Version: 1.0.0
*/
/* manrope-regular - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  src: url('assets/fonts/manrope-v20-cyrillic_latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-500 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  src: url('assets/fonts/manrope-v20-cyrillic_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-600 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  src: url('assets/fonts/manrope-v20-cyrillic_latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-700 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  src: url('assets/fonts/manrope-v20-cyrillic_latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* manrope-800 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  src: url('assets/fonts/manrope-v20-cyrillic_latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* oswald-regular - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400;
  src: url('assets/fonts/oswald-v57-cyrillic_latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* oswald-500 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  src: url('assets/fonts/oswald-v57-cyrillic_latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* oswald-600 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  src: url('assets/fonts/oswald-v57-cyrillic_latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* oswald-700 - cyrillic_latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  src: url('assets/fonts/oswald-v57-cyrillic_latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* Исправление анимации чекбокса для Contact Form 7 */
.form-checkbox:has(.form-checkbox__input:checked) .form-checkbox__box {
  background: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}

.form-checkbox:has(.form-checkbox__input:checked) .form-checkbox__box::after {
  transform: rotate(-45deg) scale(1) !important;
}

/* Динамические координаты для точек "Как всё устроено" */
.exploded__hotspot {
    /* По умолчанию (на мобилках) используем мобильные координаты */
    left: var(--x-mob, 50%) !important;
    top: var(--y-mob, 50%) !important;
}

/* На экранах от 768px и выше переключаемся на десктопные координаты */
@media (min-width: 768px) {
    .exploded__hotspot {
        left: var(--x-desk, 50%) !important;
        top: var(--y-desk, 50%) !important;
    }
}

.product-card__old-price {
    white-space: nowrap; /* Запрещает разрывать текст внутри элемента по пробелам */
    display: inline-block; /* Делает элемент "цельным блоком", который переносится только целиком */
}

/* На всякий случай давай защитим от разрыва и основную цену тоже */
.product-card__price strong {
    white-space: nowrap;
    display: inline-block;
}

/* ============================================================
   ФИНАЛЬНЫЙ СТИЛЬ FILTER EVERYTHING (СИНХРОНИЗАЦИЯ С МАКЕТОМ)
   ============================================================ */

/* 1. Убиваем системные рамки виджета и скрываем лишний мусор плагина */

.catalog-sidebar__body {
    padding: 0px 0px 60px !important;
}
.sidebar-nav {
	margin: 0 20px !important;
}
.wpc-filters-widget-wrapper {
    padding: 0 20px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
/* Доводим меню до нормы */
.control-bar__perpage span {
	display: none;
}
@media (min-width: 768px) {
    .sidebar-nav {
        margin: 0px 0px 0px !important;
    }
	.widget_wpc_filters_widget {
	padding: 20px 20px 0px;
	}
    .catalog-sidebar__body {
        padding: 0px 0px 0px !important;
    }
	.wpc-filters-widget-wrapper {
      padding: 0 0 !important;
	}
	.control-bar__perpage span {
		display: block;
	}
}

.wpc-filters-range-values-wrapper,
.wpc-filters-widget-controls-container,
.wpc-range-clear,
.wpc-pc-apply-button,
.wpc-term-count {
    display: none !important;
}

/* 2. Заголовки фильтров (Цена, Площадь) */
.wpc-filter-title {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark) !important;
    margin-bottom: 12px !important;
    text-transform: none !important;
}

/* 3. Блок цены: инпуты в ряд, стилизация под BEM */
.wpc-filters-range-wrapper {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
}
.wpc-filters-range-column {
    width: 100% !important;
}
.wpc-filters-range-column input[type="number"] {
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    font-family: inherit !important;
    font-size: 0.85rem !important;
    color: var(--text-dark) !important;
    background: var(--bg-white) !important;
    box-sizing: border-box !important;
    -moz-appearance: number-input !important;
    transition: border-color var(--transition) !important;
}
.wpc-filters-range-column input[type="number"]:focus {
    outline: none !important;
    border-color: var(--brand-blue) !important;
}

/* Принудительно возвращаем стрелочки инпутам цены */
.wpc-filters-range-column input[type="number"]::-webkit-inner-spin-button,
.wpc-filters-range-column input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: inner-spin-button !important; 
    opacity: 1 !important; 
    display: block !important;
}

/* 4. Чекбоксы и радиокнопки (Цвет, размеры и фикс левой обрезки) */
.wpc-filters-ul-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}
body .wpc-filters-main-wrap li.wpc-term-item{
	margin-bottom: 0px !important;
}
.wpc-filters-section{
	margin-bottom: 16px !important;
}
.wpc-term-item-content-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 5px 0 !important;
    cursor: pointer !important;
    overflow: visible !important; /* Блокируем обрезку у родителя */
}
.wpc-term-item-content-wrapper input[type="checkbox"],
.wpc-term-item-content-wrapper input[type="radio"] {
    accent-color: var(--brand-orange) !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    margin: 0 0 0 2px !important; /* ФИКС: отодвигаем кружочки на 2px от левого края */
    cursor: pointer !important;
}

/* Чуть увеличиваем радиокнопки для визуального соответствия макету */
.wpc-term-item-content-wrapper input[type="radio"] {
    transform: scale(1.1);
}

.wpc-term-item-content-wrapper label {
    font-size: 0.85rem !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

/* 5. КОНТЕЙНЕР КНОПОК: Убиваем fixed-позиционирование плагина и ставим в колонку */
.wpc-sticky-buttons {
    position: static !important; 
    display: flex !important; 
    flex-direction: column !important;
    gap: 8px !important; 
    margin-top: 16px !important; 
    width: 100% !important;
    background: transparent !important; 
    padding: 0 !important; 
    box-shadow: none !important;
}

/* Кнопка "Применить фильтры" */
a.wpc-filters-submit-button {
    display: block !important; 
    width: 100% !important; 
    background: var(--brand-blue) !important; 
    color: #fff !important; 
    border-radius: var(--radius-sm) !important; 
    font-family: inherit !important;
    font-size: 0.9rem !important; 
    font-weight: 600 !important; 
    text-align: center !important;
    text-transform: none !important; 
    text-decoration: none !important; 
    box-sizing: border-box !important;
    transition: background var(--transition) !important;
}
a.wpc-filters-submit-button:hover { 
    background: var(--brand-blue-dark) !important; 
}

/* Кнопка "Сбросить фильтры" */
a.wpc-filters-reset-button {
    display: block !important; 
    width: 100% !important; 
    background: none !important; 
    color: var(--brand-orange) !important;
    border: 1px solid var(--brand-orange) !important; 
    border-radius: var(--radius-sm) !important;
    font-family: inherit !important; 
    font-size: 0.85rem !important; 
    font-weight: 600 !important;
    text-align: center !important; 
    text-transform: none !important; 
    text-decoration: none !important;
    box-sizing: border-box !important; 
    transition: background var(--transition), color var(--transition) !important;
}
a.wpc-filters-reset-button:hover { 
    background: var(--brand-orange) !important; 
    color: #fff !important; 
}
.wpc-sticky-placeholder {
    display: none !important;
}
.wpc-sticky-buttons {
	border: none !important;
}

/* 1. ФИКС ОБРЕЗКИ ТЕКСТА (Убиваем слепую зону под крестик) */
#catalogSidebar .wpc-filters-range-column input[type="number"] {
    padding: 10px 12px !important; /* Жестко задаем одинаковые отступы со всех сторон */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================================
   ФИКСЫ CF7 ДЛЯ ФОРМЫ "ИНДИВИДУАЛЬНЫЙ ЗАКАЗ" (СТРОГАЯ ИЗОЛЯЦИЯ)
   ============================================================ */
.custom-order__submit {
	padding: 14px 28px !important;
}

/* Делаем системные обертки прозрачными только внутри этой конкретной формы */
.custom-order__form .wpcf7-form-control-wrap {
    display: contents !important;
}

/* Жестко ограничиваем ширину полей, чтобы атрибут size="40" от CF7 не ломал сетку */
.custom-order__form .custom-order__input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Прячем стандартное зеленое уведомление CF7 только здесь */
.custom-order__form .wpcf7-response-output {
    display: none !important;
}
/* Фикс прелоадера */
.custom-order__form .wpcf7-spinner {
    position: absolute;
    visibility: hidden;
}

/* Полностью прячем текстовые уведомления об ошибках под полями, чтобы они не ломали верстку (у нас есть свой JS-Toast и disabled кнопка) */
.custom-order__form .wpcf7-not-valid-tip {
    display: none !important;
}

/* ============================================================
   ФИКСЫ CF7 ДЛЯ ФОРМЫ "ПОЛУЧИТЬ РАСЧЕТ" (ПОРТФОЛИО)
   ============================================================ */
/* Делаем системные обертки прозрачными только внутри этой конкретной формы */
.cta-banner__form .wpcf7-form-control-wrap {
    display: contents !important;
}

/* Жестко ограничиваем ширину полей, чтобы атрибут size="40" от CF7 не ломал сетку */
.cta-banner__form .cta-banner__input {
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Прячем стандартные уведомления CF7, чтобы они не прыгали в верстке */
.cta-banner__form .wpcf7-response-output,
.cta-banner__form .wpcf7-not-valid-tip {
    display: none !important;
}

/* Фикс прелоадера */
.cta-banner__form .wpcf7-spinner {
    position: absolute;
    visibility: hidden;
}

/* ============================================================
   КАСКАДНЫЕ СТИЛИ ДЛЯ КОНТЕНТА ИЗ РЕДАКТОРА (SEO БЛОК)
   ============================================================ */

/* 1. Отступы между всеми элементами (заголовки, абзацы, таблицы) */
.seo-block__text > * {
  margin-bottom: 24px;
}
.seo-block__text > *:last-child {
  margin-bottom: 0;
}

/* 2. ЗАГОЛОВКИ H2 (Вариант "С") */
/* Базовый H2 (без линии, по левому краю) */
.seo-block__text h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  /* text-align: center; убрали отсюда */
}

/* Модификатор для линии (применяется вручную в редакторе: <h2 class="title-with-line">) */
.seo-block__text h2.title-with-line {
  position: relative;
  padding-bottom: 16px;
  margin-bottom: 32px;
  text-align: center; /* Добавили сюда */
}
.seo-block__text h2.title-with-line::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--brand-orange);
}

/* 3. ТАБЛИЦЫ: Базовый дизайн (Состояние 1 - вписывается в экран без скролла) */
.seo-block__text table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-white);
}

.seo-block__text table th,
.seo-block__text table tr:first-child td {
  background: var(--text-dark);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  white-space: normal; /* Разрешаем перенос текста для Состояния 1 */
}

.seo-block__text table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: normal;
}

.seo-block__text table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* 4. Обертка для скролла (генерируется JS только для Состояний 2 и 3) */
.content-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.content-table-wrap table {
  margin-bottom: 0; /* У обертки уже есть отступ */
  border: none;
}

/* 5. ТАБЛИЦЫ: Состояние 2 (Sticky) и Состояние 3 (Scroll) для мобилок */
@media (max-width: 767px) {
  
  /* Принудительно раздвигаем таблицу, чтобы активировать горизонтальный скролл */
  .seo-block__text table.content-table--sticky,
  .seo-block__text table.content-table--scroll {
    min-width: 600px;
  }
  
  /* Запрещаем перенос строк в шапке для скроллируемых таблиц */
  .seo-block__text table.content-table--sticky th,
  .seo-block__text table.content-table--scroll th,
  .seo-block__text table.content-table--sticky tr:first-child td,
  .seo-block__text table.content-table--scroll tr:first-child td {
    white-space: nowrap;
  }

  /* Липкая колонка (ТОЛЬКО для Состояния 2 - Sticky) */
  .seo-block__text table.content-table--sticky th:first-child,
  .seo-block__text table.content-table--sticky td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 120px;
  }
  .seo-block__text table.content-table--sticky th:first-child,
  .seo-block__text table.content-table--sticky tr:first-child td:first-child {
    background: var(--text-dark);
    z-index: 2;
  }
  .seo-block__text table.content-table--sticky tr:nth-child(even) td:first-child {
    background: #f5f5f5;
  }
  .seo-block__text table.content-table--sticky tr:nth-child(odd) td:first-child {
    background: var(--bg-white);
  }
}

/* ========== СПИСКИ (UL / OL) ========== */
.seo-block__text ul,
.seo-block__text ol {
  margin: 0 0 24px;
  padding-left: 0;
  list-style: none;
}

.seo-block__text ul > li,
.seo-block__text ol > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main, #4A5568);
}

/* UL bullets — оранжевые точки */
.seo-block__text ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--brand-orange);
  border-radius: 50%;
}

/* Вложенные UL — оранжевые кольца */
.seo-block__text ul ul > li::before {
  background: transparent;
  border: 2px solid var(--brand-orange);
  width: 6px;
  height: 6px;
}

/* Модификатор list-checked: SVG галочки */
.seo-block__text ul.list-checked > li::before {
  content: none;
}
.seo-block__text ul.list-checked > li {
  padding-left: 30px;
}
.seo-block__text ul.list-checked > li::after {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF5A00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* OL: крупные оранжевые цифры */
.seo-block__text ol {
  counter-reset: article-ol;
}
.seo-block__text ol > li {
  counter-increment: article-ol;
  padding-left: 32px;
}
.seo-block__text ol > li::before {
  content: counter(article-ol);
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  color: var(--brand-orange);
}

/* Вложенные OL: нумерация вида 1.1 */
.seo-block__text ol ol {
  counter-reset: article-ol-nested;
  margin-top: 8px;
}
.seo-block__text ol ol > li {
  counter-increment: article-ol-nested;
  padding-left: 36px;
}
.seo-block__text ol ol > li::before {
  content: counter(article-ol) '.' counter(article-ol-nested);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-blue);
  top: 2px;
}

/* Отступы для вложенных списков */
.seo-block__text ul ul,
.seo-block__text ol ol,
.seo-block__text ul ol,
.seo-block__text ol ul {
  margin-top: 8px;
  margin-bottom: 0;
}

/* ========== ЦИТАТЫ (BLOCKQUOTE) ========== */
/* Базовая цитата по умолчанию (Информер с лампочкой) */
.seo-block__text blockquote {
  font-style: normal;
  position: relative;
  display: block;
  margin: 24px 0;
  padding: 20px 20px 20px 40px;
  background: var(--bg-light, #F7FAFC);
  border-left: 3px solid var(--brand-blue);
  border-radius: 0 8px 8px 0;
}

/* Иконка лампочки по умолчанию */
.seo-block__text blockquote::before {
  content: '\1F4A1';
  position: absolute;
  left: -16px;
  top: 20px;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-style: normal;
  line-height: 1;
}

/* Оформление текста внутри цитаты */
.seo-block__text blockquote p {
  display: block;
  margin-bottom: 10px;
  color: var(--text-main, #4A5568);
}
.seo-block__text blockquote p:first-child {
  margin-top: 0;
}
.seo-block__text blockquote p:first-child strong {
  display: block;
  margin-bottom: 10px;
}
.seo-block__text blockquote p:last-child {
  margin-bottom: 0;
}

/* Модификатор: Восклицательный знак (Warning) */
.seo-block__text blockquote.article-callout--warning {
  border-left-color: #E53E3E;
  background: #FFF5F5;
}
.seo-block__text blockquote.article-callout--warning::before {
  content: '\26A0\FE0F';
}

/* Вложенная цитата (Без иконки, другой фон, курсив) */
.seo-block__text blockquote blockquote {
  margin: 12px 0 0;
  padding: 12px 16px;
  background: rgba(255,255,255,0.7);
  border-left: 4px solid var(--brand-orange);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.seo-block__text blockquote blockquote::before {
  content: none; /* Убираем лампочку у вложенной цитаты */
}

/* ============================================================
   ГЛОБАЛЬНОЕ ВЫДЕЛЕНИЕ ССЫЛОК В ЧЕКБОКСАХ СОГЛАСИЯ
   ============================================================ */
.form-consent a {
	color: var(--brand-blue);
    text-decoration: underline;
}

.form-consent a:hover {
    color: var(--brand-orange);
}