/* ==========================================================================
   Megabike — дополнения натяжки (вёрстка style.css не изменялась).
   Реальные изображения товаров + кастомные корзина/оформление + фильтры.
   ========================================================================== */

/* --- Изображения в карточке товара (в вёрстке были плейсхолдеры) --------- */
.product-card__image { overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; }
.products.is-list .product-card__image img { object-fit: cover; }

/* --- Галерея товара ----------------------------------------------------- */
.gallery__main img { max-width: 100%; max-height: 440px; width: auto; height: auto; object-fit: contain; }
.gallery__thumb { overflow: hidden; padding: 0; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }

/* --- Изображения внутри описания товара --------------------------------- */
.tab-panel img,
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.tab-panel[data-tab-panel="desc"] p { margin: 0 0 12px; }

/* ==========================================================================
   WooCommerce — общее (уведомления, кнопки, поля, служебные таблицы)
   Цвет ссылок задаёт базовое правило вёрстки `a { color: var(--accent) }`.
   ========================================================================== */
.woocommerce, .woocommerce-page { font-size: 15px; color: var(--text); }

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
	border: 1px solid var(--border); border-top: 3px solid var(--accent);
	background: var(--surface); border-radius: var(--radius); padding: 14px 18px; list-style: none; margin: 0 0 20px;
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px;
}
.woocommerce-error { border-top-color: var(--danger); }
.woocommerce-message .button, .woocommerce-info .button { margin-left: auto; }

/* Кнопки WooCommerce → как .btn--primary */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce .button,
.wc-proceed-to-checkout a.checkout-button,
.woocommerce #place_order {
	background: var(--accent); color: #fff; border: 1.5px solid var(--accent); border-radius: 10px;
	padding: 12px 22px; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s;
	font-family: var(--font);
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce .button:hover, .woocommerce #place_order:hover,
.wc-proceed-to-checkout a.checkout-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.woocommerce .button.alt, .woocommerce a.added_to_cart { background: var(--accent); color: #fff; }
/* второстепенные кнопки (обновить корзину / применить купон) уже .btn--ghost/.btn--outline из вёрстки */
.woocommerce .cart-list__actions .btn { background: initial; }

/* Поля ввода (оформление) */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-selection,
.woocommerce-checkout input[type="text"], .woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"], .woocommerce-checkout input[type="password"],
.woocommerce-checkout select, .woocommerce-checkout textarea {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
	font-family: var(--font); font-size: 14px; background: var(--surface); color: var(--text); outline: none;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-checkout input:focus, .woocommerce-checkout select:focus, .woocommerce-checkout textarea:focus { border-color: var(--accent); }
.woocommerce form .form-row label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; color: var(--text-2); }
.woocommerce form .form-row { margin: 0 0 14px; }
.woocommerce .required { color: var(--danger); border: 0; }
.woocommerce span.amount, .woocommerce .price { font-weight: 600; color: var(--text); }

/* Служебные таблицы (детали заказа, кабинет) — минимально аккуратно */
.woocommerce table.shop_table {
	width: 100%; border-collapse: collapse; background: var(--surface);
	border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}
.woocommerce table.shop_table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 13px 16px; background: var(--bg); }
.woocommerce table.shop_table td { padding: 13px 16px; border-top: 1px solid var(--border-soft); vertical-align: middle; }

/* Степпер количества (общий для карточки и корзины) */
.qty__input {
	width: 46px; height: 100%; min-height: 44px; text-align: center; font-weight: 600; font-size: 15px;
	border: 0; background: transparent; color: var(--text); font-family: var(--font); outline: none;
	-moz-appearance: textfield;
}
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty { height: 46px; }
.qty .qty__btn { height: 100%; }

/* ==========================================================================
   Корзина — кастомная (woocommerce/cart/*.php)
   ========================================================================== */
/* Сброс float-раскладки woocommerce.css внутри наших сеток.
   Её селекторы (.woocommerce .cart-collaterals .cart_totals и т.п.) имеют
   специфичность 0,3,0 — перебиваем четырьмя классами. */
.woocommerce .cart-grid .cart-collaterals,
.woocommerce .cart-grid .cart-collaterals .cart_totals,
.woocommerce .cart-grid .cart-grid__aside .cart-summary,
.woocommerce .checkout-grid .col2-set,
.woocommerce .checkout-grid .col2-set .col-1,
.woocommerce .checkout-grid .col2-set .col-2,
.woocommerce .checkout-grid .checkout-grid__main .form-row {
	width: 100%; float: none; margin-left: 0; margin-right: 0;
}

.cart-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: minmax(0, 1fr) 352px; gap: 28px; } }

.cart-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.cart-list__head {
	display: none; padding: 14px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
	font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em;
}
@media (min-width: 720px) {
	.cart-list__head { display: grid; grid-template-columns: 76px minmax(0,1fr) 104px 132px 110px 34px; gap: 14px; align-items: center; }
	.cart-list__head span:nth-child(1) { grid-column: 1 / 3; }
	.cart-list__head span:nth-child(3) { text-align: center; }
	.cart-list__head span:nth-child(4) { text-align: right; }
}

.cart-item { display: grid; gap: 12px 14px; padding: 18px 20px; align-items: center; border-bottom: 1px solid var(--border-soft);
	grid-template-columns: 72px 1fr auto; grid-template-areas: "img main rm" "img qty sub"; }
