/* Fliesenfinder Frontend. Alle Regeln sind unter .ff gekapselt, damit das Theme nicht hineinwirkt. */
.ff {
  --ff-primary: #173866;
  --ff-accent: #138286;
  --ff-highlight: #FE9B1E;
  --ff-surface: #EBEEF2;
  --ff-card: #ffffff;
  --ff-text: #1d2a3a;
  --ff-muted: #5a6778;
  --ff-line: #d5dbe3;
  --ff-radius: 3px;
  --ff-border: 1px;
  --ff-shadow: none;
  --ff-cols: 3;
  --ff-cols-m: 2;
  --ff-cols-s: 2;
  --ff-cols-active: var(--ff-cols);
  --ff-gap: 6px;
  --ff-card-line: #d5dbe3;
  --ff-card-border: 0px;
  --ff-ratio: 1 / 1;
  --ff-button: var(--ff-primary);
  --ff-button-text: #ffffff;
  --ff-cta: var(--ff-highlight);
  --ff-cta-text: var(--ff-primary);
  --ff-fs: 15px;
  font-family: inherit;
  font-size: var(--ff-fs);
  line-height: 1.5;
  color: var(--ff-text);
  text-align: left;
}
:where(.ff) *, :where(.ff) *::before, :where(.ff) *::after { box-sizing: border-box; }
.ff [hidden], .ff[hidden] { display: none !important; }
:where(.ff) button, :where(.ff) input, :where(.ff) select, :where(.ff) textarea {
  font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none;
  box-shadow: none; text-shadow: none;
}
:where(.ff) button { background: none; border: 0; padding: 0; cursor: pointer; line-height: inherit; min-height: 0; height: auto; }
:where(.ff) :where(h1, h2, h3, h4, p, ul, fieldset, legend, table) { margin: 0; padding: 0; border: 0; }
:where(.ff) ul { list-style: none; }
:where(.ff) img { max-width: 100%; display: block; }
.ff :focus { outline: none; }
.ff :focus-visible { outline: 2px solid var(--ff-accent); outline-offset: 2px; }
.ff-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf */
.ff-intro { margin-bottom: 20px; }
.ff-intro h1 { font-size: 1.9em; line-height: 1.15; font-weight: 600; color: var(--ff-primary); letter-spacing: -0.01em; }
.ff-intro p { margin-top: 6px; color: var(--ff-muted); max-width: 62ch; }
.ff-notice { margin-top: 8px; font-size: 0.87em; color: var(--ff-muted); max-width: 70ch; }
.ff-notice summary { cursor: pointer; color: var(--ff-accent); display: inline; }
.ff-notice p { margin-top: 6px; }

/* Suche */
.ff-search { position: relative; display: flex; align-items: center; background: var(--ff-card);
  border: var(--ff-border) solid var(--ff-line); border-radius: var(--ff-radius); transition: border-color .15s; }
.ff-search:focus-within { border-color: var(--ff-primary); box-shadow: 0 0 0 3px rgba(19,130,134,.18); }
.ff-search > span > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ff-muted); pointer-events: none; }
.ff .ff-search input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; padding: 0 44px 0 46px; font-size: 1.05em; border-radius: var(--ff-radius); }
.ff .ff-search input::placeholder { color: #8994a3; }
.ff .ff-search input::-webkit-search-cancel-button { display: none; }
.ff-search-clear { position: absolute; right: 8px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ff-muted); }
.ff-search-clear:hover { background: var(--ff-surface); }
.ff-search-clear svg { width: 18px; height: 18px; }
.ff-search-clear[hidden] { display: none; }

/* Schnelleinstieg */
.ff-quick { display: flex; gap: 8px; margin: 14px 0 22px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ff-quick::-webkit-scrollbar { display: none; }
.ff-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: var(--ff-border) solid var(--ff-line); background: var(--ff-card); font-size: .93em; white-space: nowrap; transition: background .15s, border-color .15s; }
.ff .ff-pill:hover { border-color: var(--ff-primary); }
.ff .ff-pill[aria-pressed="true"] { background: var(--ff-primary); border-color: var(--ff-primary); color: #fff; }
.ff-pill-sep { flex: none; width: 1px; background: var(--ff-line); margin: 4px 4px; }
.ff-dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--ff-cta); }

/* Layout */
.ff-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }

