/*
  shr-archive-filters.css — archive filter bar, result toolbar, mobile sheets.
  Markup: inc/archive-filters.php (shr_af_render_*). Behaviour:
  shr-archive-filters.js. Design: _ai/design_handoff_category_filters/ (option B).

  No layout shift is a hard rule here: the bar and toolbar are fixed-height,
  chip rows never wrap (extras collapse to "+N"), and every panel / sheet is an
  overlay (absolute or <dialog>), never in the document flow.

  ≥1101px  desktop bar of dropdown chips
  ≤1100px  sticky "Filter & Sort" chip row; full sheet = left drawer (tablet)
  ≤767px   full sheet drops from 64px below the top; facet sheets from the bottom
*/

.shr-af { --shr-af-ink: var(--s2u-text); --shr-af-steel: var(--s2u-accent-700); --shr-af-line: var(--s2u-neutral-400); }

/* Old toolbar bits the new one replaces (kept for pa_* archives). */
.shr-arc-grid-section { padding-top: clamp(18px, 2.5vw, 28px); }

/* ═══════════ Category tabs ═══════════
   The row sits straight on the filter bar (no gap, no divider). The selected
   tab is white like the bar, with a top/left/right edge and no bottom, so it
   flows into the bar; the others keep a transparent border so nothing shifts. */
.shr-af-tabs {
	position: relative; z-index: 31; /* above the bar (30) so the selected tab covers its top border */
	display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: none;
	margin-bottom: -1px;
}
.shr-af-tabs::-webkit-scrollbar { display: none; }
.s2u-page .shr-af-tabs a.shr-af-tab {
	flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; box-sizing: border-box;
	font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
	color: #7a7a7d; text-decoration: none;
	background: transparent; border: 1px solid transparent; border-bottom: 0;
}
.s2u-page .shr-af-tabs a.shr-af-tab:hover { color: var(--s2u-text); }
.s2u-page .shr-af-tabs a.shr-af-tab.is-active {
	background: #fff; color: var(--s2u-text); border-color: rgba(29, 31, 32, .16);
	border-bottom: 1px solid #fff; /* hides the bar's top line under the tab */
}

