/*
 * FILTECH Produktindex – Prototyp-CSS
 *
 * Klassen: Präfix "pi-", Schreibweise BEM (block__element--modifier), Zustände als "is-…".
 * Dieselben Klassen stehen im serverseitig gerenderten HTML und in den Vue-Templates,
 * damit beide Schichten ohne Sprung gleich aussehen.
 * Farben und Abstände als Variablen – Anpassung an das filtech.de-Layout nur hier oben.
 */

:root {
  --pi-brand: #0b4a8b;
  --pi-brand-dark: #08335f;
  --pi-brand-tint: #e8f0f9;
  --pi-accent: #f2a900;
  --pi-new: #1b7f4b;
  --pi-new-tint: #e3f4ea;
  --pi-danger: #b42318;

  --pi-text: #1b2430;
  --pi-text-muted: #5b6878;
  --pi-line: #dde3ea;
  --pi-line-strong: #c3ccd6;
  --pi-bg: #ffffff;
  --pi-bg-soft: #f4f6f9;

  --pi-radius: 6px;
  --pi-gap: 16px;
  --pi-max: 1240px;
  --pi-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body.pi {
  margin: 0;
  font: 16px/1.5 var(--pi-font);
  color: var(--pi-text);
  background: var(--pi-bg);
}
.pi a { color: var(--pi-brand); }
.pi a:hover { color: var(--pi-brand-dark); }
.pi :focus-visible { outline: 2px solid var(--pi-brand); outline-offset: 2px; }
.pi button { font: inherit; color: inherit; }

.pi-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pi-skip { position: absolute; left: -9999px; top: 0; padding: 8px 12px; background: var(--pi-bg); z-index: 100; }
.pi-skip:focus { left: 8px; top: 8px; }
.pi-muted { color: var(--pi-text-muted); }
.pi-print-only { display: none; }

/* ------------------------------------------------------------ Kopf */

.pi-header { background: var(--pi-brand); color: #fff; }
.pi-header__inner {
  max-width: var(--pi-max); margin: 0 auto; padding: 0 var(--pi-gap);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; min-height: 56px;
}
.pi-brand { color: #fff !important; text-decoration: none; font-weight: 700; letter-spacing: .04em; font-size: 1.15rem; }
.pi-brand__year { font-weight: 400; opacity: .8; }
.pi-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pi-nav__link {
  color: #fff !important; text-decoration: none; padding: 16px 10px; border-bottom: 3px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.pi-nav__link:hover { background: rgba(255, 255, 255, .08); }
.pi-nav__link[aria-current="page"] { border-bottom-color: var(--pi-accent); }
.pi-nav__count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: .75rem; line-height: 20px;
  text-align: center; background: var(--pi-accent); color: var(--pi-text); font-weight: 700;
}
.pi-lang { margin-inline-start: auto; position: relative; font-size: .875rem; }
.pi-lang__toggle {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: var(--pi-radius); color: #fff;
}
.pi-lang__toggle::-webkit-details-marker { display: none; }
.pi-lang__toggle::after { content: "▾"; font-size: .75rem; opacity: .8; }
.pi-lang__toggle:hover, .pi-lang[open] .pi-lang__toggle { background: rgba(255, 255, 255, .14); }
.pi-lang__icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.pi-lang__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 60; list-style: none; margin: 0; padding: 6px;
  min-width: 170px; background: var(--pi-bg); border: 1px solid var(--pi-line); border-radius: var(--pi-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
}
.pi-lang__link { display: block; padding: 6px 10px; border-radius: 4px; color: var(--pi-text) !important; text-decoration: none; }
.pi-lang__link:hover { background: var(--pi-bg-soft); }
.pi-lang__link[aria-current="true"] { font-weight: 700; background: var(--pi-brand-tint); color: var(--pi-brand-dark) !important; }
@media (max-width: 719px) {
  .pi-header__inner { gap: 0 12px; min-height: 0; }
  .pi-brand { padding: 10px 0; }
  .pi-nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pi-gap)); padding: 0 calc(var(--pi-gap) - 8px); }
  .pi-nav__link { padding: 8px; white-space: nowrap; }
}

/* ------------------------------------------------------------ Rahmen */