/* Filterspalte */
.ff-filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.ff-sheet-head, .ff-sheet-foot { display: none; }
.ff-group { border-top: var(--ff-border) solid var(--ff-line); }
.ff-group:first-child { border-top: 0; }
.ff-group-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 0; font-weight: 600; color: var(--ff-primary); text-align: left; }
.ff-group-toggle svg { width: 16px; height: 16px; transition: transform .2s; flex: none; }
.ff-group-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ff-group-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ff-accent); color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-weight: 600; }
.ff-group-body { padding: 0 0 14px; }
.ff-group-body[hidden] { display: none; }
.ff-sub { font-size: .8em; color: var(--ff-muted); margin: 10px 0 6px; }
.ff-sub:first-child { margin-top: 0; }
.ff-opt { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; font-size: .93em; }
.ff-opt input { width: 17px; height: 17px; accent-color: var(--ff-accent); flex: none; margin: 0; }
.ff-opt-n { margin-left: auto; font-size: .85em; color: var(--ff-muted); font-variant-numeric: tabular-nums; }
.ff-opt.is-zero { color: #a3acb8; }
.ff-opt[hidden] { display: none; }
.ff-more { margin-top: 6px; font-size: .87em; color: var(--ff-accent); text-decoration: underline; text-underline-offset: 2px; }
.ff .ff-list-search { width: 100%; height: 36px; padding: 0 10px; margin-bottom: 8px; border: var(--ff-border) solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-card); font-size: .9em; }
.ff-list-scroll { max-height: 240px; overflow-y: auto; padding-right: 4px; }

