/* ============================================================
   Catalog — parts shared by the hub, category archives and product pages:
   breadcrumbs, product card, works / page tile card, chips, pagination, rich (editor) text, FAQ, form dialog.
   Template-specific rules live in hub.css / category.css / product.css.
   ============================================================ */

/* ---------- breadcrumbs ---------- */
/* design components/core/Breadcrumb.jsx (owner 2026-09-29: upper case, one font): body font, upper case, .03em tracking;
   links semibold (navy / white on dark heroes), the current page medium and muted; orange chevrons */
.bm-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font: 500 12.5px/1.4 var(--bm-fb); letter-spacing: .03em; text-transform: uppercase; }
.bm-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.bm-crumbs li:not(:last-child)::after { content: "\203A"; margin: 0 9px; font-weight: 700; color: var(--bm-orange-text); }
.bm-crumbs a { font-weight: 600; color: var(--bm-navy-700); }
.bm-crumbs a:hover { color: var(--bm-orange-text); }
.bm-crumbs [aria-current] { font-weight: 500; color: var(--bm-muted-text); }
.bm-crumbs--invert a { color: #fff; }
.bm-crumbs--invert a:hover { color: var(--bm-orange); }
.bm-crumbs--invert [aria-current] { color: var(--bm-on-dark); }
/* «/» variant on dark heroes (the FAQ handoff design/faq-2026-10-04 §1.2 and the 404 mockup, which share it): the body
   font 13 px / 1.65, regular, no upper case; links white .65 → brand orange on hover, the «/» white .35, the current page
   white .9. The size sits on the nav (em), so a page sets it once (FAQ phones: 12.5 px) and the 44 px touch rows below
   take back exactly their extra height over one line ((1.65em - 44px) / 2 above and below). The 404 (which does not load
   this file) prints the same class and writes the same look out in 404.css, with its own hover (white + orange underline)
   and spacing — keep the two in step. */
.bm-crumbs--slash { font-size: 13px; }
.bm-crumbs--slash ol { font: 400 1em/1.65 var(--bm-fb); letter-spacing: 0; text-transform: none; }
.bm-crumbs--slash li:not(:last-child)::after { content: "/"; margin: 0 10px; font-weight: 400; color: rgba(255, 255, 255, .35); }
.bm-crumbs--slash a { font-weight: 400; color: rgba(255, 255, 255, .65); }
.bm-crumbs--slash a:hover { color: var(--bm-orange); }
.bm-crumbs--slash [aria-current] { font-weight: 400; color: rgba(255, 255, 255, .9); }
/* touch / phones (hub, category / tag heroes, products): each breadcrumb link is a 44 px row; the list's negative
   margins keep the text where it was (a hero that adds its own margin below subtracts the 13 px: hub.css) */
@media (max-width: 767px), (pointer: coarse) {
	.bm-crumbs { margin-block: -13px; }
	.bm-crumbs ol { row-gap: 0; }
	.bm-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
	.bm-crumbs--slash { margin-block: calc((1.65em - 44px) / 2); }
}

/* ---------- product card (category grid; design components/core/ProjectCard.jsx) ---------- */
.bm-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.bm-pcard {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bm-border);
	border-radius: var(--bm-r-md);
	background: #fff;
	box-shadow: 0 1px 2px rgba(27, 30, 46, .05);
	transition: transform 220ms var(--bm-ease-out), box-shadow 220ms var(--bm-ease-out);
}
.bm-pcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 2; height: 3px; background: var(--bm-orange); transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--bm-ease-out); }
.bm-pcard:hover { box-shadow: var(--bm-shadow-md); transform: translateY(-4px); }
.bm-pcard:hover::before { transform: scaleX(1); }
.bm-pcard__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bm-g100); }
.bm-pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 360ms var(--bm-ease-out), opacity 260ms var(--bm-ease-out); }
/* the plan (drawing on white) replaces the photo on hover, shown whole */
.bm-pcard__media .bm-pcard__plan { position: absolute; inset: 0; background: #fff; object-fit: contain; opacity: 0; }
.bm-pcard:hover .bm-pcard__plan { opacity: 1; }
/* no hover on touch screens: the (lazy) plan is never displayed there, so it is never downloaded */
@media (hover: none) { .bm-pcard__media .bm-pcard__plan { display: none; } }
.bm-pcard:hover .bm-pcard__img:only-child { transform: scale(1.05); }
.bm-pcard__body { display: flex; flex: 1; flex-direction: column; gap: 16px; padding: 20px 22px 22px; }
.bm-pcard__title { margin: 0; font: 700 1.22rem/1.2 var(--bm-fd); letter-spacing: -.01em; color: var(--bm-strong); }
.bm-pcard__title a { color: inherit; }
/* the title link covers the whole card */
.bm-pcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.bm-pcard__title a:focus-visible { outline: 0; }
.bm-pcard:has(.bm-pcard__title a:focus-visible) { outline: 2px solid var(--bm-orange); outline-offset: 2px; }
.bm-pcard__specs { display: grid; gap: 9px; margin: 0; font-size: 14px; line-height: 1.4; }
.bm-pcard__specs > div { display: flex; justify-content: space-between; gap: 12px; }
.bm-pcard__specs dt { color: var(--bm-muted-text); }
.bm-pcard__specs dd { margin: 0; font-weight: 600; text-align: right; color: var(--bm-strong); }
.bm-pcard__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--bm-border); }
.bm-pcard__price { display: flex; flex-direction: column; gap: 3px; margin: 0; line-height: 1.1; }
.bm-pcard__price span { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--bm-muted-text); }
.bm-pcard__price b { font: 800 1.35rem/1.05 var(--bm-fd); letter-spacing: -.01em; white-space: nowrap; color: var(--bm-strong); }
.bm-pcard__more { display: inline-flex; flex: none; align-items: center; gap: 7px; margin-left: auto; font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--bm-navy-700); transition: color 150ms ease; }
.bm-pcard__more .bm-ico { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 220ms var(--bm-ease-out); }
.bm-pcard:hover .bm-pcard__more { color: var(--bm-orange-text); }
.bm-pcard:hover .bm-pcard__more .bm-ico { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
	.bm-pcard, .bm-pcard::before, .bm-pcard__media img, .bm-pcard__more .bm-ico { transition: none; }
	.bm-pcard:hover { transform: none; }
}
@media (max-width: 1100px) { .bm-pgrid { gap: 20px; } }
@media (max-width: 767px) {
	.bm-pgrid { gap: 16px; }
	.bm-pcard__body { gap: 14px; padding: 16px 18px 18px; }
	.bm-pcard__price b { font-size: 1.2rem; }
}