.pi-main { padding-block: 16px 48px; }
.pi-footer { border-top: 1px solid var(--pi-line); color: var(--pi-text-muted); font-size: .875rem; }
.pi-footer p { max-width: var(--pi-max); margin: 0 auto; padding: 16px var(--pi-gap); }
.pi-noscript { max-width: var(--pi-max); margin: 0 auto 16px; padding: 12px var(--pi-gap); background: var(--pi-bg-soft); }

.pi-breadcrumb ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; font-size: .875rem; color: var(--pi-text-muted); }
.pi-breadcrumb li + li::before { content: "›"; margin: 0 8px; }
[dir="rtl"] .pi-breadcrumb li + li::before { content: "‹"; }
.pi-breadcrumb a { color: var(--pi-text-muted); }

.pi-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.2; margin: 0 0 8px; }
.pi-lead { margin: 0 0 24px; max-width: 60ch; color: var(--pi-text-muted); font-size: 1.0625rem; }
.pi-h2 { font-size: 1.375rem; margin: 32px 0 12px; }
.pi-h3 { font-size: 1.0625rem; margin: 0 0 8px; }
.pi-hint { font-size: .875rem; color: var(--pi-text-muted); margin: 8px 0 0; }
.pi-empty { padding: 24px; background: var(--pi-bg-soft); border-radius: var(--pi-radius); color: var(--pi-text-muted); }

.pi-count {
  display: inline-block; min-width: 1.75em; padding: 0 6px; border-radius: 10px; font-size: .75rem; line-height: 1.6;
  text-align: center; background: var(--pi-bg-soft); color: var(--pi-text-muted); font-variant-numeric: tabular-nums;
}
.pi-count--empty { background: none; font-style: italic; }

.pi-badge {
  display: inline-block; margin-inline-start: 8px; padding: 0 6px; border-radius: 4px; font-size: .6875rem; font-weight: 700;
  line-height: 1.6; letter-spacing: .02em; text-transform: uppercase; vertical-align: .15em; white-space: nowrap;
}
.pi-badge--new { background: var(--pi-new-tint); color: var(--pi-new); }
.pi-title .pi-badge { font-size: .75rem; vertical-align: .4em; }

/* ------------------------------------------------------------ Bedienelemente */

.pi-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pi-radius);
  border: 1px solid var(--pi-brand); background: var(--pi-brand); color: #fff !important; cursor: pointer;
  text-decoration: none; font-weight: 600; font-size: .9375rem; line-height: 1.3;
}
.pi-btn:hover { background: var(--pi-brand-dark); border-color: var(--pi-brand-dark); }
.pi-btn--ghost { background: var(--pi-bg); color: var(--pi-brand) !important; }
.pi-btn--ghost:hover { background: var(--pi-brand-tint); }
.pi-linkbtn { background: none; border: 0; padding: 0; color: var(--pi-brand) !important; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: .875rem; }
.pi-linkbtn--danger { color: var(--pi-danger) !important; }
.pi-iconbtn {
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--pi-text-muted);
}
.pi-iconbtn:hover { background: var(--pi-bg-soft); color: var(--pi-text); }
.pi-pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pi-brand); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }

/* Suche */
.pi-search { position: relative; flex: 1 1 320px; max-width: 640px; }
.pi-search__icon { position: absolute; inset-inline-start: 12px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--pi-text-muted); stroke-width: 2; pointer-events: none; }
.pi-search__input {
  width: 100%; padding-block: 10px; padding-inline: 42px 40px; border: 1px solid var(--pi-line-strong); border-radius: var(--pi-radius);
  font: inherit; background: var(--pi-bg); color: var(--pi-text); -webkit-appearance: none; appearance: none;
}
.pi-search__input::-webkit-search-cancel-button { display: none; }
.pi-search__input:focus { border-color: var(--pi-brand); outline: none; box-shadow: 0 0 0 3px var(--pi-brand-tint); }
.pi-search__clear { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; cursor: pointer; font-size: 1.4rem; color: var(--pi-text-muted); }
.pi-search--large { max-width: 760px; }
.pi-search--large .pi-search__input { padding-top: 14px; padding-bottom: 14px; font-size: 1.125rem; }

/* Merken */
.pi-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.pi-mark:hover { background: var(--pi-bg-soft); }
.pi-mark__icon { width: 22px; height: 22px; fill: none; stroke: var(--pi-line-strong); stroke-width: 1.6; stroke-linejoin: round; }
.pi-mark:hover .pi-mark__icon { stroke: var(--pi-accent); }
.pi-mark.is-on .pi-mark__icon { fill: var(--pi-accent); stroke: var(--pi-accent); }

