/*
 * Merchant Properbaits — content.css
 * Контентные страницы: «Покупателям» (/info/, политика, согласие), «Формы» (/forms/), «Акции» (/promo/) + формы Contact Form 7.
 * Источник: design/Properbaits Info.dc.html, Forms, Promo.
 */

/* ============================== Вкладки-разделы (общее) ============================== */
/* Без поддержки :has() все разделы видны подряд. Раздел по умолчанию и активная вкладка — inline-CSS шаблона (pbt_cnt_tabs_css). */
@supports selector(:has(*)) {
	.pb-tabs .pb-sec { display: none; }
	.pb-tabs .pb-sec:is(:target, :has(:target)) { display: flex; }
}
.pb-sec { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 16px; min-width: 0; }
.pb-content > .pb-sec { margin-top: 0; }

/* ============================== «Покупателям» ============================== */
.pb-info { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pb-snav {
	flex: 0 0 300px;
	max-width: 100%;
	background: #fff;
	border-radius: 32px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	top: 16px;
}
.pb-snav__g { display: flex; flex-direction: column; gap: 4px; }
.pb-snav__t {
	font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-muted); padding: 0 12px 6px;
}
.pb-snav__a {
	min-height: 44px; padding: 0 16px; border-radius: var(--pb-pill); display: flex; align-items: center;
	font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none; background: var(--pb-bg); color: var(--pb-ink);
	transition: background .15s, color .15s;
}
.pb-snav__a:hover { background: var(--pb-blue); color: #fff; text-decoration: none; }
.pb-snav__a.is-current { background: #202020; color: #fff; }
.pb-snav__a.is-current:hover { background: var(--pb-blue); }

.pb-info__main {
	flex: 1 1 560px;
	min-width: 0;
	background: #fff;
	border-radius: 32px;
	padding: clamp(20px, 4vw, 56px);
	font-size: 17px;
	line-height: 1.6;
	color: #2B3033;
}
/* Типографика раздела: гэп вместо верхних отступов .pb-content */
.pb-content .pb-sec > * { margin: 0; }
.pb-content .pb-sec > :is(p, h2, h3, ul, ol) { max-width: 760px; }
.pb-content .pb-sec > h2:not(.pb-sec__title) {
	margin-top: 14px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: #202020; text-wrap: balance;
}
.pb-content .pb-sec p { text-wrap: pretty; }
.pb-content .pb-sec .pb-sec__title {
	margin: 0; max-width: 900px; font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; color: #202020; text-wrap: balance;
}
.pb-content .pb-sec .pb-sec__lead { font-size: 20px; line-height: 1.5; color: #202020; max-width: 760px; }
.pb-content .pb-sec > :is(.pb-cards, .pb-steps, .pb-facts, .pb-levels, .pb-contacts, .pb-promobox, .pb-cf7, .wpcf7, .pb-legal-table) { max-width: 900px; }
/* Группы Gutenberg: сбрасываем «constrained»-поля, если WP их добавил */
.pb-sec .wp-block-group { margin-inline: 0 !important; max-width: none; }
.pb-sec .wp-block-group > * { margin-inline: 0 !important; max-width: none; }

/* Карточки (способы оплаты/доставки) */
.pb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.pb-card { background: var(--pb-bg); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.pb-content .pb-card > * { margin: 0; }
.pb-card .pb-card__title { font-size: 20px; font-weight: 600; line-height: 1.2; color: #202020; letter-spacing: 0; }
.pb-card p { font-size: 16px; line-height: 1.5; flex: 1; }
.pb-card p.pb-tag {
	flex: none; align-self: flex-start; font-size: 13px; font-weight: 500; line-height: 1.4; padding: 6px 12px; border-radius: var(--pb-pill); background: #fff; color: #202020;
}

/* Шаги (нумерованный список) */
.pb-content ol.pb-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; padding: 0; }
.pb-content ol.pb-steps > li {
	background: var(--pb-bg); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
	font-size: 16px; line-height: 1.4; color: #202020; font-weight: 500;
}
.pb-content ol.pb-steps > li::before {
	position: static; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--pb-blue); color: #fff;
	font-size: 17px; font-weight: 600; line-height: 40px; text-align: center;
}

/* Факты */
.pb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.pb-fact { background: var(--pb-bg2); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.pb-content .pb-fact > * { margin: 0; }
.pb-fact .pb-fact__big { font-size: 20px; font-weight: 600; line-height: 1.2; color: #202020; text-wrap: balance; }
.pb-fact .pb-fact__label { font-size: 14px; line-height: 1.4; color: #4A5054; }

/* Уровни бонусов */
.pb-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.pb-level { border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 10px; background: var(--pb-bg); color: #202020; }
.pb-content .pb-level > * { margin: 0; }
.pb-level--2 { background: var(--pb-bg2); }
.pb-level--3 { background: var(--pb-blue); color: #fff; }
.pb-level .pb-level__pct { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: inherit; }
.pb-level .pb-level__name { font-size: 18px; font-weight: 600; color: inherit; }
.pb-level .pb-level__range { font-size: 14px; line-height: 1.35; color: inherit; }

/* Контакты (таблица «ключ — значение») */
.pb-content figure.pb-contacts { margin: 0; overflow: visible; }
.pb-contacts table { display: block; width: 100%; font-size: 17px; }
.pb-contacts tbody { display: flex; flex-direction: column; }
.pb-contacts tr { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--pb-line); }
.pb-contacts td { padding: 0; border: 0; background: none; }
.pb-contacts td:first-child { flex: 0 0 150px; font-size: 15px; color: var(--pb-muted); }
.pb-contacts td:last-child { flex: 1 1 220px; font-weight: 600; color: #202020; overflow-wrap: anywhere; }
.pb-contacts td:last-child a { color: #202020; text-decoration: none; }
.pb-contacts td:last-child a:hover { text-decoration: underline; text-decoration-color: var(--pb-blue); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Юридическая таблица (политика, п. 6) */
.pb-content figure.pb-legal-table { margin: 0; }
.pb-legal-table td:first-child { width: 30%; background: var(--pb-bg); }

/* Промо-плашка «Как сэкономить» */
.pb-promobox {
	background: #202020; color: #fff; border-radius: 28px; padding: clamp(24px, 4vw, 44px);
	display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.pb-content .pb-promobox > * { margin: 0; }
.pb-promobox p { color: inherit; }
.pb-promobox .pb-promobox__eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-blue); }
.pb-promobox .pb-promobox__title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; max-width: none; }
.pb-promobox .pb-promobox__text { font-size: 18px; line-height: 1.5; color: #E3EAF0; max-width: 560px; }
.pb-promobox .pb-promobox__text2 { font-size: 16px; color: #B8BDC0; }
.pb-promobox .pb-promobox__note { font-size: 13px; line-height: 1.45; color: #B8BDC0; max-width: 560px; }
.pb-promobox .wp-block-buttons { margin: 0; }
.pb-promobox .wp-block-button__link { min-height: 56px; padding: 0 32px; background: var(--pb-blue); color: #fff; text-decoration: none; }
.pb-promobox .wp-block-button__link:hover { background: var(--pb-blue-h); color: #fff; }

/* ============================== «Формы» ============================== */
.pb-forms-page__title {
	margin: 0; padding: 0 4px; font-size: clamp(34px, 5vw, 56px); line-height: 1; font-weight: 600; letter-spacing: -0.03em;
}
.pb-forms-page { gap: clamp(20px, 3vw, 32px); }
.pb-tabs--chips { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px); }
.pb-tabbar { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-tab {
	min-height: 48px; padding: 0 24px; border-radius: var(--pb-pill); display: inline-flex; align-items: center;
	font-size: 15px; font-weight: 600; text-decoration: none; background: #fff; color: var(--pb-ink); transition: background .15s, color .15s;
}
.pb-tab:hover { background: var(--pb-blue); color: #fff; text-decoration: none; }
.pb-tabs--chips .pb-tabs__body { font-size: 16px; }
.pb-tabs--chips .pb-sec--form { background: #fff; border-radius: 32px; padding: clamp(20px, 3vw, 36px); gap: 20px; }
.pb-content .pb-sec--form > h2.pb-sec__title { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.02em; }
.pb-content .pb-sec--form > .pb-sec__lead { font-size: 16px; line-height: 1.55; color: #4A5054; }
.pb-sec--form > .wp-block-shortcode, .pb-sec--form .wpcf7 { max-width: none; }

/* Страница форм — на всю ширину контейнера (.pb-wrap, 1320px): сетка полей 2 колонки (is-third — 3), длинные поля — на всю ширину */
.pb-content .pb-sec--form > :is(.pb-cf7, .wpcf7, ol.pb-steps) { max-width: none; }
.pb-content .pb-sec--form > .pb-sec__lead { max-width: 860px; }
.pb-sec--form .pb-formgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 24px; align-items: start; }
.pb-sec--form .pb-formgrid > .pb-field { grid-column: span 3; }
.pb-sec--form .pb-formgrid > .pb-field.is-third { grid-column: span 2; }
.pb-sec--form .pb-formgrid > .pb-field.is-wide { grid-column: 1 / -1; }
.pb-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-top: 4px; }
.pb-form__foot .pb-agree { flex: 1 1 360px; min-width: 0; }
.pb-form__foot .pb-submit { flex: 0 0 auto; }
/* «Как это работает» — компактная полоса из 3 шагов над формой */
.pb-content .pb-sec--form ol.pb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pb-content .pb-sec--form ol.pb-steps > li {
	flex-direction: row; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 20px; font-weight: 400;
}
.pb-steps__b { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.4; color: var(--pb-text2); }
.pb-steps__b strong { font-size: 16px; line-height: 1.3; }
@media (max-width: 900px) {
	.pb-sec--form .pb-formgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pb-sec--form .pb-formgrid > .pb-field, .pb-sec--form .pb-formgrid > .pb-field.is-third { grid-column: auto; }
	.pb-sec--form .pb-formgrid > .pb-field.is-wide { grid-column: 1 / -1; }
	.pb-content .pb-sec--form ol.pb-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.pb-sec--form .pb-formgrid { grid-template-columns: minmax(0, 1fr); }
	.pb-form__foot { flex-direction: column; align-items: stretch; }
	.pb-form__foot .pb-agree { flex: 0 0 auto; }
	.pb-form__foot .pb-submit .wpcf7-submit { width: 100%; }
}

/* ----- Форма CF7 (макет Forms) ----- */
.pb-cf7 { display: block; }
.pb-cf7__fields { display: flex; flex-direction: column; gap: 20px; }
.pb-form__h { margin: 0; font-size: 18px; font-weight: 600; color: #202020; }
.pb-form__h:not(:first-child) { margin-top: 8px; }
.pb-cf7 .pb-field > span:first-child .req, .pb-cf7 i.req { color: var(--pb-red); font-style: normal; }
.pb-field__hint--s { font-size: 12px; color: var(--pb-hint); }
.pb-cf7 .wpcf7-form-control-wrap { display: block; }
.pb-cf7 .wpcf7-not-valid-tip { font-weight: 400; }

/* Чипы (radio) */
.pb-chips .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-chips .wpcf7-list-item { margin: 0; display: block; }
.pb-chips .wpcf7-list-item label {
	position: relative; min-height: 44px; padding: 0 18px; border-radius: var(--pb-pill); background: var(--pb-bg); color: #202020;
	display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; line-height: 1.2; cursor: pointer; gap: 0; transition: background .15s, color .15s;
}
.pb-chips .wpcf7-list-item label:hover { background: var(--pb-bg2); }
.pb-chips .wpcf7-list-item input[type=radio] {
	position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; cursor: pointer; border: 0;
}
.pb-chips .wpcf7-list-item label:has(input:checked) { background: #202020; color: #fff; }
.pb-chips .wpcf7-list-item label:has(input:focus-visible) { outline: 2px solid var(--pb-blue); outline-offset: 2px; }

/* Файлы */
.pb-files { gap: 12px; align-items: flex-start; }
.pb-files__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pb-files__row[hidden] { display: none; }
.pb-file {
	position: relative; min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; gap: 10px; border: 1.5px dashed #B8C4CA;
	border-radius: var(--pb-pill); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; overflow: hidden; transition: border-color .15s;
}
.pb-file:hover { border-color: var(--pb-blue); }
.pb-file .wpcf7-form-control-wrap { position: absolute; inset: 0; }
.pb-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.pb-file__hint { font-size: 14px; font-weight: 400; color: var(--pb-muted); }
.pb-files__more { border: 0; background: none; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--pb-blue-ink); cursor: pointer; }
.pb-files__more:hover { text-decoration: underline; }
.pb-files__more[hidden] { display: none; }

/* Согласие и отправка */
.pb-agree .wpcf7-form-control-wrap { display: block; }
.pb-agree .wpcf7-list-item label { font-size: 14px; line-height: 1.45; font-weight: 400; }
.pb-agree .wpcf7-list-item-label a { text-decoration: underline; text-decoration-color: var(--pb-blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pb-agree .wpcf7-not-valid-tip { padding-left: 36px; margin-top: 6px; }
.pb-submit .wpcf7-submit, .pb-cf7 input[type=submit] { min-height: 56px; padding: 0 36px; }
.pb-cf7 input[type=submit]:disabled { opacity: .6; cursor: progress; }

/* Служебные поля CF7 (без стилей CF7 браузер рисует рамку у fieldset) */
.wpcf7 .hidden-fields-container { border: 0; margin: 0; padding: 0; min-width: 0; height: 0; overflow: hidden; position: absolute; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; }

/* Ответ CF7 и экран успеха */
.wpcf7 form .wpcf7-response-output { margin: 4px 0 0; }
.wpcf7 form.sent .wpcf7-response-output { display: none; }
.wpcf7 form.init .wpcf7-response-output, .wpcf7 form[data-status="init"] .wpcf7-response-output, .wpcf7 form .wpcf7-response-output:empty { display: none; }
.pb-sent { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(8px, 2vw, 24px) 0; }
.pb-sent[hidden] { display: none; }
.pb-sent__ic { width: 64px; height: 64px; border-radius: 50%; background: var(--pb-blue); display: flex; align-items: center; justify-content: center; }
.pb-sent__h { margin: 0; font-size: 28px; font-weight: 600; color: #202020; }
.pb-sent__p { margin: 0; max-width: 560px; font-size: 17px; line-height: 1.5; color: #4A5054; }
.pb-sent__again {
	min-height: 48px; padding: 0 26px; border: 2px solid var(--pb-line); border-radius: var(--pb-pill); background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: #202020; cursor: pointer;
	transition: border-color .15s;
}
.pb-sent__again:hover { border-color: var(--pb-blue); }
.pb-cf7.is-sent .pb-cf7__fields { display: none; }
/* После отправки заголовок и вступление раздела скрываем — остаётся только экран успеха (как в макете) */
@supports selector(:has(*)) {
	.pb-content .pb-sec:has(.pb-cf7.is-sent) > :is(.pb-sec__title, .pb-sec__lead) { display: none; }
}

/* Обратная связь (Покупателям → Контакты) */
.pb-cf7--fb { background: var(--pb-bg); border-radius: 28px; padding: clamp(20px, 3vw, 32px); margin-top: 12px; }
.pb-cf7--fb .pb-cf7__fields { gap: 12px; }
.pb-fb__t { font-size: 22px; font-weight: 600; color: #202020; margin-bottom: 4px; }
.wpcf7 .pb-cf7--fb :is(input[type=text], input[type=email]) { min-height: 52px; border: 0; border-radius: var(--pb-pill); padding: 0 22px; }
.wpcf7 .pb-cf7--fb textarea { border: 0; border-radius: 24px; padding: 16px 22px; min-height: 140px; }
.pb-cf7--fb .pb-submit .wpcf7-submit { min-height: 52px; padding: 0 32px; }
.pb-cf7--fb .pb-sent__again { background: #fff; }

/* ============================== «Акции» ============================== */
.pb-promo-page { gap: clamp(24px, 3vw, 40px); }
.pb-tabs--promo { display: block; }
.pb-promo { gap: clamp(24px, 3vw, 40px); }
.pb-promo__hero {
	position: relative; border-radius: 32px; overflow: hidden; min-height: clamp(260px, 32vw, 380px); display: flex; flex-direction: column; justify-content: flex-end;
	background: #202020; color: #fff; padding: clamp(24px, 4vw, 56px);
}
.pb-promo__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.pb-promo__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(14, 24, 38, .75), rgba(14, 24, 38, .1) 70%); }
.pb-promo__txt { position: relative; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.pb-promo__badge {
	font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--pb-blue); padding: 7px 14px; border-radius: var(--pb-pill);
}
.pb-promo__title { margin: 0; font-size: clamp(34px, 5.4vw, 68px); line-height: 1.02; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; max-width: 820px; color: #fff; }
.pb-promo__tabs { display: flex; flex-direction: column; gap: 12px; }
.pb-promo__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pb-promo__gt { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-muted); padding: 0 8px 0 4px; min-width: 96px; }
.pb-promo__tabs .pb-chip { padding: 0 18px; font-size: 15px; }
.pb-promo__grid {
	background: #fff; border-radius: 32px; padding: clamp(20px, 3vw, 36px); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 24px 16px;
}
.pb-promo__empty { background: #fff; border-radius: 32px; padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }

/* Сердечко избранного на карточке (как в каталоге: круглая белая кнопка без подписи) */
.pb-promo__grid .pb-pcard__fav .wplb-wishlist-button { position: relative; }
.pb-promo__grid .pb-pcard__fav a.wplb-wishlist-button.button {
	width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: 50%; gap: 0;
	background: #fff; color: var(--pb-ink); font-size: 20px; line-height: 1; box-shadow: 0 2px 8px rgba(32, 32, 32, .08);
	display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.pb-promo__grid .pb-pcard__fav a.wplb-wishlist-button.button:hover { background: var(--pb-bg2); color: var(--pb-ink); }
.pb-promo__grid .pb-pcard__fav .wplb-wishlist-button__icon { margin: 0; display: flex; }
.pb-promo__grid .pb-pcard__fav .wplb-wishlist-button__icon svg { width: 20px; height: 20px; }
.pb-promo__grid .pb-pcard__fav .wplb-wishlist-button__text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
}
.pb-promo__grid .pb-pcard__fav a.wplb-wishlist-button.button.added { background: var(--pb-blue); color: #fff; }

/* ============================== Мобильные ============================== */
@media (max-width: 900px) {
	.pb-snav { position: static; } /* блок встал над текстом — не «прилипает» */
}
@media (max-width: 700px) {
	.pb-info__main { border-radius: 28px; }
	.pb-snav { padding: 16px; gap: 14px; border-radius: 28px; }
	.pb-contacts td:first-child { flex-basis: 100%; }
	.pb-promo__gt { min-width: 100%; padding: 0 4px; }
}