/* ═══════════ Shared controls ═══════════ */
.shr-af-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	height: 44px; padding: 0 16px; border-radius: 0; cursor: pointer;
	font-family: var(--s2u-font-body); font-size: 14px; font-weight: 600; line-height: 1;
	text-decoration: none; white-space: nowrap; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.s2u-page .shr-af a.shr-af-btn--ghost, .shr-af-btn--ghost { background: #fff; color: var(--s2u-text); border: 1px solid var(--shr-af-line); }
.shr-af-btn--ghost:hover { border-color: var(--s2u-text); }
.shr-af-btn--solid { background: var(--s2u-text); color: #fff; border: 1px solid var(--s2u-text); }
.shr-af-btn--solid:hover { background: #000; }
.s2u-page .shr-af a.shr-af-btn--red { background: var(--s2u-red); color: #fff; border: 1px solid var(--s2u-red); letter-spacing: .03em; }
.s2u-page .shr-af a.shr-af-btn--red:hover { background: var(--s2u-red-dark); border-color: var(--s2u-red-dark); }

.shr-af :focus-visible { outline: 2px solid var(--shr-af-steel); outline-offset: 2px; }

/* Dropdown / applied chip — used in the desktop bar and the mobile row. */
.shr-af-chip {
	flex: none; display: inline-flex; align-items: center; gap: 10px;
	height: 44px; padding: 0 12px 0 14px; max-width: 300px;
	background: #fff; color: var(--s2u-text); border: 1px solid var(--shr-af-line); border-radius: 0;
	font-family: var(--s2u-font-body); font-size: 14px; font-weight: 600; white-space: nowrap;
	cursor: pointer; list-style: none; user-select: none;
}
.shr-af-chip::-webkit-details-marker { display: none; }
.shr-af-chip::marker { content: ''; }
.shr-af-chip:hover { border-color: var(--s2u-text); }
.shr-af-chip.is-applied { background: var(--s2u-text); color: #fff; border-color: var(--s2u-text); }
.shr-af-chip__text { overflow: hidden; text-overflow: ellipsis; }
.shr-af-chip__arrow { font-size: 11px; opacity: .8; }

/* In-stock switch (a link, so it works without JS). */
.s2u-page .shr-af a.shr-af-switch {
	flex: none; display: inline-flex; align-items: center; gap: 12px;
	height: 44px; padding: 0 12px 0 14px; background: #fff; border: 1px solid var(--s2u-text);
	color: var(--s2u-text); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.shr-af-switch__track {
	position: relative; flex: none; width: 36px; height: 20px;
	border: 1px solid var(--s2u-text); background: #fff; transition: background .15s ease;
}
.shr-af-switch__track::after {
	content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
	background: var(--s2u-text); transition: transform .15s ease, background .15s ease;
}
.shr-af-switch.is-on .shr-af-switch__track,
input:checked + .shr-af-switch__track { background: var(--s2u-text); }
.shr-af-switch.is-on .shr-af-switch__track::after,
input:checked + .shr-af-switch__track::after { transform: translateX(16px); background: #fff; }

/* Checkbox rows. The native input stays in place (visually hidden) so
   keyboard and screen readers get a real checkbox. */
.shr-af-opts { display: flex; flex-direction: column; }
.shr-af-opt {
	position: relative; display: flex; align-items: center; gap: 12px;
	min-height: 50px; border-top: 1px solid var(--s2u-divider); cursor: pointer;
	font-size: 14px; color: var(--s2u-text);
}
.shr-af-opt input, .shr-af-cell input, .shr-af-preset input, .shr-af-acc--switch input {
	position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.shr-af-box {
	position: relative; flex: none; width: 18px; height: 18px;
	border: 1.5px solid var(--s2u-neutral-500); background: #fff;
}
.shr-af-opt input:checked + .shr-af-box { background: var(--s2u-text); border-color: var(--s2u-text); }
.shr-af-opt input:checked + .shr-af-box::after {
	content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.shr-af-box--radio { border-radius: 50%; }
.shr-af-opt input:checked + .shr-af-box--radio::after { left: 4px; top: 4px; width: 7px; height: 7px; border: 0; background: #fff; border-radius: 50%; transform: none; }
.shr-af-opt input:focus-visible + .shr-af-box { outline: 2px solid var(--shr-af-steel); outline-offset: 2px; }
.shr-af-opt__code { flex: none; width: 36px; font-family: var(--s2u-font-heading); font-size: 18px; font-weight: 600; }
.shr-af-opt__label { flex: 1; min-width: 0; font-size: 13.5px; color: var(--s2u-neutral-700); }
.shr-af-opt__n, .shr-af-preset__n, .shr-af-cell__n {
	font-size: 13px; color: var(--s2u-neutral-500); font-variant-numeric: tabular-nums;
}
.shr-af-opt[data-zero], .shr-af-cell[data-zero], .shr-af-preset[data-zero] { opacity: .4; }

.shr-af-more-brands > summary {
	display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--s2u-divider);
	font-size: 13.5px; font-weight: 600; color: var(--shr-af-steel); cursor: pointer; list-style: none;
	text-decoration: underline; text-underline-offset: 3px;
}
.shr-af-more-brands > summary::-webkit-details-marker { display: none; }
.shr-af-more-brands[open] > summary { display: none; }

/* Range presets + min/max. */
.shr-af-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 0 4px; }
.shr-af-preset {
	position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	height: 44px; padding: 0 12px; border: 1px solid var(--shr-af-line); background: #fff;
	font-size: 14px; font-weight: 600; cursor: pointer;
}
.shr-af-preset:hover { border-color: var(--s2u-text); }
.shr-af-preset:has(input:checked) { background: var(--s2u-text); border-color: var(--s2u-text); color: #fff; }
.shr-af-preset:has(input:checked) .shr-af-preset__n { color: rgba(255, 255, 255, .7); }
.shr-af-preset:has(input:focus-visible) { outline: 2px solid var(--shr-af-steel); outline-offset: 2px; }
.shr-af-minmax { display: flex; align-items: flex-end; gap: 8px; padding-top: 10px; }
.shr-af-minmax label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s2u-neutral-600); }
.shr-af-minmax input {
	width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--shr-af-line); border-radius: 0;
	background: #fff; font-family: var(--s2u-font-body); font-size: 14px; color: var(--s2u-text);
	font-variant-numeric: tabular-nums; box-shadow: none;
}
.shr-af-minmax__dash { padding-bottom: 12px; color: var(--s2u-neutral-500); }
.shr-af-note { margin: 8px 0 0; font-size: 12px; color: var(--s2u-neutral-600); }

.shr-af-helper { margin: 0; padding: 10px 16px; background: var(--s2u-bg); font-size: 12.5px; line-height: 1.5; color: var(--s2u-neutral-600); }
.s2u-page .shr-af-helper a { color: var(--shr-af-steel); text-decoration: underline; }

/* ═══════════ Desktop filter bar ═══════════ */
.shr-af-bar {
	display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 10px;
	background: #fff; margin-bottom: 14px; z-index: 30;
}
/* Joined to the category tabs above (no gap). */
.shr-af-tabs + .shr-af .shr-af-bar { margin-top: 0; }
.shr-af-bar__label { padding: 0 8px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.shr-af-dd { position: relative; flex: none; }
/* Applied chips shrink (ellipsis, full text on hover / in the panel) so many
   selections never push "More filters" past the bar. */
.shr-af-bar > .shr-af-dd:not(.shr-af-dd--more) { flex: 0 1 auto; min-width: 72px; }
.shr-af-bar .shr-af-dd > .shr-af-chip { max-width: 100%; }
.shr-af-chip__text { min-width: 0; }
.shr-af-dd--more { position: static; margin-left: auto; }

.shr-af-more {
	display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
	font-size: 14px; font-weight: 600; color: var(--shr-af-steel); cursor: pointer; list-style: none; user-select: none;
	border: 1px solid transparent;
}
.shr-af-more::-webkit-details-marker { display: none; }
.shr-af-more::marker { content: ''; }
.shr-af-more__badge {
	display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px;
	border: 1px solid var(--shr-af-steel); font-size: 12px; font-variant-numeric: tabular-nums;
}
.shr-af-more__badge.is-applied { background: var(--shr-af-steel); color: #fff; }
.shr-af-more__arrow { display: none; font-size: 11px; }
.shr-af-dd--more[open] > .shr-af-more { background: var(--shr-af-steel); color: #fff; }
.shr-af-dd--more[open] .shr-af-more__badge { display: none; }
.shr-af-dd--more[open] .shr-af-more__arrow { display: inline; }
.shr-af-dd--more:not([open]) > .shr-af-more:hover { border-color: var(--shr-af-steel); }

.shr-af-panel {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 420px;
	background: #fff; border: 1px solid rgba(17, 27, 39, .18); box-shadow: 0 16px 40px rgba(17, 27, 39, .22);
	text-align: left;
}
.shr-af-dd:nth-last-of-type(2) > .shr-af-panel { left: auto; right: 0; }
.shr-af-panel--more { top: 100%; left: -1px; right: -1px; width: auto; }
.shr-af-panel__head { display: flex; align-items: baseline; gap: 10px; padding: 16px 16px 8px; }
.shr-af-panel__title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.shr-af-panel__hint { font-size: 12px; color: var(--s2u-neutral-500); }
.shr-af-panel__body { padding: 0 16px 12px; max-height: min(60vh, 460px); overflow-y: auto; }
.shr-af-panel__body--security, .shr-af-panel__body--cut, .shr-af-panel__body--brand { padding-bottom: 0; }
.shr-af-panel__foot { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--s2u-divider); }
.shr-af-panel__foot > .shr-af-btn--ghost { flex: 1; }
.shr-af-panel__foot > .shr-af-btn--solid { flex: 2; }

.shr-af-groups { display: grid; grid-template-columns: repeat(4, 1fr); max-height: min(62vh, 560px); overflow-y: auto; }
.shr-af-group { margin: 0; min-width: 0; padding: 14px 20px 12px; border: 0; border-right: 1px solid var(--s2u-divider); border-bottom: 1px solid var(--s2u-divider); }
.shr-af-groups > .shr-af-group:nth-child(4n) { border-right: 0; }
.shr-af-group__title { float: left; width: 100%; padding: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.shr-af-group .shr-af-opts { clear: both; }
.shr-af-group .shr-af-opt { min-height: 44px; border-top: 0; }
.shr-af-group--note { margin: 0; background: var(--s2u-bg); font-size: 12.5px; line-height: 1.6; color: var(--s2u-neutral-600); }
.shr-af-panel__foot--more { align-items: center; padding: 12px 20px; }
.shr-af-panel__plus { flex: 1; font-size: 13.5px; color: var(--s2u-neutral-600); }
.shr-af-panel__foot--more > .shr-af-btn--ghost { flex: 0 0 140px; }
.shr-af-panel__foot--more > .shr-af-btn--solid { flex: 0 0 220px; }

/* ═══════════ Result toolbar ═══════════ */
.shr-af-toolbar {
	display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 0;
	border-top: 2px solid var(--s2u-text); margin-bottom: 24px;
}
.shr-af-count { flex: none; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shr-af-count span { color: var(--s2u-neutral-600); }
.shr-af-toolbar__sep { flex: none; width: 1px; height: 24px; background: var(--s2u-divider); }
.shr-af-achips { flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; overflow: hidden; }
.s2u-page .shr-af a.shr-af-achip, .shr-af-achip {
	flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 4px 0 12px;
	border: 1px solid var(--shr-af-steel); background: #fff; color: var(--shr-af-steel);
	font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.s2u-page .shr-af a.shr-af-achip:hover { background: var(--s2u-accent-100); }
.shr-af-achip__x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: 16px; }
.shr-af-achip--more { padding: 0 12px; }
.s2u-page .shr-af .shr-af-achip[hidden] { display: none; }
.s2u-page .shr-af a.shr-af-clearall {
	flex: none; display: inline-flex; align-items: center; min-height: 44px; margin-left: 10px;
	font-size: 13.5px; font-weight: 600; color: var(--s2u-text); text-decoration: underline; text-underline-offset: 3px;
}
.shr-af-sort { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 0 0 auto; }
.shr-af-sort__label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--s2u-neutral-600); }
.shr-af-js .shr-af-sort__go { display: none; }
.shr-af-sort select {
	height: 44px; min-width: 200px; padding: 0 34px 0 12px; border: 1px solid var(--shr-af-line); border-radius: 0;
	background: #fff; font-family: var(--s2u-font-body); font-size: 14px; color: var(--s2u-text); cursor: pointer;
}

/* Loading: keep the height, fade, block clicks. */
.shr-af.is-loading .shr-arc-products,
.shr-af.is-loading .shr-af-empty,
.shr-af.is-loading .shr-arc-pagination { opacity: .5; pointer-events: none; transition: opacity .15s ease; }

/* ═══════════ Empty state ═══════════ */
.shr-af-empty {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
	background: #fff; padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px);
}
.shr-af-empty__over { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--shr-af-steel); }
.shr-af-empty__title {
	margin: 0; font-family: var(--s2u-font-heading); font-weight: 600; font-size: clamp(24px, 3vw, 32px);
	letter-spacing: .02em; text-transform: uppercase; color: var(--s2u-text);
}
.shr-af-empty__text { margin: 0; max-width: 52ch; font-size: 14.5px; line-height: 1.55; color: var(--s2u-neutral-700); }
.shr-af-closest { width: 100%; max-width: 460px; border: 1px solid var(--s2u-divider); text-align: left; }
.shr-af-closest__head { padding: 12px 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--s2u-neutral-600); }
.s2u-page .shr-af a.shr-af-closest__row {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px;
	border-top: 1px solid var(--s2u-divider); color: var(--s2u-text); font-size: 14px; text-decoration: none;
}
.s2u-page .shr-af a.shr-af-closest__row:hover { background: var(--s2u-bg); }
.shr-af-closest__n { flex: none; color: var(--shr-af-steel); font-weight: 600; }
.shr-af-empty__btns { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 460px; }
.shr-af-empty__btns .shr-af-btn { height: 48px; }
.shr-af-empty__btns .shr-af-btn--red { flex: 1 1 220px; }
.shr-af-empty__btns .shr-af-btn--ghost { flex: 1 1 140px; }
.shr-af-empty__note { margin: 0; max-width: 460px; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.5; color: var(--s2u-neutral-600); }

/* ═══════════ Mobile / tablet row ═══════════ */
.shr-af-mrow, .shr-af-mcount { display: none; }

/* ═══════════ Sheets (<dialog>) ═══════════ */
.shr-af-sheet {
	padding: 0; border: 0; border-radius: 0; background: #fff; color: var(--s2u-text);
	width: 100%; max-width: 100%; font-family: var(--s2u-font-body);
}
.shr-af-sheet::backdrop { background: rgba(17, 27, 39, .55); }
.shr-af-sheet > form { display: flex; flex-direction: column; max-height: inherit; height: 100%; margin: 0; }
.shr-af-sheet__grab { flex: none; width: 40px; height: 4px; margin: 8px auto 0; background: var(--s2u-neutral-400); }
.shr-af-sheet__head {
	flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 6px 4px 6px 16px; border-bottom: 1px solid var(--s2u-divider);
}
.shr-af-sheet__title { font-family: var(--s2u-font-heading); font-size: 22px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.shr-af-sheet__close {
	width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: none;
	font-size: 26px; line-height: 1; color: var(--s2u-text); cursor: pointer;
}
.shr-af-sheet__body, .shr-af-sheet__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px; }
.shr-af-sheet__body .shr-af-opt { min-height: 54px; }
.shr-af-sheet__body .shr-af-opts > .shr-af-opt:first-child { border-top: 0; }
.shr-af-sheet__body .shr-af-box { width: 20px; height: 20px; }
.shr-af-sheet__body .shr-af-opt input:checked + .shr-af-box::after { left: 6px; top: 2px; }
.shr-af-sheet__body .shr-af-opt__code { width: 40px; font-size: 19px; }
.shr-af-sheet__body .shr-af-helper { margin: 0 -16px; }
.shr-af-sheet__body > .shr-af-presets { padding-top: 14px; }
.shr-af-sheet__body > .shr-af-note { margin-bottom: 14px; }
.shr-af-sheet__foot {
	flex: none; display: flex; gap: 10px; background: #fff;
	padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--s2u-divider);
}
.shr-af-sheet__foot .shr-af-btn { height: 48px; }
.shr-af-sheet__foot > .shr-af-btn--ghost { flex: 1; }
.shr-af-sheet__foot > .shr-af-btn--solid { flex: 2; }

/* Single-facet sheet: anchored to the bottom, as tall as its content. */
.shr-af-sheet--one { margin: auto auto 0; width: min(100%, 560px); max-height: 88vh; max-height: 88dvh; }

/* Full sheet: accordion. */
.shr-af-sheet--all { margin: 64px 0 0; height: calc(100vh - 64px); height: calc(100dvh - 64px); max-height: none; }
.shr-af-acc { display: block; border-bottom: 1px solid var(--s2u-divider); }
.shr-af-acc > summary, .shr-af-acc--switch {
	display: flex; align-items: center; gap: 12px; min-height: 52px; cursor: pointer; list-style: none;
}
.shr-af-acc > summary::-webkit-details-marker { display: none; }
.shr-af-acc__label { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.shr-af-acc__val { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--s2u-neutral-500); }
.shr-af-acc__val.is-set { color: var(--shr-af-steel); font-weight: 600; }
.shr-af-acc__icon { position: relative; flex: none; width: 14px; height: 14px; }
.shr-af-acc__icon::before, .shr-af-acc__icon::after { content: ''; position: absolute; background: var(--s2u-text); }
.shr-af-acc__icon::before { left: 0; top: 6px; width: 14px; height: 2px; }
.shr-af-acc__icon::after { left: 6px; top: 0; width: 2px; height: 14px; }
.shr-af-acc[open] .shr-af-acc__icon::after { display: none; }
.shr-af-acc__body { padding-bottom: 14px; }
.shr-af-acc__body .shr-af-opts > .shr-af-opt:first-child { border-top: 0; }
.shr-af-acc__body .shr-af-group { padding: 10px 0 4px; border: 0; border-top: 1px solid var(--s2u-divider); }
.shr-af-acc__body .shr-af-group:first-child { border-top: 0; }
.shr-af-catlinks { display: flex; flex-direction: column; }
.s2u-page .shr-af .shr-af-catlinks a { display: flex; align-items: center; min-height: 46px; border-top: 1px solid var(--s2u-divider); color: var(--s2u-text); font-size: 14px; text-decoration: none; }
.s2u-page .shr-af .shr-af-catlinks a:first-child { border-top: 0; }

.shr-af-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shr-af-cell {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
	height: 52px; border: 1px solid var(--shr-af-line); cursor: pointer;
}
.shr-af-cell__code { font-family: var(--s2u-font-heading); font-size: 18px; font-weight: 600; line-height: 1.1; }
.shr-af-cell__n { font-size: 11px; }
.shr-af-cell:has(input:checked) { background: var(--s2u-text); border-color: var(--s2u-text); color: #fff; }
.shr-af-cell:has(input:checked) .shr-af-cell__n { color: rgba(255, 255, 255, .7); }
.shr-af-cell:has(input:focus-visible) { outline: 2px solid var(--shr-af-steel); outline-offset: 2px; }

html.shr-af-locked { overflow: hidden; }

/* ═══════════ ≤1100px: sticky chip row replaces the bar ═══════════
   Only with html.shr-af-js (set in <head>, dropped again if the script never
   initialises) — the row's buttons and sheets need JS. Without it the plain
   desktop forms stay, wrapping onto extra lines (see the no-JS block below). */
@media (max-width: 1100px) {
	.shr-af-js .shr-af-bar, .shr-af-js .shr-af-toolbar .shr-af-achips, .shr-af-js .shr-af-toolbar__sep, .shr-af-js .shr-af-toolbar .shr-af-clearall { display: none; }

	.shr-af-js .shr-af-mrow {
		position: sticky; top: var(--shr-af-sticky-top, 0px); z-index: 50;
		display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
		margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 10px clamp(16px, 4vw, 48px);
		background: #fff; border-top: 1px solid var(--s2u-divider); border-bottom: 1px solid var(--s2u-divider);
		box-shadow: 0 4px 12px rgba(17, 27, 39, .06);
	}
	.shr-af-js .shr-af-mrow::-webkit-scrollbar { display: none; }
	.shr-af-tabs + .shr-af .shr-af-mrow { border-top: 0; } /* the selected tab flows into the row */
	.shr-af-mbtn {
		flex: none; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
		background: #fff; border: 1px solid var(--s2u-text); border-radius: 0; color: var(--s2u-text);
		font-family: var(--s2u-font-body); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
	}
	.shr-af-mbtn__badge {
		display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px;
		background: var(--s2u-text); color: #fff; font-size: 11.5px; font-weight: 700;
	}
	.shr-af-mrow .shr-af-chip { max-width: 240px; }

	.shr-af-js .shr-af-toolbar { min-height: 56px; margin-top: 10px; margin-bottom: 18px; border-top-width: 1px; }

	/* No JS: the desktop bar and toolbar wrap instead of scrolling (a scroll
	   container would clip the dropdown panels); panels fit the screen. */
	html:not(.shr-af-js) .shr-af-bar { flex-wrap: wrap; height: auto; min-height: 64px; padding: 10px; }
	html:not(.shr-af-js) .shr-af-dd--more { position: relative; margin-left: 0; }
	html:not(.shr-af-js) .shr-af-panel { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; max-width: 560px; max-height: 80vh; overflow-y: auto; }
	html:not(.shr-af-js) .shr-af-groups { grid-template-columns: 1fr; }
	html:not(.shr-af-js) .shr-af-toolbar, html:not(.shr-af-js) .shr-af-achips { flex-wrap: wrap; }

	/* Tablet: the full sheet is a left-side drawer. */
	.shr-af-sheet--all { margin: 0 auto 0 0; width: 440px; max-width: 100%; height: 100vh; height: 100dvh; }
}

/* ═══════════ ≤767px ═══════════ */
@media (max-width: 767px) {
	.shr-arc-header__intro { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
	.shr-arc-header__intro p { display: inline; }

	.shr-af-tabs { gap: 2px; }
	.s2u-page .shr-af-tabs a.shr-af-tab { min-height: 44px; padding: 0 12px; font-size: 12.5px; }

	.shr-af-js .shr-af-toolbar { display: none; }
	.shr-af-js .shr-af-mcount {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		padding: 4px 0; margin-bottom: 14px; font-size: 13.5px; color: var(--s2u-neutral-600);
	}
	.shr-af-js .shr-af-mcount strong { color: var(--s2u-text); }
	html:not(.shr-af-js) .shr-af-sort { margin-left: 0; }
	html:not(.shr-af-js) .shr-af-sort select { min-width: 0; }

	.shr-arc-products { gap: 22px; }

	.shr-af-sheet--all { margin: 64px 0 0; width: 100%; height: calc(100vh - 64px); height: calc(100dvh - 64px); }
	.shr-af-sheet--one { width: 100%; }

	.shr-af-empty__btns { flex-direction: column; }
	.shr-af-empty__btns .shr-af-btn { flex: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.shr-af *, .shr-af *::after { transition: none !important; }
}
