@font-face {
  font-family: 'MediaPreise';
  src: url('p_MediaPreise.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  background-color: #333;
  font-family: 'Noto Sans', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.kontroll-panel {
  text-align: center;
  color: white;
  box-sizing: border-box;
  padding: 15px 10px; /* Etwas Abstand an den Seiten */
}
.kontroll-panel p {
  margin: 5px 0 0 0;
  font-size: 14px;
  color: #aaa;
}
button {
  background-color: #df0000;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  margin: 0 5px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold;
}
button:hover {
  filter: brightness(0.8);
}
#hidden-html-source {
  position: absolute;
  top: 0;
  left: -9999px;
  width: 794px;
  background: white;
}
#hidden-html-source .flyer-seite {
  width: 794px;
  height: 1120px; /* Exaktes A4-Verhältnis! */
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}
.flyer-seite-inner {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
}
.flyer-header {
  height: 75px;
  border-bottom: 3px solid var(--theme-color);
  margin-bottom: 15px;
  flex-shrink: 0;
  text-align: center;
}
.flyer-header h1 {
  margin: 0;
  color: #000;
  font-size: 26px;
  text-transform: uppercase;
}
.flyer-header p {
  margin: 5px 0 0 0;
  color: #666;
  font-size: 13px;
}
.legal-text-box {
  background: #ffffff;
  color: #666;
  font-size: 9px;
  line-height: 1.2;
  padding-top: 20px;
  margin-top: auto;
  flex-shrink: 0; /* Zwingt den Text, nicht zu schrumpfen */
  box-sizing: border-box;
  text-align: left;
}
/* =========================================
           LAYOUT 2: DAS 8ER RASTER (Der Gitter-Trick!)
           ========================================= */
