/* ==========================================================================
   AS Maschinen – Datenblatt (Druck / „Als PDF sichern“)

   Eigenes Stilblatt für Papier, bewusst getrennt vom Website-Stil: keine
   Navigation, keine Zustände, keine Bewegung. Es zählen Lesbarkeit auf A4,
   saubere Seitenumbrüche und sparsamer Farbauftrag. Farben und Schriften
   wie im Asset-Kit; Farben nur als Tokens in :root.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("schriften/IBMPlexSans-Regular-Latin1.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("schriften/IBMPlexSans-Medium-Latin1.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("schriften/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("schriften/IBMPlexMono-Regular.woff2") format("woff2");
}

:root {
  --marine: #12266B;
  --anthrazit: #111827;
  --grau-500: #6B7280;
  --grau-50: #F4F5F8;
  --gruen: #0F5132;
  --rot: #B3261E;
  --weiss: #FFFFFF;

  --linie: color-mix(in srgb, var(--anthrazit) 12%, transparent);
  --linie-stark: color-mix(in srgb, var(--anthrazit) 24%, transparent);
  --marine-hell: color-mix(in srgb, var(--marine) 7%, var(--weiss));
  --schreibtisch: color-mix(in srgb, var(--grau-500) 22%, var(--grau-50));
  --sans: "IBM Plex Sans", system-ui, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--schreibtisch);
  color: var(--anthrazit);
  font: 400 10pt/1.5 var(--sans);
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
p { margin: 0; }
a { color: inherit; }
.icon { flex: none; vertical-align: -0.2em; }

/* ----------------------------------------------------- Balken am Bildschirm */

.balken {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 20px; background: var(--marine); color: var(--weiss);
}
.balken__zurueck { color: var(--weiss); text-decoration: none; font-size: 11pt; }
.balken__zurueck:hover { text-decoration: underline; }
.balken__drucken {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 6px;
  background: var(--weiss); color: var(--marine);
  font: 600 11pt var(--sans); cursor: pointer;
}
.balken__drucken:hover { background: var(--grau-50); }
.balken a:focus-visible, .balken__drucken:focus-visible { outline: 3px solid var(--weiss); outline-offset: 2px; }

/* -------------------------------------------------------------- Das Blatt */

.blatt {
  width: 210mm; min-height: 297mm;
  margin: 20px auto; padding: 14mm 15mm 12mm;
  background: var(--weiss);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--anthrazit) 14%, transparent);
}

/* Kopf: Logo links, rechts Augenzeile, Art.-Nr. und Stand. */
.kopf {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding-bottom: 4mm; border-bottom: 2pt solid var(--marine);
}
.kopf__logo { display: block; height: 12mm; width: auto; }
.kopf__rechts { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.35; }
.kopf__auge {
  font-size: 8pt; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--marine);
}
.kopf__nr { font-size: 12pt; font-weight: 600; }
.kopf__nr-bez { font-size: 8.5pt; font-weight: 400; color: var(--grau-500); }
.kopf__stand { font-size: 8pt; color: var(--grau-500); }

/* Einordnung, Abzeichen, Titel */
.titel { margin: 5mm 0 4mm; }
.titel__einordnung {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 9pt; color: var(--grau-500);
}
.titel__einordnung .icon { color: var(--marine); }
.abzeichen {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  font-size: 7.5pt; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--weiss);
}
.abzeichen--verfuegbar { background: var(--gruen); }
.abzeichen--neu { background: var(--marine); }
.abzeichen--verkauft { background: var(--anthrazit); }
h1 {
  margin: 2mm 0 0; font-size: 22pt; font-weight: 600; line-height: 1.12; letter-spacing: -.01em;
  color: var(--anthrazit);
}

/* Bild links, Preis und Kennwerte rechts – der Blick, den man zuerst braucht. */
.oben { display: grid; grid-template-columns: 104mm 1fr; gap: 6mm; align-items: stretch; }
.hauptbild { margin: 0; }
.hauptbild img {
  display: block; width: 100%; height: 74mm; object-fit: contain;
  background: var(--grau-50); border: 1px solid var(--linie);
}
.oben__rechts { display: flex; flex-direction: column; gap: 4mm; }

