/* Страница товара. Источник: design/Properbaits Product.dc.html. Форма покупки (цена, вариации, ступени, количество) — product-form.css. */

.pb-main--product { gap: 20px; padding-top: 20px; }

/* ---------- Верх: галерея + сводка ---------- */
.pb-pdp { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }

.pb-gal { flex: 1 1 420px; min-width: 0; background: #fff; border-radius: var(--pb-r-xl); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pb-gal__stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--pb-r-lg); overflow: hidden; background: var(--pb-bg); }
.pb-gal__main { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.pb-gal__main--ph { cursor: default; }
.pb-gal__main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pb-gal__stage > .pb-badge { position: absolute; top: 16px; left: 16px; z-index: 2; pointer-events: none; }
.pb-badge--lg { font-size: 16px; padding: 8px 14px; }
.pb-gal__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pb-gal__thumb {
	position: relative; aspect-ratio: 1 / 1; min-width: 0; padding: 0; border: 2px solid transparent; border-radius: 16px; overflow: hidden;
	background: var(--pb-bg); cursor: pointer; transition: border-color .15s;
}
.pb-gal__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pb-gal__thumb:hover { border-color: var(--pb-blue-soft); }
.pb-gal__thumb.is-active { border-color: var(--pb-blue); }

.pb-sum { flex: 1 1 440px; min-width: 0; background: #fff; border-radius: var(--pb-r-xl); padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 24px; }
.pb-sum__head { display: flex; flex-direction: column; gap: 8px; }
.pb-sum a.pb-sum__cat { align-self: flex-start; text-decoration: none; }
.pb-sum a.pb-sum__cat:hover { color: var(--pb-blue-ink); text-decoration: none; }
.pb-sum__title { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pb-sum .woocommerce-notices-wrapper { margin: 0; }

/* Доставка / оплата / возврат (тексты из макета Home v4) */
.pb-perks-mini { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--pb-line); display: flex; flex-direction: column; gap: 14px; }
.pb-perks-mini__li { display: flex; gap: 14px; align-items: flex-start; }
.pb-perks-mini__ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--pb-blue-pale); color: var(--pb-blue-ink); display: flex; align-items: center; justify-content: center; }
.pb-perks-mini__t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; color: var(--pb-muted); }
.pb-perks-mini__t strong { font-size: 15px; font-weight: 600; color: var(--pb-ink); }
.pb-perks-mini__t strong a { color: inherit; }