.layout-grid-8 {
  background-color: #ffffff !important;
}
/* Das Gitter: Hintergrund ist grau, Lücke ist 1px, Karten sind weiss! */
.layout-grid-8 .produkt-grid {
  height: 100%;
  display: grid;
  background-color: #eee; /* Dient als durchgehende Trennlinie */
  gap: 1px; /* Die perfekte 1px Linie! */
}
.layout-grid-8 .produkt-grid {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
}
.half-page-image {
  width: 100%;
  height: 50%;
  background-size: cover;
  background-position: center;
  border-radius: 5px;
  margin-bottom: 20px;
}
/* Karten wieder rein weiss machen */
.layout-grid-8 .produkt-karte {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #fff; /* Sehr wichtig für das Grid! */
  padding: 20px; /* Schön Luft nach allen Seiten */
}
.karte-links {
  width: 50%;
  display: flex;
  flex-direction: column;
  padding-right: 15px;
  box-sizing: border-box;
}
.karte-rechts {
  width: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.preis-box {
  margin-bottom: 5px;
  margin-top: -5px;
}
.streichpreis {
  font-size: 14px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
.aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 46px;
  line-height: 0.9;
  letter-spacing: -1px;
  color: #000;
}
.marken-box {
  margin-bottom: 10px;
  min-height: 25px;
  display: flex;
  align-items: flex-end;
}
.marken-logo {
  max-height: 22px;
  max-width: 70%;
  object-fit: contain;
}
.marken-logo svg {
  height: 100%;
  width: auto;
  max-height: inherit;
  max-width: 100%;
  object-fit: contain;
}
.marken-text {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.produkt-titel {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}
.artikel-nummer {
  font-size: 10px;
  color: #888;
  margin-top: 10px;
}
.bild-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.produkt-bild {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.energy-label {
  position: absolute;
  bottom: -5px;
  right: -5px;
}
.energy-label svg {
  height: 40px;
}
/* Weniger Rand, damit die Karte luftiger wirkt */
.layout-grid-8 .produkt-karte {
  padding: 15px !important;
}
/* Text bekommt 55% Platz, Bild 45% */
.layout-grid-8 .karte-links {
  width: 50% !important;
  padding-right: 10px;
  margin-top: auto !important;
}
.layout-grid-8 .karte-rechts {
  width: 50% !important;
}
/* Bild darf den Bereich maximal ausfüllen */
.layout-grid-8 .produkt-bild {
  max-width: 100% !important;
  max-height: 100% !important;
}
/* =========================================
           NEU: 50% BILD + 1 RIESEN-PRODUKT UNTEN
           ========================================= */
.layout-half-img-1-prod {
  background-color: #ffffff !important;
}
.layout-half-img-1-prod .flyer-seite-inner {
  display: flex;
  flex-direction: column;
}
.layout-half-img-1-prod .half-page-image {
  height: 50%;
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: 0;
}
.layout-half-img-1-prod .produkt-grid {
  flex-grow: 1; /* Nimmt den übrigen Platz! */
  display: block;
}
.layout-half-img-1-prod .produkt-karte {
  display: flex;
  flex-direction: row;
  height: 100%;
  background-color: #fff;
  padding: 40px; /* Viel Luft an den Seiten! */
  box-sizing: border-box;
  align-items: center;
}
/* Der Text bekommt 45% des Platzes und wird schön in der Mitte zentriert */
.layout-half-img-1-prod .karte-links {
  width: 45%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 40px;
  box-sizing: border-box;
}
/* Das Bild bekommt 55% des Platzes, damit es massiv wirkt */
.layout-half-img-1-prod .karte-rechts {
  width: 55%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.layout-half-img-1-prod .bild-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.layout-half-img-1-prod .produkt-bild {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.layout-half-img-1-prod .energy-label {
  position: absolute;
  bottom: 8%;
  right: 0;
}
.layout-half-img-1-prod .energy-label svg {
  height: 55px;
}
/* RIESIGE SCHRIFTEN FÜR DAS HERO-PRODUKT */
.layout-half-img-1-prod .preis-box {
  margin-bottom: 10px;
}
.layout-half-img-1-prod .streichpreis {
  font-size: 18px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
.layout-half-img-1-prod .aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 75px;
  line-height: 0.9;
  letter-spacing: -2px;
  color: #000;
}
.layout-half-img-1-prod .marken-box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 30px;
  margin-bottom: 15px;
}
.layout-half-img-1-prod .marken-logo {
  max-height: 30px;
  max-width: 100%;
}
.layout-half-img-1-prod .marken-text {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}
.layout-half-img-1-prod .produkt-titel {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  margin-bottom: 15px;
}
.layout-half-img-1-prod .artikel-nummer {
  font-size: 11px;
  color: #888;
  margin-top: 15px;
  text-align: left;
}
/* =========================================
           NEU: 50% BILD + 2 PRODUKTE UNTEN
           ========================================= */
.layout-half-img-2-prod {
  background-color: #ffffff !important;
}
.layout-half-img-2-prod .flyer-seite-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.layout-half-img-2-prod .half-page-image {
  height: 50%;
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: 0;
}
.layout-half-img-2-prod .produkt-grid {
  flex-grow: 1; /* Nimmt den übrigen Platz! */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: #eee;
  gap: 1px;
}
.layout-half-img-2-prod .produkt-karte {
  display: flex;
  flex-direction: column;
  text-align: left;
  background-color: #fff;
  padding: 35px 25px; /* HIER IST DIE EXTRA LUFT! */
  box-sizing: border-box;
}
.layout-half-img-2-prod .bild-container {
  flex-grow: 1;
  min-height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
}
.layout-half-img-2-prod .produkt-bild {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.layout-half-img-2-prod .energy-label {
  position: absolute;
  bottom: 0;
  right: 0;
}
.layout-half-img-2-prod .energy-label svg {
  height: 35px;
}
.layout-half-img-2-prod .preis-box {
  margin-bottom: 5px;
  text-align: left;
}
.layout-half-img-2-prod .streichpreis {
  font-size: 14px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
.layout-half-img-2-prod .aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 48px;
  line-height: 0.9;
  letter-spacing: -1px;
  color: #000;
}
.layout-half-img-2-prod .marken-box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 25px;
  margin-bottom: 10px;
}
.layout-half-img-2-prod .marken-logo {
  max-height: 22px;
  max-width: 100%;
}
.layout-half-img-2-prod .marken-text {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.layout-half-img-2-prod .produkt-titel {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  margin-bottom: 10px;
}
.layout-half-img-2-prod .artikel-nummer {
  font-size: 10px;
  color: #888;
  margin-top: auto;
  padding-top: 10px;
  text-align: left;
}
/* =========================================
           VORLAGE 4: DAS 3x3 RASTER (Kachel-View)
           ========================================= */
.layout-grid-3 {
  background-color: #ffffff !important;
}
.layout-grid-3 .produkt-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  background-color: #eee; /* Der 1px Gitter-Trick! */
  gap: 1px;
}
.layout-grid-3 .produkt-karte {
  display: flex;
  flex-direction: column;
  text-align: left;
  background-color: #fff; /* Sehr wichtig für das Gitter */
  padding: 20px;
  box-sizing: border-box;
}
.layout-grid-3 .bild-container {
  flex-grow: 1;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 15px;
}
.layout-grid-3 .energy-label {
  position: absolute;
  bottom: 0;
  right: 0;
}
.layout-grid-3 .energy-label svg {
  height: 30px;
}
.layout-grid-3 .preis-box {
  margin-bottom: 5px;
  text-align: left;
}
.layout-grid-3 .streichpreis {
  font-size: 12px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
.layout-grid-3 .aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: -1px;
  color: #000;
}
.layout-grid-3 .marken-box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 25px;
  margin-bottom: 5px;
}
.layout-grid-3 .marken-logo {
  max-height: 20px;
  max-width: 100%;
}
.layout-grid-3 .marken-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.layout-grid-3 .produkt-titel {
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.layout-grid-3 .artikel-nummer {
  font-size: 9px;
  color: #888;
  margin-top: auto;
  padding-top: 10px;
  text-align: left;
}
/* =========================================
		   VORLAGE 6: DAS 2x3 RASTER (6 Produkte)
		   ========================================= */
.layout-grid-6 {
  background-color: #ffffff !important;
}
.layout-grid-6 .produkt-grid {
  height: 100%;
  display: grid;
  /* HIER IST DIE MAGIE: minmax(0, 1fr) verbietet dem Grid, die Seite zu sprengen! */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  background-color: #eee;
  gap: 1px;
}
.layout-grid-6 .produkt-karte {
  display: flex;
  flex-direction: column;
  text-align: left;
  background-color: #fff;
  padding: 15px; /* Minimal weniger Rand, damit die Produkte atmen können */
  box-sizing: border-box;
  overflow: hidden; /* Verhindert das Herausrutschen von Inhalten */
}
.layout-grid-6 .bild-container {
  flex-grow: 1;
  min-height: 0 !important; /* GANZ WICHTIG: Erlaubt dem Bild, sich stufenlos zu verkleinern! */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}
.layout-grid-6 .produkt-bild {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.layout-grid-6 .energy-label {
  position: absolute;
  bottom: 0;
  right: 0;
}
.layout-grid-6 .energy-label svg {
  height: 30px;
}
.layout-grid-6 .preis-box {
  margin-bottom: 5px;
  text-align: left;
}
.layout-grid-6 .streichpreis {
  font-size: 13px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
/* Schriftgrößen minimal angepasst für perfekte Proportionen im 6er Grid */
.layout-grid-6 .aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 42px;
  line-height: 0.9;
  letter-spacing: -1px;
  color: #000;
}
.layout-grid-6 .marken-box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 25px;
  margin-bottom: 5px;
}
.layout-grid-6 .marken-logo {
  max-height: 20px;
  max-width: 100%;
}
.layout-grid-6 .marken-text {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.layout-grid-6 .produkt-titel {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.layout-grid-6 .artikel-nummer {
  font-size: 9px;
  color: #888;
  margin-top: auto;
  padding-top: 10px;
  text-align: left;
}
/* =========================================
           NEU: VORLAGE 4: DAS 2x2 RASTER (4 Produkte)
           ========================================= */
.layout-grid-4 {
  background-color: #ffffff !important;
}
.layout-grid-4 .produkt-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 Spalten */
  grid-template-rows: repeat(2, 1fr); /* 2 Reihen */
  background-color: #eee; /* Der 1px Gitter-Trick! */
  gap: 1px;
}
.layout-grid-4 .produkt-karte {
  display: flex;
  flex-direction: column;
  text-align: left;
  background-color: #fff;
  padding: 40px 30px; /* Viel Luft für einen edlen Look */
  box-sizing: border-box;
}
.layout-grid-4 .bild-container {
  flex-grow: 1;
  min-height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 25px;
}
.layout-grid-4 .produkt-bild {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.layout-grid-4 .energy-label {
  position: absolute;
  bottom: 0;
  right: 0;
}
.layout-grid-4 .energy-label svg {
  height: 40px;
}
.layout-grid-4 .preis-box {
  margin-bottom: 10px;
  text-align: left;
}
.layout-grid-4 .streichpreis {
  font-size: 16px;
  text-decoration: line-through;
  color: #666;
  margin-bottom: -5px;
}
/* Die Preise werden im 4er Layout noch präsenter */
.layout-grid-4 .aktueller-preis {
  font-family: 'MediaPreise', sans-serif;
  font-size: 58px;
  line-height: 0.9;
  letter-spacing: -1px;
  color: #000;
}
.layout-grid-4 .marken-box {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  min-height: 25px;
  margin-bottom: 15px;
}
.layout-grid-4 .marken-logo {
  max-height: 25px;
  max-width: 100%;
}
.layout-grid-4 .marken-text {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}
.layout-grid-4 .produkt-titel {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
.layout-grid-4 .artikel-nummer {
  font-size: 11px;
  color: #888;
  margin-top: auto;
  padding-top: 15px;
  text-align: left;
}
/* =========================================
           VORLAGE 5: FULL PAGE IMAGE (Werbung)
           ========================================= */
.layout-full-image .flyer-seite-inner, .layout-pdf-hotspots .flyer-seite-inner {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.full-page-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* =========================================
           BUGFIX: SCROLLBALKEN RADIKAL VERSTECKEN
           ========================================= */
/* 1. Versteckt Scrollbalken in Chrome, Safari, Edge für ALLE Elemente */ ::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
  background: transparent !important;
  -webkit-appearance: none !important;
}
/* 2. Zwingt Firefox und IE dazu, keine Balken zu zeichnen */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html, body {
  overflow-x: hidden !important;
}
//* =========================================
FLIPBOOK & PDF SYSTEM=========================================*/ body.flipbook-mode {
  overflow: hidden !important; /* GANZ WICHTIG: Verhindert jegliche Scrollbalken! */
  width: 100vw;
  height: 100vh !important; /* WICHTIG: Zwingt die Seite auf exakte Monitor-Höhe */
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}
#loading-screen {
  color: white;
  font-size: 24px;
  text-align: center;
  padding: 1rem
}
#flipbook-wrapper {
  position: relative;
  width: 100%;
  max-width: 1080px; /* Normal-Modus: Max Breite des Buchs */
  margin: 0 auto;
  flex-grow: 1; /* Nimmt freien Platz unter Header ein */
  height: 100%; /* Erbt die Monitor-Höhe vom body */
  min-height: 0; /* Verhindert, dass Flexbox unten ausbricht! */
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 0 20px 0;
  box-sizing: border-box;
}
/* Der innere Container, der das Buch und die Pfeile zusammenhält */
#flipbook-wrapper > div:first-of-type {
  width: 100% !important;
  height: 100% !important; /* <--- DER FIX: Gibt dem Buch das harte Limit nach unten! */
  max-height: 100% !important;
  min-height: 0 !important;
  display: flex;
  justify-content: center;
  align-items: center;
}
#flipbook.stf__parent {
  margin: 0 auto !important;
  max-width: 100% !important;
  max-height: 100% !important; /* SICHERHEITS-SCHLOSS NACH UNTEN */
  transition: transform 0.6s ease-in-out !important;
}
/* WICHTIGER FIX: Wir animieren und verschieben jetzt den .stf__wrapper. 
   		Dieser ist exakt so breit wie das Buch, nicht wie der Monitor! */
#flipbook .stf__wrapper {
  transition: transform 0.6s ease-in-out !important;
}
.flip-controls {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 100%; /* Orientiert sich jetzt sauber am Wrapper */
  transform: translate(-50%, -50%);
  display: none;
  justify-content: space-between;
  padding: 0;
  box-sizing: border-box;
  z-index: 1000;
  pointer-events: none;
  min-width: 220px;
}
/* --- DYNAMISCHES VOLLBILD --- */
body.is-fullscreen #header-area {
  display: none !important; /* Header weg */
}
body.is-fullscreen #flipbook-wrapper {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 100vw !important; /* Erlaubt die volle Monitorbreite */
  width: 100vw !important;
  height: 100vh !important;
  background-color: #333;
  z-index: 9999;
  padding: 20px 0 40px 0 !important;
  box-sizing: border-box;
}