/* Checkboxen in Facetten */
.pi-check { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; cursor: pointer; font-size: .9375rem; line-height: 1.35; }
.pi-check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--pi-brand); flex: none; }
.pi-check__label { flex: 1; }
.pi-check__count { color: var(--pi-text-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.pi-check--solo { padding: 12px 0 0; border-top: 1px solid var(--pi-line); }

/* ------------------------------------------------------------ Werkzeug: Suche, Filter, Ergebnis */

.pi-app { margin-bottom: 16px; }
.pi-tool__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.pi-tool__body { display: block; }

.pi-facet { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.pi-facet__title { font-weight: 700; font-size: .9375rem; margin-bottom: 6px; padding: 0; }
.pi-facet__find { width: 100%; margin: 2px 0 6px; padding: 6px 8px; border: 1px solid var(--pi-line-strong); border-radius: var(--pi-radius); font: inherit; font-size: .875rem; }
.pi-facet__list { list-style: none; margin: 0; padding: 0; }
.pi-facet__more { margin-top: 4px; }
.pi-facets__head, .pi-facets__foot { display: none; }

/* Seitenleiste (Ausstellerliste) */
@media (min-width: 960px) {
  .pi-tool--sidebar .pi-tool__body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
  .pi-tool--sidebar .pi-tool__filterbtn { display: none; }
  .pi-tool--sidebar .pi-facets { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding-inline-end: 8px; }
}

/* Aufklappbares Feld (Bereichsseite) */
.pi-tool--panel .pi-facets:not(.is-open) { display: none; }
@media (min-width: 720px) {
  .pi-tool--panel .pi-facets.is-open { padding: 16px; margin-bottom: 16px; background: var(--pi-bg-soft); border-radius: var(--pi-radius); }
  .pi-tool--panel .pi-facets__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; }
  .pi-tool--panel .pi-check--solo { border: 0; padding-top: 28px; }
}

/* Mobil: Filter als Vollbild-Ebene */
@media (max-width: 959px) {
  .pi-tool--sidebar .pi-facets:not(.is-open) { display: none; }
}
@media (max-width: 959px) {
  .pi-tool--sidebar .pi-facets.is-open { position: fixed; inset: 0; z-index: 50; background: var(--pi-bg); display: flex; flex-direction: column; }
}
@media (max-width: 719px) {
  .pi-tool--panel .pi-facets.is-open { position: fixed; inset: 0; z-index: 50; background: var(--pi-bg); display: flex; flex-direction: column; }
}
.pi-facets.is-open .pi-facets__head { display: flex; justify-content: space-between; align-items: center; padding-block: 8px; padding-inline: 16px 8px; border-bottom: 1px solid var(--pi-line); }
.pi-facets.is-open .pi-facets__groups { flex: 1; overflow: auto; padding: 16px; }
.pi-facets.is-open .pi-facets__foot { display: block; padding: 12px 16px; border-top: 1px solid var(--pi-line); }
.pi-facets.is-open .pi-facets__foot .pi-btn { width: 100%; justify-content: center; }
@media (min-width: 720px) {
  .pi-tool--panel .pi-facets.is-open .pi-facets__head,
  .pi-tool--panel .pi-facets.is-open .pi-facets__foot { display: none; }
  .pi-tool--panel .pi-facets.is-open .pi-facets__groups { padding: 0; overflow: visible; }
}

.pi-results__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.pi-results__count { margin: 0; font-weight: 700; }
.pi-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--pi-text-muted); }
.pi-sort select { font: inherit; padding: 4px 8px; border: 1px solid var(--pi-line-strong); border-radius: var(--pi-radius); background: var(--pi-bg); color: var(--pi-text); }