.cart-item:last-child { border-bottom: 0; }
@media (min-width: 720px) {
	.cart-item { grid-template-columns: 76px minmax(0,1fr) 104px 132px 110px 34px;
		grid-template-areas: "img main price qty sub rm"; }
}
.cart-item__img { grid-area: img; width: 72px; height: 72px; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cart-item__img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item__main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cart-item__name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }
.cart-item__name:hover { color: var(--accent); }
.cart-item__attrs { font-size: 12px; color: var(--muted-2); }
.cart-item__attrs p { margin: 0; }
.cart-item__attrs img { display: none; } /* картинки из описания в корзине не показываем */
.cart-item__backorder { font-size: 12px; color: var(--warn); margin: 2px 0 0; }
.cart-item__price--inline { grid-area: price; font-size: 13px; color: var(--muted); font-weight: 600; }
.cart-item__col--price { grid-area: price; display: none; color: var(--text-2); font-weight: 600; }
.cart-item__col--qty { grid-area: qty; }
.cart-item__col--sub { grid-area: sub; font-weight: 700; color: var(--text); text-align: right; }
.cart-item__col--rm { grid-area: rm; text-align: right; }
@media (min-width: 720px) {
	.cart-item__price--inline { display: none; }
	.cart-item__col--price { display: block; }
	.cart-item__col--qty { justify-self: end; }
	.cart-item__col--sub { text-align: right; }
}
.cart-item__col--qty .qty { height: 44px; }
.cart-item__col--qty .qty__btn { width: 36px; font-size: 18px; }
.cart-item__remove {
	display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
	border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
	color: var(--muted-2); font-size: 18px; line-height: 1; transition: all .12s;
}
.cart-item__remove:hover { border-color: var(--danger); color: var(--danger); background: #fdeef2; }

.cart-list__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--bg); }
.cart-coupon { display: flex; gap: 8px; margin-right: auto; }
.field--sm { height: 42px; width: 170px; }
.cart-update { background: transparent; }
.cart-continue { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.cart-continue:hover { color: var(--accent); }

/* Карточка суммы */
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; }
@media (min-width: 900px) { .cart-grid__aside { position: sticky; top: 96px; } }
.cart-summary__title { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.cart-summary__rows { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.cart-summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.cart-summary__row > span:first-child { white-space: nowrap; }
.cart-summary .wc-proceed-to-checkout .checkout-button { white-space: nowrap; }
.cart-summary__row span:last-child { font-weight: 600; color: var(--text); text-align: right; white-space: nowrap; }
.cart-summary__row--total { font-size: 17px; font-weight: 700; color: var(--text); padding-top: 4px; }
.cart-summary__row--total span:last-child { font-size: 20px; color: var(--accent); }
.cart-summary__row--shipping { flex-direction: column; align-items: stretch; gap: 6px; }
.cart-summary__row--shipping .woocommerce-shipping-totals th { font-weight: 600; }
.cart-summary .wc-proceed-to-checkout { margin: 0; padding: 0; }
.cart-summary .wc-proceed-to-checkout .checkout-button { width: 100%; padding: 15px; font-size: 15px; border-radius: 12px; }
.cart-summary__note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Пустая корзина */
.cart-empty { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 24px; text-align: center; }
.cart-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; background: var(--accent-soft); margin-bottom: 16px; }
.cart-empty__title { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.cart-empty__text { color: var(--muted); font-size: 14px; max-width: 420px; margin: 0 auto 20px; line-height: 1.5; }

/* ==========================================================================
   Оформление заказа — кастомное (woocommerce/checkout/*.php)
   ========================================================================== */
.checkout-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 900px) { .checkout-grid { grid-template-columns: minmax(0,1fr) 380px; gap: 28px; } }

.checkout-grid__main { display: flex; flex-direction: column; gap: 20px; }
.checkout-grid__main .col2-set { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.checkout-grid__main .col-1, .checkout-grid__main .col-2 {
	width: 100%; float: none;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px;
}
.checkout-grid__main .col-2:empty { display: none; }
/* Поля во всю ширину ячейки (перебиваем float:left; width:47% из woocommerce.css) */
.checkout .checkout-grid__main .form-row { width: 100%; float: none; margin: 0 0 14px; padding: 0; box-sizing: border-box; }
.checkout .checkout-grid__main .form-row:last-child { margin-bottom: 0; }
.woocommerce-billing-fields h3, .woocommerce-shipping-fields h3, .woocommerce-additional-fields h3 { font-size: 17px; font-weight: 700; margin: 0 0 16px; }
.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-billing-fields__field-wrapper .notes,
.woocommerce-additional-fields .form-row { grid-column: 1 / -1; }
@media (max-width: 560px) { .woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; } }

#order_review_heading { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
@media (min-width: 900px) { .checkout-grid__aside { position: sticky; top: 96px; } }
.woocommerce-checkout #order_review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }

/* Список позиций в сводке */
.order-review__items { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.order-review__item { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.order-review__thumb { position: relative; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.order-review__thumb img { width: 100%; height: 100%; object-fit: contain; }
.order-review__badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.order-review__name { font-size: 13px; font-weight: 500; color: var(--text-2); line-height: 1.35; min-width: 0; }
.order-review__name p { margin: 2px 0 0; font-size: 11px; color: var(--muted-2); }
.order-review__price { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }

.order-review__totals { display: flex; flex-direction: column; gap: 11px; padding: 16px 0; }
.order-review__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.order-review__row span:last-child { font-weight: 600; color: var(--text); white-space: nowrap; }
.order-review__row--shipping { flex-direction: column; align-items: stretch; gap: 6px; }
.order-review__row--total { font-size: 17px; font-weight: 700; color: var(--text); padding-top: 8px; border-top: 1px solid var(--border); }
.order-review__row--total span:last-child { font-size: 20px; color: var(--accent); }
.order-review__row--shipping ul#shipping_method { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.order-review__row--shipping ul#shipping_method label { font-weight: 500; }

/* Оплата */
.woocommerce-checkout #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { list-style: none; margin: 0 0 16px; padding: 16px 0 0; border-top: 1px solid var(--border); }
.woocommerce-checkout #payment ul.payment_methods li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }
.woocommerce-checkout #payment ul.payment_methods li label { font-weight: 600; font-size: 14px; margin: 0; }
.woocommerce-checkout #payment .payment_box { flex: 1 0 100%; font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 12px 14px; margin: 4px 0 0; }
.woocommerce-checkout #payment .payment_box::before { display: none; }
.woocommerce-checkout #payment .place-order { padding-top: 16px; }
.woocommerce-checkout #place_order { width: 100%; padding: 15px; font-size: 15px; border-radius: 12px; }
.woocommerce-checkout #payment .woocommerce-privacy-policy-text { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.woocommerce form.checkout_coupon { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.woocommerce-form-login-toggle, .woocommerce-form-coupon-toggle { margin-bottom: 16px; }

/* ==========================================================================
   Фильтры каталога: выпадающие панели на пилюлях тулбара + активные фильтры
   (бэкенд — нативный layered nav WooCommerce; здесь только UI в стиле вёрстки)
   ========================================================================== */
.pill-wrap { position: relative; display: inline-flex; }
.pill-wrap .pill { cursor: pointer; user-select: none; white-space: nowrap; }
.pill.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
[data-dd].is-open > .pill { border-color: var(--accent); }
.pill__badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}

.pill-dd {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
	min-width: 232px; max-width: 320px;
	background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
	box-shadow: 0 14px 34px rgba(23, 23, 27, .13); padding: 6px;
	display: none;
}
[data-dd].is-open .pill-dd { display: block; }
.pill-dd__list { max-height: 288px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.pill-dd__list::-webkit-scrollbar { width: 8px; }
.pill-dd__list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

.pill-dd__opt {
	display: flex; align-items: center; gap: 10px; padding: 8px 10px;
	border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); line-height: 1.25;
}
.pill-dd__opt:hover { background: var(--accent-soft); }
.pill-dd__opt.is-active { color: var(--accent); }
.pill-dd__name { flex: 1; }
.pill-dd__count { color: var(--muted-2); font-size: 12px; font-weight: 500; }
.pill-dd__opt.is-active .pill-dd__count { color: var(--accent); }

/* Чекбокс (мультивыбор атрибута) */
.pill-dd__check {
	width: 18px; height: 18px; flex-shrink: 0; border: 1.5px solid var(--border);
	border-radius: 5px; display: flex; align-items: center; justify-content: center;
	transition: background .12s, border-color .12s;
}
.pill-dd__opt:hover .pill-dd__check { border-color: var(--accent); }
.pill-dd__opt.is-active .pill-dd__check { background: var(--accent); border-color: var(--accent); }
.pill-dd__opt.is-active .pill-dd__check::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }

/* Радио (сортировка — один выбор) */
.pill-dd__radio {
	width: 16px; height: 16px; flex-shrink: 0; border: 1.5px solid var(--border);
	border-radius: 50%; position: relative; transition: border-color .12s;
}
.pill-dd__opt--radio:hover .pill-dd__radio { border-color: var(--accent); }
.pill-dd__opt--radio.is-active .pill-dd__radio { border-color: var(--accent); }
.pill-dd__opt--radio.is-active .pill-dd__radio::after {
	content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}

/* Панель цены */
.pill-dd--price { padding: 10px; }
.pill-dd__price { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pill-dd__num {
	width: 96px; height: 42px; border: 1.5px solid var(--border); border-radius: 10px;
	padding: 0 12px; font-size: 14px; font-family: var(--font); outline: none; color: var(--text);
	-moz-appearance: textfield;
}
.pill-dd__num::-webkit-outer-spin-button, .pill-dd__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pill-dd__num:focus { border-color: var(--accent); }
.pill-dd__dash { color: var(--muted-2); }

/* Строка активных фильтров */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 20px; }
.active-filters__label { font-size: 13px; color: var(--muted); font-weight: 600; }
.active-filters__chip {
	display: inline-flex; align-items: center; gap: 7px;
	background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent);
	border-radius: 30px; padding: 6px 8px 6px 14px; font-size: 13px; font-weight: 500;
}
.active-filters__chip:hover { border-color: var(--accent); }
.active-filters__x {
	display: inline-flex; align-items: center; justify-content: center;
	width: 18px; height: 18px; border-radius: 50%; background: rgba(157, 28, 155, .12);
	font-size: 14px; line-height: 1;
}
.active-filters__chip:hover .active-filters__x { background: var(--accent); color: #fff; }
.active-filters__reset { color: var(--muted); font-size: 13px; text-decoration: underline; margin-left: 4px; }
.active-filters__reset:hover { color: var(--accent); }

@media (max-width: 640px) {
	.pill-dd { left: auto; right: 0; }
	.pill-dd--price .pill-dd__price { flex-wrap: nowrap; }
	.pill-dd__num { width: 100%; }
}

/* ==========================================================================
   UX магазина: тосты, боковая корзина, избранное и сравнение
   ========================================================================== */

/* Счётчики избранного/сравнения в шапке */
.action__ic { position: relative; display: flex; }
.action__badge--soft { top: -6px; right: -8px; }

/* Кнопка в состоянии загрузки */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading .icon { opacity: 0; }
.btn.is-loading::after {
	content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
	animation: mb-spin .6s linear infinite;
}
@keyframes mb-spin { to { transform: rotate(360deg); } }

/* Активные «сердечко» / «сравнение» в карточке */
.icon-btn.is-active { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
.icon-btn.is-active .icon { fill: var(--accent); color: var(--accent); }

/* Кнопки избранное/сравнение в карточке товара */
.buy__tools { display: flex; gap: 18px; flex-wrap: wrap; }
.buy__tool {
	display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0;
	font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.buy__tool:hover { color: var(--accent); }
.buy__tool.is-active { color: var(--accent); }
.buy__tool.is-active .icon { fill: var(--accent); }

/* --- Тосты ------------------------------------------------------------- */
.mb-toasts {
	position: fixed; right: 20px; bottom: 20px; z-index: 1200;
	display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.mb-toast {
	pointer-events: auto; display: flex; align-items: flex-start; gap: 12px;
	min-width: 268px; max-width: 360px; padding: 14px 16px;
	background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
	border-radius: 12px; box-shadow: 0 14px 34px rgba(23, 23, 27, .16);
	opacity: 0; transform: translateY(10px); transition: opacity .22s, transform .22s;
}
.mb-toast.is-in { opacity: 1; transform: translateY(0); }
.mb-toast--ok { border-left-color: var(--ok); }
.mb-toast--warn { border-left-color: var(--warn); }
.mb-toast--muted { border-left-color: var(--muted-2); }
.mb-toast__ic {
	flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
	background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
}
.mb-toast__ic::after { content: '✓'; font-size: 12px; font-weight: 700; color: var(--accent); }
.mb-toast--ok .mb-toast__ic { background: #e8f6ed; }
.mb-toast--ok .mb-toast__ic::after { color: var(--ok); }
.mb-toast--warn .mb-toast__ic { background: #fdf2e3; }
.mb-toast--warn .mb-toast__ic::after { content: '!'; color: var(--warn); }
.mb-toast--muted .mb-toast__ic { background: var(--bg); }
.mb-toast--muted .mb-toast__ic::after { content: '−'; color: var(--muted); }
.mb-toast__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.mb-toast__body b { font-size: 14px; font-weight: 600; color: var(--text); }
.mb-toast__body span {
	font-size: 12.5px; color: var(--muted); line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mb-toast__body span:empty { display: none; }
.mb-toast__x { background: none; border: 0; padding: 0; font-size: 18px; line-height: 1; color: var(--muted-2); cursor: pointer; }
.mb-toast__x:hover { color: var(--text); }

/* --- Боковая корзина --------------------------------------------------- */
body.mb-noscroll { overflow: hidden; }
.mb-overlay {
	position: fixed; inset: 0; z-index: 1090; background: rgba(23, 23, 27, .42);
	backdrop-filter: blur(1.5px);
}
.mb-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100;
	width: 400px; max-width: 92vw; background: var(--surface);
	display: flex; flex-direction: column;
	box-shadow: -14px 0 44px rgba(23, 23, 27, .18);
	transform: translateX(100%); transition: transform .28s ease;
}
.mb-drawer.is-open { transform: translateX(0); }
.mb-drawer__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 22px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.mb-drawer__title { font-size: 17px; font-weight: 700; color: var(--text); }
.mb-drawer__close {
	background: none; border: 0; padding: 0; width: 32px; height: 32px; border-radius: 8px;
	font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer;
}
.mb-drawer__close:hover { background: var(--bg); color: var(--text); }
.mb-drawer__inner { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mb-drawer__list { flex: 1; overflow-y: auto; padding: 8px 22px; }
.mb-drawer__foot { flex-shrink: 0; padding: 18px 22px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.mb-drawer__total { display: flex; align-items: baseline; justify-content: space-between; font-size: 15px; color: var(--text-2); margin-bottom: 2px; }
.mb-drawer__total b { font-size: 20px; font-weight: 700; color: var(--accent); }

.mb-ci { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.mb-ci:last-child { border-bottom: 0; }
.mb-ci__img { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 9px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mb-ci__img img { width: 100%; height: 100%; object-fit: contain; }
.mb-ci__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mb-ci__name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-ci__name:hover { color: var(--accent); }
.mb-ci__meta { font-size: 12px; color: var(--muted-2); }
.mb-ci__sum { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.mb-ci__rm { background: none; border: 0; padding: 0; width: 24px; height: 24px; border-radius: 50%; font-size: 17px; line-height: 1; color: var(--muted-2); cursor: pointer; }
.mb-ci__rm:hover { background: #fdeef2; color: var(--danger); }

.mb-drawer__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 28px; gap: 6px; }
.mb-drawer__empty-ic { width: 66px; height: 66px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.mb-drawer__empty-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }
.mb-drawer__empty-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }

/* --- Страницы «Избранное» / «Сравнение» -------------------------------- */
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.list-tools__hint { font-size: 13px; color: var(--muted); }
.list-tools__clear { background: none; border: 0; padding: 0; margin-left: auto; font-family: var(--font); font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.list-tools__clear:hover { color: var(--danger); }

.compare-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
.compare thead th { border-bottom: 1px solid var(--border); vertical-align: top; }
.compare__corner { width: 190px; font-size: 13px; font-weight: 600; color: var(--muted); }
.compare__head { position: relative; width: 230px; }
.compare__rm {
	position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
	border: 1px solid var(--border); background: var(--surface); color: var(--muted-2);
	font-size: 16px; line-height: 1; cursor: pointer;
}
.compare__rm:hover { border-color: var(--danger); color: var(--danger); background: #fdeef2; }
.compare__img { display: flex; align-items: center; justify-content: center; height: 128px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.compare__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.compare__name { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; margin-bottom: 8px; }
.compare__name:hover { color: var(--accent); }
.compare__price { display: block; margin-bottom: 10px; }
.compare__price .product-card__price-row { margin: 0; }
.compare__label { width: 190px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); }
.compare tbody td { font-size: 14px; color: var(--text-2); }
.compare tbody tr.is-diff td { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.compare__dash { color: var(--muted-2); }

@media (max-width: 560px) {
	.mb-toasts { right: 12px; left: 12px; bottom: 12px; }
	.mb-toast { min-width: 0; max-width: none; }
}

/* ==========================================================================
   Sticky-смещение под высоту закреплённой шапки (169px + отступ).
   Ниже 992px вёрстка делает .tree/.buy статичными — правило не мешает.
   ========================================================================== */
.tree, .buy { top: 190px; }

/* ==========================================================================
   Отзывы о товаре — в стиле сайта
   ========================================================================== */
.reviews { display: flex; flex-direction: column; gap: 24px; }

.reviews__summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reviews__score { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.reviews__summary .rating { font-size: 18px; }
.reviews__count { font-size: 13px; color: var(--muted); }

.reviews__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.reviews__list .review-item { list-style: none; }
.review__avatar {
	width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
	background: var(--accent-soft); color: var(--accent);
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.review__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review__author { font-size: 14px; font-weight: 600; color: var(--text); }
.review__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }
.review__verified { color: var(--ok); font-weight: 600; }
.review__rating { margin-left: auto; padding-left: 10px; }
.review__text { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.review__text p { margin: 0 0 8px; }
.review__text p:last-child { margin-bottom: 0; }
.review__pending { color: var(--warn); font-style: italic; }

.reviews__empty { text-align: center; padding: 34px 20px; background: var(--bg); border-radius: var(--radius); }
.reviews__empty-ic { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); align-items: center; justify-content: center; margin-bottom: 10px; }
.reviews__empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.reviews__empty-text { font-size: 13.5px; color: var(--muted); margin: 0; }
.reviews__note { font-size: 14px; color: var(--muted); }

.reviews__pagination ol, .reviews__pagination ul { list-style: none; display: flex; gap: 6px; padding: 0; margin: 14px 0 0; }

/* Форма отзыва */
.reviews__form-title { display: block; font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.review-form { display: flex; flex-direction: column; gap: 14px; }
.review-form__row { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.review-form__row label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.review-form .required { color: var(--danger); }
.review-form .form-submit { margin: 2px 0 0; }
.review-form .consent { margin: 0; }
.review-form .must-log-in { font-size: 14px; color: var(--muted); margin: 0; }

@media (min-width: 640px) {
	.review-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
	.review-form > *:not(.review-form__row) { grid-column: 1 / -1; }
	.review-form__row--full { grid-column: 1 / -1; }
}

/* Оценка звёздами: обратный порядок + приём с ~ (без JS) */
.rate-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rate-row__label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.rate-pick { display: inline-flex; flex-direction: row-reverse; gap: 3px; }
.rate-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.rate-pick label { font-size: 26px; line-height: 1; color: #d1d1d6; cursor: pointer; transition: color .12s; }
.rate-pick input:checked ~ label,
.rate-pick label:hover,
.rate-pick label:hover ~ label { color: var(--star); }
.rate-pick input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* WooCommerce задаёт цене на странице товара свой оливковый #958e09 —
   возвращаем цвет темы (селектор специфичнее вудовского). */
body.woocommerce div.product span.price,
body.woocommerce div.product p.price { color: var(--text); }
body.woocommerce div.product span.price--old { color: var(--muted-2); }

/* Порядок полей формы отзыва: оценка → имя → e-mail → отзыв → согласия → кнопка.
   WordPress выводит их иначе, выравниваем через order (работает и во flex, и в grid). */
.review-form .rate-row { order: 1; }
.review-form .review-form__row--author { order: 2; }
.review-form .review-form__row--email { order: 3; }
.review-form .review-form__row--full { order: 4; }
.review-form .comment-form-cookies-consent { order: 5; }
.review-form .consent { order: 6; }
.review-form .form-submit { order: 7; }

.review-form .comment-form-cookies-consent {
	display: flex; align-items: flex-start; gap: 9px; margin: 0;
	font-size: 12px; color: var(--muted); line-height: 1.4;
}
.review-form .comment-form-cookies-consent input { margin-top: 2px; accent-color: var(--accent); }
.review-form .comment-form-cookies-consent label { font-weight: 400; font-size: 12px; color: var(--muted); }

/* ==========================================================================
   Адаптив: добираем то, что не покрыто медиазапросами вёрстки
   ========================================================================== */

/* Плитки разделов на главной — в вёрстке жёстко 4 колонки на любой ширине,
   из-за чего на телефоне страница уезжала вправо. */
@media (max-width: 992px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* Длинные неразрывные ссылки в импортированных описаниях растягивали страницу */
.tab-panel, .entry-content, .review__text,
.cart-item__name, .mb-ci__name, .order-review__name { overflow-wrap: break-word; }

/* Верхняя полоса шапки на телефоне: оставляем город и телефон,
   часы работы и «Заказать звонок» прячем — иначе всё переносится по слогам. */
@media (max-width: 640px) {
	.header__top-inner { height: auto; min-height: 38px; gap: 10px; font-size: 12px; padding-top: 6px; padding-bottom: 6px; }
	.header__top-right { gap: 12px; }
	.header__top-right .inline-ic { display: none; }
	.header__top-right a:not(.header__phone) { display: none; }
}

/* Степпер количества в корзине не должен растягиваться на всю ячейку сетки */
.cart-item__col--qty .qty { width: max-content; }
@media (max-width: 719px) {
	.cart-item__col--qty { justify-self: start; }
	.cart-item__col--sub { justify-self: end; }
}

/* Ровные колонки плиток: 1fr раздувается от длинных названий разделов */
@media (max-width: 992px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* На телефоне стрелки слайдера ложились поверх текста — хватает точек */
/* ==========================================================================
   Слайдер на главной: стрелки в одном ряду с точками, без наложений на контент
   ========================================================================== */
/* Контент прижат кверху, снизу зарезервирована полоса под кластер управления,
   высота фиксирована — слайды разной длины не прыгают и не налезают на стрелки. */
.hero { align-items: flex-start; min-height: 440px; }
.hero__slide { padding: 48px 56px 84px; }

.hero__controls {
	position: absolute; left: 56px; bottom: 26px; z-index: 4;
	display: flex; align-items: center; gap: 18px;
}
/* точки — из абсолютных в поток кластера */
.hero__controls .hero__dots { position: static; left: auto; bottom: auto; display: flex; align-items: center; gap: 8px; }
.hero__arrows { display: flex; align-items: center; gap: 8px; }
/* стрелки — из боковых в кластер */
.hero__controls .hero__nav {
	position: static; top: auto; left: auto; right: auto; transform: none;
	width: 38px; height: 38px; border-radius: 50%;
	background: rgba(255, 255, 255, .16); color: #fff;
	display: flex; align-items: center; justify-content: center;
	transition: background .15s, transform .12s;
}
.hero__controls .hero__nav:hover { background: var(--accent); }
.hero__controls .hero__nav:active { transform: scale(.92); }

@media (max-width: 640px) {
	.hero__controls { left: 28px; bottom: 20px; gap: 14px; }
	.hero__controls .hero__nav { width: 34px; height: 34px; }
}

/* ==========================================================================
   Коллизия имён: классы вёрстки .search/.product/.products совпадают с
   классами, которые WordPress проставляет самому <body> (на странице
   результатов поиска body получает класс "search"). Из-за этого правило
   формы поиска — display:flex + border + overflow:hidden — применялось ко
   всей странице: шапка, контент и футер вставали в строку, и страница
   разъезжалась по горизонтали. Нейтрализуем на уровне body.
   ========================================================================== */
body.search, body.product, body.products {
	display: block; flex: none; align-items: normal;
	border: 0; border-radius: 0; overflow: visible;
	gap: normal; grid-template-columns: none;
}

/* ==========================================================================
   Дерево разделов каталога: раскрывающиеся подразделы
   ========================================================================== */
/* Раскрытый большой раздел (у «Запчастей» 18 подразделов) не должен ломать
   прилипание — ограничиваем высоту и даём свою прокрутку. */
.catalog .tree { max-height: calc(100vh - 210px); overflow-y: auto; overscroll-behavior: contain; }
.catalog .tree::-webkit-scrollbar { width: 8px; }
.catalog .tree::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

.tree__group { display: flex; flex-direction: column; }
.tree__row { display: flex; align-items: center; gap: 2px; }
.tree__row .tree__item { flex: 1; min-width: 0; }

.tree__toggle {
	flex-shrink: 0; width: 28px; height: 28px; padding: 0; border: 0; background: none;
	border-radius: 8px; cursor: pointer; color: var(--muted-2);
	display: flex; align-items: center; justify-content: center;
	transition: background .12s, color .12s, transform .18s;
}
.tree__toggle:hover { background: var(--accent-soft); color: var(--accent); }
.tree__group.is-open > .tree__row .tree__toggle { transform: rotate(180deg); color: var(--accent); }

.tree__subs {
	display: none; flex-direction: column; gap: 1px;
	margin: 2px 0 6px 22px; padding-left: 10px; border-left: 1px solid var(--border);
}
.tree__group.is-open .tree__subs { display: flex; }
.tree__sub {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 7px 10px; border-radius: 8px;
	font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3;
}
.tree__sub:hover { background: var(--accent-soft); color: var(--accent); }
.tree__sub.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Способы оплаты — карточками в стиле сайта
   (перебивает ранний блок ниже по каскаду и дефолт woocommerce.css)
   ========================================================================== */
.woocommerce-checkout #payment { background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods {
	list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--border);
	display: flex; flex-direction: column; gap: 10px;
}
.woocommerce-checkout #payment ul.payment_methods li {
	margin: 0; padding: 14px 16px; background: var(--surface);
	border: 1.5px solid var(--border); border-radius: 12px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	transition: border-color .15s, background .15s;
	cursor: pointer;
}
.woocommerce-checkout #payment ul.payment_methods li:hover { border-color: var(--accent-border); }
.woocommerce-checkout #payment ul.payment_methods li:has(input:checked) {
	border-color: var(--accent); background: var(--accent-soft);
}
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
	width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--accent); cursor: pointer;
}
.woocommerce-checkout #payment ul.payment_methods li label {
	margin: 0; padding: 0; font-size: 14px; font-weight: 600; color: var(--text);
	cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.woocommerce-checkout #payment ul.payment_methods li img { max-height: 22px; width: auto; margin: 0 0 0 auto; }

/* Описание способа оплаты: без серой плашки и «хвостика».
   У woocommerce.css селектор `#payment div.payment_box::before` (1,2,1) —
   перебиваем через body. */
body.woocommerce-checkout #payment div.payment_box {
	flex: 1 0 100%; margin: 2px 0 0; padding: 0;
	background: none; border-radius: 0; box-shadow: none;
	font-size: 13px; line-height: 1.45; color: var(--muted);
}
body.woocommerce-checkout #payment div.payment_box::before,
body.woocommerce-checkout #payment div.payment_box::after {
	content: none; display: none; border: 0;
}
body.woocommerce-checkout #payment div.payment_box p { margin: 0; }
body.woocommerce-checkout #payment div.payment_box p + p { margin-top: 6px; }

/* Если способ оплаты один — радиокнопку прячем, оставляем аккуратную карточку */
.woocommerce-checkout #payment ul.payment_methods li:only-child input[type="radio"] { display: none; }
.woocommerce-checkout #payment ul.payment_methods li:only-child { border-color: var(--accent-border); background: var(--accent-soft); }

/* ==========================================================================
   Страница контактов: карта + форма в одной строке
   ========================================================================== */
.contacts-mapwrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.contacts-map {
	flex: 1; min-height: 420px; padding: 0; overflow: hidden;
	background: var(--bg); /* если встраивание карты заблокировано — нейтральная панель, а не белая дыра */
	position: relative;
}
.contacts-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
.contacts-mapnote {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	font-size: 13px; color: var(--muted);
}
.contacts-mapnote span { display: inline-flex; align-items: center; gap: 7px; }
.contacts-mapnote a { font-weight: 600; }

.contacts-form { display: flex; flex-direction: column; }
.contacts-form .feedback-form { display: flex; flex-direction: column; gap: 12px; }
.contacts-form .feedback-form textarea.field { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.contacts-form .consent { margin-top: 2px; }

@media (max-width: 992px) {
	.contacts-map, .contacts-map iframe { min-height: 320px; }
}

/* ==========================================================================
   Страница 404
   ========================================================================== */
.err404 { max-width: 620px; }
.err404__code { display: inline-block; font-size: 64px; font-weight: 700; line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.err404__title { font-size: 28px; margin: 12px 0 8px; }
.err404__text { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0 0 22px; }
.err404__search { max-width: 480px; margin-bottom: 20px; }
.err404__actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 560px) { .err404__code { font-size: 52px; } .err404__title { font-size: 23px; } }

/* ==========================================================================
   Слайдер фотографий из описания товара (вместо «полотна» картинок)
   ========================================================================== */
.desc-text { font-size: 15px; line-height: 1.7; color: var(--text-2); margin-bottom: 20px; }
.desc-text :last-child { margin-bottom: 0; }
.desc-empty { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; }

.descslider { max-width: 620px; }
.descslider__stage {
	position: relative; background: #fff; border: 1px solid var(--border);
	border-radius: var(--radius-lg); overflow: hidden;
}
.descslider__viewport {
	display: flex; align-items: center; justify-content: center;
	height: 440px; padding: 12px;
	touch-action: pan-y;               /* горизонтальный свайп листает, вертикальный — скроллит */
	-webkit-user-select: none; user-select: none;
}
.descslider__main { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

.descslider__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 42px; height: 42px; border-radius: 50%;
	border: 1px solid var(--border); background: rgba(255, 255, 255, .92);
	color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(23, 23, 27, .1); transition: background .12s, border-color .12s;
}
.descslider__nav:hover { background: #fff; border-color: var(--accent); color: var(--accent); }
.descslider__nav--prev { left: 12px; }
.descslider__nav--next { right: 12px; }

.descslider__counter {
	position: absolute; right: 12px; bottom: 12px; z-index: 2;
	background: rgba(23, 23, 27, .72); color: #fff; font-size: 12px; font-weight: 600;
	padding: 4px 10px; border-radius: 20px; line-height: 1;
}
.descslider__counter b { font-weight: 700; }

.descslider__thumbs {
	display: flex; gap: 8px; margin-top: 10px; padding-bottom: 4px;
	overflow-x: auto; scroll-behavior: smooth; overscroll-behavior-x: contain;
}
.descslider__thumbs::-webkit-scrollbar { height: 6px; }
.descslider__thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.descslider__thumb {
	flex: 0 0 auto; width: 64px; height: 64px; padding: 0; cursor: pointer;
	border: 2px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden;
	transition: border-color .12s;
}
.descslider__thumb:hover { border-color: var(--accent-border); }
.descslider__thumb.is-active { border-color: var(--accent); }
.descslider__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 560px) {
	.descslider__viewport { height: 320px; }
	.descslider__nav { width: 36px; height: 36px; }
	.descslider__thumb { width: 54px; height: 54px; }
}

/* ==========================================================================
   Мобильное меню (гамбургер + off-canvas)
   ========================================================================== */
/* Гамбургер — только на мобиле */
.header__burger {
	display: none; flex-shrink: 0; width: 42px; height: 42px; padding: 0;
	border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
	color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.header__burger:hover { border-color: var(--accent); color: var(--accent); }

/* Кластер иконок — только на мобиле: телефон, поиск, кабинет, корзина */
.header__mactions { display: none; align-items: center; gap: 2px; }
.micon {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 10px; color: var(--text); background: none; border: 0; cursor: pointer;
}
.micon:hover, .micon.is-active { color: var(--accent); background: var(--accent-soft); }
.micon__badge {
	position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
	border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}

@media (max-width: 900px) {
	.header__top { display: none; }              /* город/телефон — в меню */
	.header__burger { display: inline-flex; border: 0; background: none; width: 40px; height: 40px; }
	.header__burger:hover { background: var(--accent-soft); }
	.catalog-btn { display: none; }              /* каталог — в меню */
	.quick-menu { display: none; }               /* категории — в меню */
	.megamenu { display: none !important; }
	.header__actions { display: none; }          /* десктоп-действия скрыты */
	.header__mactions { display: flex; flex-shrink: 0; flex-wrap: nowrap; }  /* мобильные иконки — одной строкой */
	.micon { width: 40px; height: 40px; }
	/* Всё в одну строку: гамбургер + логотип + иконки; поиск разворачивается ниже */
	.header__main { flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 12px 0; }
	.header__logo { margin-right: auto; flex-shrink: 1; min-width: 0; }
	.header__logo img { max-height: 30px; max-width: 100%; width: auto; height: auto; }

	/* Поиск — по кнопке-иконке: по умолчанию скрыт, разворачивается строкой */
	.header .search { display: none; }
	.header.is-search-open .search { display: flex; order: 5; flex-basis: 100%; margin-top: 4px; }
}
@media (max-width: 360px) {
	.micon { width: 38px; height: 38px; }
	.header__logo img { max-height: 28px; }
}

/* Off-canvas панель */
.mmenu-overlay { position: fixed; inset: 0; z-index: 1140; background: rgba(23, 23, 27, .45); }
.mmenu {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 1150;
	width: 88vw; max-width: 380px; background: var(--surface);
	display: flex; flex-direction: column; overflow-y: auto;
	transform: translateX(-100%); transition: transform .28s ease;
	-webkit-overflow-scrolling: touch;
}
.mmenu.is-open { transform: translateX(0); }

.mmenu__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.mmenu__logo img { height: 38px; width: auto; display: block; }
.mmenu__close { background: none; border: 0; padding: 0; width: 36px; height: 36px; border-radius: 9px; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.mmenu__close:hover { background: var(--bg); color: var(--text); }

.mmenu__nav { display: flex; flex-direction: column; padding: 8px 0; }
.mmenu__row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
	padding: 15px 20px; background: none; border: 0; text-align: left; cursor: pointer;
	font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--text);
}
.mmenu__row:hover { color: var(--accent); }
.mmenu__row .icon { flex-shrink: 0; transition: transform .2s; }
.mmenu__group.is-open > .mmenu__row--exp .icon { transform: rotate(90deg); color: var(--accent); }

.mmenu__sub { display: none; flex-direction: column; padding: 2px 0 8px; background: var(--bg); }
.mmenu__group.is-open .mmenu__sub { display: flex; }
.mmenu__suba {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 11px 20px 11px 34px; font-size: 15px; font-weight: 500; color: var(--text-2);
}
.mmenu__suba:hover { color: var(--accent); }
.mmenu__count { color: var(--muted-2); font-size: 12px; font-weight: 500; }

.mmenu__divider { height: 1px; background: var(--border); margin: 6px 20px; }
.mmenu__city { display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-size: 16px; font-weight: 600; color: var(--text); }

.mmenu__account { display: flex; flex-direction: column; padding: 4px 0 8px; }
.mmenu__acc { display: flex; align-items: center; gap: 12px; padding: 13px 20px; font-size: 15px; font-weight: 500; color: var(--text-2); position: relative; }
.mmenu__acc:hover { color: var(--accent); }
.mmenu__acc .icon { color: var(--muted); flex-shrink: 0; }
.mmenu__acc:hover .icon { color: var(--accent); }
.mmenu__badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.mmenu__phone { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 18px 20px; border-top: 1px solid var(--border); font-size: 17px; font-weight: 700; color: var(--text); }

/* ==========================================================================
   Фоновые изображения главной (assets/img): герой, плитки, баннер, услуги
   ========================================================================== */
.tile__img,
.service-card__img,
.promo-dark__img {
	background-size: cover; background-position: center; background-repeat: no-repeat;
}
.tile__img { background-color: var(--bg); }
.service-card__img { background-color: var(--bg); }

/* Плейсхолдеры оставляем только там, где картинки нет */
.tile__img.ph, .service-card__img.ph { background-size: auto; }

/* ==========================================================================
   Герой: плавное листание — кроссфейд двух фоновых слоёв + выезд контента
   ========================================================================== */
.hero { overflow: hidden; }
/* Два фоновых слоя, JS перекрещивает .is-active — картинка меняется мягко */
.hero__bg {
	position: absolute; inset: 0; z-index: 0;
	background-size: cover; background-position: center right; background-repeat: no-repeat;
	opacity: 0; transition: opacity .9s ease; will-change: opacity;
}
.hero__bg.is-active { opacity: 1; }
.hero__overlay { z-index: 1; }
.hero__controls { z-index: 4; }

/* Контейнер слайдов держит высоту; сами слайды сложены друг на друге */
.hero__slides { position: relative; z-index: 2; width: 100%; min-height: 440px; }
.hero__slide {
	position: absolute; top: 0; left: 0; right: 0;
	opacity: 0; transform: translateX(34px);
	transition: opacity .6s cubic-bezier(.4, 0, .2, 1), transform .6s cubic-bezier(.4, 0, .2, 1);
	pointer-events: none; will-change: opacity, transform;
}
.hero__slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero__slide.is-leaving { opacity: 0; transform: translateX(-34px); }
/* Листание назад — зеркалим направление выезда */
.hero.is-rev .hero__slide { transform: translateX(-34px); }
.hero.is-rev .hero__slide.is-active { transform: none; }
.hero.is-rev .hero__slide.is-leaving { transform: translateX(34px); }

@media (prefers-reduced-motion: reduce) {
	.hero__slide, .hero.is-rev .hero__slide { transform: none; }
	.hero__slide, .hero__bg { transition: opacity .25s ease; }
}

@media (max-width: 640px) {
	.hero__bg { background-position: center; }
	.hero__slides { min-height: 360px; }
	.hero__slide { padding: 30px !important; }
	/* mobile-композиция самостоятельная — усиливаем затемнение под белый текст */
	.hero__overlay { background: linear-gradient(180deg, rgba(20, 6, 24, .35) 0%, rgba(20, 6, 24, .78) 100%); }
}

/* На мобиле подвал прижимаем компактнее к контенту */
@media (max-width: 640px) {
	.container.footer__inner { padding-top: 30px; }
}

/* ==========================================================================
   Личный кабинет: вход и внутренние разделы
   Своего макета в вёрстке не было — собрано из её же компонентов (.card, .field,
   .btn), чтобы страница не выпадала из стиля магазина.
   ========================================================================== */
.account-login {
	display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
	gap: 24px; align-items: start; margin-bottom: 40px;
}
.account-login--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-card { padding: 26px 24px; }
.account-card__title { font-size: 20px; margin: 0 0 6px; }
.account-card__lead { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 20px; }
.account-card__note { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

.account-field__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.account-field__label .req { color: var(--accent); }
.account-login .field { width: 100%; margin-bottom: 16px; }

.account-login__row {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap; margin: 4px 0 18px;
}
.account-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.account-remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.account-login__lost { font-size: 14px; color: var(--accent); }

/* Пояснение вместо формы регистрации (регистрация в магазине отключена) */
.account-aside {
	background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
	padding: 26px 24px;
}
.account-aside__ic {
	width: 52px; height: 52px; border-radius: 14px; background: #fff;
	border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
	margin-bottom: 14px;
}
.account-aside__title { font-size: 18px; margin: 0 0 8px; }
.account-aside__text { font-size: 14px; line-height: 1.7; color: var(--text-2); margin: 0 0 18px; }
.account-aside__help { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.6; }

/* --- Раскладка кабинета: меню слева, содержимое справа --- */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: 0; }
/* Две колонки — только для вошедших. WordPress не ставит класс logged-out,
   поэтому ориентируемся на logged-in: иначе сетка ловила форму входа и
   сжимала её в узкие полосы (текст сыпался по одной букве). */
.woocommerce-account.logged-in .woocommerce {
	display: grid; grid-template-columns: 264px minmax(0, 1fr);
	gap: 24px; align-items: start;
}

.account-nav { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.account-nav__head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--border); }
.account-nav__avatar {
	width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.account-nav__name { font-weight: 600; font-size: 15px; }
.account-nav__mail { font-size: 12px; color: var(--muted); word-break: break-word; }
.account-nav__list { list-style: none; margin: 0; padding: 8px; }
.account-nav__item a {
	display: flex; align-items: center; gap: 10px; padding: 11px 12px;
	border-radius: 10px; font-size: 14px; color: var(--text); transition: background .12s, color .12s;
}
.account-nav__item a:hover { background: var(--bg); color: var(--accent); }
.account-nav__item .icon { color: var(--muted); flex-shrink: 0; }
.account-nav__item a:hover .icon { color: var(--accent); }
.account-nav__item.is-active a { background: var(--accent); color: #fff; font-weight: 600; }
.account-nav__item.is-active .icon { color: #fff; }

.account-hello { margin-bottom: 20px; }
.account-hello__title { font-size: 22px; margin: 0 0 6px; }
.account-hello__text { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }

.account-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account-tile {
	display: block; background: #fff; border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: 18px; transition: border-color .12s, transform .12s;
}
.account-tile:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.account-tile__ic { margin-bottom: 10px; }
.account-tile__name { font-weight: 600; font-size: 15px; margin-bottom: 4px; color: var(--text); }
.account-tile__text { font-size: 13px; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
	.account-login, .account-login--two { grid-template-columns: minmax(0, 1fr); }
	.woocommerce-account.logged-in .woocommerce { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.account-tiles { grid-template-columns: minmax(0, 1fr); }
	.account-card, .account-aside { padding: 20px 16px; }
}

/* ==========================================================================
   Страница «Заказ оформлен»: успех, факты, шаги, состав заказа
   ========================================================================== */
.thanks { margin-bottom: 28px; }
.thanks__head {
	background: linear-gradient(135deg, rgba(157, 28, 155, .07), rgba(157, 28, 155, .02));
	border: 1px solid var(--accent-border); border-radius: var(--radius-lg);
	padding: 30px 28px; text-align: center; margin-bottom: 20px;
}
.thanks__check {
	width: 66px; height: 66px; border-radius: 50%; background: var(--accent);
	display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
	box-shadow: 0 8px 22px rgba(157, 28, 155, .28);
}
.thanks__title { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.thanks__text { font-size: 15px; line-height: 1.65; color: var(--text-2); margin: 0; max-width: 620px; margin-inline: auto; }
.thanks__text strong { color: var(--text); }

.thanks__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.thanks-fact {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px;
}
.thanks-fact__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.thanks-fact__value { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.thanks-fact__value--accent { color: var(--accent); }
.thanks-fact__note { font-size: 12px; color: var(--muted); margin-top: 4px; }

.thanks__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.thanks-step {
	display: flex; gap: 12px; align-items: flex-start;
	background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px;
}
.thanks-step__n {
	width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
	font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.thanks-step__name { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.thanks-step__text { font-size: 13px; line-height: 1.55; color: var(--muted); }

.thanks__note {
	background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--accent);
	border-radius: var(--radius-lg); padding: 16px 18px;
}
.thanks__note-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.thanks__note-text { font-size: 14px; line-height: 1.6; color: var(--text-2); }

.thanks__actions {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin: 28px 0 8px; padding-top: 22px; border-top: 1px solid var(--border);
}
.thanks__phone { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; margin-left: auto; }

.thanks-fail {
	background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--err, #d33);
	border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.thanks-fail__title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.thanks-fail__text { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 0 0 18px; }
.thanks-fail__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Состав заказа и данные покупателя --- */
.order-box {
	background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
	padding: 24px; margin-bottom: 20px;
}
.order-box__title { font-size: 19px; margin: 0 0 18px; }

.order-item {
	display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto;
	gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.order-item:first-child { padding-top: 0; }
.order-item__img { width: 64px; height: 64px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.order-item__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.order-item__name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.order-item__name a { color: var(--text); }
.order-item__name a:hover { color: var(--accent); }
.order-item__meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.order-item__meta p { margin: 0; }
.order-item__note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.order-item__qty { font-size: 14px; color: var(--muted); white-space: nowrap; }
.order-item__sum { font-size: 16px; font-weight: 700; white-space: nowrap; }

.order-totals { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.order-totals__row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 15px; }
.order-totals__label { color: var(--muted); }
.order-totals__value { font-weight: 600; }
.order-totals__row--final { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 19px; }
.order-totals__row--final .order-totals__label { color: var(--text); font-weight: 600; }
.order-totals__row--final .order-totals__value { color: var(--accent); font-weight: 700; }

.order-customer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.order-customer__row { display: flex; gap: 12px; align-items: flex-start; }
.order-customer__ic {
	width: 38px; height: 38px; border-radius: 10px; background: var(--bg);
	border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.order-customer__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
.order-customer__value { font-size: 15px; font-weight: 600; line-height: 1.45; word-break: break-word; }

@media (max-width: 900px) {
	.thanks__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.thanks__steps { grid-template-columns: minmax(0, 1fr); }
	.order-customer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.thanks__head { padding: 24px 18px; }
	.thanks__title { font-size: 21px; }
	.thanks__facts { grid-template-columns: minmax(0, 1fr); }
	.order-box { padding: 18px 16px; }
	.order-item { grid-template-columns: 52px minmax(0, 1fr) auto; row-gap: 6px; }
	.order-item__img { width: 52px; height: 52px; }
	.order-item__sum { grid-column: 2 / -1; }
	.thanks__phone { margin-left: 0; }
}

/* ==========================================================================
   Подвал: подпись под контактом на своей строке
   В вёрстке у .footer__contact small нет display:block, поэтому телефон и
   подпись слипались в одну строку («+7 900 637-03-84Заказать звонок»).
   ========================================================================== */
.footer__contact small { display: block; margin-top: 3px; line-height: 1.4; }
.footer__contact > div { min-width: 0; }

/* ==========================================================================
   Страницы без бокового меню
   .catalog из вёрстки — это сетка «сайдбар 260px + контент». На страницах,
   которых нет в информационном меню (личный кабинет, избранное и т.п.),
   сайдбар не выводится, и контент попадал в узкую первую колонку — форма
   входа сжималась в полосу, текст сыпался по одной букве.
   ========================================================================== */
.catalog--full { grid-template-columns: minmax(0, 1fr); }