.book-page-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  background-color: white;
}
.page {
  background-color: white;
  cursor: grab;
}
.page:active {
  cursor: grabbing !important;
}
html.pdf-mode, body.pdf-mode {
  background: white;
  margin: 0;
  padding: 0;
  height: auto !important;
  overflow: auto;
}
.pdf-mode #hidden-html-source {
  position: relative;
  left: 0;
  top: 0;
  margin: 0;
  width: 794px;
  display: block;
}
.pdf-mode .flyer-seite {
  margin-bottom: 0 !important;
  box-shadow: none !important;
  border: none !important;
  page-break-after: always;
  page-break-inside: avoid !important;
}
.pdf-mode .flyer-seite:last-child {
  page-break-after: avoid !important;
}
/* =========================================
           BUGFIX: 50% BILDER & KARTEN-LAYOUTS
           ========================================= */
/* 2. Platzverteilung reparieren, damit das Raster drunter Platz hat */
.layout-half-img-2-prod .produkt-grid, .layout-half-img-1-prod .produkt-grid {
  flex-grow: 1 !important;
}
/* 3. Verhindert blaue Links und repariert das Klicken */
a.produkt-karte {
  text-decoration: none !important;
  color: #000000 !important;
  cursor: pointer;
}
/* 4. Verhindert Quetschen von Boxen bei langen Texten */
.produkt-titel, .preis-box, .marken-box, .artikel-nummer {
  flex-shrink: 0 !important;
}
.artikel-nummer {
  font-size: 9px !important;
  color: #888 !important;
}
.energy-label svg {
  width: auto !important;
  max-width: max-content !important;
  object-fit: contain !important;
}
/* 5. Dynamische Zeilen-Längen für die Titel (mit sauberen Pünktchen) */
.produkt-titel {
  font-family: 'Noto Sans', sans-serif !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin-bottom: 10px !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
/* Grosse Layouts: Dürfen bis zu 4 Zeilen haben */
.layout-half-img-1-prod .produkt-titel, .layout-grid-4 .produkt-titel {
  -webkit-line-clamp: 4 !important;
  font-size: 16px !important;
}
/* Kleine Layouts: Werden exakt nach 2 Zeilen abgeschnitten */
.layout-grid-8 .produkt-titel, .layout-grid-6 .produkt-titel, .layout-grid-3 .produkt-titel, .layout-half-img-2-prod .produkt-titel {
  -webkit-line-clamp: 2 !important;
  font-size: 13px !important;
}
/* =========================================
   ZOOM OVERLAY SYSTEM
   ========================================= */
#btn-zoom {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #df0000;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}
#zoom-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  overflow: auto; /* WICHTIG: Erlaubt normales Scrollen/Wischen */
  box-sizing: border-box;
  text-align: center;
}
#zoom-overlay.active {
  display: block;
}
#zoom-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #df0000;
  color: white;
  border: solid 2px white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1em;
}
#zoom-content {
  display: flex;
  flex-direction: row; /* Für Desktop (2 Seiten nebeneinander) */
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  width: 100%;
  cursor: zoom-in;
  transition: all 0.3s ease;
}
/* --- NEU: Container für Bild + Links im Zoom --- */
.zoom-page-wrapper {
  position: relative; /* Wichtig für die absoluten Links */
  display: inline-block;
  max-width: 100%;
  max-height: 100vh;
}
.zoom-page-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 100vh;
  height: auto;
  object-fit: contain;
}
/* Hineingezoomt: Wrapper wird riesig, Links wachsen exakt mit! */
#zoom-content.zoomed-in {
  cursor: zoom-out;
  display: block; /* Aufheben von Flex, damit Container richtig wachsen kann */
}
#zoom-content.zoomed-in .zoom-page-wrapper {
  width: 100%; /* Echter Zoom: 200% macht es doppelt so gross */
  max-width: none;
  max-height: none;
}
#zoom-content.zoomed-in .zoom-page-wrapper img {
  max-height: none;
}
@media (max-width: 768px) {
  /* Auf dem Handy ist es im Zoom meist besser, wenn es noch etwas größer ist */
  #zoom-content.zoomed-in .zoom-page-wrapper {
    width: 100%;
  }
}
.page-zoom-btn {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #df0000;
  color: white;
  border: solid 2px white;
  border-radius: 9999px;
  padding: 0.65rem;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 20; /* Muss höher sein als die unsichtbaren Links (z-index: 10) */
  transition: transform 0.2s, opacity 0.1s;
  display: flex;
  align-items: center;
}
.page-zoom-btn:hover {
  transform: translateX(-50%) scale(1.05);
  background-color: #b30000;
}
/* =========================================
           NAVIGATION ARROWS & WISCH-ANIMATION
           ========================================= */