.pi-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pi-chip {
  border: 1px solid var(--pi-brand); background: var(--pi-brand-tint); color: var(--pi-brand-dark); border-radius: 16px;
  padding: 3px 10px; font-size: .8125rem; cursor: pointer;
}
.pi-chip:hover { background: var(--pi-brand); color: #fff; }

/* ------------------------------------------------------------ Tabelle */

.pi-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pi-table th {
  text-align: start; font-size: .8125rem; font-weight: 600; color: var(--pi-text-muted); text-transform: uppercase; letter-spacing: .03em;
  padding: 8px; border-bottom: 2px solid var(--pi-line-strong); white-space: nowrap;
}
.pi-table__mark { width: 44px; }
.pi-sortbtn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.pi-sortbtn::after { content: "↕"; margin-inline-start: 4px; opacity: .35; }
.pi-sortbtn.is-active { color: var(--pi-text); }
.pi-sortbtn.is-active::after { content: "↓"; opacity: 1; }

.pi-row td { padding: 12px 8px; border-bottom: 1px solid var(--pi-line); vertical-align: top; }
.pi-row.is-marked { background: #fffaf0; }
.pi-row__mark { width: 44px; padding: 6px 0 !important; }
.pi-row__company { display: flex; gap: 12px; align-items: flex-start; }
.pi-row__body { min-width: 0; flex: 1; }
.pi-row__name { font-weight: 650; color: var(--pi-text) !important; text-decoration: none; }
a.pi-row__name:hover { color: var(--pi-brand) !important; text-decoration: underline; }
.pi-row__country { width: 180px; color: var(--pi-text-muted); }
.pi-row__stand { width: 80px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

.pi-logo { width: 72px; height: 40px; object-fit: contain; object-position: center; flex: none; }

.pi-row__areas { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .8125rem; line-height: 1.5; }
.pi-row__areas a { color: var(--pi-text-muted); text-decoration: none; }
.pi-row__areas a:hover { color: var(--pi-brand); text-decoration: underline; }
.pi-row__areas .is-hit a { color: var(--pi-brand-dark); font-weight: 650; background: var(--pi-brand-tint); padding: 0 4px; border-radius: 3px; }
.pi-row__areas-more { color: var(--pi-text-muted); }
.pi-row__areas-more details { display: contents; }
.pi-row__areas-more summary { cursor: pointer; color: var(--pi-brand); }
.pi-row__areas-more .pi-linkbtn { font-size: inherit; }


/* Schmale Bildschirme: Zeile als Karte */
@media (max-width: 719px) {
  .pi-table thead { display: none; }
  .pi-table, .pi-table tbody { display: block; }
  .pi-row {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
    grid-template-areas: "mark company stand" "mark company country";
    grid-template-rows: auto 1fr;
    border-bottom: 1px solid var(--pi-line); padding: 10px 0;
  }
  .pi-row td { display: block; border: 0; padding: 0 4px; width: auto; }
  .pi-row__mark { grid-area: mark; padding: 0 !important; width: auto; }
  .pi-row__company { grid-area: company; }
  .pi-row__country { grid-area: country; font-size: .8125rem; width: auto; text-align: end; max-width: 96px; line-height: 1.3; }
  .pi-row__stand { grid-area: stand; text-align: end; }
  .pi-logo { width: 48px; height: 28px; }
}

/* ------------------------------------------------------------ Übersicht A–Z */

.pi-overview { margin-bottom: 8px; }
.pi-hits { margin-top: 24px; }
.pi-hits__block { margin-bottom: 32px; }
.pi-hits__areas { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; }
.pi-hits__areas li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--pi-line); }
.pi-hits__areas .is-empty a { color: var(--pi-text-muted); }
.pi-hits__more { margin-top: 16px; }

.pi-az__letters { list-style: none; margin: 0 0 16px; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: 0; background: var(--pi-bg); z-index: 5; border-bottom: 1px solid var(--pi-line); }
.pi-az__letters a { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: var(--pi-radius); text-decoration: none; font-weight: 600; background: var(--pi-bg-soft); }
.pi-az__letters a:hover { background: var(--pi-brand); color: #fff; }
.pi-az__group { scroll-margin-top: 64px; margin-bottom: 16px; }
.pi-az__letter { font-size: 1.25rem; margin: 0 0 4px; color: var(--pi-brand); border-bottom: 2px solid var(--pi-brand); padding-bottom: 2px; }
.pi-az__list { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 32px; }
.pi-az__item { break-inside: avoid; display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--pi-line); }
.pi-az__item a { flex: 1; text-decoration: none; }
.pi-az__item a:hover { text-decoration: underline; }
.pi-az__item .pi-badge { margin-inline-start: 0; }
.pi-az__item--empty a { color: var(--pi-text-muted); }
.pi-az__alt { display: block; font-size: .8125rem; color: var(--pi-text-muted); }

/* ------------------------------------------------------------ Bereichsseite */

.pi-area__head { margin-bottom: 16px; }
.pi-area__meta { margin: 0; color: var(--pi-text-muted); }
.pi-area__meta strong { color: var(--pi-text); }
.pi-layout { display: block; }
@media (min-width: 1024px) {
  .pi-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
}
.pi-aside { margin-top: 32px; }
@media (min-width: 1024px) { .pi-aside { margin-top: 0; } }
.pi-aside__block { padding: 16px; background: var(--pi-bg-soft); border-radius: var(--pi-radius); margin-bottom: 16px; }
.pi-related { list-style: none; margin: 0; padding: 0; }
.pi-related li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--pi-line); font-size: .9375rem; }
.pi-related li:last-child { border-bottom: 0; }
.pi-related .pi-count { background: var(--pi-bg); }
.pi-terms { margin: 0; font-size: .875rem; }
.pi-terms div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--pi-line); }
.pi-terms div:last-child { border-bottom: 0; }
.pi-terms dt { color: var(--pi-text-muted); }
.pi-terms dd { margin: 0; }

