/*
 * ART Pro Audio Europe – Stylesheet der Website.
 *
 * Grundlage ist der HTML/CSS-Entwurf (TEAC); die Anpassungen an das Contao-Markup,
 * Barrierefreiheit, Suche und Fehlerseiten sind eingearbeitet. Änderungen am
 * Aussehen werden nur hier gemacht.
 *
 * Reihenfolge beachten: Die Abschnitte ab „Barrierefreiheit“ stehen bewusst am
 * Ende, weil sie Regeln weiter oben mit gleicher Spezifität überschreiben.
 */

/* ------------------------------------------------------------ Schrift (lokal) */

/* Inter (SIL Open Font License, files/theme/fonts/Inter-LICENSE.txt) – lokal statt
   von Google Fonts, damit beim Seitenaufruf keine Daten an Google gehen.
   Variable Schrift: eine Datei je Zeichensatz deckt die Stärken 400–700 ab. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------ Farben und Grundlagen */

/* Farbschema über data-theme am <html> (Standard: dunkel, siehe Seitenlayout) */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --line: #e4e4e8;
  --text: #18181b;
  --muted: #6b6b75;
  --accent: #6c64b8;      /* aus dem ART-Dreieck abgeleitet */
  --accent-soft: #efeefa;
  --accent-text: #5b53a6; /* kleine Akzent-Texte auf --accent-soft (Kontrast 5,6:1) */
  --on-accent: #fff;
  --surface: #fff;        /* Karten, Menüs */
  --img-bg: #fff;         /* Produktbilder haben weißen Hintergrund */
  --line-strong: #cfcfd6;
  --header-bg: rgba(255,255,255,.94);
  --focus: var(--accent); /* Fokus-Ring, ≥ 3:1 in beiden Farbschemata */
  color-scheme: light;
  --radius: 10px;
  --max: 1240px;
}
:root[data-theme="dark"] {
  --bg: #111114;
  --bg-soft: #18181d;
  --line: #2c2c34;
  --line-strong: #4a4a55;
  --text: #ececf1;
  --muted: #a1a1ab;
  --accent: #a59ff0;
  --accent-soft: #26243d;
  --accent-text: #a59ff0;
  --on-accent: #111114;
  --surface: #1d1d23;
  --img-bg: #fff;
  --header-bg: rgba(17,17,20,.92);
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* scroll-padding: angesprungene/fokussierte Elemente nicht unter Header und Abschnittsnavigation */
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
/* Contao umschließt Bilder mit <picture>. Die <img> sind mit width/height 100 % des
   Elternelements bemessen – ohne eigene Box des <picture> wären Lazy-Bilder vor dem
   Laden 0×0 (Chrome-Issue „explicit dimensions“). */
picture { display: contents; }
/* <source> zeigt nichts an, wäre durch display: contents aber ein eigenes Raster-Element
   (z. B. zweite Spalte im Kopf der Kategorieseite – das Bild rutschte darunter) */
picture > source { display: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ Header */

header.main { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.main .wrap { display: flex; align-items: center; height: 76px; gap: 32px; }
/* TEAC-Logo | ART Pro Audio in Europe */
/* ART-Logo + Absender „in Europe by TEAC“ */
.brand { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
/* Das Original-Logo hat weiße Schrift: als Maske nutzen, Schrift in Textfarbe, Dreieck in ART-Lila */
.brand .art-logo { position: relative; display: block; height: 34px; aspect-ratio: 349 / 77; background: var(--text);
  -webkit-mask: url(../images/art-logo.png) center / contain no-repeat; mask: url(../images/art-logo.png) center / contain no-repeat; }
.brand .art-logo::after { content: ""; position: absolute; left: 5.7%; top: 1.3%; width: 18.6%; height: 72.7%; background: #7c77b7; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand .by { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.brand svg.teac { width: 50px; height: auto; color: var(--text); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; margin-left: auto; }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { border-color: var(--accent); }
/* Suche: Lupe öffnet das Feld nach links über die Navigation */
.search { position: relative; display: flex; align-items: center; margin: 0; }
.search button { position: relative; z-index: 1; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer; transition: border-color .2s; }
.search button:hover { border-color: var(--text); color: var(--text); }
.search input { position: absolute; right: 0; top: 0; width: 38px; height: 38px; padding: 0 44px 0 18px; border: 1px solid var(--text); border-radius: 999px; background: var(--surface); font: inherit; font-size: 15px; color: var(--text); outline: none; opacity: 0; visibility: hidden; transition: width .3s ease, opacity .2s, visibility 0s .3s; }
.search input::-webkit-search-cancel-button { display: none; }
.search.open input { width: 300px; opacity: 1; visibility: visible; transition: width .3s ease, opacity .15s; }
.search.open button { border-color: transparent; color: var(--text); }
/* Links blenden aus, damit das Feld keine halb verdeckten Einträge zeigt */
@media (width >= 1024px) {
  .nav > a { transition: opacity .2s; }
  .nav:has(.search.open) > a { opacity: 0; visibility: hidden; }
}
.burger { display: none; }

/* ------------------------------------------------------------ Startseite: Hero */

/* Das Padding kommt über .hero .wrap, nicht über section */
.hero { padding: 0; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--accent); }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 16px 0 20px; font-weight: 700; }
.hero p { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 32px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid var(--text); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost:hover { background: var(--text); color: var(--bg); }
.hero-visual { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 4px; box-shadow: 0 16px 40px rgba(20,20,30,.06); }
.hero-visual img { width: 100%; aspect-ratio: 455/278; object-fit: cover; border-radius: 10px; }
.hero-visual .tag { position: absolute; top: 24px; left: 24px; font-size: 12px; font-weight: 600; background: var(--surface); color: var(--accent-text); padding: 4px 10px; border-radius: 999px; }
.hero-visual .cap { padding: 16px 8px 12px; display: grid; gap: 2px; }
.hero-visual .cap strong { font-size: 18px; }
.hero-visual .cap span { font-size: 14px; color: var(--muted); }
section[id] { scroll-margin-top: 76px; }

/* ------------------------------------------------------------ Abschnitte */

section { padding: 80px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.sec-head h2 { font-size: 32px; letter-spacing: -.015em; margin: 8px 0 0; }
.sec-head p { margin: 8px 0 0; color: var(--muted); max-width: 560px; }
.link-more { font-weight: 600; font-size: 15px; color: var(--accent); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* ------------------------------------------------------------ Produktkacheln (Highlights, Listen) */

.featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.prod { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s; }
.prod:hover { border-color: var(--line-strong); box-shadow: 0 8px 24px rgba(20,20,30,.06); }
.prod .img { aspect-ratio: 4/3; display: grid; place-items: center; margin-bottom: 16px; overflow: hidden; background: var(--img-bg); border-radius: 6px; }
.prod .img img { width: 100%; height: 100%; object-fit: contain; }
.prod strong { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.prod span { font-size: 14px; color: var(--muted); }
/* Etikett „NEW“ als Inline-Element im Produktnamen */
.new { font-size: 11px; font-weight: 700; font-style: normal; background: var(--accent); color: var(--on-accent); padding: 2px 7px; border-radius: 4px; display: inline-block; vertical-align: middle; position: relative; top: -.1em; }
h1 .new { font-size: 13px; padding: 3px 9px; letter-spacing: .04em; margin-left: 6px; }

/* ------------------------------------------------------------ Startseite: Kategorie-Kacheln */

.cats-bg { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.cat:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,20,30,.08); }
.cat .img { aspect-ratio: 455/278; background: var(--img-bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.cat .img img { width: 100%; height: 100%; object-fit: cover; }
.cat .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.cat h3 { font-size: 17px; margin: 0 0 6px; }
.cat p { font-size: 14px; color: var(--muted); margin: 0 0 14px; flex: 1; }
.cat .go { font-size: 14px; font-weight: 600; color: var(--accent); }

/* ------------------------------------------------------------ Startseite: TEAC-Bereich (Bild und Text) */

.dealer { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.dealer figure { margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-soft); }
.dealer figure img { width: 100%; aspect-ratio: 650/366; object-fit: cover; }
.dealer h2 { font-size: 32px; letter-spacing: -.015em; margin: 0 0 16px; }
.dealer p { color: var(--muted); margin: 0 0 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 28px; padding: 0; list-style: none; }
.facts li { font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.facts b { font-weight: 600; }

/* ------------------------------------------------------------ Footer */

footer.site { background: #1c1c22; color: #c9c9d1; font-size: 15px; }
footer.site .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 24px 0 8px; }
footer.site .cols > * { padding-top: 20px; margin: 16px 0 0; }
footer.site address { font-style: normal; line-height: 1.6; margin-bottom: 14px; }
footer.site address strong { color: #fff; font-size: 20px; font-weight: 600; display: inline-block; margin-bottom: 4px; }
footer.site p { margin: 0; }
footer.site ul { list-style: none; padding: 20px 0 0; display: grid; gap: 10px; align-content: start; }
footer.site a:hover { color: #fff; }
footer.site .legal { font-size: 13px; color: #8d8d97; padding: 28px 0 32px; }

@media (max-width: 1080px) {
  .cats, .featured { grid-template-columns: repeat(3, 1fr); }
  .nav { gap: 20px; }
}
@media (width < 1024px) {
  .theme-toggle { margin-left: auto; }
  .burger { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
}
@media (max-width: 820px) {
  .dealer { grid-template-columns: 1fr; gap: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; padding-bottom: 48px; }
  .cats, .featured { grid-template-columns: repeat(2, 1fr); }
  .sec-head { flex-direction: column; align-items: start; }
  section { padding: 56px 0; }
  footer.site .cols { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .cats { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod { padding: 14px; }
}

/* ------------------------------------------------------------ Sprachnavigation */

.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; user-select: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--text); }
.lang-switch .chev { transition: transform .2s; }
.lang-switch[open] .chev { transform: rotate(180deg); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(20,20,30,.1); list-style: none; margin: 0; padding: 6px; min-width: 180px; z-index: 20; }
.lang-switch li a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.lang-switch li a:hover { background: var(--bg-soft); }
.lang-switch li a span { color: var(--muted); font-size: 12px; font-weight: 500; }
.lang-switch li a[aria-current] { font-weight: 600; background: var(--accent-soft); }
.lang-switch li a[aria-current] span { color: var(--accent-text); }

/* ------------------------------------------------------------ Brotkrumen */

.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }

/* ------------------------------------------------------------ Kategorieseite */

.cat-hero { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.cat-hero .inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; padding: 28px 0 52px; }
.cat-hero h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
.cat-hero p { color: var(--muted); font-size: 18px; margin: 0; max-width: 560px; }
.cat-hero .count { display: inline-block; margin-top: 22px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.cat-hero img { width: 100%; aspect-ratio: 455/278; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.listing { display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start; }
.listing > *, .pd > *, .block > *, .cat-hero .inner > * { min-width: 0; }
.side { position: sticky; top: 100px; }
/* Überschrift der Kategorie-Liste (h2 für die richtige Überschriften-Reihenfolge) */
.side .side-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px 12px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a { display: block; padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.side a:hover { background: var(--bg-soft); }
.side a[aria-current] { background: var(--text); color: var(--bg); font-weight: 600; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prod .more { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ------------------------------------------------------------ Produktdetail */

.pd { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; padding: 24px 0 64px; }
.gallery .stage { border: 1px solid var(--line); border-radius: 14px; background: var(--img-bg); aspect-ratio: 1160/500; overflow: hidden; }
.gallery .stage img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumbs button { border: 1px solid var(--line); border-radius: 8px; background: var(--img-bg); padding: 4px; cursor: pointer; aspect-ratio: 1160/500; }
.thumbs button:hover { border-color: var(--line-strong); }
.thumbs button[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 6px; }
.pd-info .sub { font-size: 19px; font-weight: 500; color: var(--muted); margin: 0 0 22px; }
.pd-info .lead { margin: 0 0 22px; }
.checks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; font-size: 15px; }
.checks li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c64b8' stroke-width='3'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }
/* Abschnittsnavigation: bricht um statt waagerecht zu scrollen (sonst wären die
   rechten Einträge mit Maus/Tastatur nicht erreichbar) */
.subnav { position: sticky; top: 76px; z-index: 5; background: var(--header-bg); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 0; }
.subnav a { padding: 14px 0; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--text); border-color: var(--accent); }
.block { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.block:last-child { border-bottom: 0; }
.block h2 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.block .txt p { margin: 0 0 16px; max-width: 720px; }
.feat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.feat-grid li { display: flex; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.feat-grid li::before { content: ""; flex: 0 0 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--accent); }
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 500; color: var(--muted); width: 38%; padding-right: 24px; }
.disclaimer { font-size: 13px; color: var(--muted); margin-top: 14px; }
.dl { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; max-width: 460px; }
.dl:hover { border-color: var(--text); }
.dl .ico { width: 44px; height: 44px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dl div { flex: 1; }
.dl strong { display: block; }
.dl span { font-size: 13px; color: var(--muted); }
.video { position: relative; max-width: 640px; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; border: 0; padding: 0; display: block; width: 100%; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video .play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; transition: transform .2s; }
.video:hover .play { transform: scale(1.06); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .listing { grid-template-columns: 200px 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .cat-hero .inner, .pd { grid-template-columns: 1fr; gap: 28px; }
  .listing { grid-template-columns: 1fr; gap: 24px; }
  .side { position: static; }
  .side .side-title { display: none; }
  /* Kategorie-Liste als umbrechende Leiste (nicht waagerecht scrollend, siehe .subnav) */
  .side ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .side a { padding: 6px 12px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); }
  .block { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; }
  .feat-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  .specs th { width: 45%; padding-right: 12px; }
  .pd { padding-top: 16px; }
  .subnav .wrap { column-gap: 18px; }
  .subnav a { padding: 10px 0; }
}

/* ------------------------------------------------------------ Dark/Light-Umschalter */

.theme-toggle { flex-shrink: 0; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: none; color: var(--muted); cursor: pointer; padding: 0; margin-right: -20px; }
.theme-toggle:hover { border-color: var(--text); color: var(--text); }
.theme-toggle .sun, [data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
.nav .search { margin-right: -20px; }
[data-theme="dark"] footer.site { background: #0b0b0e; border-top: 1px solid var(--line); }
[data-theme="dark"] .dealer figure img, [data-theme="dark"] .cat-hero img { filter: brightness(.94); }
/* Smartphone: Absender unter das ART-Logo */
@media (max-width: 600px) {
  header.main .wrap { gap: 8px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
  .brand .art-logo { height: 26px; }
  .brand svg.teac { width: 40px; }
  .theme-toggle { margin-right: 0; }
  .lang-switch summary { padding: 0 10px; }
  .lang-switch summary > svg:first-child { display: none; }
  .burger { flex-shrink: 0; }
}

/* ------------------------------------------------------------ Smartphone-Navigation */

/* Dieselbe .nav, per Burger als Panel unter dem Header (Logik in site.js) */
.burger { cursor: pointer; padding: 0; color: var(--text); flex-shrink: 0; }
.burger .close, .burger[aria-expanded="true"] .open { display: none; }
.burger[aria-expanded="true"] .close { display: block; }
.burger[aria-expanded="true"] { border-color: var(--text); }
@media (width < 1024px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px 24px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 16px 32px rgba(20,20,30,.08); max-height: calc(100dvh - 76px); overflow-y: auto; }
  header.main.nav-open .nav { display: flex; }
  .nav a { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; }
  .nav a:last-of-type { border-bottom: 0; }
  /* Suche steht im Panel oben als offenes Suchfeld */
  .nav .search { order: -1; margin: 8px 0 4px; }
  .nav .search input, .search.open input { position: static; width: 100%; height: 46px; padding: 0 16px 0 46px; border-color: var(--line); background: var(--bg-soft); font-size: 16px; opacity: 1; visibility: visible; transition: none; }
  .nav .search input:focus { border-color: var(--text); }
  .nav .search button { position: absolute; left: 4px; top: 4px; border-color: transparent; }
  .nav a::after { content: "→"; color: var(--muted); font-weight: 400; }
  .nav a:hover, .nav a.active { border-color: var(--line); }
  .nav a.active { color: var(--accent); }
  html.menu-open { overflow: hidden; }
}
@media (max-width: 520px) { .nav { padding-left: 16px; padding-right: 16px; } }

/* ------------------------------------------------------------ Inhaltsseiten: Kontakt, Impressum, Datenschutz */

.page-head { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.page-head .inner { padding-top: 4px; padding-bottom: 44px; }
.page-head h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 14px 0 12px; }
.page-head p { color: var(--muted); font-size: 18px; margin: 0; max-width: 640px; }
.doc { max-width: 780px; padding: 48px 0 88px; }
.doc h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; margin: 48px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 16px; margin: 28px 0 6px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc li { margin-bottom: 4px; }
.doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.doc .card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 14px; }
.doc address { font-style: normal; }
.doc .updated { font-size: 14px; color: var(--muted); margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; padding: 48px 24px 88px; }
.contact > * { min-width: 0; }
.info-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.info-card h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.info-card address { font-style: normal; }
.info-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; overflow-wrap: anywhere; }
.info-card p { margin: 0; color: var(--muted); font-size: 15px; }
.info-card a { font-weight: 500; }
.info-card a:hover { color: var(--accent); }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Barrierefreiheit */

/* Fokus-Ring für die Tastaturbedienung (nur bei Tastatur, nicht bei Mausklick) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible, .search button:focus-visible, .theme-toggle:focus-visible, .lang-switch summary:focus-visible { border-radius: 999px; }
.prod:focus-visible, .cat:focus-visible, .dl:focus-visible, .search-hit:focus-visible, .hero-visual:focus-visible { border-radius: var(--radius); outline-offset: 4px; }
.thumbs button:focus-visible, .video:focus-visible { border-radius: 8px; }
/* Eingabefelder: .search input setzt outline: none – Fokus wieder sichtbar machen */
.search input:focus-visible, .search-page-form input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Dunkler Footer: weißer Ring */
footer.site :focus-visible { --focus: #fff; }
/* Mobilmenü: das Suchformular (position: relative, im DOM nach den Links, per
   order: -1 oben) überdeckt sonst den oberen Rand des Fokusrings von „Produkte“ */
.nav a:focus-visible { position: relative; z-index: 2; }

/* Sprunglink „Zum Inhalt“: erst bei Tastaturfokus sichtbar */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .cat:hover, .video:hover .play { transform: none; }
}

/* ------------------------------------------------------------ Contao-Module */

/* Besucher- und Botstatistik („nur zählen“): kein Platz im Layout.
   .mod_visitors trägt Contaos Klasse „block“, die oben ein Raster mit Abstand ist. */
.mod_visitors_fe_invisible, .mod_botstatistics_invisible { display: none !important; }

/* Inhaltsseiten (Artikel-Template mod_article_page) */
.page-section { padding: 56px 0 80px; }
.page-section h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 28px; }
/* Contao: nur für Screenreader */
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ Suchseite */

.search-page { max-width: 820px; }
.search-page-form { display: flex; gap: 12px; margin-bottom: 28px; }
.search-page-form input { flex: 1; min-width: 0; height: 48px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
/* Fokus: Rahmen in Textfarbe; den Fokus-Ring setzt :focus-visible (Abschnitt Barrierefreiheit) */
.search-page-form input:focus { border-color: var(--text); }
.search-summary { color: var(--muted); margin: 0 0 20px; }
.search-hint { color: var(--muted); font-size: 14px; }
.search-results { display: grid; gap: 14px; }
.search-hit { display: block; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.search-hit:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(20,20,30,.06); }
.search-hit strong { display: block; font-size: 18px; margin-bottom: 6px; }
.search-hit p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.search-hit mark { background: var(--accent-soft); color: var(--text); padding: 0 2px; border-radius: 3px; }
.search-hit .url { font-size: 13px; color: var(--accent); word-break: break-all; }
.search-page .pagination { margin-top: 28px; }
.search-page .pagination ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.search-page .pagination a, .search-page .pagination strong { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.search-page .pagination strong { background: var(--text); color: var(--bg); border-color: var(--text); }
.search-page .pagination p { color: var(--muted); font-size: 14px; }
@media (max-width: 600px) { .search-page-form { flex-direction: column; } }

/* ------------------------------------------------------------ Fehlerseiten (content_element/template/error) */

section.error { padding: 0; background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.error-page { position: relative; min-height: 62vh; display: grid; align-items: center; padding-top: 72px; padding-bottom: 88px; overflow: hidden; }
.error-code { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: clamp(140px, 26vw, 340px); font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--accent-soft); user-select: none; pointer-events: none; }
.error-body { position: relative; max-width: 620px; }
.error-body h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 16px 0 20px; }
.error-body p { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.error-body .search-page-form { max-width: 520px; }
@media (max-width: 760px) { .error-code { top: 24px; transform: none; font-size: 120px; } .error-page { padding-top: 120px; } }

/* ------------------------------------------------------------ Druck / PDF */

/* Nur im Druck sichtbar (z. B. Produkt-URL, Download-Adressen) */
.print-only { display: none; }

@page { size: A4; margin: 14mm 14mm 16mm; }

@media print {
  /* Immer helles, sparsames Farbschema – unabhängig von der Wahl am Bildschirm */
  :root, :root[data-theme="dark"] {
    --bg: #fff; --bg-soft: #fff; --surface: #fff; --header-bg: #fff;
    --text: #111; --muted: #555; --line: #d4d4da; --line-strong: #b8b8c0;
    --accent: #4d4596; --accent-soft: #efeefa; --accent-text: #4d4596;
    color-scheme: light;
  }
  html { scroll-padding-top: 0; }
  body { font-size: 10.5pt; line-height: 1.45; background: #fff; color: var(--text); }
  .wrap { max-width: none; padding: 0; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; transition: none !important; animation: none !important; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block; }

  /* Bedienelemente und Navigation ausblenden */
  .skip-link, .nav, .burger, .theme-toggle, .lang-switch, .search, .crumbs, .subnav,
  .btns, .thumbs, .side, #videos, .video, .video-note, .link-more, .mod_visitors, .mod_botstatistics_invisible,
  .search-page-form, .pagination, .error-code { display: none !important; }

  /* Kopf: nur das Logo, nicht fixiert */
  header.main { position: static; background: none; backdrop-filter: none; border-bottom: 1px solid var(--line); margin-bottom: 6mm; }
  header.main .wrap { height: auto; padding: 0 0 3mm; }
  /* Logo-Maske ist ein Hintergrund: beim Drucken erzwingen */
  .brand .art-logo, .brand .art-logo::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Fuß: nur Adresse und Rechtszeile */
  footer.site, [data-theme="dark"] footer.site { background: none; color: var(--muted); border-top: 1px solid var(--line); margin-top: 8mm; font-size: 9pt; break-inside: avoid; }
  footer.site .cols { display: block; padding: 3mm 0 0; }
  footer.site .cols > * { display: none; margin: 0; padding: 0; }
  footer.site .cols > :first-child { display: block; }
  footer.site address { margin: 0 0 1mm; line-height: 1.4; }
  footer.site address strong { color: var(--text); font-size: 10pt; margin: 0; }
  footer.site .legal { padding: 2mm 0 0; color: var(--muted); }

  /* Abschnitte kompakt */
  section, .cats-bg, .hero, .cat-hero, .page-head, section.error { padding: 0; background: none; border: 0; }
  h1, h2, h3, h4 { break-after: avoid; }
  img { break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }

  /* Produktdetail als Datenblatt: Bild und Kerndaten nebeneinander */
  .pd { grid-template-columns: 1fr 1fr; gap: 8mm; padding: 0 0 4mm; align-items: start; }
  .gallery .stage { border: 1px solid var(--line); border-radius: 6px; }
  .pd-info h1 { font-size: 22pt; margin: 2mm 0 1mm; }
  .pd-info .sub { font-size: 12pt; margin: 0 0 3mm; }
  .pd-info .lead { margin: 0 0 3mm; }
  .print-url { font-size: 8.5pt; color: var(--muted); margin: 0 0 3mm; word-break: break-all; }
  .checks { margin: 0; gap: 1.5mm; }
  .checks li { font-size: 10pt; }
  .checks li::before, .feat-grid li::before, .new { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .block { display: block; padding: 4mm 0; border-bottom: 1px solid var(--line); break-inside: auto; }
  .block:last-child { border-bottom: 0; }
  .block h2 { font-size: 13pt; margin: 0 0 2.5mm; }
  .block .txt p { max-width: none; margin: 0 0 2.5mm; }
  .feat-grid { grid-template-columns: 1fr 1fr; gap: 1.5mm 8mm; }
  .feat-grid li { font-size: 10pt; padding-bottom: 1.5mm; break-inside: avoid; }
  .specs { font-size: 9.5pt; }
  .specs th, .specs td { padding: 1.6mm 0; }
  .specs tr { break-inside: avoid; }
  .specs th { width: 34%; padding-right: 5mm; }
  .dl { max-width: none; padding: 2mm 3mm; border-radius: 6px; break-inside: avoid; margin-bottom: 2mm; }
  .dl > svg { display: none; }
  .dl .ico { width: 10mm; height: 10mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dl .print-only { font-size: 8.5pt; word-break: break-all; color: var(--muted); }

  /* „Das könnte Sie auch interessieren“ (Produktdetail): nicht drucken */
  section.cats-bg:has(.products) { display: none; }

  /* Kategorieseite: Kopf kompakt, Produkte als Raster */
  .cat-hero .inner { grid-template-columns: 1.4fr 1fr; gap: 8mm; padding: 0 0 5mm; }
  .cat-hero h1 { font-size: 22pt; }
  .cat-hero p { font-size: 11pt; }
  .listing { display: block; }
  .products, .featured { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .prod { padding: 3mm; border-radius: 6px; break-inside: avoid; }
  .prod .img { margin-bottom: 2mm; }
  .prod strong { font-size: 10.5pt; }
  .prod span { font-size: 9pt; }
  .prod .more { display: none; }

  /* Startseite und Inhaltsseiten */
  .hero .wrap { grid-template-columns: 1fr 1fr; gap: 8mm; padding: 0 0 6mm; }
  .hero h1 { font-size: 24pt; }
  .hero p { font-size: 11pt; }
  .cats { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .cat { break-inside: avoid; }
  .sec-head { margin-bottom: 4mm; }
  .sec-head h2 { font-size: 16pt; }
  .page-head .inner { padding: 0 0 4mm; }
  .page-head h1, .page-section h1 { font-size: 22pt; }
  .doc { max-width: none; padding: 4mm 0; }
  .doc .card { break-inside: avoid; }
  .contact { grid-template-columns: repeat(3, 1fr); gap: 4mm; padding: 4mm 0; }
  .info-card { padding: 4mm; break-inside: avoid; }
  .page-section { padding: 0; }
  .search-hit { break-inside: avoid; padding: 3mm 4mm; }
}