.flip-controls button {
  pointer-events: auto;
  background-color: #df0000;
  color: white;
  border: solid 2px white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, background-color 0.2s, opacity 0.3s;
  margin: 0;
  padding: 0;
}
.flip-controls button:hover {
  transform: scale(1.1);
  background-color: #b30000;
}
/* Responsive Anpassungen für Mobile (Handys) bleiben gleich */
@media (max-width: 768px) {
  .flip-controls button {
    width: 40px;
    height: 40px;
    font-size: 16px;
    background-color: rgba(223, 0, 0, 0.8);
  }
}
#swipe-hint {
  position: fixed;
  bottom: 5%;
  /* NEU: Wir starten exakt in der Mitte (50%) und gehen 150 Pixel nach rechts. 
       Dadurch liegt die Hand immer punktgenau auf der rechten Kante des Flyers! */
  left: calc(50% + 250px);
  color: #000000;
  font-size: 50px;
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 1)) drop-shadow(0px 2px 4px rgba(255, 255, 255, 0.8));
  animation: swipeAnim 2s infinite ease-in-out;
  display: none;
}
/* Responsive Anpassungen für Mobile (Handys) */
@media (max-width: 768px) {
  /* ... dein Code für die flip-controls bleibt hier gleich ... */
  .flip-controls {
    padding: 0 10px;
  }
  /* NEU für's Handy: Die Hand näher an die Mitte rücken */
  #swipe-hint {
    left: calc(50% + 60px); /* Auf schmalen Displays weniger weit nach rechts */
    bottom: 15%;
  }
}
/* Die Wisch-Animation: Die Hand "drückt" aufs Papier, zieht nach links und lässt los */
@keyframes swipeAnim {
  0% {
    transform: translateX(0) translateY(0) scale(1) rotate(-15deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(0.9) rotate(-15deg);
  }
  70% {
    transform: translateX(-100px) translateY(-10px) scale(0.9) rotate(-25deg);
    opacity: 1;
  }
  80% {
    transform: translateX(-100px) translateY(-10px) scale(1) rotate(-25deg);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
/* =========================================
   DESKTOP VS MOBILE ICON & PINCH-HINT
   ========================================= */
/* Desktop/Mobile Unterscheidung für das Wisch-Icon */
.mobile-icon {
  display: none;
}
.desktop-icon {
  display: inline-block;
}
/* Das Pinch-to-Zoom Overlay im Zoom-Modus */
#pinch-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: rgba(0, 0, 0, 0.75);
  padding: 20px 30px;
  border-radius: 12px;
  text-align: center;
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  z-index: 10001;
  pointer-events: none; /* Blockiert keine Klicks auf das Bild! */
  opacity: 0; /* Standardmäßig unsichtbar */
}
#pinch-hint i {
  font-size: 40px;
  margin-bottom: 10px;
  animation: pinchPulse 0.8s infinite alternate ease-in-out;
}
/* Puls-Animation für das Spreizen-Icon */
@keyframes pinchPulse {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1.2);
  }
}
/* Ein- und Ausblenden des Hinweises */
@keyframes fadeOutHint {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 768px) {
  .mobile-icon {
    display: inline-block;
  }
  .desktop-icon {
    display: none;
  }
}
#page-counter {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  z-index: 999;
  margin-top: 15px; /* Perfekter Abstand zum unteren Papierrand */
  pointer-events: none;
}
@media (max-width: 768px) {
  #page-counter {
    font-size: 11px;
    padding: 4px 12px;
    margin-top: 10px;
  }
}
/* =========================================
           BILD OHNE RAND (FULL-WIDTH TOP)
           ========================================= */
