/*
 * B2B search — redesigned filter bar.
 * Visual reference (Figma):
 *   filter form : node 3995-161079
 *   dropdown    : node 4011-167637  (default / hover / selected trigger states)
 * Scoped under .tior-b2b-filter so it never leaks into the rest of the (Bootstrap) app.
 */

/* TEMP HIDDEN 2026-07-28 — quick-search тимчасово приховано з візуалу.
   Елемент лишається в DOM, щоб JS-обробники (#quickSearch / #quickSearchClear)
   не ламалися. Відновити — прибрати цей блок. */
.tior-b2b-filter .tfb-search-outer,
.tior-b2b-filter .tfb-search-group{
	display: none !important;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600&family=JetBrains+Mono:wght@700&display=swap');

/* ---- Page wrapper (scoped beige background per TIOR_Responsive_Breakpoints.md) ---- */
.tior-search-page{
	background: var(--bg-page);
	min-height: 100vh;
	width: 100%;
	padding: 24px 0;
	box-sizing: border-box;
}

.tior-search-page__inner{
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
}

.tior-search-page__title{
	font: 600 32px/40px 'Outfit', system-ui, -apple-system, sans-serif;
	color: #0e131f;
	margin: 0 0 16px;
	letter-spacing: -0.01em;
	text-align: center;
}

/* Mobile-only sort icon (in .tfb-sort .tfb-dd-trigger). Hidden on desktop. */
.tior-b2b-filter .tfb-sort-icon{
	display: none;
}

/* Mobile-only rozmiar add-btn (cluster) + spacer. Hidden on desktop.
   Cluster сам по собі — просто flex-обгортка з display:inline на desktop. */
.tior-b2b-filter .tfb-rozmiar-cluster{
	display: contents; /* на desktop не змінює layout — size1/+/size2 залишаються in-place */
}
.tior-b2b-filter .tfb-rozmiar-add-btn,
.tior-b2b-filter .tfb-rozmiar-grid-spacer{
	display: none;
}

.tior-b2b-filter{
--tfb-bg: #fafafa;
--text-placeholder: #9BA3AF;
--tfb-card-border: #ffffff;
--tfb-border: rgba(107, 114, 128, 0.4);
--tfb-text: #323744;
--tfb-muted: #6b7280;
--tfb-accent: var(--accent-primary, #005F6E); /* прототипний --accent-primary */
--tfb-chip-border: rgba(0, 0, 0, 0.2);
--tfb-radius-lg: 8px;
--tfb-radius-sm: 3px;
font-family: 'Outfit', system-ui, -apple-system, sans-serif;
margin: 18px 0 0; /* trailing gap is now on .tfb-card below — form-level margin sat AFTER the entire form (including #tfbResult child), so it created a footer gap, not a filters→results gap */
--color-bg-chip:            #ddd8d4;
}

.tior-b2b-filter *{
box-sizing: border-box;
}

/* Kill lingering UA button focus ring after a mouse press (Chrome/Safari retain
   :focus after click, which paints a black outline around dropdowns/toggles
   inside the filters card). Keyboard-driven :focus-visible still shows the
   accent outline so keyboard a11y stays intact. */
.tior-b2b-filter button:focus:not(:focus-visible){
outline: none;
box-shadow: none;
}
.tior-b2b-filter button:focus-visible{
outline: 2px solid var(--tfb-accent);
outline-offset: 2px;
}

/* ---- card ---- */

.tfb-card{
	background: var(--tfb-bg);
	border: 1px solid var(--tfb-card-border);
	border-radius: var(--tfb-radius-lg);
	box-shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 0 0 1px rgba(17, 24, 39, .03);

	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 1280px;
	margin: 0 auto;
}

/* Meta strip between the filter card and the results list.
   Hidden by default (`style="display:none"`), so putting the results gap on
   `#tfbResult` keeps 16px between card and results regardless of meta state.
   Values mirror prototype /?v=44 .results-filters-card (gap:8px, padding-bottom:16px). */
.tfb-meta{
	margin-bottom: 32px;
	max-width: 1280px;
}

/* 16px gap to the first result — always present, whether meta is shown or not. */
#tfbResult{
	margin-top: 16px;
}

/* Kill the legacy .b2b-results{margin-top:-20px} from b2b_results.css — the
   negative margin collapses through the plain #tfbResult wrapper (no border/
   padding) and eats 20px of the intended gap to the first result row.
   Scoped to #tfbResult so legacy consumers of .b2b-results elsewhere keep
   their original offset. */
#tfbResult > .b2b-results{
	margin-top: 0;
}

/* ---- top row : search + show button + ean toggle ---- */

.tfb-top{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;

}

.tfb-search-group{
display: flex;
align-items: center;
gap: 12px;
flex: 1 1 auto;
min-width: 0;
}

.tfb-search{
position: relative;
width: 374px;
max-width: 100%;
}

.tfb-search .tfb-search-ic{
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
color: var(--tfb-muted);
pointer-events: none;
display: flex;
}

.tfb-search input{
width: 100%;
height: 36px;
background: var(--tfb-bg);
border: .689px solid var(--tfb-border);
border-radius: 8px;
padding: 4px 12px 4px 36px;
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
transition: border-color .15s;
}

.tfb-search input::placeholder{
color: var(--text-placeholder);
opacity: 1;
}

.tfb-search input:focus{
outline: none;
border-color: var(--tfb-accent);
}

/* × clear button inside the quick-search input — same visual language as
   .tfb-dd-clear (accent color, tiny cross SVG). Hidden by default; JS toggles
   .is-visible once #quickSearch has any text. Sits at the right edge of the
   input via `right: 12px` — works both for the fixed 374px desktop input and
   the full-row .is-expanded overlay on mobile scope. */