/* ------------------------------------------------------------ Merkliste */

.pi-toast { padding: 12px 16px; border-radius: var(--pi-radius); background: var(--pi-new-tint); color: var(--pi-new); font-weight: 600; margin: 0 0 16px; }
.pi-watch__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--pi-line); }
.pi-watch__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pi-watch__group { margin-bottom: 24px; }
.pi-watch__group .pi-h3 { color: var(--pi-brand); border-bottom: 2px solid var(--pi-brand); padding-bottom: 2px; }
.pi-watch__list { list-style: none; margin: 0; padding: 0; }
.pi-watch__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--pi-line); }
.pi-watch__stand { font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.pi-watch__country { color: var(--pi-text-muted); font-size: .875rem; margin-inline-start: 6px; }
.pi-watch__note textarea {
  width: 100%; max-width: 560px; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--pi-line); border-radius: var(--pi-radius);
  font: inherit; font-size: .875rem; resize: vertical; background: var(--pi-bg); field-sizing: content; min-height: 34px;
}
.pi-watch__note textarea:focus { border-color: var(--pi-brand); outline: none; }
.pi-watch__hint { max-width: 70ch; }

.pi-dialog { border: 0; border-radius: 10px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.pi-dialog::backdrop { background: rgba(10, 20, 35, .5); }
.pi-dialog__inner { padding: 16px 20px 20px; }
.pi-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.pi-dialog__head .pi-h3 { margin: 0; }
.pi-dialog__qr { margin: 16px auto; width: 220px; }
.pi-dialog__qr svg { width: 100%; height: auto; display: block; }
.pi-dialog__link { display: flex; gap: 8px; margin-top: 12px; }
.pi-dialog__link input { flex: 1; min-width: 0; padding: 8px; border: 1px solid var(--pi-line-strong); border-radius: var(--pi-radius); font: inherit; font-size: .8125rem; }

/* ------------------------------------------------------------ Ausstellerprofil */

.pi-profile { border-top: 2px solid var(--pi-brand); }
.pi-profile__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 32px;
  padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--pi-line);
}
.pi-profile__id { flex: 1 1 420px; min-width: 0; }
.pi-profile__logo { display: block; max-width: 240px; max-height: 96px; width: auto; height: auto; margin-bottom: 12px; }
.pi-profile__facts { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 12px 0 0; }
.pi-profile__facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pi-text-muted); }
.pi-profile__facts dd { margin: 0; font-weight: 600; }
.pi-profile__stand { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pi-profile__actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex: 0 1 260px; }
.pi-profile__actions .pi-btn { justify-content: center; width: 100%; }
.pi-profile__actions .pi-hint { margin: 0; font-size: .75rem; }
.pi-profile__section { margin-bottom: 32px; }
.pi-profile__section .pi-h2 { margin-top: 0; }
.pi-profile__text { max-width: 75ch; }
.pi-profile__text p { margin: 0 0 12px; }
.pi-profile__areas, .pi-profile__markets {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 24px;
}
.pi-profile__areas li, .pi-profile__markets li { padding: 6px 0; border-bottom: 1px solid var(--pi-line); }
.pi-profile__areas a { text-decoration: none; }
.pi-profile__areas a:hover { text-decoration: underline; }
.pi-richtext h3 { font-size: 1.125rem; margin: 20px 0 8px; }
.pi-richtext h4 { font-size: 1rem; margin: 16px 0 6px; }
.pi-richtext > :first-child { margin-top: 0; }
.pi-richtext p { margin: 0 0 12px; }
.pi-richtext ul, .pi-richtext ol { margin: 0 0 12px; padding-inline-start: 1.25em; }
.pi-richtext li { margin-bottom: 4px; }
.pi-richtext table { border-collapse: collapse; margin: 0 0 12px; font-size: .9375rem; }
.pi-richtext td, .pi-richtext th { border: 1px solid var(--pi-line); padding: 4px 8px; text-align: start; vertical-align: top; }
.pi-richtext img { max-width: 100%; height: auto; }
.pi-richtext a { overflow-wrap: anywhere; }
.pi-ph-img { background: var(--pi-bg-soft); border-radius: var(--pi-radius); object-fit: cover; }