.img-no-border .half-page-image {
  margin-top: -30px !important;
  margin-left: -30px !important;
  margin-right: -30px !important;
  width: calc(100% + 60px) !important;
  height: calc(50% + 15px) !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}
/* Für 50% Bild mit 2 Produkten: Abstand entfernen, damit es bündig ist */
.layout-half-img-2-prod.img-no-border .flyer-seite-inner {
  gap: 0 !important;
}
/* =========================================
           GLOBALER PREIS-STYLE (html2canvas sicherer Sticker-Look)
           ========================================= */
.aktueller-preis {
  color: #000000 !important;
  font-family: 'MediaPreise', sans-serif !important;
  letter-spacing: 0px !important; /* Etwas mehr Luft für die Zahlen generell */
  -webkit-text-stroke: 0 !important;
  /* Weiße Outline (hart) + Weicher Schlagschatten (mit Blur!) */
  text-shadow: /* 1. Schicht: Weiße harte Outline (0px Blur) */ -2px -2px 0 #fff, 0 -2px 0 #fff, 2px -2px 0 #fff, 2px 0 0 #fff, 2px 2px 0 #fff, 0 2px 0 #fff, -2px 2px 0 #fff, -2px 0 0 #fff, -1px -2px 0 #fff, 1px -2px 0 #fff, -2px -1px 0 #fff, 2px -1px 0 #fff, -2px 1px 0 #fff, 2px 1px 0 #fff, -1px 2px 0 #fff, 1px 2px 0 #fff, /* 2. Schicht: WEICHER SCHLAGSCHATTEN (Blur-Radius auf 5px und 8px erhöht!) */ 3px 4px 5px rgba(0, 0, 0, 0.35), 2px 6px 8px rgba(0, 0, 0, 0.15) !important;
  display: inline-block !important;
}
/* HIER WIRD DER STRICH (.-) WEGGESCHOBEN */
.preis-strich {
  margin-left: 5px; /* Schiebt das .- sanft von der letzten Zahl weg */
  display: inline-block;
}
/* =========================================
           ULTIMATIVER BUGFIX: 1 RIESEN-PRODUKT (ZENTRIERT & RIESIG)
           ========================================= */