.tfb-search .tfb-search-clear{
	position: absolute;
	right: 12px;
	left: auto;
	top: 50%;
	transform: translateY(-50%);
	display: none;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tfb-accent);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	z-index: 62;
}
.tfb-search.is-expanded .tfb-search-clear.is-visible{
	display: inline-flex;
}
.tfb-search .tfb-search-clear:hover{
	color: var(--accent-pressed, #024b57);
}

/* 2026-08-20: перейшли з outline на filled per DS §9.1 --primary. Клас-назва
   `.tfb-btn-outline` — legacy, не перейменовуємо щоб не чіпати FTL/JS refs. */
.tfb-btn-outline{
height: 36px;
width: 150px;
flex: 0 0 auto;
display: inline-flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 4px;
background: var(--tfb-accent);
color: var(--text-inverted, #fff);
font: 500 18px/20px 'Outfit', sans-serif;
white-space: nowrap;
cursor: pointer;
transition: background .15s, filter .15s, transform .1s, opacity .15s;
}

.tfb-btn-outline:hover{
filter: brightness(1.04);
box-shadow: none;
}

.tfb-btn-outline:active{
background: var(--accent-pressed, #024b57);
transform: scale(.985);
filter: none;
box-shadow: none;
}

.tfb-btn-outline:disabled{
opacity: .45;
cursor: not-allowed;
filter: none;
transform: none;
}

.tfb-spin{
display: inline-block;
width: 14px;
height: 14px;
border: 2px solid currentColor;
border-top-color: transparent;
border-radius: 50%;
vertical-align: -2px;
margin-right: 6px;
animation: tfb-spin .7s linear infinite;
}

@keyframes tfb-spin{
to{
transform: rotate(360deg);
}
}

.tfb-toggle{
display: flex;
align-items: center;
gap: 8px;
padding: 4px 0 4px 12px;
flex: 0 0 auto;
}

.tfb-toggle > span{
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
white-space: nowrap;
}

.tfb-switch{
position: relative;
display: inline-block;
width: 34px;
height: 20px;
flex: 0 0 auto;
}

.tfb-switch input{
position: absolute;
inset: 0;
opacity: 0;
margin: 0;
cursor: pointer;
z-index: 2;
}

.tfb-switch .tfb-track{
position: absolute;
inset: 0;
border-radius: 24px;
background: #c9ccd2;
transition: background .15s;
}

.tfb-switch .tfb-knob{
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
transition: left .15s;
}

.tfb-switch input:checked ~ .tfb-track{
background: var(--tfb-accent);
}

.tfb-switch input:checked ~ .tfb-knob{
left: 16px;
}

/* ---- bottom row : triggers (left) + sort (right) ---- */

.tfb-bottom{
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
/* nowrap on the row axis so "Sort by" stays pinned to the right regardless of
   how many trigger rows the left column unfolds. The Tablet / Mobile @media
   blocks at the end of this file switch .tfb-bottom to a column layout, so
   this doesn't cause horizontal overflow on narrow viewports. */
flex-wrap: nowrap;
}

.tfb-bottom-left{
display: flex;
flex-direction: column;
gap: 14px;
min-width: 0;
flex: 1 1 auto;
}

.tfb-triggers{
display: flex;
align-items: center;
gap: 4px;
flex-wrap: wrap;
}

/* Forces a new row inside .tfb-triggers without needing two flex containers.
   Used between the "default filters" group and the "other selects" group. */
.tfb-triggers-break{
flex-basis: 100%;
height: 0;
}

/* Figma node 4548:275995 — "Więcej filtrów" toggle.
   Text-link styling: Outfit 16 / 18, grey-muted, underlined label row.
   Chevron rotates 180° when expanded. */
.tfb-more-btn{
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 12px;
border: 0;
background: transparent;
color: var(--tfb-muted);
cursor: pointer;
}

.tfb-more-btn__label{
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-muted);
border-bottom: 0.5px solid #000;
padding-bottom: 1px;
white-space: nowrap;
}

.tfb-more-btn .tfb-chev{
transition: transform .15s ease;
color: var(--tfb-muted);
}

.tfb-more-btn[aria-expanded="true"] .tfb-chev{
transform: rotate(180deg);
}

/* Collapsible block holding rows 2 + 3 inside .tfb-triggers.
   Becomes a full-width flex sub-container so its children still wrap as rows. */
.tfb-collapsible{
flex-basis: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
margin-top: 4px;
}

/* Author rule wins over UA's [hidden]{display:none} once we use display:flex
   on .tfb-collapsible, so spell it out for the hidden state. */
.tfb-collapsible[hidden]{
display: none;
}

/* ---- dropdown component (matches Figma Dropdown/Trigger) ---- */

.tfb-dd{
position: relative;
}

.tfb-dd-trigger{
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
height: 26px;
border: .5px solid var(--tfb-border);
border-radius: var(--tfb-radius-sm);
background: #fff;
padding: 4px 12px;
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
white-space: nowrap;
cursor: pointer;
transition: border-color .15s, color .15s, box-shadow .15s;
}

.tfb-dd-trigger .tfb-dd-label{
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex: 1 1 auto;
}

.tfb-dd-trigger .tfb-chev{
color: var(--tfb-muted);
flex: 0 0 auto;
transition: transform .15s, color .15s;
}

/* hover state */
.tfb-dd-trigger:hover{
border-color: var(--tfb-muted);
box-shadow: 0 1px 2px rgba(17, 24, 39, .08);
}

.tfb-dd.is-open > .tfb-dd-trigger{
border-color: var(--tfb-accent);
}

.tfb-dd.is-open > .tfb-dd-trigger .tfb-chev{
transform: rotate(180deg);
color: var(--tfb-accent);
}

/* selected state — label stays at default (e.g. "Sezon"), but the whole
   trigger paints accent: border, label colour, chev → hidden, × → shown. */
.tfb-dd.is-selected > .tfb-dd-trigger{
	border-color: var(--tfb-accent);
	color: var(--tfb-accent);
	font-weight: 500;
}

.tfb-dd.is-selected > .tfb-dd-trigger .tfb-dd-label{
	color: var(--tfb-accent);
}

.tfb-dd.is-selected > .tfb-dd-trigger .tfb-chev{
	display: none;
}

/* × clear button — inline flex sibling of chev inside the trigger. Same slot,
   same width, so hiding chev + showing × doesn't shift the label. */
.tfb-dd-trigger .tfb-dd-clear{
	display: none;
	width: 14px;
	height: 14px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tfb-accent);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	transition: color 120ms ease;
}
.tfb-dd.is-selected > .tfb-dd-trigger .tfb-dd-clear{
	display: inline-flex;
}
.tfb-dd-trigger .tfb-dd-clear:hover{
	color: var(--accent-pressed, #024b57);
}

/* Sort trigger keeps its chev (needed to reveal current sort — not a filter). */
.tfb-sort .tfb-dd.is-selected > .tfb-dd-trigger .tfb-chev{
	display: inline-flex;
}
.tfb-sort .tfb-dd .tfb-dd-trigger .tfb-dd-clear{
	display: none !important;
}

.tfb-dd-menu{
position: absolute;
z-index: 60;
/* Overlap 1px onto the trigger's transparent bottom border so the accent
   outline reads as one continuous line — no visible seam between trigger
   and overlay in the focused state (designer TZ 2026-08-03, A4). */
top: calc(100% - 1px);
left: 0;
/* Menu tracks trigger width (parent .tfb-dd is position:relative and matches
   the trigger's outer box) — parity with home page dropdown (B1). */
width: 100%;
min-width: 100%;
max-width: none;
background: #fff;
border: 1px solid var(--tfb-accent);
border-top: 0;
border-radius: 0 0 6px 6px;
box-shadow: 0 10px 28px rgba(17, 24, 39, .16);
padding: 0;
display: none;
/* Multiple of the 40px option row so the scroll viewport never leaves a
   half-row visible top/bottom (A5). */
max-height: 400px;
overflow: auto;
}

/* Trigger merges seamlessly with the open menu — drops the shared bottom border
   and squares off the bottom corners so the two look like one shape. */
.tfb-dd.is-open > .tfb-dd-trigger{
	border-bottom-color: transparent;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	position: relative;
	z-index: 61;
}

.tfb-dd-menu.tfb-menu-right{
left: auto;
right: 0;
}

.tfb-dd.is-open > .tfb-dd-menu{
display: block;
}

/* Option row inside the open dropdown — matches prototype .dd-item:
   40px tall, Outfit body 16px, radio dot right (via `order` below).
   Explicit width:100% + box-sizing guarantees border-bottom spans the entire
   row edge-to-edge on every dropdown, including Rozmiar (A3). */
.tfb-opt{
display: flex;
align-items: center;
gap: 8px;
width: 100%;
box-sizing: border-box;
text-align: left;
border: 0;
border-bottom: 1px solid var(--color-border-surface, #e5e7eb);
background: transparent;
border-radius: 0;
padding: 0 12px;
min-height: 40px;
height: 40px;
font: 400 16px/1 'Outfit', system-ui, -apple-system, sans-serif;
color: var(--tfb-text);
white-space: nowrap;
cursor: pointer;
}

/* Прототип v44 `.dd-item`: label ліворуч, optional count середина, radio ПРАВОРУЧ.
   Наш DOM: [.tfb-opt-radio][.tfb-opt-text](.tfb-homologation-brand-count) — CSS
   переставляє порядок через `order`. Count є тільки в homologation. */
.tfb-opt-text{
order: 1;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.tfb-opt-radio{
order: 3;
}

.tfb-opt:last-child{ border-bottom: 0; }

.tfb-opt-radio{
flex-shrink: 0;
position: relative;
width: 18px;
height: 18px;
border: 1.5px solid var(--color-border-default, #eaeaea);
border-radius: 50%;
background: #fff;
transition: border-color 140ms ease, background-color 140ms ease;
}

/* hover — mirror home page dropdown (var(--hover-grey)) so both surfaces share
   the same hover state (B3 parity). Falls back to prototype bg-page if the
   token isn't defined in this file's scope. */
.tfb-opt:hover{
background: var(--hover-grey, var(--color-bg-page, #f1ebe2));
}

/* selected — prototype v44 `.dd-item.is-selected`: teal filled radio +
   accent label colour, row bg unchanged (no grey wash). */
.tfb-opt.is-active{
background: transparent;
color: var(--tfb-accent);
}

.tfb-opt.is-active .tfb-opt-radio{
border-color: var(--tfb-accent);
background-color: var(--tfb-accent);
}

.tfb-opt.is-active .tfb-opt-radio::after{
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 7px;
height: 7px;
border-radius: 50%;
background-color: #fff;
transform: translate(-50%, -50%);
}

/* Search-as-you-type row at the top of every dropdown menu.
   Sticky so it stays visible while scrolling long option lists.
   Row height + vertical padding match .tfb-opt (40px), icon 24px + text 16/18
   per designer TZ 2026-08-03 (A2) — reads as another row at the top of the
   list, borderless (parity with home page). */
.tfb-dd-search-row,
.tfb-dd-input-row{
position: sticky;
top: 0;
display: flex;
align-items: center;
gap: 8px;
background: #fff;
padding: 0 12px;
min-height: 40px;
border-bottom: 1px solid var(--color-border-surface, #e5e7eb);
z-index: 1;
}

.tfb-dd-search-row > *,
.tfb-dd-input-row > *{
box-sizing: border-box;
}

.tfb-dd-search-row .tfb-dd-search-icon,
.tfb-dd-input-row .tfb-dd-search-icon{
color: var(--tfb-muted);
width: 24px;
height: 24px;
flex-shrink: 0;
pointer-events: none;
}

.tfb-dd-search-input,
.tfb-dd-text-input{
flex: 1;
min-width: 0;
width: 100%;
border: 0;
background: transparent;
padding: 0;
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
outline: none;
}

.tfb-dd-search-input::placeholder,
.tfb-dd-text-input::placeholder{
color: var(--text-placeholder, #9BA3AF);
}

.tfb-opt[hidden]{ display: none !important; }

/* Figma node 4548:275842 — section header inside a multi-section dropdown
   (e.g. "Opór" / "Mokra" / "Hałas" inside the consolidated EU label).
   Same shape as a Dropdown/Item but smaller mono label + no radio dot. */
.tfb-dd-section{
display: flex;
align-items: center;
min-height: 24px;
padding: 4px 12px;
background: #fff;
border-bottom: 0.2px solid var(--tfb-border);
font: 400 12px/15.84px 'JetBrains Mono', ui-monospace, monospace;
color: var(--tfb-muted);
pointer-events: none;
user-select: none;
}

/* ---- sort menu : one row per field with ↑ / ↓ arrows ---- */
.tfb-sort-menu{
min-width: 200px;
max-height: none;
height: auto;
overflow: visible;
}

/* "Sort by EAN" row is only available while the Pokaż EAN toggle is on.
   Selectors include .tfb-sort-row so they outrank the base .tfb-sort-row rule below. */
.tfb-sort-row.tfb-sort-ean{
display: none;
}
.tior-b2b-filter.tfb-show-ean .tfb-sort-row.tfb-sort-ean{
display: flex;
}

.tfb-sort-row{
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 4px 8px 4px 12px;
min-height: 40px;
border-bottom: 1px solid var(--color-border-surface, #e5e7eb);
transition: background 100ms ease, color 100ms ease;
}

.tfb-sort-row:last-child{
border-bottom: 0;
}

.tfb-sort-row:hover{
background: var(--color-bg-page, #f1ebe2);
}

/* Row-level active state: highlight the entire row (name+arrows) when either
   ↑ or ↓ arrow is active, so the current sort reads at a glance. */
.tfb-sort-row:has(.tfb-sort-arr.is-active){
color: var(--tfb-accent);
}

.tfb-sort-row:has(.tfb-sort-arr.is-active) .tfb-sort-name{
color: var(--tfb-accent);
font-weight: 500;
}

.tfb-sort-name{
font: 400 16px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
white-space: nowrap;
transition: color 100ms ease, font-weight 100ms ease;
}

.tfb-sort-arrows{
display: inline-flex;
gap: 2px;
flex: 0 0 auto;
}

.tfb-sort-arr{
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
min-width: 26px;
min-height: 0;
height: 26px;
padding: 0;
border: 0;
border-radius: 4px;
background: transparent;
font: 600 15px/1 'Outfit', sans-serif;
color: var(--tfb-muted);
transition: background 100ms ease, color 100ms ease;
}

.tfb-sort-arr:hover{
background: rgba(0, 95, 110, 0.08);
color: var(--tfb-accent);
}

.tfb-sort-arr.is-active{
background: var(--tfb-accent);
color: #fff;
font-weight: 600;
}

/* Guest-only sort panel additions — mirror prototype v44 `.sort-locked-header`
   + `.sort-item.is-disabled` + `.sort-login-cta-wrap` block. */
.tfb-sort-locked-header{
display: flex;
align-items: center;
gap: 6px;
height: 36px;
padding: 0 12px;
font: 700 13px/1 'Outfit', sans-serif;
color: var(--tfb-muted);
background: #f5f2ed;
border-bottom: 1px solid var(--color-border-surface, #e5e7eb);
border-top: 1px solid var(--color-border-surface, #e5e7eb);
}

.tfb-sort-row.is-disabled{
cursor: default;
color: var(--tfb-muted);
background: #f5f2ed;
}
.tfb-sort-row.is-disabled:hover{
background: #f5f2ed;
color: var(--tfb-muted);
}
.tfb-sort-row.is-disabled .tfb-sort-name{
color: var(--tfb-muted);
font-weight: 400;
}

.tfb-sort-login-wrap{
padding: 8px 12px;
background: #f5f2ed;
}

.tfb-sort-login-cta{
display: block;
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
border: 0;
border-radius: var(--tfb-radius-sm, 3px);
background: var(--tfb-accent);
color: #fffaf2;
font: 500 15px/40px 'Outfit', sans-serif;
text-decoration: none;
cursor: pointer;
transition: background 140ms ease;
}

.tfb-sort-login-cta:hover{
background: var(--accent-pressed, #024b57);
color: #fffaf2;
text-decoration: none;
}

/* ---- multi-field panel (Indeksy / Więcej filtrów) ---- */

.tfb-panel{
position: absolute;
z-index: 60;
top: calc(100% + 4px);
left: 0;
max-width: calc(100vw - 24px);
box-sizing: border-box;
background: #fff;
border: .5px solid var(--tfb-border);
border-radius: 8px;
box-shadow: 0 10px 28px rgba(17, 24, 39, .16);
padding: 16px;
display: none;
}

.tfb-panel.tfb-panel-right{
left: auto;
right: 0;
}

.tfb-dd.is-open > .tfb-panel{
display: block;
}

.tfb-grid2{
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}

.tfb-field{
display: flex;
flex-direction: column;
gap: 5px;
margin-bottom: 12px;
}

/* Nested @fdd (e.g. Indexes inner load/speed) should fill the tfb-field column. */
.tfb-field > .tfb-dd{
width: 100%;
}

/* Match the .tfb-control height so the inner @fdd trigger matches the field layout. */
.tfb-field > .tfb-dd > .tfb-dd-trigger{
height: 34px;
}

.tfb-field:last-of-type{
margin-bottom: 0;
}

.tfb-field > label{
font: 400 13px/15px 'Outfit', sans-serif;
color: var(--tfb-muted);
}

.tfb-control{
height: 34px;
width: 100%;
border: .5px solid var(--tfb-border);
border-radius: 6px;
background: #fff;
padding: 4px 10px;
font: 400 15px/18px 'Outfit', sans-serif;
color: var(--tfb-text);
}

.tfb-control:focus{
outline: none;
border-color: var(--tfb-accent);
}

.tfb-control[disabled]{
background: #f4f5f7;
color: var(--tfb-muted);
}

.tfb-panel-actions{
display: flex;
align-items: center;
justify-content: flex-end;
gap: 12px;
margin-top: 14px;
}

.tfb-checks{
display: flex;
flex-wrap: wrap;
gap: 6px 10px;
margin-top: 10px;
}

/* Row 3 of the trigger area — sits inside .tfb-triggers, spans the full row
   so the toggles read as a band of inline checkboxes rather than a panel. */
.tfb-checks-inline{
	flex-basis: 100%;
	margin: 0;
	padding: 2px 0;
	gap: 8px;
}

.tfb-check{
display: inline-flex;
align-items: center;
gap: 6px;
font: 400 13px/18px 'Outfit', sans-serif;
color: var(--tfb-text, #1a1a1a);
cursor: pointer;
user-select: none;
}

.tfb-check input{
width: 14px;
height: 14px;
accent-color: var(--tfb-accent);
cursor: pointer;
}

/* Row 3 boolean toggles render as chip pills (mirrors the home/new .toggle look):
   the native checkbox is hidden, the label becomes a pill that flips background
   colour when :has(input:checked). */
.tfb-checks-inline .tfb-check{
display: inline-flex;
align-items: center;
padding: 6px 12px;
background: var(--color-bg-chip);
border: 1px solid var(--tfb-chip-border);
border-radius: 3px;
transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.tfb-checks-inline .tfb-check input{
position: absolute;
opacity: 0;
width: 0;
height: 0;
pointer-events: none;
}

.tfb-checks-inline .tfb-check:has(input:checked){
background: var(--tfb-accent);
border-color: var(--tfb-accent);
color: #fff;
}

.tfb-link{
border: 0;
background: transparent;
color: var(--tfb-muted);
font: 400 15px/18px 'Outfit', sans-serif;
cursor: pointer;
}

.tfb-link:hover{
color: var(--tfb-accent);
text-decoration: underline;
}

.tfb-btn-solid{
border: 0;
border-radius: 4px;
background: var(--tfb-accent);
color: #fff;
padding: 7px 18px;
font: 400 15px/18px 'Outfit', sans-serif;
cursor: pointer;
transition: filter .15s;
}

.tfb-btn-solid:hover{
filter: brightness(.94);
}

/* ---- results meta : count + chips + clear all ----
   Matches prototype /?v=44 layout: count on its own line (top), chips + Clear-all
   share the second line as an inline flow. Achieved via flex-wrap where the
   count is forced to a full-width line and the rest wraps below it. */

.tfb-meta{
	display: flex;
	align-items: center;
	column-gap: 12px;
	row-gap: 8px;
	
	flex-wrap: wrap;
}

/* results-count style from prototype (index.html:526): 14px muted text. */
.tfb-count{
flex-basis: 100%;
color: var(--tfb-muted);
font: 400 14px/1.4 'Outfit', sans-serif;
white-space: nowrap;
}

/* 29.10 (прототип 29.10) · чипи в один рядок, що гортається вбік, на всіх
   ширинах; «Wyczyść filtry» стоїть одразу за ними (наступний сусід у рядку). */
.tfb-chips{
display: flex;
align-items: center;
gap: 4px;
flex-wrap: nowrap;
flex: 0 1 auto;
min-width: 0;
overflow-x: auto;
scrollbar-width: none;
}
.tfb-chips::-webkit-scrollbar{ display: none; }
.tfb-meta__row--chips > .tfb-clear{ flex: none; }
/* 29.10 · чип етикетки ЄС: іконка параметра + клас, як бейдж у картці. */
.tfb-chip--eu .eu-icon{ width: 16px; height: 16px; flex: none; }

/* Applied filter chips — visual match with prototype `.filter-pill`
   (index.html:527-537). Regular weight, no uppercase.
   30.10 (прототип 30.10, if-res-chip-30-10) · Inforeifen: чип — заливка без
   рамки (бірюзовий тінт, темний бірюзовий текст), як в OponyToMy темна
   заливка. Логіка однакова в обох брендах: чип = заливка (стан), «Wyczyść
   filtry» = рамка без заливки (дія). Раніше в IF і чип, і кнопка мали
   акцентну рамку — кнопка читалась як ще один чип. Рамка лишається
   прозорою, щоб висота чипа не змінилась. OP перебиває oponytomy/overrides.css. */
.tfb-chip{
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid transparent;
border-radius: 100px;
/* DS §9.20 — спільне для брендів: радіус 100px, padding 6px 14px. */
padding: 6px 14px;
background: var(--bg-accent-tint-medium);
font: 400 14px/16px 'JetBrains Mono', 'Courier New', monospace;
color: var(--accent-pressed, var(--tfb-accent));
white-space: nowrap;
flex: none;
}

.tfb-chip button{
display: inline-flex;
align-items: center;
border: 0;
background: transparent;
padding: 0;
color: var(--accent-pressed, var(--tfb-accent));
font-size: 14px;
line-height: 1;
cursor: pointer;
transition: color 120ms ease;
}

.tfb-chip button:hover{
color: var(--accent-pressed, #024b57);
}

/* 28.10 (прототип 28.10, рішення Ляни) · «Wyczyść filtr(y)» — КНОПКА, а не
   текст-лінк: ним користуються часто, а лінк губився. Стоїть у рядку чипів
   одразу після них. Вигляд — другорядна кнопка бренду (--btn-cta-secondary-*:
   OP нейтральна обведена, IF акцентна 1.5px), висота чипа рядка (36px), без
   «×» — щоб не читалась як ще один чип. Виняток із §9.13 для цього місця.
   Висота = висоті НАШОГО чипа (.tfb-chip, §9.20: 6px + рядок 16px + рамка),
   а не 36px прототипу: у прототипі й чипи 36, у нас за ДС нижчі, і кнопка
   вища за чипи поруч виглядала б чужою (рішення користувачки 28.10). Рамка
   IF 1.5px з'їдає свій надлишок із вертикального падінгу.
   Поведінка та сама: скидає всі параметри, зокрема розмір.
   Зона тапу тепер — сама кнопка, тож компенсаційні padding/margin (§9.2a)
   прибрані. */
.tfb-clear{
display: inline-flex;
align-items: center;
padding: calc(7px - var(--btn-cta-secondary-border-width, 1px)) var(--space-lg, 16px);
margin: 0;
box-sizing: border-box;
border: var(--btn-cta-secondary-border-width, 1px) solid var(--btn-cta-secondary-border-color, currentColor);
border-radius: var(--radius-pill, 100px);
background: transparent;
color: var(--btn-cta-secondary-color, var(--text-on-light));
font: 500 16px/16px var(--font-body, 'Outfit'), sans-serif;
cursor: pointer;
white-space: nowrap;
align-self: center;
}
.tfb-clear:focus-visible{ outline: none; box-shadow: var(--focus-ring); }
.tfb-clear:hover{
text-decoration: none;
background: var(--bg-ghost-hover);
}

/* ---- sort (right side) ---- */

.tfb-sort{
display: flex;
align-items: center;
gap: 10px;
flex: 0 0 auto;
}

.tfb-sort > span{
color: var(--tfb-muted);
font: 400 16px/18px 'Outfit', sans-serif;
white-space: nowrap;
}

/* Sort trigger is always "picked" (default sort applies immediately), so paint
   it in accent so it reads as an active state at all times. Matches prototype
   #sortTrigger.is-active pattern. */
.tior-b2b-filter .tfb-sort .tfb-dd-trigger,
.tior-b2b-filter .tfb-sort .tfb-dd-trigger .tfb-dd-label,
.tior-b2b-filter .tfb-sort .tfb-dd-trigger .tfb-chev{
color: var(--tfb-accent);
}
.tior-b2b-filter .tfb-sort .tfb-dd-trigger{
border-color: var(--tfb-accent);
font-weight: 500;
}

/* ---- results table : Pokaż EAN toggle hides EAN column (2nd col) ---- */

#tfbResult{
margin-top: 14px;
}

#tfbResult.tfb-hide-ean table th:nth-child(2),
#tfbResult.tfb-hide-ean table td:nth-child(2){
display: none;
}

/* ============================================================================
   Homologation filter dropdown — structured panel with free-text + brand checks.
   Reuses .tfb-check / .tfb-checks for the checkbox rows.
   ============================================================================ */
.tfb-dd-homologation .tfb-dd-menu{
	min-width: 240px;
	padding: 10px 12px;
}
.tfb-dd-section-label{
	display: block;
	font: 500 11px/14px 'Outfit', sans-serif;
	color: var(--tfb-text-muted, #6b6b6b);
	text-transform: uppercase;
	letter-spacing: .04em;
	margin: 6px 0 4px;
}
.tfb-homologation-brands{
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0 0 8px;
}
/* Each brand row mirrors the EU-label .tfb-opt look: full-width row with a
   circular indicator on the left. The actual checkbox is hidden — :has selectors
   below light up the radio dot and row background when checked.
   Multi-select stays intact because the underlying <input type=checkbox> still
   toggles on label click. */
.tfb-homologation-brand-row{
	cursor: pointer;
}
.tfb-homologation-brand-row input[type=checkbox]{
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.tfb-homologation-brand-row:has(input:checked){
	background: var(--border-default, #EAEAEA);
}
.tfb-homologation-brand-row:has(input:checked) .tfb-opt-radio{
	border-color: var(--tfb-text);
}
.tfb-homologation-brand-row:has(input:checked) .tfb-opt-radio::after{
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: 50%;
	background-color: var(--tfb-text);
}
.tfb-homologation-brand-count{
	/* Прототип `.dd-item-count`: font 14, muted, лежить між .tfb-opt-text (flex:1, order:1)
	   і .tfb-opt-radio (order:3) → потрапляє на праву частину рядка перед radio. */
	order: 2;
	color: var(--tfb-muted, #6b7280);
	font-size: 14px;
}
.tfb-dd-actions{
	display: flex;
	justify-content: flex-end;
	padding-top: 6px;
	border-top: 1px solid var(--tfb-divider, #ececec);
}
.tfb-dd-reset{
	background: transparent;
	border: 0;
	padding: 4px 8px;
	font: 500 13px/16px 'Outfit', sans-serif;
	color: var(--tfb-accent, #1a1a1a);
	cursor: pointer;
}
.tfb-dd-reset:hover{
	text-decoration: underline;
}

/* ============================================================================
   FLUID FILTER LAYOUT — 2026-07-20: extended mobile UX to tablet+desktop per
   filtry-fluid.html prototype. All dropdowns behave as on mobile: search pill,
   [Filtry ▾] button reveals chip-grid, sort/EAN inline. Sizes scale fluidly
   from 390 to 1280 via clamp() in the base rules below.

   Legacy tablet media block (670-1039) removed here — its rules contradicted
   the fluid layout (flex-column bottom, sort under triggers, etc.). Legacy
   desktop base rules earlier in the file are kept as fallbacks; the rules
   below (formerly wrapped in @media (max-width: 669px)) apply at ALL widths
   and win over the earlier base by source ordering.

   Narrow-mobile block at the end (max-width: 440px) is preserved.
   ============================================================================ */
	.tior-search-page{
		/* Top/bottom aligned with prototype .results-content (32px = --space-2xl)
		   and with profile/password/addresses/orders top-padding (2026-08-13). */
		padding: var(--space-2xl) 0;
	}
	.tior-search-page__inner{
		padding: 0 12px;
	}
.tior-search-page__title{
		font-size: 24px;
		line-height: 30px;
		margin-bottom: 12px;
		text-align: left; /* прототип screenResults: заголовок ліворуч, разом з breadcrumb */
	}

	.tior-b2b-filter{
		margin: 8px 0 16px;
	}

	/* Прототип `.results-filters-card` — прозоре тло без бордера/тіні. */
	.tior-b2b-filter .tfb-card{
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;
	}

	/* Toolbar — flex row, матчить прототип `.filter-bar` (index.html:1043-1047):
	   [🔍 search] [Filtry] [Sort] ...spacer... [EAN]. Далі — `.tfb-triggers` (grid)
	   як окремий рядок, потім CTA "Pokaż opony". */
	.tior-b2b-filter .tfb-card{
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px 16px;
		padding: 12px 0;
		position: relative;
	}

	/* Розчиняємо проміжні обгортки — leaves стають прямими flex-дітьми .tfb-card */
	.tior-b2b-filter .tfb-top,
	.tior-b2b-filter .tfb-search-group,
	.tior-b2b-filter .tfb-bottom,
	.tior-b2b-filter .tfb-bottom-left{
		display: contents;
	}

	/* Row 1 order: search(1) → Filtry(2) → Sort(3) → EAN(4, pinned right). */
	.tior-b2b-filter .tfb-search-outer{ order: 1; flex: 0 0 40px; }
	.tior-b2b-filter .tfb-search{ order: 1; flex: none; }
	.tior-b2b-filter .tfb-mobile-filters-btn{ order: 2; flex: none; }
	.tior-b2b-filter .tfb-sort{ order: 3; flex: none; }
	.tior-b2b-filter .tfb-toggle{ order: 4; flex: none; margin-left: auto; }

	/* Row 2: тригери-панель — лишається grid як була (`display: grid` нижче),
	   forces full-width wrap через flex-basis: 100%. */
	.tior-b2b-filter .tfb-triggers{ order: 5; flex-basis: 100%; width: 100%; }

	/* Row 3: Pokaż opony CTA — центрується під тригерами (fixed 150px width base). */
	.tior-b2b-filter .tfb-btn-outline{ order: 6; margin: 0 auto; }

	/* Wrapper forces the CTA onto its OWN row (flex-basis: 100%) — without it
	   #tfbSearchBtn fit into the top flex-row alongside quickSearch on any width
	   where .tfb-triggers is display:none (i.e. tablet+desktop before the user
	   opens Filtry). Visibility mirrors the button rule below:
	     — .has-direct-nav — direct-nav landing prompt (until first search runs);
	     — .has-pending-filter-change — filters differ from last executed search. */
	.tior-b2b-filter .tfb-cta-row{
		order: 6;
		flex-basis: 100%;
		width: 100%;
		display: flex;
		justify-content: center;
	}
	.tior-b2b-filter:not(.has-direct-nav):not(.has-pending-filter-change) .tfb-cta-row{
		display: none;
	}

	/* Row 1 col 1 — in-flow placeholder that reserves the 40×40 pill slot in the
	   toolbar row so that when `.tfb-search.is-expanded` goes `position:absolute`,
	   sibling flex items (Filtry / Sort / EAN toggle) don't reflow. NOT
	   position:relative — overlay anchors to `.tfb-card` (position:relative,
	   лінія 1300) so it can span the full toolbar-row width via `left:0; right:0`
	   (covering Filtry / Sort / EAN as in prototype `.results-search-input`). */
	.tior-b2b-filter .tfb-search-outer{
		width: 40px;
		height: 40px;
		align-self: center;
	}

	/* Collapsed pill fills its outer wrapper (40×40 icon-only). При
	   .is-expanded (додається через JS onclick/onfocus) — position:absolute
	   overlay щодо `.tfb-search-outer`, як у прототипі screenResults
	   `.results-search-input`. */
	.tior-b2b-filter .tfb-search{
		position: relative;
		width: 40px;
		height: 40px;
		max-width: 100%;
		border-radius: 100px;
		/* Collapsed pill blends into the filter card body — no white disc, no
		   shadow, just a hairline. Expanded state gets a solid white background
		   (see `.is-expanded` below) so the overlay input reads on its own. */
		background: transparent;
		border: 1px solid rgba(17, 24, 39, .08);
		box-shadow: none;
		overflow: hidden;
		cursor: pointer;
		transition: width 280ms cubic-bezier(.4, 0, .2, 1),
		            box-shadow 160ms ease,
		            border-color 160ms ease,
		            background-color 160ms ease;
	}
	.tior-b2b-filter .tfb-search:hover{
		border-color: rgba(17, 24, 39, .18);
	}
	.tior-b2b-filter .tfb-search .tfb-search-ic{
		left: 11px;
		width: 18px;
		height: 18px;
		color: var(--tfb-muted);
		transition: left 280ms cubic-bezier(.4, 0, .2, 1);
	}
	.tior-b2b-filter .tfb-search input{
		width: 0;
		height: 40px;
		padding: 0;
		border: none;
		background: transparent;
		opacity: 0;
		transition: width 280ms cubic-bezier(.4, 0, .2, 1),
		            opacity 200ms ease,
		            padding 280ms cubic-bezier(.4, 0, .2, 1);
	}
	/* `.tfb-search-outer` залишається в flow як 40×40 placeholder — сусіди
	   (Filtry / Sort / EAN toggle) не рухаються. Overlay позиціонується відносно
	   `.tfb-card` (position:relative, лінія 1300), розтягуючись на всю ширину
	   toolbar-рядка через `left:0; right:0` — закриває Filtry / Sort / EAN.
	   `top: 10px` = `.tfb-card` padding-top (12px) мінус 2px, щоб 44px overlay
	   візуально центрувався на 40px pill-рядку і НЕ стрибав вгору картки. */
	   .tior-b2b-filter .tfb-search.is-expanded{
	   		position: absolute;
	   		top: 10px;
	   		left: 0;
	   		right: 0;
	   		width: auto; /* override .tfb-search{ width:40px } base — required so left+right stretch */
	   		max-width: none;
	   		height: 44px;
	   		z-index: 60;
	   		/* Solid bg here — the overlay covers the toolbar row and needs
	   		   opaque backing so the underlying triggers don't bleed through. */
	   		background: #fff;
	   		box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
	   	}
	/* Icon stays at collapsed `left: 11px` when expanding — no horizontal shift.
	   Input overlays rightward at 44px height with a solid bg + shadow, so it
	   visually covers Filtry / Sort / EAN toggle without displacing them.
	   Wrapper is 40×40 still, so left:0 anchors overlay to the pill; width scales
	   with viewport but capped at 480px so it doesn't run off ultra-wide layouts. */
	.tior-b2b-filter .tfb-search.is-expanded input{
		width: 100%;
		opacity: 1;
		padding: 4px 14px 4px 40px;
	}
	/* The wrapper's icon needs the same z-index or higher so it appears above
	   the overlaid input (it's positioned absolutely inside the pill). */
	.tior-b2b-filter .tfb-search.is-expanded .tfb-search-ic{
		z-index: 61;
	}
	/* Same for the × clear button injected in the header. */
	.tior-b2b-filter .tfb-search.is-expanded .tfb-search-clear{
		z-index: 61;
	}

	/* Row 2 — toolbar [Filtry] [Sort] ... [EAN].
	   Прототип `.mini-trigger`: appearance:none, background:none, border:none, padding:0,
	   font-size 16px. Це просто текстова кнопка з іконкою — без field-chrome. */
	.tior-b2b-filter .tfb-mobile-filters-btn{
		grid-area: filtry;
		justify-self: start;
		align-self: center;
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--tfb-text);
		font: 400 18px/1.4 'Outfit', sans-serif;
		cursor: pointer;
	}
	.tior-b2b-filter .tfb-mobile-filters-btn[aria-expanded="true"] .tfb-chev{
		transform: rotate(180deg);
	}
	/* Це plain text-with-icon кнопка — глобальний .tior-b2b-filter button:focus-visible
	   outline малює навколо неї 2px рамку, що читається як border. Скасовуємо. */
	.tior-b2b-filter .tfb-mobile-filters-btn:focus,
	.tior-b2b-filter .tfb-mobile-filters-btn:focus-visible{
		outline: none;
	}

	.tior-b2b-filter .tfb-sort{
		grid-area: sort;
		justify-self: start;
		align-self: center;
		gap: 0;
	}
	.tior-b2b-filter .tfb-sort > span{
		display: none; /* "Sortuj wg" текст ховаємо — лишається сам dropdown */
	}
	.tior-b2b-filter .tfb-sort .tfb-dd{
		width: auto !important;
	}
	.tior-b2b-filter .tfb-sort .tfb-dd-trigger{
		height: auto;
		padding: 0;
		gap: 6px;
		border: 0;
		background: none;
		font: 400 18px/1.4 'Outfit', sans-serif;
		color: var(--tfb-text);
	}
	.tior-b2b-filter .tfb-sort .tfb-dd-trigger:hover{
		border: 0;
		box-shadow: none;
	}
	.tior-b2b-filter .tfb-sort .tfb-sort-icon{
		display: inline-block;
		width: 18px;
		height: 18px;
		color: var(--tfb-muted);
		flex: none;
	}
	/* Filtry-btn icon inherits color через currentColor. */
	.tior-b2b-filter .tfb-mobile-filters-btn svg:first-of-type{
		width: 18px;
		height: 18px;
		color: var(--tfb-muted);
		flex: none;
	}

	.tior-b2b-filter .tfb-toggle{
		grid-area: ean;
		justify-self: end;
		align-self: center;
		padding: 0;
		gap: 6px;
	}

	/* Row 3 — triggers panel (hidden by default; revealed by .is-mobile-filters-open).
	   Grid 3×N: dropdown'и chip-style, авто-пакування 3 на рядок.
	   Row 1 (при одинарному розмірі): [Rozmiar+add] [Typ] [spacer].
	   Row 1 (при .is-double на cluster): [Rozmiar1] [Rozmiar2] [Typ] — spacer прихований.
	   Boolean chips (.tfb-checks-inline) span-ять всю ширину через grid-column: 1 / -1. */
	.tior-b2b-filter .tfb-triggers{
		grid-area: triggers;
		display: none;
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
		width: 100%;
	}
	.tior-b2b-filter.is-mobile-filters-open .tfb-triggers{
		display: grid;
	}
	.tior-b2b-filter.is-mobile-filters-open .tfb-collapsible,
	.tior-b2b-filter.is-mobile-filters-open .tfb-collapsible[hidden]{
		display: contents !important; /* дозволяє вкладеним chip'ам жити в тому ж grid-контейнері */
	}
	.tior-b2b-filter .tfb-triggers-break{
		display: none; /* desktop wrap-логіка на mobile непотрібна */
	}
	.tior-b2b-filter .tfb-more-btn{
		display: none; /* "Więcej filtrów" непотрібен — Filtry вже все розгортає */
	}

	/* Rozmiar cluster ─────────────────────────────────────────────
	   Single (за замовчуванням): flex row [size1(flex:1) | +btn | size2(hidden)]
	     — займає 1 grid-клітинку.
	   Double (.is-double, через JS): display:contents → size1/size2 стають окремими
	     grid items; +btn ховається. */
	.tior-b2b-filter .tfb-rozmiar-cluster{
		display: flex;
		align-items: center;
		gap: 4px;
		min-width: 0;
	}
	.tior-b2b-filter .tfb-rozmiar-cluster > .tfb-dd{
		flex: 1 1 0;
		min-width: 0;
	}
	.tior-b2b-filter .tfb-rozmiar-cluster > .tfb-dd[data-dd-for="size2"]{
		display: none; /* size2 схований у single mode */
	}
	.tior-b2b-filter .tfb-rozmiar-add-btn{
		flex: none;
		width: 24px;
		height: 24px;
		border: 1px solid #eaeaea;
		border-radius: 50%;
		background: #fff;
		color: var(--tfb-text);
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		transition: box-shadow .15s;
	}
	/* Hover — тільки м'яка тінь, без інверсії кольорів (запит користувачки 2026-07-24). */
	.tior-b2b-filter .tfb-rozmiar-add-btn:hover{
		box-shadow: 0 2px 6px rgba(17, 24, 39, .12);
	}
	.tior-b2b-filter .tfb-rozmiar-cluster.is-double{
		display: contents; /* size1/size2 стають окремими grid items */
	}
	.tior-b2b-filter .tfb-rozmiar-cluster.is-double > .tfb-dd[data-dd-for="size2"]{
		display: block; /* показуємо size2 dropdown в double mode */
	}
	.tior-b2b-filter .tfb-rozmiar-cluster.is-double > .tfb-rozmiar-add-btn{
		display: none;
	}

	/* Spacer stays hidden at all widths (designer TZ 2026-08-03, B2):
	   second-size slot must not occupy a grid cell before "+" is clicked.
	   Grid auto-flow packs following items (seasonId, etc.) into col 3 of
	   row 1 in single-size mode; clicking + spills size1+size2 out of the
	   cluster via `display: contents` and they replace typeId's neighbours. */

	/* Dropdown triggers → chip-style кнопки */
	.tior-b2b-filter .tfb-triggers .tfb-dd{
		min-width: 0;
		width: auto !important; /* перебиває інлайн style="width:135px" тощо з .ftlh */
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-trigger{
		/* Прототип `.results-filter-chip`: 1px #eaeaea, radius 8, padding 6/12, font 14. */
		height: auto;
		width: 100%;
		padding: 6px 12px;
		border: 1px solid #eaeaea;
		border-radius: 8px;
		background: #fff;
		color: var(--tfb-text);
		font: 400 14px/18px 'Outfit', sans-serif;
		justify-content: space-between;
		gap: 4px;
		overflow: hidden;
	}
	/* EU chip у 3-col grid ~110px — 3 SVG-іконки + текст не вміщаються.
	   Ховаємо декоративні eu-hint-icons, лишаємо тільки текстовий label. */
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .eu-hint-icons{
		display: none;
	}

	/* ─── EU Label dropdown ─ прототип v44 euSheet ─────────────────────────
	   3 секції (Opór / Mokra / Hałas), в кожній 5 (або 3) кольорових А-Е кнопок.
	   Розкладка: сектор label — full-width, кнопки — flex row 5×1fr / 3×1fr. */
	/* display:flex ТІЛЬКИ при is-open — не переписуємо базовий display:none, інакше
	   меню лишається відкрите візуально навіть коли клас is-open знято JS'ом. */
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu.is-open > .tfb-dd-menu{
		display: flex;
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-dd-menu{
		flex-wrap: wrap;
		gap: 6px 5px;
		padding: 12px;
		min-width: 280px;
		max-width: 90vw;
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-dd-section{
		flex: 1 0 100%;
		font: 700 10px/1.4 'JetBrains Mono', monospace;
		letter-spacing: .5px;
		color: var(--tfb-muted);
		text-transform: uppercase;
		margin: 6px 0 -2px;
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-dd-section:first-child{ margin-top: 0; }
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-opt{
		flex: 1 1 0;
		min-height: 32px;
		padding: 6px 0;
		border: 1.5px solid #eaeaea;
		border-radius: 4px;
		background: #eaeaea;
		font: 700 13px/1 'JetBrains Mono', monospace;
		color: var(--tfb-text);
		justify-content: center;
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-opt-radio{ display: none; }
	.tior-b2b-filter .tfb-triggers .tfb-dd-eu .tfb-opt-text{
		flex: none;
		overflow: visible;
	}
	/* Selected: тільки кольоровий бордер + текст (фон лишається базовий #eaeaea). */
	/* Opór (resistance) — зелений→червоний */
	.tfb-dd-eu .tfb-opt.is-active[data-target="resistance"][data-value="A"]{ border-color:#009d37; color:#009d37; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="resistance"][data-value="B"]{ border-color:#78bb00; color:#78bb00; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="resistance"][data-value="C"]{ border-color:#c8b800; color:#c8b800; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="resistance"][data-value="D"]{ border-color:#ffb000; color:#ffb000; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="resistance"][data-value="E"]{ border-color:#e70000; color:#e70000; }
	/* Mokra nawierzchnia (wet) — сині відтінки */
	.tfb-dd-eu .tfb-opt.is-active[data-target="wet"][data-value="A"]{ border-color:#005ba4; color:#005ba4; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="wet"][data-value="B"]{ border-color:#0072b9; color:#0072b9; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="wet"][data-value="C"]{ border-color:#22a5de; color:#22a5de; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="wet"][data-value="D"]{ border-color:#3a99c9; color:#3a99c9; }
	.tfb-dd-eu .tfb-opt.is-active[data-target="wet"][data-value="E"]{ border-color:#7cb8d9; color:#7cb8d9; }
	/* Hałas (noise) — сірий */
	.tfb-dd-eu .tfb-opt.is-active[data-target="noise"]{ border-color:#6b7280; color:#6b7280; }
	.tior-b2b-filter .tfb-triggers .tfb-dd-trigger .tfb-dd-label{
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		min-width: 0;
	}
	.tior-b2b-filter .tfb-triggers .tfb-dd-menu{
		left: 0;
		right: auto;
		min-width: 240px;
		max-width: 90vw;
		width: auto;
	}

	/* Boolean chips row (RunFlat / XL / FR / 48h) — span всієї ширини у grid */
	.tior-b2b-filter .tfb-checks-inline{
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		align-items: center;
		margin-top: 4px;
	}
	.tior-b2b-filter .tfb-checks-inline .tfb-check{
		position: relative;
		display: inline-flex;
		align-items: center;
		padding: 8px 12px;
		border: 1px solid #bec5c8;
		border-radius: 8px;
		background: var(--color-bg-chip);
		color: var(--tfb-text);
		font: 400 14px/18px 'Outfit', sans-serif;
		cursor: pointer;
		gap: 6px;
	}
	.tior-b2b-filter .tfb-checks-inline .tfb-check input{
		position: absolute;
		inset: 0;
		opacity: 0;
		margin: 0;
		cursor: pointer;
	}
	.tior-b2b-filter .tfb-checks-inline .tfb-check:has(input:checked){
		background: var(--color-bg-chip); /* override desktop-scoped accent-fill */
		border-color: var(--tfb-accent);
		color: var(--tfb-accent);
	}
	.tior-b2b-filter .tfb-checks-inline .tfb-check:has(input:checked) span{
		font-weight: 500;
	}

	/* Row 4 — "Pokaż opony" CTA. Prototype `filtry-fluid.html` .cta.cta-secondary
	   metrics: 48px height, 12px radius, 18px/500 font, secondary variant.
	   Hidden by default; two states reveal it (matching .tfb-cta-row above):
	     — .has-direct-nav — user arrived without filter params, needs an explicit
	       "run the search" action;
	     — .has-pending-filter-change — after auto-load or a prior search, user
	       changed something in the filter panel / quickSearch, so results no
	       longer match the current filter state. */
	.tior-b2b-filter .tfb-btn-outline{
		grid-area: cta;
		width: 100%;
		height: 48px;
		border-radius: 12px;
		font-size: 18px;
		font-weight: 500;
		line-height: 1;
		align-items: center;
		justify-content: center;
		display: none;
		margin-top: var(--space-xs);
	}
	.tior-b2b-filter.has-direct-nav .tfb-btn-outline,
	.tior-b2b-filter.has-pending-filter-change .tfb-btn-outline{
		display: flex;
	}

	/* Meta now sits OUTSIDE .tfb-card (see FTL) — no grid-area binding needed.
	   Keep the base flex layout, just tighten paddings inside the compact card. */
	.tior-b2b-filter .tfb-meta{
		padding: 0 8px;
		row-gap: 8px;
	}

/* ============================================================================
   MOBILE (≤ 669px) — сторінковий inset тісніший (6px sides), щоб картки
   мали більше горизонтального місця для контенту (2026-08-12, per проханням).
   ============================================================================ */
@media (max-width: 669px){
	.tior-search-page__inner{
		padding: 0 6px;
	}
}

/* ============================================================================
   NARROW MOBILE (≤ 440px) — коли [Filtry|Sort|·|EAN] занадто тісно,
   переносимо EAN окремим рядком, а chip-grid стискаємо до 2 колонок.
   ============================================================================ */
@media (max-width: 440px){
	/* Найвужчий екран (~390px): tightening поверх базового flex-layout —
	   менший gap, компактніші padding на Filtry-btn / Sort trigger, 2-col chip-grid. */
	.tior-b2b-filter .tfb-card{
		gap: 4px;
	}
	.tior-b2b-filter .tfb-mobile-filters-btn{
		padding: 4px 8px;
		gap: 4px;
	}
	.tior-b2b-filter .tfb-sort{
		gap: 6px;
	}
	.tior-b2b-filter .tfb-sort .tfb-dd-trigger{
		padding: 0 6px;
		gap: 4px;
	}
	.tior-b2b-filter .tfb-toggle{
		gap: 6px;
	}
	/* Chip-grid → 2 колонки на найвужчих екранах. */
	.tior-b2b-filter.is-mobile-filters-open .tfb-triggers{
		grid-template-columns: repeat(2, 1fr);
	}
	.tior-b2b-filter .tfb-rozmiar-grid-spacer{
		display: none !important;
	}
}

/* ============================================================================
   HOME PANEL PARITY (2026-08-05) — /b/search now imports primary + advanced
   filter panels from the home page (see b2b_filters.ftlh). Because the fluid
   layout above sets `.tfb-card` to `display:flex; flex-wrap` and dissolves
   `.tfb-top / .tfb-bottom` via `display:contents`, the new `.filters-panel`
   sections become direct flex-children of `.tfb-card`. Without an explicit
   `order` and `flex-basis:100%`, they'd render BEFORE quickSearch (default
   order 0 < search's order 1). Rules below place each panel on its own row
   after the search row and before the CTA.
   ============================================================================ */

/* Panels: full-width row inside .tfb-card, after search (order 1) and before
   CTA (order 6). Two rows total — primary (order 5.1) then advanced (5.2). */
.tior-b2b-filter .tfb-card .filters-panel--primary{
	order: 5;
	flex-basis: 100%;
	width: 100%;
}
.tior-b2b-filter .tfb-card .filters-panel--advanced{
	order: 5;  /* Same order → source order preserved: advanced after primary. */
	flex-basis: 100%;
	width: 100%;
}

/* Panels come with `padding: var(--space-lg) 0`; on home their side padding
   is provided by `.search-module`. Inside .tfb-card there's no side padding,
   so trim top padding too — the row-gap from .tfb-card already spaces things. */
.tior-b2b-filter .tfb-card .filters-panel--primary,
.tior-b2b-filter .tfb-card .filters-panel--advanced{
	padding: 0;
}

/* Orphan: `.tfb-mobile-filters-btn` used to expand the (now-inactive) legacy
   `.tfb-triggers` grid. New primary panel has its own visibility, so the
   button toggles nothing. Hide until it's cleaned up in the template. */
.tior-b2b-filter .tfb-mobile-filters-btn{
	display: none !important;
}

/* Toolbar actions row (sort + Pokaż EAN toggle) — sits on its own row inside
   .tfb-meta via flex-basis:100%, contents pushed right. Overrides the fluid
   rule `.tior-b2b-filter .tfb-toggle{margin-left:auto}` which would blow the
   gap between sort and toggle to fill the whole row — inside this bar we want
   them next to each other. */
.tior-b2b-filter .tfb-meta-actions{
	flex-basis: 100%;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
}
.tior-b2b-filter .tfb-meta-actions .tfb-toggle{
	margin-left: 0;
}

/* ============================================================================
   FLUID SCALING for tablet + desktop (min-width: 670px) — matches filtry-fluid.html.
   Only sizes that scale — dropdown UX (chip-grid, search pill, Filtry button)
   stays the mobile-style layout applied at all widths above.
   Formulas: title 32→40px, filter-bar gap space-lg→space-xl (16→24px),
   CTA "Pokaż opony" narrows to 150px auto-centered, card gets more air.
   ============================================================================ */
@media (min-width: 670px){
	.tior-search-page{
		padding: var(--space-2xl) 0;
	}
	/* 22.10 (правки для живого 15.10, п.4) · бокове поле 16px на всіх
	   ширинах від 670, а не плавні 16→80. Прототип 15.10: --res-max 1280 і
	   --page-gutter 16 у .app — «картка 1248 на 1440; було 1120 — колонки
	   тексту стискались і розмір/модель/чипи переносились». Наша формула
	   давала на 1440 рівно ті старі 1120. */
	.tior-search-page__inner{
		padding: 0 var(--space-lg, 16px);
	}
	.tior-search-page__title{
		font-size: clamp(32px, calc(32px + (40px - 32px) * ((100vw - 670px) / (1280px - 670px))), 40px);
		line-height: 52.8px;
		margin-bottom: 16px;
	}
	.tior-b2b-filter .tfb-card{
		column-gap: clamp(16px, calc(16px + (24px - 16px) * ((100vw - 670px) / (1280px - 670px))), 24px);
	}
	.tior-b2b-filter .tfb-btn-outline{
		width: 150px;
		justify-self: center;
	}
}

/* ── Page title rendered OUTSIDE its content container ────────────────────
   orders / order / cart keep the h1 above their content box rather than
   inside it, so the title has to carry the box's own horizontal metrics for
   the two left edges to line up. Two variants because the two boxes differ.
   Flat 30px at every width — no responsive step (design call 2026-08-24).

   Compound selectors (class twice) so these beat the plain-class rules
   earlier in this file, including the ones inside @media (min-width: 670px).
   `line-height: normal` is what switches the line box OFF: dropping the
   declaration would just re-expose the 30px/52.8px values those earlier
   rules set. Deliberately no box-sizing: both containers are content-box,
   so the title has to stay content-box too or the max-width maths stops
   matching. */
.tior-search-page__title.tior-search-page__title--checkout,
.tior-search-page__title.tior-search-page__title--results{
	font-size: 30px;
	line-height: normal;
	padding-top: 20px;
	padding-left: 20px;
	padding-right: 20px;
}

/* Mirrors .checkout_container: max-width 1300 + 20px sides, centred. */
.tior-search-page__title.tior-search-page__title--checkout{
	max-width: 1300px;
	margin-left: auto;
	margin-right: auto;
}

/* Mirrors .b2b-results_order: full-bleed with 20px sides, 5px under 670px.
   Width left at auto on purpose — the container's own width:100% + padding
   overflows its parent, and the title should follow the text edge, not that. */
@media (max-width: 669px){
	.tior-search-page__title.tior-search-page__title--results{
		padding-left: 5px;
		padding-right: 5px;
	}
}

/* ═══ 22.10 (правки для живого 15.10, п.6) · СОРТУВАННЯ В ДВА КРОКИ ═══════════
   Прототип 15.10 (.res-sort*): кнопка «Sortowanie» з іконкою й шевроном
   відкриває список параметрів (компонент .orl-filter-pop зі списку
   замовлень — тут скопійований під скоуп пошуку, бо shared/list-filters.css
   несе глобальні .pg-* і зачепив би пагінацію видачі). Обраний параметр —
   кнопка праворуч зі стрілкою; клік міняє напрямок, стрілка обертається.
   Без червоного: вибір видно словом і темним радіо, а не акцентом (в OP
   акцент лише за головною CTA). Нижче 670 список — bottom-sheet із
   затемненням, як панелі фільтрів списку замовлень. */
.tior-b2b-filter .res-sort{
	display: flex; align-items: center; gap: var(--space-md, 12px); min-width: 0;
}
/* flex, а не блок: блок успадковував line-height 27px сторінки, кнопка в
   ньому сідала на верх рядка, і «Sortowanie» стояло на 3.5px вище за
   кнопку напрямку поруч (заміряно 22.10). */
.tior-b2b-filter .res-sort-filter{ position: relative; display: flex; align-items: center; }
.tior-b2b-filter .res-sortbtn,
.tior-b2b-filter .res-sortdir{
	appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
	display: inline-flex; align-items: center;
	font-family: var(--font-body, 'Outfit', sans-serif); font-weight: 500; font-size: 16px;
	color: var(--text-default); white-space: nowrap;
}
.tior-b2b-filter .res-sortbtn{ gap: var(--space-sm, 8px); }
.tior-b2b-filter .res-sortbtn-ic{ flex: none; width: 20px; height: 20px; color: var(--text-muted); }
.tior-b2b-filter .res-sortbtn-chev{ flex: none; width: 14px; height: 14px; color: var(--text-muted); transition: transform 140ms ease; }
.tior-b2b-filter .res-sortbtn[aria-expanded="true"] .res-sortbtn-chev{ transform: rotate(180deg); }
.tior-b2b-filter .res-sortdir{
	gap: var(--space-xs, 4px);
	padding: var(--space-sm, 8px) 0; margin: calc(-1 * var(--space-sm, 8px)) 0;
}
.tior-b2b-filter .res-sortdir-arrow{ display: inline-block; transition: transform 140ms ease; }
.tior-b2b-filter .res-sortdir.is-desc .res-sortdir-arrow{ transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine){
	.tior-b2b-filter .res-sortdir:hover .res-sortdir-label{ text-decoration: underline; text-underline-offset: 3px; }
}
.tior-b2b-filter .res-sortbtn:focus-visible,
.tior-b2b-filter .res-sortdir:focus-visible{
	outline: var(--focus-outline-width, 2px) solid var(--focus-outline-color, var(--text-default));
	outline-offset: 2px;
}

/* Панель списку — .orl-filter-pop. */
.tior-b2b-filter .res-sort-pop{
	position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; display: none;
	min-width: 240px; padding: var(--space-lg, 16px); box-sizing: border-box;
	background: var(--bg-surface-light, #fafafa);
	border: 1px solid var(--hover-grey, #eaeaea); border-radius: var(--radius-lg, 8px);
	box-shadow: var(--shadow-card);
}
.tior-b2b-filter .res-sort-pop.is-open{ display: block; }
.tior-b2b-filter .res-sort-title{ display: none; }
.tior-b2b-filter .res-sort-opts{ display: flex; flex-direction: column; }
/* Рядок — .flt-opt: радіо 12px ліворуч, підпис 16px. */
.tior-b2b-filter .res-sort-opt{
	appearance: none; background: none; border: 0; text-align: left; cursor: pointer;
	display: flex; align-items: center; gap: var(--space-md, 12px);
	padding: var(--space-sm, 8px) 0;
	font-family: var(--font-body, 'Outfit', sans-serif); font-size: 16px; font-weight: 400;
	color: var(--text-on-light, var(--text-default));
}
.tior-b2b-filter .res-sort-opt:hover{ color: var(--text-default); }
.tior-b2b-filter .res-sort-opt:focus-visible{
	outline: var(--focus-outline-width, 2px) solid var(--focus-outline-color, var(--text-default));
	outline-offset: 2px;
}
.tior-b2b-filter .res-sort-radio{
	width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;
	border: 1.5px solid var(--text-placeholder, #767676); flex: none;
}
.tior-b2b-filter .res-sort-opt.is-active{ font-weight: 500; }
.tior-b2b-filter .res-sort-opt.is-active .res-sort-radio{
	border-color: var(--text-default); background: var(--text-default);
}
/* Гостю недоступні параметри — приглушені, без ховера, як .tfb-sort-row.is-disabled. */
.tior-b2b-filter .res-sort-opt.is-disabled{ cursor: default; color: var(--text-muted); }
.tior-b2b-filter .res-sort-opt.is-disabled .res-sort-radio{ border-color: var(--border-default, #d9d9d9); }
.tior-b2b-filter .res-sort-pop .tfb-sort-locked-header{
	margin: var(--space-sm, 8px) calc(-1 * var(--space-lg, 16px)) 0;
	padding: 0 var(--space-lg, 16px);
}
.tior-b2b-filter .res-sort-pop .tfb-sort-login-wrap{
	margin: 0 calc(-1 * var(--space-lg, 16px)) calc(-1 * var(--space-lg, 16px));
	padding: var(--space-sm, 8px) var(--space-lg, 16px) var(--space-lg, 16px);
	border-radius: 0 0 var(--radius-lg, 8px) var(--radius-lg, 8px);
}

/* Затемнення — лише під шітом на телефоні. */
.tior-b2b-filter .res-sort-backdrop{ display: none; }
@media (max-width: 669px){
	.tior-b2b-filter .res-sort-backdrop.is-open{
		display: block; position: fixed; inset: 0; z-index: 999;
		background: var(--bg-backdrop, rgba(0,0,0,.32));
	}
	.tior-b2b-filter .res-sort-pop{
		position: fixed; left: 50%; right: auto; top: auto; bottom: 0;
		transform: translateX(-50%) translateY(100%);
		width: min(560px, 100%); min-width: 0; max-height: var(--sheet-max-h, 70vh); overflow-y: auto;
		border-radius: 16px 16px 0 0; border: none;
		padding: var(--space-lg, 16px) var(--space-xl, 24px);
		box-shadow: 0 -8px 32px rgba(0,0,0,.12);
		display: block; visibility: hidden; pointer-events: none;
		transition: transform 320ms cubic-bezier(.32,0,.67,0), visibility 0s linear 320ms;
		z-index: 1000;
	}
	.tior-b2b-filter .res-sort-pop.is-open{
		transform: translateX(-50%) translateY(0);
		visibility: visible; pointer-events: auto;
		transition: transform 320ms cubic-bezier(.32,0,.67,0);
	}
	.tior-b2b-filter .res-sort-title{
		display: block; margin-bottom: var(--space-md, 12px);
		font-family: var(--font-body, 'Outfit', sans-serif); font-weight: 700; font-size: 18px;
		color: var(--text-default);
	}
	.tior-b2b-filter .res-sort-pop .tfb-sort-locked-header,
	.tior-b2b-filter .res-sort-pop .tfb-sort-login-wrap{
		margin-left: calc(-1 * var(--space-xl, 24px)); margin-right: calc(-1 * var(--space-xl, 24px));
		padding-left: var(--space-xl, 24px); padding-right: var(--space-xl, 24px);
	}
}
@media (prefers-reduced-motion: reduce){
	.tior-b2b-filter .res-sort-pop{ transition: none; }
}

/* 22.10 (правки для живого 15.10) · лічильник «N wyników» і «Sortowanie» —
   на лівій кромці списку, як у прототипі (там .res-meta/.res-tools без поля).
   Правило .tfb-meta{padding:0 8px} вище колись було мобільним, а діє на всіх
   ширинах і зсувало обидва рядки на 8px від краю карток. Телефон не чіпаємо. */
@media (min-width: 670px){
	.tior-b2b-filter .tfb-meta{ padding-left: 0; padding-right: 0; }
}

/* 29.10 (прототип 29.10) · «Pokaż opony» переїхала з картки фільтрів у .tfb-meta,
   між чипами й сортуванням. order:6 зі старого місця (рядок у flex-картці) тут
   виніс би її в кінець колонки — повертаємо в потік розмітки. Відступи над і під
   кнопкою — лише крок колонки (8px), без власних. Розмір — канонічна головна CTA
   бренду (--btn-cta-*: OP 56 / пілюля, IF 48 / 12), ширина за вмістом, мінімум
   200px як --cta-min-width прототипу; на телефоні — на всю ширину. */
.tior-b2b-filter .tfb-meta > .tfb-cta-row{
	order: 0;
	margin: 0;
	padding: 0;
}
.tior-b2b-filter .tfb-meta .tfb-btn-outline{
	margin: 0;
	height: var(--btn-cta-height, 48px);
	padding: var(--btn-cta-padding, 0 16px);
	border-radius: var(--btn-cta-radius, 12px);
	font-size: var(--btn-cta-font-size, 18px);
	font-weight: var(--btn-font-weight, 500);
	box-sizing: border-box;
}
@media (min-width: 670px){
	.tior-b2b-filter .tfb-meta .tfb-btn-outline{
		width: auto;
		min-width: 200px;
	}
}
/* 29.10 · від рядка сортування до списку — той самий крок 8px, що й між
   рядками над ним (прототип 29.10: .res-bar gap 8 → .res-list). */
.tior-b2b-filter .tfb-meta{ margin-bottom: 0; }
.tior-b2b-filter #tfbResult{ margin-top: var(--space-sm, 8px); }

/* 29.10 (прототип 29.10, рішення Ляни) · Висота блоку над списком стала:
   «Pokaż opony» ховається через visibility, а не display — місце під неї
   лишається, і список під нею не стрибає, коли кнопка з'являється чи зникає.
   Так само тримають висоту рядок «N wyników» і рядок чипів, навіть порожні.
   Коли кнопку видно — ті самі класи, що й раніше (.has-direct-nav /
   .has-pending-filter-change). Схована кнопка невидима й для фокуса. */
.tior-b2b-filter .tfb-meta > .tfb-cta-row,
.tior-b2b-filter:not(.has-direct-nav):not(.has-pending-filter-change) .tfb-meta > .tfb-cta-row{
	display: flex;
	visibility: hidden;
}
/* .has-fresh-arrival (29.10) — щойно прийшли на видачу з головної: кнопка видна
   до першого пошуку на самій видачі, як у прототипі 29.10. */
/* Подвоєний клас — специфічність (0,5,0), як у правила «сховати» вище з двома
   :not(): на .has-fresh-arrival те правило теж спрацьовує, і без підсилення
   перемагало б. */
.tior-b2b-filter.tior-b2b-filter:is(.has-direct-nav, .has-pending-filter-change, .has-fresh-arrival) .tfb-meta > .tfb-cta-row{
	visibility: visible;
}
.tior-b2b-filter .tfb-meta .tfb-btn-outline{ display: flex; }
.tior-b2b-filter .tfb-meta > .tfb-count{ min-height: calc(14px * 1.4); }
.tior-b2b-filter .tfb-meta > .tfb-meta__row--chips{ min-height: 29px; }
/* 30.10 (прототип 30.10, res-mobile-30-10) · Мобайл (< 670): «Wyczyść filtry» —
   текстова дія (§9.13, як у списку «Zamówienia») в рядку «N wyników», одразу
   після лічильника. Рядок чипів віддано самим чипам на всю ширину; без чипів
   місця під них не тримаємо. Замінює правку 30.10 «гортається весь рядок».
   #tfbMeta і рядок чипів мають інлайн display — тому !important.
   Таблет і десктоп — без змін. */
@media (max-width: 669px){
	.tior-b2b-filter #tfbMeta{
		display: grid !important;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: var(--space-lg, 16px) !important;
		row-gap: var(--space-sm, 8px) !important;
	}
	.tior-b2b-filter #tfbMeta > .tfb-meta__row--chips{ display: contents !important; }
	.tior-b2b-filter #tfbMeta > *,
	.tior-b2b-filter #tfbMeta .tfb-chips{ grid-column: 1 / -1; }
	.tior-b2b-filter #tfbMeta > .tfb-count{ grid-column: 1; grid-row: 1; align-self: center; }
	.tior-b2b-filter #tfbMeta .tfb-chips{ min-height: 29px; }
	.tior-b2b-filter #tfbMeta .tfb-chips:empty{ display: none; }
	.tior-b2b-filter #tfbMeta .tfb-clear{
		grid-column: 2; grid-row: 1;
		align-self: center; justify-self: start;
		height: auto; border: 0; border-radius: 0; background: none;
		font: 500 16px/20px var(--font-body, 'Outfit'), sans-serif;
		color: var(--text-default, var(--text-on-light));
		/* зона тапу 48px без зсуву сусідів — прийом .cart-clear-all (§9.2a) */
		padding: 14px 8px; margin: -14px -8px;
	}
	.tior-b2b-filter #tfbMeta .tfb-clear:hover{ background: none; text-decoration: underline; text-underline-offset: 3px; }
	.tior-b2b-filter #tfbMeta .tfb-clear:focus-visible{ box-shadow: var(--focus-ring); border-radius: var(--radius-xs, 4px); }

	/* 30.10 (прототип 30.10) · «Pokaż opony» на мобайлі — другорядна (обведена,
	   --btn-cta-secondary-*: OP нейтральна, IF акцентна 1.5px), розмір CTA лишається.
	   Ближча до пошуку, ніж до видачі: над нею 8px (крок сітки), під нею 32px
	   (8 + крок 8 + 16 над «Sortowanie»). Схованій кнопці місця не тримаємо —
	   display:none замість visibility, тоді від чипів до «Sortowanie» 24px. */
	.tior-b2b-filter #tfbMeta .tfb-btn-outline{
		background: transparent;
		border: var(--btn-cta-secondary-border-width, 1px) solid var(--btn-cta-secondary-border-color, var(--text-muted));
		color: var(--btn-cta-secondary-color, var(--text-on-light));
	}
	.tior-b2b-filter #tfbMeta .tfb-btn-outline:hover{
		filter: none;
		background: var(--btn-cta-secondary-hover-bg, transparent);
		border-color: var(--btn-cta-secondary-hover-border, var(--text-on-light));
	}
	.tior-b2b-filter #tfbMeta .tfb-btn-outline:active{ background: var(--btn-cta-secondary-hover-bg, transparent); }
	.tior-b2b-filter #tfbMeta .tfb-btn-outline:focus-visible{ outline: none; box-shadow: var(--focus-ring); }
	.tior-b2b-filter #tfbMeta > .tfb-cta-row{ margin-bottom: var(--space-sm, 8px); }
	.tior-b2b-filter:not(.has-direct-nav):not(.has-pending-filter-change):not(.has-fresh-arrival) #tfbMeta > .tfb-cta-row{ display: none; }
	.tior-b2b-filter #tfbMeta > .tfb-meta__row--toolbar{ margin-top: var(--space-lg, 16px); }
}
/* Старий .b2b-results{margin-top:-20px} (b2b_results.css) сидить тепер під
   обгорткою .b2b-results-meta, тож правило #tfbResult > .b2b-results його не
   ловить, і від'ємний відступ просочувався крізь обгортку: список наїжджав
   на рядок сортування на 12px. */
#tfbResult .b2b-results-meta > .b2b-results{ margin-top: 0; }

/* 31.10 (рішення користувачки) · Від 670 чипи, що не вміщаються в рядок,
   переносяться на наступний, а не гортаються вбік: мишею рядок без смуги
   прокрутки не прокрутити (лише Shift+колесо), і обрізаних чипів не видно.
   Відступ від прототипу 29.10, де рядок один. «Wyczyść filtry» стоїть
   одразу за останнім чипом: .tfb-chips розчиняється в рядок (contents),
   тож чипи й кнопка — сусіди в одному flex-рядку з переносом. Крок між
   чипами 4px, до кнопки 12px (4 + 8), між рядками 4px.
   Рядок має інлайн flex-wrap/column-gap — тому !important.
   Телефон (< 670) — як було: рядок гортається, прототип 30.10. */
@media (min-width: 670px){
	.tior-b2b-filter .tfb-meta > .tfb-meta__row--chips{
		flex-wrap: wrap !important;
		column-gap: var(--space-xs, 4px) !important;
		row-gap: var(--space-xs, 4px);
	}
	.tior-b2b-filter .tfb-meta__row--chips > .tfb-chips{ display: contents; }
	.tior-b2b-filter .tfb-meta__row--chips > .tfb-clear{ margin-left: var(--space-sm, 8px); }
}