/* ---------- Описание и характеристики ---------- */
.pb-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px clamp(24px, 4vw, 64px); padding: clamp(20px, 3vw, 40px); }
.pb-details__col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pb-details--solo { grid-template-columns: minmax(0, 760px); }
.pb-details .pb-h2 { font-size: clamp(24px, 2.6vw, 32px); }
.pb-details__desc { font-size: 16px; line-height: 1.6; color: var(--pb-text2); }
.pb-specs { border: 1px solid #E1E5E7; border-radius: var(--pb-r-md); overflow: hidden; }
.pb-specs__row { display: flex; justify-content: space-between; gap: 16px; min-height: 52px; align-items: center; padding: 8px 20px; font-size: 15px; background: #F8FAFB; }
.pb-specs__row:nth-child(even) { background: #fff; }
.pb-specs__row + .pb-specs__row { border-top: 1px solid #E1E5E7; }
.pb-specs__k { color: var(--pb-muted); }
.pb-specs__v { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ---------- Лайтбокс ---------- */
.pb-lb { position: fixed; inset: 0; z-index: 600; background: rgba(21, 23, 26, .92); display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.pb-lb[hidden] { display: none; }
.pb-lb__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; background: #fff; }
.pb-lb button {
	position: absolute; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--pb-ink);
	display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s;
}
.pb-lb button:hover { background: var(--pb-blue); color: #fff; }
.pb-lb__close { top: 12px; right: 12px; }
.pb-lb__prev { left: 12px; top: 50%; margin-top: -24px; }
.pb-lb__next { right: 12px; top: 50%; margin-top: -24px; }
.pb-lb__count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 14px; color: #fff; }

/* ---------- Отзывы ---------- */
.pb-reviews { gap: 28px; padding: clamp(20px, 3vw, 40px); scroll-margin-top: 16px; }
.pb-reviews__h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pb-reviews .pb-h2 { font-size: clamp(24px, 2.6vw, 32px); }
.pb-reviews__count { min-height: 28px; padding: 0 12px; display: inline-flex; align-items: center; background: var(--pb-bg2); border-radius: var(--pb-pill); font-size: 14px; font-weight: 600; }
.pb-reviews .pb-reviews__write { min-height: 52px; padding: 0 28px; }
.pb-reviews .pb-reviews__write.is-open { background: var(--pb-muted); }

.pb-revform { background: var(--pb-bg); border-radius: var(--pb-r-lg); padding: clamp(18px, 2.4vw, 32px); scroll-margin-top: 16px; }
.pb-revform[hidden] { display: none; }
.pb-revform .comment-respond { display: flex; flex-direction: column; gap: 18px; }
.pb-revform__h { margin: 0; font-size: 22px; font-weight: 600; }
.pb-revbonus { margin: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--pb-blue-pale); border-radius: 18px; font-size: 14px; line-height: 1.4; color: var(--pb-ink); }
.pb-revbonus__ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pb-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.pb-revform__note { margin: 0; font-size: 15px; line-height: 1.5; color: var(--pb-text2); }
.pb-revform__form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.pb-revform__form p { margin: 0; }
.pb-revform .pb-field label { font-size: 14px; font-weight: 600; }
.pb-revform .pb-field .pb-field__hint { font-weight: 400; }
.pb-revform .pb-req { color: var(--pb-red); }
.pb-revform #reply-title small { margin-left: 12px; font-size: 14px; font-weight: 400; }
.pb-revform__label { font-size: 14px; font-weight: 600; }
.pb-revform__rate { display: flex; flex-direction: column; gap: 6px; }
.pb-rate { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pb-rate .pb-rate__star { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 32px; line-height: 1; color: #D5DEE2; transition: color .1s; }
.pb-rate .pb-rate__star.is-on { color: var(--pb-blue); }
.pb-rate__hint { margin-left: 8px; font-size: 14px; color: var(--pb-muted); }
.pb-revform__err { font-size: 14px; font-weight: 500; color: var(--pb-red); }
.pb-revform__submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pb-revform__consent { font-size: 13px; line-height: 1.4; color: var(--pb-muted); max-width: 420px; }
.pb-revform .comment-form-cookies-consent { display: flex; gap: 10px; align-items: center; font-size: 14px; }

.pb-reviews__body { display: flex; gap: clamp(24px, 4vw, 64px); flex-wrap: wrap; align-items: flex-start; }
.pb-stars { letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.pb-stars__on { color: var(--pb-blue); }
.pb-stars__off { color: #D5DEE2; }
.pb-stars--lg { font-size: 18px; }
.pb-revsum { flex: 0 1 320px; min-width: min(100%, 240px); display: flex; flex-direction: column; gap: 18px; background: var(--pb-bg); border-radius: var(--pb-r-lg); padding: 24px; }
.pb-revsum__top { display: flex; align-items: center; gap: 16px; }
.pb-revsum__avg { font-size: 56px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.pb-revsum__meta { display: flex; flex-direction: column; gap: 4px; }
.pb-revsum__meta .pb-stars { font-size: 20px; }
.pb-revsum__based { font-size: 14px; color: var(--pb-muted); }
.pb-revsum__bars { display: flex; flex-direction: column; gap: 8px; }
.pb-revsum__bar { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--pb-text2); }
.pb-revsum__n { width: 26px; white-space: nowrap; }
.pb-revsum__track { flex: 1; height: 8px; border-radius: 4px; background: #DCE6EB; overflow: hidden; }
.pb-revsum__fill { height: 100%; border-radius: 4px; background: var(--pb-blue); }
.pb-revsum__c { width: 22px; text-align: right; }

.pb-revlist { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pb-revlist__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pb-revlist__shown { font-size: 14px; color: var(--pb-muted); }
.pb-revlist__sort { display: flex; max-width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 16px; background: var(--pb-bg); border-radius: var(--pb-pill); font-size: 14px; color: var(--pb-muted); }
.pb-reviews .pb-revlist__sort select {
	display: block; width: auto; min-width: 0; flex: 1; min-height: 36px; border: 0; border-radius: var(--pb-pill); background-color: #fff;
	padding: 0 34px 0 14px; font: inherit; font-size: 14px; font-weight: 500; color: var(--pb-ink); cursor: pointer; outline: none; background-position: right 12px center; background-size: 16px;
}
.pb-revlist__items { display: flex; flex-direction: column; gap: 20px; }
.pb-rev { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--pb-line); }
.pb-rev[hidden] { display: none; }
.pb-rev__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pb-rev__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-rev__ava { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--pb-bg2); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; }
.pb-rev__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pb-rev__name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; font-weight: 600; }
.pb-rev__ok { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px; background: #E3F6EC; color: #1B6B3F; border-radius: var(--pb-pill); font-size: 12px; font-weight: 600; }
.pb-rev__date { font-size: 13px; color: var(--pb-muted); }
.pb-rev__text { font-size: 16px; line-height: 1.55; color: var(--pb-ink); overflow-wrap: anywhere; }
.pb-rev__text p + p { margin-top: 8px; }
.pb-rev__reply { margin-top: 4px; padding: 14px 18px; background: var(--pb-bg); border-left: 3px solid var(--pb-blue); border-radius: 0 16px 16px 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.5; color: var(--pb-text2); }
.pb-rev__reply-t { font-size: 13px; font-weight: 600; color: var(--pb-ink); }
.pb-revlist__more { align-self: flex-start; min-height: 52px; padding: 0 32px; }
.pb-revlist__more[hidden] { display: none; }

.pb-revempty { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: clamp(28px, 4vw, 56px) 20px; background: var(--pb-bg); border-radius: var(--pb-r-lg); }
.pb-revempty__ic { width: 64px; height: 64px; border-radius: 50%; background: var(--pb-bg2); display: flex; align-items: center; justify-content: center; }
.pb-revempty__h { margin: 0; font-size: 22px; font-weight: 600; }
.pb-revempty__t { margin: 0; max-width: 460px; font-size: 16px; line-height: 1.5; color: var(--pb-text2); text-wrap: balance; }

/* ---------- Похожие товары ---------- */
.pb-related .pb-car { --pb-car-cols: 4; --pb-car-min: 240px; }

@media (max-width: 700px) {
	.pb-gal { padding: 12px; }
	.pb-gal__thumbs { gap: 8px; }
	.pb-sum__title { font-size: 28px; }
	.pb-revsum__avg { font-size: 48px; }
}

/* Полоса гарантий на всю ширину (template-parts/product/perks.php) */
.pb-pperks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pb-pperks__item { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: var(--pb-r-xl); padding: 24px 26px; }
.pb-pperks__ic { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--pb-bg2); color: var(--pb-ink); display: flex; align-items: center; justify-content: center; }
.pb-pperks__t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pb-pperks__title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; }
.pb-pperks__title a { color: inherit; }
.pb-pperks__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--pb-text2); text-wrap: pretty; }
@media (max-width: 900px) { .pb-pperks { grid-template-columns: minmax(0, 1fr); gap: 10px; } .pb-pperks__item { padding: 18px 20px; } }

/* Фото и описание — одной высоты: галерея растягивается и держит картинку по центру */
.pb-pdp { align-items: stretch; }
.pb-gal { justify-content: flex-start; }