.layout-half-img-1-prod .produkt-grid {
  display: block !important;
  height: auto !important;
  flex-grow: 1 !important;
}
/* Hier passiert die Magie: Zentriert den Textblock vertikal */
.layout-half-img-1-prod .karte-links {
  width: 45% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding-right: 40px !important;
  margin-top: 0 !important;
}
.layout-half-img-1-prod .karte-rechts {
  width: 55% !important;
  height: 100% !important;
  position: relative !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.layout-half-img-1-prod .aktueller-preis {
  font-size: 75px !important;
}
.layout-half-img-1-prod .produkt-titel {
  font-size: 18px !important;
  -webkit-line-clamp: 4 !important;
}
.layout-half-img-1-prod .streichpreis {
  font-size: 18px !important;
}
.layout-half-img-1-prod .artikel-nummer {
  font-size: 11px !important;
  margin-top: 15px !important;
}
.layout-half-img-1-prod .bild-container {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.layout-half-img-1-prod .produkt-bild {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}
.layout-half-img-1-prod .energy-label {
  position: absolute !important;
  bottom: 5% !important;
  right: 0 !important;
}
.layout-half-img-1-prod .energy-label svg {
  height: 55px !important;
}
/* =========================================
           BOMBENSICHERER BILD-FIT (FLEXBOX-TRICK FÜR PDF)
           ========================================= */
.img-wrapper {
  position: relative !important;
  overflow: hidden !important;
  /*flex-shrink: 0 !important;*/
  /* FLEXBOX IST DIE LÖSUNG! Es zentriert das Bild absolut fehlerfrei */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.cover-img-sharp {
  /* KEIN absolute und KEIN transform mehr! Das hat den Fehler verursacht! */
  position: relative !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  /* Bild füllt den Kasten garantiert aus */
  min-width: 100% !important;
  min-height: 100% !important;
  /* Behält die originalen Proportionen (Plätzchen-Ausstecher) */
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
}
/* =========================================
           FARB-THEMES (WEISS, SCHWARZ, ROT)
           ========================================= */
/* THEME: SCHWARZ */
.theme-bg-black, .theme-bg-black .produkt-karte {
  background-color: #000000 !important;
}
.theme-bg-black .produkt-grid {
  background-color: #333333 !important; /* Gitter-Lücken dunkelgrau */
}
.theme-bg-black .marken-text, .theme-bg-black .produkt-titel {
  color: #ffffff !important;
}
.theme-bg-black .artikel-nummer {
  color: #aaaaaa !important;
}
/* Macht schwarze Logos (ASUS, LENOVO) automatisch weiss! */
.theme-bg-black .marken-logo {
  filter: brightness(0) invert(1) !important;
}
.theme-bg-black .legal-text-box {
  background-color: #000000 !important;
  color: #aaaaaa !important;
  border-top-color: #333333 !important;
}
/* THEME: ROT */
.theme-bg-red, .theme-bg-red .produkt-karte {
  background-color: var(--theme-color) !important;
}
.theme-bg-red .produkt-grid {
  background-color: #a30000 !important; /* Gitter-Lücken dunkelrot */
}
.theme-bg-red .marken-text, .theme-bg-red .produkt-titel {
  color: #ffffff !important;
}
.theme-bg-red .artikel-nummer {
  color: #ffcccc !important;
}
/* Macht schwarze Logos automatisch weiss! */
.theme-bg-red .marken-logo {
  filter: brightness(0) invert(1) !important;
}
.theme-bg-red .legal-text-box {
  background-color: var(--theme-color) !important;
  color: #ffcccc !important;
  border-top-color: #a30000 !important;
}
/* NEU: Weißer Leucht-Schein (Glow) für den Preis auf schwarzem Hintergrund */
.theme-bg-black .aktueller-preis {
  text-shadow: /* 1. Schicht: Die harte weiße Outline (bleibt erhalten) */ -2px -2px 0 #fff, 0 -2px 0 #fff, 2px -2px 0 #fff, 2px 0 0 #fff, 2px 2px 0 #fff, 0 2px 0 #fff, -2px 2px 0 #fff, -2px 0 0 #fff, -1px -2px 0 #fff, 1px -2px 0 #fff, -2px -1px 0 #fff, 2px -1px 0 #fff, -2px 1px 0 #fff, 2px 1px 0 #fff, -1px 2px 0 #fff, 1px 2px 0 #fff, /* 2. Schicht: WEISSER SCHEIN NACH AUSSEN (Glow-Effekt statt schwarzem Schatten) */ 0px 0px 10px rgba(255, 255, 255, 0.8), 0px 0px 20px rgba(255, 255, 255, 0.5) !important;
}
/* Header Area Start */
div#header-area {
  display: flex;
  background-color: #df0000;
  width: 100%;
  justify-content: space-between;
  padding: 0.8rem;
  align-items: center;
}
div#header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 1rem;
}
#header-logo img {
  max-width: 200px;
  padding: 5px;
}
#lang-switcher {
  margin-right: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  grid-gap: 0.5rem;
}
#header-area-inner {
  width: 1476px;
  margin: auto;
  display: flex;
  justify-content: space-between;
}
div#header-right {
  display: flex;
}
/* =========================================
           BUGFIX: PDF-SEITEN NICHT ABSCHNEIDEN
           ========================================= */