.ff-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; }
.ff-swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.ff-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ff-swatch-c { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(23,56,102,.18); transition: transform .12s; }
.ff-swatch input:checked + .ff-swatch-c { box-shadow: 0 0 0 2px var(--ff-card), 0 0 0 4px var(--ff-primary); }
.ff-swatch input:focus-visible + .ff-swatch-c { outline: 2px solid var(--ff-accent); outline-offset: 5px; }
.ff-swatch:hover .ff-swatch-c { transform: scale(1.08); }
.ff-swatch.is-zero .ff-swatch-c { opacity: .3; }
.ff-swatch-l { font-size: 11px; color: var(--ff-muted); text-align: center; line-height: 1.2; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ff-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-chip { position: relative; cursor: pointer; }
.ff-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ff-chip span { display: inline-block; padding: 5px 10px; border: var(--ff-border) solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-card); font-size: .87em; font-variant-numeric: tabular-nums; }
.ff-chip:hover span { border-color: var(--ff-primary); }
.ff-chip input:checked + span { background: var(--ff-primary); border-color: var(--ff-primary); color: #fff; }
.ff-chip input:focus-visible + span { outline: 2px solid var(--ff-accent); outline-offset: 2px; }
.ff-chip.is-zero span { color: #a3acb8; }

/* Ergebnisleiste */
.ff-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ff-count { font-size: 1.15em; color: var(--ff-primary); }
.ff-count strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.ff-count small { font-size: .78em; color: var(--ff-muted); margin-left: 4px; }
.ff-sort { display: flex; align-items: center; gap: 8px; font-size: .9em; color: var(--ff-muted); }
.ff .ff-sort select { height: 38px; padding: 0 30px 0 10px; border: var(--ff-border) solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-card); color: var(--ff-text); }
.ff-filter-btn { display: none; }
.ff-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; min-height: 0; }
.ff-active:empty { display: none; }
.ff-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: var(--ff-surface); border-radius: var(--ff-radius); font-size: .87em; color: var(--ff-primary); }
.ff-tag svg { width: 14px; height: 14px; }
.ff-tag:hover { background: #dde3ea; }
.ff-reset { font-size: .87em; color: var(--ff-accent); text-decoration: underline; text-underline-offset: 2px; padding: 4px 6px; }

/* Raster: Karten liegen wie Fliesen im Fugenbild */
.ff-grid { display: grid; grid-template-columns: repeat(var(--ff-cols-active), minmax(0, 1fr)); gap: var(--ff-gap); background: var(--ff-surface); padding: var(--ff-gap); border-radius: calc(var(--ff-radius) + 2px); }
.ff-grid > li { display: flex; min-width: 0; }
/* Die Karte füllt ihre Rasterzelle, dadurch enden alle Kacheln einer Reihe auf gleicher Höhe. */
.ff-card { display: flex; flex-direction: column; flex: 1 1 auto; width: 100%; height: 100%; background: var(--ff-card); border: var(--ff-card-border) solid var(--ff-card-line); border-radius: var(--ff-radius); overflow: hidden; box-shadow: var(--ff-shadow); text-align: left; transition: transform .18s ease; }
.ff .ff-card:hover { transform: translateY(-2px); }
.ff-card:hover .ff-card-img > i { transform: scale(1.04); }
.ff-card-img { position: relative; flex: none; aspect-ratio: var(--ff-ratio); overflow: hidden; background: var(--ff-surface); }
.ff-card-img > i, .ff-card-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ff-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.ff-badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 2px; background: rgba(255,255,255,.92); color: var(--ff-primary); }
.ff-badge--new { background: var(--ff-cta); color: var(--ff-cta-text); }
.ff-card-body { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
/* Feste Zeilenzahlen halten die Kacheln ruhig, der volle Text steht im aria-label und in der Detailansicht. */
.ff-card-mfr { font-size: .8em; color: var(--ff-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-card-title { font-size: 1.02em; font-weight: 600; color: var(--ff-primary); line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ff-card-meta { font-size: .85em; color: var(--ff-muted); padding-top: 4px; margin-top: auto; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* Platzhalter statt Foto: Farbfläche mit leichter Materialanmutung */
.ff-ph { position: absolute; inset: 0; display: block; background-color: var(--c, #d8d4cc); }
.ff-ph::after { content: ""; position: absolute; inset: 0; }
.ff-ph--holz::after, .ff-ph--fischgrat::after { background: repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 23px, rgba(255,255,255,.06) 23px 25px, transparent 25px 41px); }
.ff-ph--marmor::after, .ff-ph--onyx::after, .ff-ph--travertin::after { background: linear-gradient(122deg, transparent 30%, rgba(255,255,255,.16) 36%, transparent 46%), linear-gradient(58deg, transparent 62%, rgba(0,0,0,.035) 66%, transparent 71%); }
.ff-ph--beton::after, .ff-ph--stein::after, .ff-ph--zement-stein::after, .ff-ph--kalkstein::after, .ff-ph--terrazzo::after, .ff-ph--cotto::after { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.14), transparent 55%), radial-gradient(circle at 75% 70%, rgba(0,0,0,.06), transparent 50%); }
.ff-ph--gestreift::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.06) 0 1px, transparent 1px 12px); }

.ff-loadmore { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 22px; }
.ff-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: var(--ff-radius); font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.ff .ff-btn--line { border: var(--ff-border) solid var(--ff-button); color: var(--ff-button); background: var(--ff-card); }
.ff .ff-btn--line:hover { background: var(--ff-button); color: var(--ff-button-text); }
.ff .ff-btn--solid { background: var(--ff-button); color: var(--ff-button-text); }
.ff .ff-btn--cta { background: var(--ff-cta); color: var(--ff-cta-text); }
.ff .ff-btn--solid:hover, .ff .ff-btn--cta:hover { filter: brightness(.92); }
.ff-loadmore small { color: var(--ff-muted); font-size: .85em; }

.ff-empty { background: var(--ff-surface); border-radius: var(--ff-radius); padding: 36px 28px; }
.ff-empty h2 { font-size: 1.2em; color: var(--ff-primary); }
.ff-empty p { margin-top: 6px; color: var(--ff-muted); }
.ff-empty-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Detail und Filter-Sheet */
.ff-overlay { position: fixed; inset: 0; background: rgba(15, 30, 55, .45); z-index: 99998; opacity: 0; transition: opacity .2s; }
.ff-overlay.is-open { opacity: 1; }
.ff-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--ff-card); z-index: 99999; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease; box-shadow: -12px 0 40px rgba(15, 30, 55, .16);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ff-panel.is-open { transform: none; }
.ff-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--ff-line); }
.ff-panel-head strong { flex: 1; font-size: .95em; color: var(--ff-muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ff-primary); flex: none; }
.ff-icon-btn:hover { background: var(--ff-surface); }
.ff-icon-btn svg { width: 22px; height: 22px; }
.ff-panel-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ff-panel-foot { padding: 12px 16px; border-top: 1px solid var(--ff-line); display: flex; gap: 10px; align-items: center; }
.ff-panel-foot .ff-btn { flex: 1; }
.ff-d-img { position: relative; aspect-ratio: 4 / 3; }
.ff-d-main { padding: 20px 22px 26px; }
.ff-d-mfr { font-size: .9em; color: var(--ff-muted); }
.ff-d-title { font-size: 1.6em; line-height: 1.2; font-weight: 600; color: var(--ff-primary); margin-top: 2px; }
.ff-d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ff-d-tags span { font-size: .82em; padding: 3px 9px; background: var(--ff-surface); border-radius: 2px; color: var(--ff-primary); }
.ff-d-tags .is-new { background: var(--ff-cta); color: var(--ff-cta-text); }
.ff-d-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--ff-accent); font-size: .92em; text-decoration: underline; text-underline-offset: 2px; }
.ff-d-link svg { width: 15px; height: 15px; }
.ff-d-h { font-size: 1.05em; font-weight: 600; color: var(--ff-primary); margin: 26px 0 4px; }
.ff-d-hint { font-size: .85em; color: var(--ff-muted); margin-bottom: 8px; }
.ff-table-wrap { overflow-x: auto; border: 1px solid var(--ff-line); border-radius: var(--ff-radius); }
.ff table.ff-table { width: 100%; border-collapse: collapse; font-size: .87em; font-variant-numeric: tabular-nums; background: none; }
.ff-table th, .ff-table td { padding: 9px 10px; text-align: left; border: 0; border-bottom: 1px solid var(--ff-line); white-space: nowrap; vertical-align: middle; background: none; }
.ff-table th { font-weight: 600; color: var(--ff-muted); font-size: .92em; background: var(--ff-surface); }
.ff-table tr:last-child td { border-bottom: 0; }
.ff-table tr.is-match td { background: rgba(19, 130, 134, .06); }
.ff-table tr.is-sel td { background: rgba(23, 56, 102, .08); }
.ff-table input { width: 18px; height: 18px; accent-color: var(--ff-primary); margin: 0; }
.ff-table label { display: block; cursor: pointer; }
.ff-siblings { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ff-sib { text-align: left; font-size: .8em; color: var(--ff-text); }
.ff-sib i { display: block; position: relative; aspect-ratio: 1; border-radius: 2px; margin-bottom: 4px; overflow: hidden; }
.ff-sib:hover i { outline: 2px solid var(--ff-primary); outline-offset: 1px; }

/* Anfrage */
.ff-form { display: grid; gap: 14px; padding: 20px 22px 26px; }
.ff-form h2 { font-size: 1.3em; color: var(--ff-primary); }
.ff-form-sum { background: var(--ff-surface); border-radius: var(--ff-radius); padding: 12px 14px; font-size: .88em; }
.ff-form-sum strong { color: var(--ff-primary); }
.ff-form-sum ul { margin-top: 6px; display: grid; gap: 2px; color: var(--ff-muted); }
.ff-field { display: grid; gap: 4px; }
.ff-field label { font-size: .88em; font-weight: 600; color: var(--ff-primary); }
.ff .ff-field input, .ff .ff-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: var(--ff-border) solid var(--ff-line); border-radius: var(--ff-radius); background: var(--ff-card); }
.ff .ff-field input:focus, .ff .ff-field textarea:focus { border-color: var(--ff-primary); box-shadow: 0 0 0 3px rgba(19,130,134,.18); }
.ff-field [aria-invalid="true"] { border-color: #b3261e !important; }
.ff-err { font-size: .82em; color: #b3261e; }
.ff-err[hidden] { display: none; }
.ff-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ff-form-status { font-size: .88em; color: #b3261e; background: #fcefee; border-radius: var(--ff-radius); padding: 10px 12px; }
.ff-form-status[hidden] { display: none; }
.ff .ff-btn[disabled] { opacity: .7; cursor: progress; }
.ff-form--sent { justify-items: start; }
.ff-sent-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ff-surface); color: var(--ff-accent); }
.ff-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ff-small { font-size: .8em; color: var(--ff-muted); }

@media (prefers-reduced-motion: reduce) {
  .ff *, .ff-panel, .ff-overlay { transition: none !important; }
}

/* Umbrüche nach der Breite, die das Theme dem Finder gibt, nicht nach der Bildschirmbreite.
   Das Script setzt ff-w-m (mittel), ff-w-s (schmal) und ff-w-xs (sehr schmal) am Container. */
.ff.ff-w-m { --ff-cols-active: var(--ff-cols-m, 2); }
.ff-w-m .ff-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.ff.ff-w-s { --ff-cols-active: var(--ff-cols-s, 2); }
.ff-w-s .ff-intro h1 { font-size: 1.5em; }
.ff-w-s .ff-layout { display: block; }
.ff-w-s .ff-filters { position: fixed; inset: 0; top: 0; max-height: none; z-index: 99999; background: var(--ff-card); padding: 0;
display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s ease; visibility: hidden;
padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ff-w-s .ff-filters.is-open { transform: none; visibility: visible; }
.ff-w-s .ff-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; border-bottom: 1px solid var(--ff-line); }
.ff-w-s .ff-sheet-head h2 { font-size: 1.15em; color: var(--ff-primary); }
.ff-w-s .ff-sheet-body { flex: 1; overflow-y: auto; padding: 0 18px; }
.ff-w-s .ff-sheet-foot { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--ff-line); }
.ff-w-s .ff-sheet-foot .ff-btn { flex: 1; }
.ff-w-s .ff-sheet-foot .ff-btn--solid { flex: 1.5; }
.ff-w-s .ff-group-toggle { padding: 15px 0; }
.ff-w-s .ff-opt { padding: 8px 0; }
.ff-w-s .ff-filter-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: var(--ff-border) solid var(--ff-button); border-radius: var(--ff-radius); color: var(--ff-button); font-weight: 600; }
.ff-w-s .ff-filter-btn svg { width: 18px; height: 18px; }
.ff-w-s .ff-bar { position: sticky; top: 0; z-index: 5; background: var(--ff-card); padding: 8px 0; margin: 0 0 8px; }
.ff-w-s .ff-sort span { display: none; }
.ff-w-s .ff-active { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ff-w-s .ff-active > * { flex: none; }
.ff-w-s .ff-card-body { padding: 8px 9px 10px; }
.ff-w-s .ff-card-meta { display: none; }
.ff-w-s .ff-card-title { font-size: .95em; }
.ff-w-xs .ff-card-mfr { display: none; }

/* Detailansicht und Formular liegen direkt am body, hier zählt die Bildschirmbreite */
@media (max-width: 820px) {
  .ff-panel { width: 100%; transform: translateY(100%); }
  .ff-panel.is-open { transform: none; }
  .ff-d-main, .ff-form { padding: 16px 16px 22px; }
  .ff-grid2 { grid-template-columns: 1fr; }
}

/* Lade- und Fehlerzustand vor dem Start des Scripts */
.ff-mount { min-height: 240px; }
.ff-mount .ff-loading, .ff-load-error { padding: 40px 24px; background: var(--ff-surface, #EBEEF2); border-radius: 3px; color: #5a6778; text-align: center; margin: 0; }
.ff-mount .ff-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border: 2px solid #c3cad4; border-top-color: #173866; border-radius: 50%; animation: ff-spin .8s linear infinite; }
@keyframes ff-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ff-mount .ff-loading::before { animation: none; } }
.ff-admin-hint { padding: 14px 18px; border-left: 4px solid #FE9B1E; background: #fff8ee; color: #1d2a3a; }
.ff-d-text { margin-top: 14px; color: var(--ff-text); line-height: 1.55; }

/* Umschalter zwischen den Katalogen (Fliesen, Werkzeuge, Verlegesysteme, SPC Vinyl), bricht bei schmalen Breiten um */
.ff-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 22px; background: var(--ff-surface); border-radius: calc(var(--ff-radius) + 4px); }
.ff .ff-switch-tab { min-height: 42px; padding: 0 20px; border-radius: var(--ff-radius); font-weight: 600; color: var(--ff-primary); transition: background .15s, color .15s; }
.ff .ff-switch-tab:hover { background: rgba(255,255,255,.6); }
.ff .ff-switch-tab[aria-selected="true"] { background: var(--ff-card); box-shadow: 0 1px 3px rgba(15,30,55,.12); }
.ff .ff-switch-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: inherit; font-weight: 600; box-shadow: none; border: 0; }
.ff .ff-switch-link:hover, .ff .ff-switch-link:focus { color: var(--ff-primary); text-decoration: none; }
.ff .ff-switch-link:focus-visible { outline: 2px solid var(--ff-accent); outline-offset: 2px; }
.ff .ff-switch-pdf { font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1; padding: 3px 5px; border-radius: 3px; background: var(--ff-primary); color: var(--ff-card); }
.ff-host { min-width: 0; }
.ff-w-s .ff-switch, .ff-mount .ff-switch { max-width: 100%; }

/* Werkzeuge: Platzhalter in der Farbe des Anwendungsbereichs, angedeutete Scheibe */
.ff-ph--tool::after { background:
  radial-gradient(circle at 50% 50%, rgba(255,255,255,.95) 0 9%, transparent 9.5%),
  radial-gradient(circle at 50% 50%, transparent 0 30%, rgba(255,255,255,.18) 30.5% 31.5%, transparent 32%),
  radial-gradient(circle at 50% 50%, rgba(0,0,0,.10) 0 38%, transparent 38.5%); }
.ff-badge--slv { background: #1f3a2b; color: #fff; }
.ff-d-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 16px 0 0; font-size: .92em; }
.ff-d-facts dt { color: var(--ff-muted); }
.ff-d-facts dd { margin: 0; color: var(--ff-text); }

/* Echte Produktfotos in Detail und Weitere-Liste, Werkzeuge freigestellt auf Weiß statt beschnitten */
.ff-d-img > img, .ff-sib i > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ff .ff-img-contain { object-fit: contain; background: #fff; padding: 7%; }
.ff-d-img > img.ff-img-contain { padding: 5%; }