.preisfeld {
  padding: 4mm 5mm; background: var(--marine); color: var(--weiss);
}
.preisfeld__bez { font-size: 7.5pt; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.preisfeld__preis { font-size: 17pt; font-weight: 600; line-height: 1.2; }
.preisfeld__preis.mono { font-weight: 400; font-size: 18pt; }
.preisfeld__zusatz { font-size: 8.5pt; opacity: .85; }
.preisfeld--verkauft { background: var(--anthrazit); }
.preisfeld--verkauft .preisfeld__preis { font-size: 12pt; }

/* Kennwerte-Raster: Icon, Bezeichnung klein, Wert kräftig. */
.kennwerte {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  margin: 0; padding: 0; list-style: none;
  border-top: 1px solid var(--linie); border-left: 1px solid var(--linie);
}
.kennwerte li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center;
  padding: 2.4mm 3mm; border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie);
}
.kennwerte__icon { grid-row: span 2; color: var(--marine); }
.kennwerte__bez { font-size: 7.5pt; color: var(--grau-500); line-height: 1.3; }
.kennwerte__wert { font-size: 10pt; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.kennwerte__wert .mono { font-weight: 400; }

/* Überschriften der Abschnitte – auch die Tabellenbeschriftung. */
h2, .technik caption {
  margin: 6mm 0 2mm; padding-bottom: 1.5mm; border-bottom: 1px solid var(--linie-stark);
  font-size: 9pt; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  text-align: left; color: var(--marine);
}

/* Technische Daten: echte Tabelle, Werte in Mono, Einheit leiser. */
.technik-spalten { margin-top: 5mm; }
.technik-spalten--zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6mm; align-items: start; }
.technik { width: 100%; border-collapse: collapse; }
.technik caption { margin-top: 0; caption-side: top; }
/* Zweite Hälfte: Beschriftung für Screenreader, optisch nur die Linie. */
.technik caption.technik__fortsetzung { color: transparent; }
.technik th, .technik td {
  padding: 1.3mm 2mm; border-bottom: 1px solid var(--linie);
  text-align: left; vertical-align: top; font-size: 9.5pt;
}
.technik tr:nth-child(even) th, .technik tr:nth-child(even) td { background: var(--grau-50); }
.technik th { width: 55%; font-weight: 400; color: var(--grau-500); }
.technik td { font-weight: 400; }
.einheit { color: var(--grau-500); }

/* Kontaktkasten: die Aufforderung zur Anfrage, hervorgehoben. */
.kontakt {
  margin-top: 5mm; padding: 4mm 5mm;
  background: var(--marine-hell); border-left: 3pt solid var(--marine);
}
.kontakt__titel {
  margin: 0 0 3mm; padding: 0; border: 0;
  font-size: 12pt; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--marine);
}
.kontakt__spalten { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6mm; align-items: start; font-size: 9pt; }
.kontakt__spalten p + p { margin-top: 2mm; }
.kontakt__bez { display: block; font-size: 7.5pt; letter-spacing: .1em; text-transform: uppercase; color: var(--grau-500); }
.kontakt__wege { display: flex; flex-direction: column; gap: 1mm; }
.kontakt__wege a, .kontakt__adresse { text-decoration: none; overflow-wrap: anywhere; }
.kontakt__wege .icon { color: var(--marine); }
.kontakt__adresse { font-weight: 600; color: var(--marine); }
.kontakt__hinweis { color: var(--grau-500); font-size: 8.5pt; }
.qr { margin: 0; width: 24mm; text-align: center; }
.qr svg { display: block; width: 24mm; height: 24mm; }
.qr figcaption { margin-top: 1mm; font-size: 6.5pt; line-height: 1.25; color: var(--grau-500); }

/* Fuß: Anschrift, Register, Vorbehalt. */
.fuss {
  margin-top: 5mm; padding-top: 2.5mm; border-top: 1px solid var(--linie-stark);
  font-size: 7.5pt; line-height: 1.5; color: var(--grau-500);
}
.fuss strong { color: var(--anthrazit); font-weight: 600; }

/* ------------------------------------------------------ Zweites Blatt */