.layout-pdf-hotspots .cover-img-sharp {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  /* 'fill' zwingt das Bild EXAKT in die A4-Seite, ohne zu zoomen oder abzuschneiden! */
  object-fit: fill !important;
}

/* =========================================
   AUSGELAGERTE INLINE-STYLES (Schritt 1)
   ========================================= */

/* Header & Sprache */
.btn-fullscreen { margin-right: 5px; }
.lang-link { color: white; font-weight: bold; text-decoration: none; margin: 0 10px; }
.lang-link:hover { text-decoration: underline; }

/* Exit Fullscreen Button */
#exit-fullscreen-btn {
    display: none; 
    position: fixed; 
    top: 75px; 
    right: 20px; 
    z-index: 99999; /* <-- WICHTIG: Muss zwingend höher als 9999 sein! */
    background: rgba(0,0,0,0.6); 
    color: white; 
    border: solid 2px white; 
    border-radius: 50%; 
    width: 45px; 
    height: 45px; 
    font-size: 18px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); 
    cursor: pointer; 
    transition: background 0.2s; 
    opacity: 1;
    
    /* NEU: Zentriert das Icon wieder perfekt in der Mitte */
    align-items: center;
    justify-content: center;
}
#exit-fullscreen-btn:hover { background: rgba(0,0,0,0.8); }

