/* HAMIR: связка UI-кита (hn-components.css) с разметкой WooCommerce и темой poli.
   Все правила ограничены .hn_catalog / .hn-header-cart. Подключается после стилей WooCommerce. */

/* ---------- контейнер в колонке #content темы ---------- */
.hn_catalog.hn_site { padding: 4px 28px 32px; background: #fff; }
/* Только страницы каталога: фиксированная ширина контентной части (с левым меню темы — 1400px), прижата влево */
.hn_catalog.hn_site { max-width: 1140px; box-sizing: border-box; margin-right: auto; }
.hn_catalog .hn_title { font-size: 40px; font-weight: 800; }
.hn_catalog h1.hn_title { margin: 0; }
.hn_catalog .hn_page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.hn_catalog .hn_heading-group { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.hn_catalog .hn_category-description { margin-top: 32px; color: #3d3849; font-size: 15px; line-height: 1.6; }
.hn_catalog .hn_category-description .hn_subtitle { margin-bottom: 12px; }
.hn_catalog .hn_category-description p + p { margin-top: 10px; }

/* ---------- фото: <img> вместо демо-фона ---------- */
.hn_catalog img.hn_photo { height: auto; object-fit: cover; }
.hn_catalog .hn_product-card__photo { display: block; align-self: start; }
.hn_catalog .hn_product-card__body { min-width: 0; }
.hn_catalog .hn_product-card__title { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; margin-bottom: 4px; }
.hn_catalog .hn_product-card__price strong { font-size: 24px; font-weight: 750; letter-spacing: -.03em; }
.hn_catalog .hn_price-request { font-size: 18px !important; color: var(--hn-muted); }
/* Все фото каталога — квадратные (1:1): разделы, карточки в списке, галерея товара и превью */
.hn_catalog .hn_photo,
.hn_catalog .hn_category-card .hn_photo,
.hn_catalog .hn_product-card .hn_photo,
.hn_catalog .hn_gallery-main .hn_photo,
.hn_catalog .hn_gallery-main img.hn_photo,
.hn_catalog .hn_gallery-thumb .hn_photo,
.hn_catalog .hn_gallery-thumb img.hn_photo { aspect-ratio: 1 / 1; width: 100%; height: auto; object-fit: cover; }
.hn_catalog .hn_gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.hn_catalog .hn_gallery-thumb { width: auto; }
.hn_catalog .hn_product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hn_catalog .hn_wc-content .product-thumbnail img { aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- кнопки: перебиваем .woocommerce button.button.alt ---------- */
.hn_site.hn_catalog .hn_button,
.hn_site.hn_catalog a.hn_button.button,
.hn_site.hn_catalog button.hn_button.button.alt {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 46px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px;
	background: var(--hn-orange); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2;
	text-decoration: none; box-shadow: none; text-shadow: none; opacity: 1;
}
.hn_site.hn_catalog .hn_button:hover,
.hn_site.hn_catalog button.hn_button.button.alt:hover { background: var(--hn-orange-dark); color: #fff; }
.hn_site.hn_catalog .hn_button--outline { background: #fff; color: var(--hn-purple-dark); border-color: var(--hn-purple); }
.hn_site.hn_catalog .hn_button--outline:hover { background: var(--hn-purple-soft); color: var(--hn-purple-dark); }
.hn_site.hn_catalog .hn_button--quiet { background: transparent; color: var(--hn-muted); border-color: transparent; }
.hn_site.hn_catalog .hn_button--quiet:hover { background: var(--hn-surface); color: var(--hn-ink); }
.hn_site.hn_catalog .hn_subcategories .hn_button[aria-pressed="true"] { background: var(--hn-purple); color: #fff; }
.hn_site.hn_catalog button.hn_button.button.alt.disabled,
.hn_site.hn_catalog button.hn_button.button.alt:disabled,
.hn_site.hn_catalog .hn_button[aria-disabled="true"] { background: #c9c3d6; color: #fff; cursor: not-allowed; opacity: 1; }
.hn_catalog .hn_button .hn_icon { width: 20px; height: 20px; }
.hn_catalog .hn_button.loading { opacity: .7; }
.hn_catalog .hn_button.added::after { content: " ✓"; }
.hn_catalog .hn_product-card__actions { flex-wrap: wrap; }
.hn_catalog .hn_product-card__actions a.added_to_cart { flex: 1 0 100%; text-align: center; font-size: 13px; color: var(--hn-purple-dark); text-decoration: underline; }

/* ---------- количество: .quantity WooCommerce внутри .hn_qty ---------- */
.hn_catalog .hn_qty .quantity { display: contents; }
.hn_catalog .hn_qty .quantity .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.hn_site.hn_catalog .hn_qty input.qty { width: 0; min-width: 32px; flex: 1; margin: 0; padding: 6px 1px; border: 0; text-align: center; font-size: 15px; background: #fff; box-shadow: none; appearance: textfield; -moz-appearance: textfield; }

/* ---------- блок покупки ---------- */
.hn_catalog .hn_cart-form { margin: 0; }
.hn_catalog .hn_buy-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.hn_catalog .hn_quantity-note { margin-top: 10px; color: var(--hn-muted); font-size: 14px; }
.hn_catalog .hn_price-hint { display: block; margin-top: 8px; color: var(--hn-purple); font-size: 14px; }
.hn_catalog .hn_stock-state { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; }
.hn_catalog .hn_stock-state .hn_icon { width: 22px; height: 22px; color: #6c6678; flex: 0 0 auto; }
.hn_catalog .hn_choice--oos span { background: linear-gradient(135deg, #efedf2 48%, #c8c3d2 49%, #c8c3d2 51%, #efedf2 52%); color: #918b9d; }
.hn_catalog .hn_choice--oos input:checked + span { background: linear-gradient(135deg, #8d7bb0 48%, #fff 49%, #fff 51%, #8d7bb0 52%); color: #fff; }
.hn_catalog .hn_availability { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hn-line); color: var(--hn-muted); font-size: 14px; }
.hn_catalog .hn_availability .hn_icon { width: 18px; height: 18px; }

/* штатная таблица вариаций WooCommerce — работает, но скрыта (выбор — кнопками).
   !important: правило WooCommerce «.woocommerce div.product form.cart .variations { width:100% }» сильнее
   и растягивало абсолютно спозиционированную таблицу за правый край (горизонтальный скролл). */
.hn_catalog table.hn_variations-native,
.woocommerce .hn_catalog div.product form.cart table.variations.hn_variations-native {
	position: absolute !important; left: 0 !important; top: 0 !important;
	width: 1px !important; height: 1px !important; max-width: 1px !important;
	overflow: hidden !important; clip-path: inset(50%); margin: 0 !important; padding: 0 !important; border: 0 !important;
}
.hn_catalog .hn_cart-form { position: relative; }

/* WooCommerce задаёт галерее и блоку покупки float и width:48% (в т. ч. через #content темы) — у нас сетка */
.woocommerce #content .hn_catalog div.product div.images.hn_gallery,
.woocommerce #content .hn_catalog div.product div.summary.hn_purchase,
.woocommerce .hn_catalog div.product div.images.hn_gallery,
.woocommerce .hn_catalog div.product div.summary.hn_purchase,
.woocommerce-page #content .hn_catalog div.product div.images.hn_gallery,
.woocommerce-page #content .hn_catalog div.product div.summary.hn_purchase { float: none; width: auto; margin: 0; }

/* страховка от любых выступов внутри каталога */
.hn_catalog.hn_site { overflow-x: clip; }
.hn_catalog .hn_product-layout > * { min-width: 0; }
.hn_catalog .single_variation_wrap .single_variation { display: none !important; }
.hn_catalog .single_variation_wrap { margin-top: 0; }

/* подбор количества по метражу / массе */
.hn_catalog .hn_calc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 14px; padding: 12px 14px; background: var(--hn-surface); border-radius: 6px; font-size: 14px; }
.hn_catalog .hn_calc__label { color: #4d475a; }
.hn_catalog .hn_calc__field { display: inline-flex; align-items: center; gap: 6px; }
.hn_site.hn_catalog .hn_calc .hn_input { width: 96px; min-height: 36px; padding: 6px 8px; font-size: 14px; }
.hn_catalog .hn_calc__result { flex: 1 0 100%; }
.hn_catalog .hn_calc__result:empty { display: none; }
.hn_catalog .hn_calc-summary { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--hn-line); border-radius: 6px; font-size: 14px; color: #4d475a; }
.hn_catalog .hn_calc-summary strong { font-size: 18px; color: var(--hn-ink); white-space: nowrap; }
.hn_catalog .hn_calc-summary:empty { display: none; }

/* вкладки и описание */
.hn_catalog .hn_product-tabs { margin-top: 8px; }
.hn_catalog .hn_description { font-size: 15px; line-height: 1.6; }
.hn_catalog .hn_description p + p { margin-top: 10px; }
.hn_catalog .hn_services a { color: inherit; }

/* ---------- каталог ---------- */
.hn_site.hn_catalog .hn_filter-toggle { display: none; }
.hn_catalog .hn_gallery { align-self: start; }
.hn_catalog .hn_options legend { padding-top: 0; }
.hn_catalog .hn_options { padding: 0 0 20px; margin-top: 20px; }
.hn_catalog .hn_listing-main { min-width: 0; }
.hn_catalog .hn_sort-form { margin: 0; }
.hn_catalog .hn_active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hn_catalog .hn_active-filters:empty { display: none; }
.hn_catalog .hn_filter-actions { display: flex; flex-direction: column; gap: 6px; }
.hn_catalog .hn_check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.hn_catalog .hn_pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.hn_catalog .hn_pagination .dots { display: inline-grid; place-items: center; min-width: 30px; color: var(--hn-muted); }
.hn_catalog .hn_help-card__head { display: flex; align-items: center; gap: 14px; }
.hn_catalog .hn_help-card__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e3dcf2; color: var(--hn-purple); flex: 0 0 auto; }
.hn_catalog .hn_help-card .hn_phone { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.hn_catalog .hn_help-card .hn_icon { width: 24px; height: 24px; }
.hn_catalog .hn_empty { text-align: center; padding: 48px 20px; border: 1px solid var(--hn-line); border-radius: var(--hn-radius); }
.hn_catalog .hn_empty > .hn_icon { width: 48px; height: 48px; color: var(--hn-purple); margin-bottom: 12px; }
.hn_catalog .hn_empty p { color: var(--hn-muted); margin: 6px 0 18px; }

/* ---------- корзина / оформление (классические шорткоды WooCommerce) ---------- */
.hn_catalog .hn_wc-content { font-size: 15px; }
.hn_catalog .hn_wc-content table.shop_table { border: 1px solid var(--hn-line); border-radius: var(--hn-radius); border-collapse: separate; border-spacing: 0; width: 100%; }
.hn_catalog .hn_wc-content table.shop_table th,
.hn_catalog .hn_wc-content table.shop_table td { padding: 14px 12px; border-top: 1px solid var(--hn-line); vertical-align: middle; }
.hn_catalog .hn_wc-content table.shop_table thead th { border-top: 0; background: var(--hn-surface); font-weight: 600; font-size: 13px; color: var(--hn-muted); }
.hn_catalog .hn_wc-content .product-thumbnail img { width: 90px; border-radius: 5px; }
.hn_catalog .hn_wc-content .product-name a { font-weight: 700; }
.hn_catalog .hn_wc-content dl.variation { margin-top: 6px; font-size: 13px; color: var(--hn-muted); display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.hn_catalog .hn_wc-content dl.variation dt { font-weight: 400; }
.hn_catalog .hn_wc-content dl.variation dd, .hn_catalog .hn_wc-content dl.variation dd p { margin: 0; }
.hn_catalog .hn_unit-suffix, .hn_catalog .hn_unit-rate { color: var(--hn-muted); font-size: 13px; }
.hn_catalog .hn_cart-qty { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.hn_catalog .hn_wc-content .quantity .qty { width: 70px; min-height: 40px; border: 1px solid #d8d2e2; border-radius: 5px; text-align: center; }
.hn_catalog .hn_wc-content .cart_totals,
.hn_catalog .hn_wc-content #order_review { background: var(--hn-purple-soft); border-radius: var(--hn-radius); padding: 20px; }
.hn_catalog .hn_wc-content .cart_totals h2 { font-size: 24px; margin-bottom: 12px; }
.hn_site.hn_catalog .hn_wc-content .button,
.hn_site.hn_catalog .hn_wc-content button.button { border-radius: 6px; background: var(--hn-purple); color: #fff; padding: 10px 16px; font-weight: 600; border: 0; }
.hn_site.hn_catalog .hn_wc-content .checkout-button,
.hn_site.hn_catalog .hn_wc-content #place_order { background: var(--hn-orange); font-size: 16px; padding: 14px 20px; width: 100%; }
.hn_site.hn_catalog .hn_wc-content .checkout-button:hover,
.hn_site.hn_catalog .hn_wc-content #place_order:hover { background: var(--hn-orange-dark); }
.hn_catalog .hn_wc-content input.input-text, .hn_catalog .hn_wc-content select, .hn_catalog .hn_wc-content textarea { min-height: 44px; padding: 10px 12px; border: 1px solid #d8d2e2; border-radius: 5px; background: #fff; width: 100%; }
.hn_catalog .hn_wc-content .form-row label { font-size: 14px; margin-bottom: 6px; display: block; }
.hn_catalog .hn_cart-delivery-note { margin-top: 10px; }
.hn_catalog .hn_shortcuts { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.hn_catalog .hn_shortcut { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--hn-line); border-radius: 6px; font-weight: 600; }
.hn_catalog .hn_shortcut .hn_icon { width: 18px; height: 18px; color: var(--hn-purple); }
.hn_catalog .woocommerce-message, .hn_catalog .woocommerce-info, .hn_catalog .woocommerce-error { border-radius: 6px; margin-bottom: 18px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
	.hn_catalog .hn_title { font-size: 32px; }
}
@media (max-width: 850px) {
	.hn_site.hn_catalog .hn_filter-toggle { display: inline-flex; min-height: 38px; padding: 7px 10px; font-size: 13px; }
	.hn_catalog.hn_site { padding: 4px 16px 24px; }
	.hn_catalog .hn_wc-content table.shop_table_responsive tr td::before { font-weight: 600; }
}
@media (max-width: 600px) {
	.hn_catalog .hn_title { font-size: 26px; }
	.hn_catalog .hn_calc-summary { flex-direction: column; }
	.hn-header-cart span { display: none; }
}

/* Параметры в карточке списка (ширина, толщина) — заметнее названия (FX1, п. 9) */
.hn_catalog .hn_product-card__meta { font-size: 16px; line-height: 1.4; color: var(--hn-ink); font-weight: 600; margin-bottom: 10px; }
.hn_catalog .hn_product-card__title { font-size: 14px; font-weight: 600; color: var(--hn-muted); margin-bottom: 4px; }
@media (max-width: 600px) { .hn_catalog .hn_product-card__meta { font-size: 15px; } }

/* ===================================================================== ТЗ 26.10: состояния, партия, заявка */
.hn_catalog .hn_state { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 5px; font-size: 13px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.hn_catalog .hn_state--stock { background: #e3f5e7; color: #1f7a35; }
.hn_catalog .hn_state--order { background: var(--hn-purple-soft); color: var(--hn-purple-dark); }
.hn_catalog .hn_state--off { background: #fdeaea; color: #c0262d; }
.hn_catalog .hn_product-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.hn_catalog .hn_product-card__prelim { margin-top: 6px; color: var(--hn-muted); font-size: 12px; line-height: 1.4; }
.hn_catalog .hn_product-card--off .hn_product-card__photo,
.hn_catalog .hn_product-card--off .hn_product-card__price,
.hn_catalog .hn_product-card--off .hn_product-card__rate { opacity: .55; }
.hn_catalog .hn_product-card__more { justify-content: center; margin-top: 8px; width: 100%; }
.hn_site.hn_catalog .hn_button--disabled,
.hn_site.hn_catalog .hn_button--disabled:hover,
.hn_site.hn_catalog button.hn_button:disabled { background: #d9d5e0; color: #6f6a7b; border-color: transparent; cursor: not-allowed; }
.hn_site.hn_catalog .hn_button--wide { width: 100%; justify-content: center; }
.hn_catalog .hn_purchase-state { margin-bottom: 10px; }
.hn_catalog .hn_prelim { margin-top: 8px; color: var(--hn-muted); font-size: 13px; line-height: 1.45; }
.hn_catalog .hn_batch { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; margin: 12px 0 10px; font-size: 15px; color: var(--hn-muted); }
.hn_catalog .hn_batch dd { margin: 0; color: var(--hn-ink); font-weight: 700; }
.hn_catalog .hn_min-alert { margin: 0 0 10px; padding: 10px 14px; border-radius: 6px; background: #efe9fb; color: var(--hn-purple-dark); font-size: 14px; line-height: 1.45; }
.hn_catalog .hn_buy-note { margin-top: 8px; }
.hn_catalog .hn_winding { margin-top: 10px; padding: 9px 12px; border-radius: 6px; background: var(--hn-purple-soft); font-size: 14px; }
.hn_catalog .hn_winding .hn_link { text-decoration: none; }
.hn_catalog .hn_choice input:disabled + span { cursor: not-allowed; }
.hn_catalog .hn_choice { position: relative; }
.hn_catalog .hn_choice__note { display: block; margin-top: 3px; color: var(--hn-muted); font-size: 11px; text-align: center; white-space: nowrap; }
.hn_catalog .hn_request-form .hn_input { max-width: 260px; }
.hn_catalog .hn_request-min { margin-top: 6px; }
.hn_catalog .hn_request-min--alert { color: var(--hn-purple-dark); font-weight: 600; }
.hn_catalog .hn_request-help { margin: 12px 0 8px; }
.hn_catalog .hn_request-sum { margin: 4px 0 12px; color: var(--hn-muted); font-size: 14px; }
.hn_catalog .hn_request-sum strong { color: var(--hn-ink); }
.hn_catalog .hn_in-cart { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; background: var(--hn-purple-soft); font-size: 14px; }
.hn_catalog .hn_in-cart .hn_icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--hn-purple); }
.hn_catalog .hn_more-link { margin: 18px 0 0; }
.hn_more-link--product { margin: 18px 0 0; font-size: 16px; font-weight: 700; }
.hn_more-link--product .hn_link { display: inline-flex; align-items: center; gap: 6px; }
.hn_catalog .hn_pickup p { margin: 0 0 8px; }

/* Корзина и оформление заявки */
.hn_catalog .hn_pending { color: var(--hn-purple-dark); font-weight: 600; font-size: 14px; }
.hn_catalog .hn_prelim-label { display: block; color: var(--hn-muted); font-size: 12px; font-weight: 400; }
.hn_catalog .hn_cart-req { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.hn_catalog .hn_cart-req .hn_input { width: 120px; min-height: 38px; }
.hn_catalog .hn_cart-min { margin-top: 4px; }
.hn_catalog .hn_request-totals tr.hn_pending-row td { color: var(--hn-purple-dark); font-size: 14px; background: #efe9fb; }
.hn_catalog .hn_request-totals tr.order-total th { font-weight: 600; }
.hn_catalog .hn_request-totals tr.order-total td { font-size: 22px; font-weight: 800; }
.hn_catalog .hn_review tfoot .hn_pending-row td { color: var(--hn-purple-dark); background: #efe9fb; }
.hn_catalog .hn_checkout-intro { margin: 0 0 16px; color: var(--hn-muted); }
.hn_catalog .hn_checkout-pickup { margin: 16px 0; padding: 14px 16px; border-radius: 8px; background: var(--hn-purple-soft); }
.hn_catalog .hn_consent { margin: 12px 0; }
.hn_catalog .hn_consent label { display: flex; gap: 8px; align-items: flex-start; }
.hn_catalog .hn_thankyou__head { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.hn_catalog .hn_thankyou__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--hn-purple-soft); flex: 0 0 auto; }
.hn_catalog .hn_thankyou__icon svg { width: 38px; height: 38px; fill: none; stroke: var(--hn-purple); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hn_catalog .hn_thankyou__title { margin: 0 0 6px; font-size: 28px; }
.hn_catalog .hn_thankyou__text { margin: 0 0 14px; }
.hn_catalog .hn_thankyou__pickup { margin: 0 0 20px; padding: 14px 16px; border-radius: 8px; background: var(--hn-surface); }
@media (max-width: 600px) {
  .hn_catalog .hn_thankyou__head { align-items: flex-start; }
  .hn_catalog .hn_thankyou__icon { width: 52px; height: 52px; }
  .hn_catalog .hn_thankyou__title { font-size: 22px; }
  .hn_catalog .hn_request-form .hn_input { max-width: none; }
}

.hn_catalog .hn_winding p { margin: 0 0 6px; color: var(--hn-ink); }
.hn_site.hn_catalog .hn_winding__button { padding: 0; border: 0; background: none; color: var(--hn-purple-dark); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hn_catalog .hn_review tfoot .hn_review-note-row td { font-weight: 400; background: transparent; }
.hn_catalog .hn_pickup a { color: var(--hn-purple-dark); text-decoration: underline; }