.blatt--zwei { min-height: auto; }
.blatt--zwei .kopf { margin-bottom: 2mm; }
.blatt--zwei .kopf__auge { letter-spacing: .04em; text-transform: none; font-size: 9pt; color: var(--anthrazit); }
.hinweis { font-size: 8.5pt; color: var(--grau-500); font-style: italic; }
.beschreibung { font-size: 9.5pt; line-height: 1.6; }
.beschreibung p { margin: 0 0 2mm; }
.beschreibung ul, .beschreibung ol { margin: 0 0 2mm; padding-left: 5mm; }
.ausstattung { margin: 0; padding-left: 5mm; columns: 2; column-gap: 8mm; font-size: 9.5pt; }
.ausstattung li { break-inside: avoid; margin-bottom: 1mm; }
.videos { margin: 0; padding-left: 5mm; font-size: 9pt; }
.videos a { color: var(--marine); overflow-wrap: anywhere; }

/* Alle übrigen Fotos in drei Spalten; das Raster fließt bei Bedarf auf weitere Seiten. */
.bildraster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.bildraster figure { margin: 0; }
.bildraster img {
  display: block; width: 100%; height: 42mm; object-fit: contain;
  background: var(--grau-50); border: 1px solid var(--linie);
}

/* ============================================================ Für Papier */

/* Unten Platz für die Laufzeile (Titel · Art.-Nr.) und die Seitenzahl; die Inhalte
   der Randfelder setzt das Datenblatt selbst (sprachabhängig). */
@page {
  size: A4;
  margin: 12mm 12mm 16mm;
  @bottom-left  { font: 7.5pt "IBM Plex Sans", Arial, sans-serif; color: var(--grau-500); vertical-align: top; padding-top: 4mm; }
  @bottom-right { font: 7.5pt "IBM Plex Sans", Arial, sans-serif; color: var(--grau-500); vertical-align: top; padding-top: 4mm; }
}

@media print {
  body { background: var(--weiss); font-size: 10pt; }

  /* Bedienung, kein Inhalt. */
  .balken { display: none; }

  .blatt {
    width: auto; min-height: auto; margin: 0; padding: 0; box-shadow: none;
    /* Jedes Blatt beginnt auf einer neuen Seite. */
    break-after: page;
  }
  .blatt:last-of-type { break-after: auto; }

  /* Tabellenzeilen, Fotos, Kontaktkasten und Kennwerte nie zerreißen. */
  tr, figure, .kontakt, .kennwerte, .preisfeld { break-inside: avoid; }
  h2, .technik caption { break-after: avoid; }
  .kontakt, .fuss { break-inside: avoid; }

  /* Flächen gehören zur Aussage: Preisfeld, Abzeichen, Streifen und Bildrahmen mitdrucken. */
  .preisfeld, .abzeichen, .kontakt, .technik, .hauptbild img, .bildraster img {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  a { text-decoration: none; }
}

/* ------------------------------------------------------ Schmale Schirme */

/* „screen“ ist Pflicht: Ein A4-Blatt ist schmaler als 230 mm – ohne die
   Einschränkung rutschten Bild und Kennwerte auch im Druck untereinander. */
@media screen and (max-width: 230mm) {
  .blatt { width: auto; margin: 12px; padding: 16px; min-height: auto; }
  .kopf { flex-wrap: wrap; }
  .oben { grid-template-columns: 1fr; }
  .hauptbild img { height: auto; max-height: 50vh; }
  .kontakt__spalten, .technik-spalten--zwei { grid-template-columns: 1fr; }
  .bildraster { grid-template-columns: 1fr 1fr; }
  .bildraster img { height: auto; }
  .ausstattung { columns: 1; }
  .balken { padding: 8px 16px; flex-wrap: wrap; gap: 8px; }
  .balken__drucken { padding: 0 14px; }
  /* Rasterspalten dürfen schmaler werden als ihr Inhalt – sonst schiebt eine lange
     Zeile (Maße, Adresse) die Seite seitlich aus dem Bild. */
  .oben > *, .technik-spalten > *, .kontakt__spalten > * { min-width: 0; }
  .technik td, .technik th { overflow-wrap: anywhere; }
  .technik th { width: 50%; }
  .kopf__logo { height: 10mm; }
}