.pi-news { padding: 16px 0; border-top: 1px solid var(--pi-line); max-width: 75ch; }
.pi-profile__section > .pi-news:first-of-type { border-top: 0; padding-top: 4px; }
.pi-news__title { font-size: 1.125rem; margin: 0 0 8px; color: var(--pi-brand-dark); }
.pi-news__thumbs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pi-news__thumbs img { display: block; width: 120px; height: 90px; }
.pi-news__more > summary { cursor: pointer; color: var(--pi-brand); font-weight: 600; padding: 12px 0; border-top: 1px solid var(--pi-line); }

.pi-docs, .pi-videos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pi-doc, .pi-video {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 14px; border-radius: var(--pi-radius);
  background: var(--pi-brand-tint); color: var(--pi-brand-dark) !important; text-decoration: none; font-weight: 600; font-size: .9375rem;
}
.pi-doc:hover, .pi-video:hover { background: var(--pi-brand); color: #fff !important; }
.pi-doc__icon, .pi-video__icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.pi-doc__name { overflow-wrap: anywhere; }
.pi-doc__meta { font-weight: 400; font-size: .8125rem; opacity: .8; }

.pi-profile .gallery-thumbs button { padding: 0; border: 0; }
.pi-profile .gallery-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.pi-markbtn { gap: 8px; }
.pi-markbtn .pi-mark__icon { width: 20px; height: 20px; fill: none; stroke: var(--pi-brand); stroke-width: 1.6; stroke-linejoin: round; }
.pi-markbtn.is-on { background: #fff6e0; border-color: var(--pi-accent); color: var(--pi-text) !important; }
.pi-markbtn.is-on .pi-mark__icon { fill: var(--pi-accent); stroke: var(--pi-accent); }

.pi-similar { list-style: none; margin: 0; padding: 0; }
.pi-similar li { padding: 6px 0; border-bottom: 1px solid var(--pi-line); font-size: .9375rem; }
.pi-similar li:last-child { border-bottom: 0; }
.pi-similar a { display: block; text-decoration: none; }
.pi-similar a:hover { text-decoration: underline; }
.pi-similar__meta { display: block; font-size: .8125rem; color: var(--pi-text-muted); }

/* ------------------------------------------------------------ Druck (vor allem Merkliste) */

@media print {
  body.pi { font-size: 11pt; }
  .pi-header, .pi-footer, .pi-breadcrumb, .pi-skip, .pi-noscript, .pi-tool__bar, .pi-facets, .pi-chips,
  .pi-sort, .pi-watch__actions, .pi-watch__remove, .pi-watch__note, .pi-watch__hint, .pi-toast, .pi-dialog,
  .pi-mark, .pi-row__mark, .pi-table__mark, .pi-aside, .pi-az__letters, .pi-profile__actions, .pi-lang { display: none !important; }
  .pi-print-only { display: block; }
  .pi-main { padding: 0; max-width: none; }
  .pi-lead { margin-bottom: 8px; }
  .pi-watch__item { grid-template-columns: 56px 1fr; break-inside: avoid; }
  .pi-watch__notetext { margin: 4px 0 0; font-style: italic; }
  .pi-watch__group { break-inside: auto; }
  .pi-watch__group .pi-h3 { break-after: avoid; }
  .pi a { color: inherit; text-decoration: none; }
}
