/* Форма покупки: цена, вариации (свотчи, список с поиском), ступени цен, количество, «В корзину», избранное.
   Общая для страницы товара (product.css) и быстрого просмотра (quick-view.css). Источник: design/Properbaits Product.dc.html. */

/* Поправка к base.css на страницах WooCommerce: синяя «кнопка форм» перебивала иконку-кнопку поиска в шапке. */
.pb-header .pb-search .pb-search__btn { min-height: 0; width: 48px; padding: 0; background: none; color: var(--pb-ink); border-radius: 0; font-size: inherit; }
.pb-header .pb-search .pb-search__btn:hover { background: none; color: var(--pb-ink); }

/* ---------- Артикул и наличие ---------- */
.pb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; color: var(--pb-muted); }
.pb-stock { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.pb-stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #2FA866; }
.pb-stock.is-in { color: #1B6B3F; }
.pb-stock.is-out { color: #8A2A16; }
.pb-stock.is-out::before { background: var(--pb-red); }
.pb-stock.is-back { color: #6B5200; }
.pb-stock.is-back::before { background: #E0A800; }

/* ---------- Цена ---------- */
.pb-pricebox { display: flex; flex-direction: column; gap: 6px; }
.pb-pricebox__row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pb-pricebox__now { font-size: clamp(32px, 4vw, 42px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.pb-pricebox__old { font-size: 20px; color: var(--pb-muted); text-decoration: line-through; }
.pb-pricebox__unit { font-size: 14px; color: var(--pb-muted); }
.pb-pricebox__cash { font-size: 15px; font-weight: 500; color: #2F7A8E; }
.pb-pricebox__cash:hover { color: #2F7A8E; }

/* ---------- Значения вариаций ---------- */
.pb-opts { display: flex; flex-direction: column; gap: 22px; align-items: stretch; }
.pb-opt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pb-opt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pb-opt__count { font-size: 13px; color: var(--pb-muted); }
.pb-opt__field { position: relative; min-width: 0; }
.pb-opts .reset_variations { align-self: flex-start; font-size: 14px; color: var(--pb-muted); text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.pb-opts .reset_variations:hover { color: var(--pb-ink); }
.pb-opts .reset_variations[style*="hidden"], .pb-buyform--single .reset_variations { display: none; }

/* Свотчи плагина wplb-variation-swatches → «таблетки» макета (min-height 48, фон F3F7F9, выбранная — синяя). */
.pb-pdp .wplb-variation-swatches__wrapper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pb-pdp .wplb-variation-swatches .wplb-variation-swatches__item {
	width: auto !important; height: auto; min-height: 48px; margin: 0; padding: 0 20px; line-height: 1.2;
	display: inline-flex; align-items: center; justify-content: center; white-space: normal; text-align: center;
	border: 0; border-radius: var(--pb-pill); background: var(--pb-bg); box-shadow: none;
	font-size: 15px; font-weight: 500; color: var(--pb-ink); transition: background .15s, color .15s;
}
.pb-pdp .wplb-variation-swatches .wplb-variation-swatches__item:hover,
.pb-pdp .wplb-variation-swatches .wplb-variation-swatches__item:focus-visible { background: var(--pb-blue-h); color: #fff; box-shadow: none; }
.pb-pdp .wplb-variation-swatches .wplb-variation-swatches__item.selected { background: var(--pb-blue); color: #fff; box-shadow: none; }
.pb-pdp .wplb-variation-swatches .wplb-variation-swatches__item.disabled { opacity: .35; pointer-events: none; }
.pb-pdp .wplb-variation-swatches__name { text-indent: 0; display: inline; }
.pb-pdp .wplb-variation-swatches--has-tooltip .wplb-variation-swatches__item::before,
.pb-pdp .wplb-variation-swatches--has-tooltip .wplb-variation-swatches__item::after { display: none; }

/* Описание/доступность вариации WooCommerce: цену и наличие показывает блок выше. */
.pb-pdp .single_variation .woocommerce-variation-price,
.pb-pdp .single_variation .woocommerce-variation-availability { display: none; }
.pb-pdp .single_variation .woocommerce-variation-description { font-size: 15px; line-height: 1.5; color: var(--pb-text2); margin-bottom: 12px; }
.pb-pdp .single_variation:empty { display: none; }

/* ---------- Выпадающий список с поиском («Конфигурация формы») ---------- */
.pb-combo { position: relative; }
.pb-combo__native { display: none; }
.pb-combo .pb-combo__btn {
	width: 100%; min-height: 56px; padding: 0 20px; border: 1.5px solid #B8C4CA; border-radius: var(--pb-pill); background: #fff;
	font: inherit; font-size: 16px; font-weight: 500; color: var(--pb-ink); cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; transition: border-color .15s;
}
.pb-combo__label { min-width: 0; overflow-wrap: anywhere; }
.pb-combo:not(.has-value) .pb-combo__label { color: var(--pb-muted); font-weight: 400; }
.pb-combo__btn svg { flex: none; transition: transform .15s; }
.pb-combo.is-open .pb-combo__btn { border-color: var(--pb-blue); }
.pb-combo.is-open .pb-combo__btn svg { transform: rotate(180deg); }
.pb-combo__panel {
	position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: var(--pb-r-lg);
	box-shadow: 0 20px 48px rgba(32, 32, 32, .2); padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.pb-combo__panel[hidden] { display: none; }
.pb-combo input.pb-combo__q {
	display: block; width: 100%; min-height: 44px; border: 0; background: var(--pb-bg); border-radius: var(--pb-pill); padding: 0 18px;
	font: inherit; font-size: 15px; color: var(--pb-ink); outline: none; -webkit-appearance: none; appearance: none;
}
.pb-combo input.pb-combo__q:focus { box-shadow: 0 0 0 2px var(--pb-blue); }
.pb-combo__list { max-height: 288px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pb-combo .pb-combo__opt {
	min-height: 44px; padding: 8px 16px; border: 0; border-radius: 14px; background: transparent; font: inherit; font-size: 15px; line-height: 1.3;
	color: var(--pb-ink); cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left;
}
.pb-combo .pb-combo__opt[hidden] { display: none; }
.pb-combo .pb-combo__opt:hover, .pb-combo .pb-combo__opt.is-selected { background: var(--pb-bg2); }
.pb-combo .pb-combo__opt.is-disabled { opacity: .4; cursor: not-allowed; }
.pb-combo__opt-t { min-width: 0; overflow-wrap: anywhere; }
.pb-combo__opt-p { flex: none; color: var(--pb-muted); font-size: 14px; }
.pb-combo__empty { padding: 12px 16px; font-size: 14px; color: var(--pb-muted); }

/* ---------- Ступени цен (разметка pb_tiers_render) ---------- */
.pb-tiers { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.pb-tiers[hidden] { display: none; }
.pb-tiers__title { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--pb-muted); }
.pb-tiers__rows { border: 1px solid #E1E5E7; border-radius: var(--pb-r-md); overflow: hidden; }
.pb-tiers__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px; font-size: 15px; background: #fff; transition: background .15s; }
.pb-tiers__row + .pb-tiers__row { border-top: 1px solid #E1E5E7; }
.pb-tiers__row.is-active { background: var(--pb-bg2); font-weight: 600; }

/* ---------- Количество ---------- */
.pb-qty { display: inline-flex; align-items: center; background: var(--pb-bg); border-radius: var(--pb-pill); padding: 4px; }
.pb-qty .quantity { display: block; margin: 0; }
.pb-qty .pb-qty__btn {
	flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--pb-ink);
	font: inherit; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.pb-qty .pb-qty__btn:hover { background: var(--pb-blue); color: #fff; }
.pb-pdp .pb-qty .quantity input.qty {
	display: block; width: 56px; min-width: 0; min-height: 0; height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent;
	font: inherit; font-size: 17px; font-weight: 600; text-align: center; color: var(--pb-ink); -moz-appearance: textfield; appearance: textfield;
}
.pb-pdp .pb-qty .quantity input.qty::-webkit-outer-spin-button,
.pb-pdp .pb-qty .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pb-pdp .pb-qty .quantity input.qty:focus { outline: none; box-shadow: none; }

/* ---------- Блок покупки ---------- */
.pb-buyform { display: flex; flex-direction: column; gap: 24px; margin: 0; }
.pb-buy { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--pb-line); padding-top: 20px; }
.pb-buy__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pb-buy__total { display: flex; flex-direction: column; align-items: flex-end; }
.pb-buy__total[hidden] { display: none; }
.pb-buy__total-l { font-size: 13px; color: var(--pb-muted); }
.pb-buy__total-v { font-size: 26px; font-weight: 600; line-height: 1.2; }
.pb-buy__hint { margin: 0; font-size: 14px; font-weight: 500; color: var(--pb-red); }
.pb-buy__actions { display: flex; gap: 8px; }
.pb-buy .pb-buy__btn.single_add_to_cart_button {
	flex: 1; min-height: 56px; padding: 0 28px; font-size: 17px; font-weight: 600; background: var(--pb-blue); color: #fff; width: auto;
}
.pb-buy .pb-buy__btn.single_add_to_cart_button:hover { background: var(--pb-blue-h); color: #fff; }
.pb-buy .pb-buy__btn.single_add_to_cart_button.disabled { opacity: .5; cursor: pointer; }
.pb-buy .pb-buy__btn.single_add_to_cart_button.loading { opacity: .7; pointer-events: none; }
.pb-buy .pb-buy__btn.single_add_to_cart_button.added { background: var(--pb-blue-ink); }
.pb-oos { margin: 0; padding: 14px 18px; border-radius: var(--pb-r-md); background: var(--pb-bg); font-size: 15px; font-weight: 500; color: var(--pb-text2); }

.pb-added { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: #E3F6EC; color: #1B6B3F; font-size: 14px; font-weight: 500; }
.pb-added[hidden] { display: none; }
.pb-added a { color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }
.pb-added--err { background: #FDEEEA; color: #8A2A16; }

/* Избранное рядом с «В корзину» */
.pb-buy__fav { flex: none; display: flex; }
.pb-buy__fav a.wplb-wishlist-button.button {
	width: 56px; height: 56px; min-height: 0; padding: 0; border: 0; border-radius: 50%; gap: 0; background: var(--pb-bg); color: var(--pb-ink);
	font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.pb-buy__fav a.wplb-wishlist-button.button:hover { background: var(--pb-bg2); color: var(--pb-ink); }
.pb-buy__fav .wplb-wishlist-button__icon { margin: 0; display: flex; }
.pb-buy__fav .wplb-wishlist-button__icon svg { width: 22px; height: 22px; }
.pb-buy__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-buy__fav a.wplb-wishlist-button.button.added { background: var(--pb-blue); color: #fff; }
.pb-buy__fav a.wplb-wishlist-button.button.added:hover { background: var(--pb-blue-h); color: #fff; }

@media (max-width: 700px) {
	.pb-combo__panel { position: fixed; z-index: 450; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); max-height: 70vh; }
	.pb-combo__list { max-height: 45vh; }
}