/* Ladebildschirm */
#loading-screen {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    height: 100vh; 
    gap: 15px;
}
.loading-spinner { font-size: 50px; color: var(--theme-color); }
.loading-title { color: white; font-size: 18px; font-weight: bold; }
.loading-subtitle { color: #aaa; font-size: 12px; }

/* Flipbook Inner Wrapper */
.flipbook-flex-wrapper {
    position: relative; 
    display: flex; 
    justify-content: center; 
    width: 100%;
}

/* =========================================
   AUSGELAGERTE INLINE-STYLES (Schritt 2)
   ========================================= */

/* --- PDF Ladebildschirm (UI) --- */
#pdf-ui {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: white; 
    z-index: 9999; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    font-family: 'Noto Sans', sans-serif;
}
#pdf-status { color: var(--theme-color); text-align: center; }
#pdf-subtext { text-align: center; color: #666; max-width: 80%; line-height: 1.5; }
#pdf-actions { display: none; margin-top: 30px; }

.btn-pdf-close {
    background: #333; color: white; padding: 12px 24px; 
    border: none; border-radius: 5px; font-size: 16px; 
    cursor: pointer; font-weight: bold; transition: background 0.2s;
}
.btn-pdf-close:hover { background: #000; }


/* --- Automatische Flyer-Rückseite --- */
.auto-cover-page { background-color: var(--theme-color) !important; }

.auto-cover-inner {
    display: flex; flex-direction: column; justify-content: center; 
    align-items: center; color: white;
}

.auto-cover-title {
    font-size: 50px; margin-bottom: 20px; font-weight: 900; 
    font-style: italic; text-transform: uppercase; font-family: 'Noto Sans', sans-serif;
}

.auto-cover-url {
    background: white; color: var(--theme-color); padding: 15px 40px; 
    font-size: 30px; font-family: 'Noto Sans', sans-serif; font-weight: 900;
}

/* =========================================
   AUSGELAGERTE INLINE-STYLES (Schritt 3)
   ========================================= */

/* --- Container Fixes --- */
.full-page-wrapper { width: 100%; height: 100%; }
.bg-white { background-color: #ffffff; }

/* --- Hotspots --- */
.pdf-hotspots-bg { z-index: 1; }
.hotspot-link {
    display: block; 
    z-index: 5; 
    background: rgba(255,255,255,0.01); 
    border: none; 
    padding: 0; 
    cursor: pointer;
}

/* --- Werbebanner --- */
.banner-link {
    padding: 0 !important; 
    display: block; 
    overflow: hidden; 
    background: transparent; 
    text-decoration: none;
}
.banner-img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

/* --- SVG Marken-Logo --- */
.svg-logo-wrapper { display: flex; align-items: flex-end; }

/* =========================================
   DER ULTIMATIVE LÜCKEN- & ZENTRIER-FIX
   ========================================= */
.flipbook-flex-wrapper {
    position: relative; 
    display: flex; 
    justify-content: center; 
    width: 100%;
    max-width: 1080px; 
    margin: 0 auto;
    transition: transform 0.6s ease; 
}

/* Im Vollbild: Der Rahmen koppelt sich hart an die Fensterhöhe! (Format 1080/764 = 1.4136) */
body.is-fullscreen .flipbook-flex-wrapper {
    max-width: calc((100vh - 122px) * 1.4136) !important; 
}

/* Auf dem Smartphone (Format 540/764 = 0.7068) */
@media (max-width: 768px) {
    .flipbook-flex-wrapper { max-width: 540px; }
    
    body.is-fullscreen .flipbook-flex-wrapper {
        max-width: calc((100vh - 122px) * 0.7068) !important; 
    }
}