/* ---------- works / page tile card (bm_page_card(): the card shell above + ProjectsPage.jsx WorkCard): the page lists
   (works, blog, news) and the product page's «Реалізовані проєкти» band (moved from pages.css 2026-10-07) ---------- */
.bm-pgcard .bm-pcard__media { aspect-ratio: 4 / 3; background: var(--bm-navy-700); }
.bm-pgcard .bm-pcard__body { gap: 12px; }
.bm-pgcard .bm-pcard__title { font-weight: 600; font-size: 1.15rem; line-height: 1.25; }
.bm-pgcard .bm-pcard__foot { align-items: center; }
.bm-pgcard:hover .bm-pcard__img { transform: scale(1.05); }
.bm-pgcard__badge { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 2px; background: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--bm-strong); }
.bm-pgcard__text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--bm-text); }
.bm-pgcard__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--bm-muted-text); }
.bm-pgcard__meta > span, .bm-pgcard__meta > time { display: inline-flex; align-items: center; gap: 6px; }
.bm-pgcard__meta .bm-ico { width: 15px; height: 15px; color: var(--bm-orange); }
.bm-pgcard__go { display: grid; flex: none; place-items: center; width: 34px; height: 34px; margin-left: auto; border-radius: 50%; background: var(--bm-g100); color: var(--bm-navy-700); transition: background-color 220ms var(--bm-ease-out), color 220ms var(--bm-ease-out); }
.bm-pgcard__go .bm-ico { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 220ms var(--bm-ease-out); }
.bm-pgcard:hover .bm-pgcard__go { background: var(--bm-orange); color: #fff; }
.bm-pgcard:hover .bm-pgcard__go .bm-ico { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) {
	.bm-pgcard__go, .bm-pgcard__go .bm-ico { transition: none; }
	.bm-pgcard:hover .bm-pcard__img { transform: none; }
}

/* ---------- chips: the category model-type filter (template-parts/catalog/filter-chips.php, category.css lays out the
   row) and the product page's models row «Інші моделі» (product.css); moved from category.css 2026-10-07 ---------- */
.bm-cat-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 18px; border: 1px solid var(--bm-border); border-radius: var(--bm-r-md); background: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--bm-strong); text-decoration: none; transition: border-color 150ms var(--bm-ease-out), color 150ms var(--bm-ease-out), background-color 150ms var(--bm-ease-out); }
.bm-cat-chip:hover { border-color: var(--bm-orange); color: var(--bm-orange-text); }
.bm-cat-chip.is-active { border-color: var(--bm-orange-fill); background: var(--bm-orange-fill); color: #fff; }
.bm-cat-chip.is-active:hover { color: #fff; }
@media (max-width: 767px), (pointer: coarse) {
	.bm-cat-chip { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.bm-cat-chip { transition: none; }
}
@media (max-width: 767px) {
	.bm-cat-chip { padding: 8px 14px; }
}

/* ---------- pagination (the_posts_pagination) ---------- */
.bm-pager { margin-top: 40px; }
.bm-pager .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bm-pager .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--bm-border); border-radius: var(--bm-r); font-size: 14px; font-weight: 700; color: var(--bm-strong); }
.bm-pager a.page-numbers:hover { border-color: var(--bm-orange); color: var(--bm-orange-text); }
.bm-pager .current { border-color: var(--bm-orange-fill); background: var(--bm-orange-fill); color: #fff; }
.bm-pager .dots { border-color: transparent; }

/* ---------- rich text (term descriptions, SEO sections, product texts) ---------- */
.bm-rich { font-size: 15.5px; line-height: 1.7; }
.bm-rich > :last-child { margin-bottom: 0; }
.bm-rich h2, .bm-rich h3, .bm-rich h4 { margin: 1.4em 0 .6em; line-height: 1.25; }
.bm-rich h2 { font-size: 1.6rem; }
.bm-rich h3 { font-size: 1.3rem; }
.bm-rich h4 { font-size: 1.1rem; }
.bm-rich > :is(h2, h3, h4):first-child { margin-top: 0; }
.bm-rich ul, .bm-rich ol { margin: 0 0 1em; padding-left: 1.3em; }
.bm-rich ul { list-style: disc; }
.bm-rich ol { list-style: decimal; }
.bm-rich li { margin-bottom: .35em; }
.bm-rich li::marker { color: var(--bm-orange); }
.bm-rich a { text-decoration: underline; text-underline-offset: 2px; }
.bm-rich strong, .bm-rich b { color: var(--bm-strong); }
.bm-rich img { height: auto; border-radius: var(--bm-r); }
.bm-rich table { width: 100%; margin: 0 0 1em; border-collapse: collapse; font-size: 14px; }
.bm-rich :is(th, td) { padding: 9px 12px; border: 1px solid var(--bm-border); text-align: left; vertical-align: top; }
.bm-rich th { background: var(--bm-g50); color: var(--bm-strong); }

/* ---------- FAQ (<details>) ---------- */
.bm-faq__title { margin: 0 0 20px; font: 800 24px/1.2 var(--bm-fd); letter-spacing: -.01em; text-transform: uppercase; color: var(--bm-strong); }
.bm-faq__list { border-top: 1px solid var(--bm-border); }
.bm-faq__item { border-bottom: 1px solid var(--bm-border); }
.bm-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; list-style: none; cursor: pointer; font: 700 16px/1.4 var(--bm-fd); color: var(--bm-strong); }
.bm-faq__item summary::-webkit-details-marker { display: none; }
.bm-faq__item summary:hover { color: var(--bm-orange-text); }
.bm-faq__chev { width: 20px; height: 20px; color: var(--bm-orange); stroke-width: 2.2; transition: transform 220ms var(--bm-ease-out); }
.bm-faq__item[open] .bm-faq__chev { transform: rotate(180deg); }
.bm-faq__a { padding: 0 0 20px; }
@media (max-width: 767px) {
	.bm-faq__title { font-size: 20px; }
	.bm-faq__item summary { padding: 15px 0; font-size: 15px; }
}

/* ---------- form dialog (<dialog> + CF7) and the upload field: moved to assets/css/forms.css (forms unification
   2026-10-04, unchanged; forms.css loads before this file wherever a window can open). ---------- */

/* ---------- the old calc dialog look (.bm-dialog--calc, the «Інфоцентр» prototype window of 2026-10-03): removed with the
   forms unification (2026-10-04, plan §3.4) — every window is the component's .bm-sheet (assets/css/forms.css) and no
   template prints the class any more (the pre-round file: scratchpad unify/a1/orig/catalog.css.orig). ---------- */

/* ---------- form sheet (.bm-sheet) and its field style (.bm-sheet-form): moved to assets/css/forms.css (forms
   unification 2026-10-04, unchanged). ---------- */

/* ---------- owner answer 187 «а» (2026-11-10): the texts the old site set «по ширине» inline (style="text-align: justify" in the
   product tabs and descriptions of 38 products, the texts of 10 works: 641 places) align left on phones; wider screens as before. ---------- */
@media (max-width: 767px) {
	[style*="text-align: justify"], [style*="text-align:justify"] { text-align: left !important; }
}
