/* Logo-Grid auf der Startseite -------------------------------------------
 * Nachgebaut nach dem händischen Elementor-Grid (Container f0835e5):
 * 5 Spalten, 20px Abstand, 10px Innenabstand, Logos 189px, zentriert.
 * Beim Hover blendet das Markenbild genau über der Logo-Fläche ein. */
.marken-grid {
	list-style: none;
	margin: 0;
	padding: 10px;
	display: grid;
	grid-template-columns: repeat(5, 1fr); /* Desktop + Tablet: 5 Spalten */
	gap: 20px;
	justify-items: center;
	align-items: start;
}
.marken-grid__item {
	width: 100%;
	text-align: center;
}
.marken-grid__link {
	position: relative;
	display: inline-block;
	overflow: hidden;
	transition: opacity .2s;
}
.marken-grid__link:not(.hat-bild):hover img { opacity: .7; } /* ohne Markenbild wie bisher */
.marken-grid__link img { transition: opacity .2s; }
.marken-grid__item img {
	display: inline-block;
	vertical-align: middle;
	width: 189px;
	max-width: 100%;
	height: auto;
}
.marken-grid__item img.marken-grid__bild {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .35s ease;
}
.marken-grid__link.hat-bild:hover .marken-grid__bild,
.marken-grid__link.hat-bild:focus-visible .marken-grid__bild { opacity: 1; }
 
/* „→ entdecken“: nur beim Hover, weißer Streifen unten über dem Bild */
.marken-grid__cta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: .3em .5em;
	background: #fff;
	color: #000;
	font-size: .8rem;
	line-height: 1.3;
	text-align: center;
	opacity: 0;
	transition: opacity .25s ease;
}
.marken-grid__link:hover .marken-grid__cta,
.marken-grid__link:focus-visible .marken-grid__cta { opacity: 1; }
 
/* Touch-Geräte: kein Hover, Bild wird dann gar nicht erst geladen */
@media (hover: none) {
	.marken-grid__item img.marken-grid__bild,
	.marken-grid__cta { display: none; }
}
@media (max-width: 767px) { /* Elementor-Breakpoint Mobil */
	.marken-grid {
		grid-template-columns: repeat(3, 1fr); /* Mobil: 3 Spalten */
		gap: 10px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.marken-grid__bild, .marken-grid__cta { transition: none; }
}
 
/* Einzelseite Marke ------------------------------------------------------ */
/* Hello Elementor begrenzt .site-main auf Seiten ohne Elementor; hier
 * aufheben, damit das Hero-Bild die volle Breite nutzen kann. */
body.single-marke main.site-main.marke {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
}
.marke__hero {
	position: relative;
	width: 100%;
	aspect-ratio: 21 / 9;
	max-height: 70vh;
	min-height: 260px;
	overflow: hidden;
	background: #eee;
}
.marke__hero-bild {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
 
/* Markenlogo oben links auf dem Hero-Bild */
.marke__logo--hero {
	position: absolute;
	top: clamp(1rem, 3vw, 2.5rem);
	left: clamp(1rem, 3vw, 2.5rem);
	z-index: 1;
	width: auto;
	height: auto;
	max-width: clamp(110px, 18vw, 240px);
	max-height: clamp(50px, 9vw, 110px);
	margin: 0;
	object-fit: contain;
}
@media (min-width: 1025px) { /* Desktop: weiter eingerückt */
	.marke__logo--hero { top: 4.5rem; left: 4.5rem; }
}
 
.marke__inhalt {
	max-width: 1200px;
	margin: 3rem auto;  /* Abstand oben/unten als margin, damit kein padding */
	padding: 0;
}
@media (max-width: 1023px) { /* unter 1024px: seitlicher Innenabstand */
	.marke__inhalt { padding: 0 25px; }
}
.marke__kopf { text-align: center; }
.marke__logo { max-height: 120px; width: auto; margin-bottom: 2rem; }
.marke__text { max-width: none; margin: 0; }
/* Zweispaltig: links Video/Bild 40 %, rechts Text 60 % */
.marke__text--zweispaltig {
	margin-bottom: 5rem;
	display: grid;
	grid-template-columns: 2fr 3fr; /* = 40 % / 60 % */
	gap: 3rem;
	align-items: start;
}
/* YouTube/Vimeo responsiv im 16:9-Format */
.marke__video {
	position: relative;
	aspect-ratio: 16 / 9;
}
.marke__video iframe {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}
.marke__medium img {
	display: block;
	width: 100%;
	height: auto;
}
.marke__textspalte > :first-child { margin-top: 0; }
@media (max-width: 767px) { /* Mobil: untereinander, Bild/Video zuerst */
	.marke__text--zweispaltig { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 3rem; }
}
/* Falls das Theme die Klasse nicht mitbringt: Überschrift unsichtbar, aber lesbar */
.marke__titel.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
 
/* Schaufenster: Brillen liegen auf einem durchgehenden Regalboden je Reihe,
 * mit kurzen schrägen Linien an beiden Enden (Tiefe).
 * Feste Spaltenzahl je Bildschirm (--regal-spalten), damit Anfang und Ende
 * jeder Reihe bekannt sind. */
.modelle-grid {
	--regal-abstand: 2rem;   /* Abstand zwischen den Brillen */
	--regal-linie: 6px;      /* Stärke des Regalbodens */
	--regal-farbe: #d9e1e1;
	--regal-hoch: 7%;        /* wie weit die Linie ins Bild nach oben rückt */
	--regal-schraege: 30px;  /* Länge der schrägen Enden */
	--regal-winkel: 40deg;   /* Neigung der schrägen Enden */
	--regal-ueberstand: calc(tan(var(--regal-winkel)) * var(--regal-schraege)); /* nicht ändern */
	display: grid;
	grid-template-columns: repeat(4, 1fr); /* Desktop: 4 Brillen pro Reihe */
	column-gap: var(--regal-abstand);
	row-gap: 3rem;
	padding-top: calc(var(--regal-schraege) / 2);
}
.modell { --rest: 0; }   /* freie Plätze rechts daneben (nur letzte Reihe) */
.modell__regal { position: relative; }
 
/* Regalboden: jede Brille zieht die Linie bis zur nächsten durch */
.modell__regal::after {
	content: "";
	position: absolute;
	left: 0;
	right: calc(-1 * var(--regal-abstand));
	bottom: var(--regal-hoch);
	height: var(--regal-linie);
	background: var(--regal-farbe);
	z-index: 2;
	pointer-events: none;
}
/* schräge Enden: links am Reihenanfang, rechts am Reihenende */
.modell__regal::before,
.modell__regal-ende {
	content: "";
	display: none;
	position: absolute;
	bottom: calc(var(--regal-hoch) + var(--regal-linie) - 1px); /* setzt oben auf dem Boden an, kein Versatz */
	width: calc(var(--regal-linie) * .65); /* halb so dick wie bisher */
	height: var(--regal-schraege);
	background: var(--regal-farbe);
	z-index: 2;
	pointer-events: none;
	transform: skewX(calc(-1 * var(--regal-winkel))); /* oben nach rechts geneigt */
	transform-origin: left bottom;
}
.modell__regal::before { left: 0; }
/* rechtes Ende: Linie endet um den Überstand der Schräge früher,
 * damit die Schräge nicht über den Inhaltsbereich hinausragt */
.modell__regal-ende {
	right: calc(-1 * var(--rest) * (100% + var(--regal-abstand)) + var(--regal-ueberstand));
}
/* letzte Brille: Linie läuft bis zum rechten Rand der Reihe */
.modell:last-child .modell__regal::after {
	right: calc(-1 * var(--rest) * (100% + var(--regal-abstand)) + var(--regal-ueberstand));
}
.modell:last-child .modell__regal-ende { display: block; }
 
/* Reihenanfang/-ende je nach Spaltenzahl */
@media (min-width: 1025px) {
	.modell:nth-child(4n+1) .modell__regal::before { display: block; }
	.modell:nth-child(4n) .modell__regal::after { right: var(--regal-ueberstand); }
	.modell:nth-child(4n) .modell__regal-ende { display: block; }
	.modell:last-child:nth-child(4n+1) { --rest: 3; }
	.modell:last-child:nth-child(4n+2) { --rest: 2; }
	.modell:last-child:nth-child(4n+3) { --rest: 1; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.modelle-grid { grid-template-columns: repeat(3, 1fr); }
	.modell:nth-child(3n+1) .modell__regal::before { display: block; }
	.modell:nth-child(3n) .modell__regal::after { right: var(--regal-ueberstand); }
	.modell:nth-child(3n) .modell__regal-ende { display: block; }
	.modell:last-child:nth-child(3n+1) { --rest: 2; }
	.modell:last-child:nth-child(3n+2) { --rest: 1; }
}
@media (max-width: 767px) {
	.modelle-grid { grid-template-columns: repeat(2, 1fr); --regal-abstand: 1rem; --regal-schraege: 20px; row-gap: 2rem; }
	.modell:nth-child(2n+1) .modell__regal::before { display: block; }
	.modell:nth-child(2n) .modell__regal::after { right: var(--regal-ueberstand); }
	.modell:nth-child(2n) .modell__regal-ende { display: block; }
	.modell:last-child:nth-child(2n+1) { --rest: 1; }
}
.modell__bild {
	position: relative;
	z-index: 1;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: contain; /* Brille ganz zeigen, nicht beschneiden */
	display: block;
}
/* i-Icon oben rechts auf dem Brillenbild, Tooltip mit Titel + Infos */
.modell { position: relative; }
.modell:hover, .modell:focus-within { z-index: 5; } /* Tooltip über den Nachbarn */
/* .modell__info bleibt statisch: Icon und Tooltip richten sich am Bild aus */
/* gegen Button-Styles von Theme/Elementor-Kit abgesichert (daher !important) */
.modell__info button.modell__info-knopf {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box !important;
	width: 26px !important;
	height: 26px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid #555 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #555 !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1 !important;
	font-style: normal !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.modell__info button.modell__info-knopf:hover,
.modell__info.ist-offen button.modell__info-knopf {
	background: #555 !important;
	color: #fff !important;
}
.modell__tooltip {
	position: absolute;
	top: 42px;
	right: 0;
	z-index: 4;
	width: max-content;
	max-width: min(260px, 80vw);
	padding: .8rem 1rem;
	background: #fff;
	border: 1px solid #d9e1e1;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
	font-size: .875rem;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
@media (hover: hover) {
	.modell__info:hover .modell__tooltip { opacity: 1; visibility: visible; transform: none; }
}
.modell__tooltip::before { /* Brücke, damit der Hover beim Weg zum Tooltip nicht abreißt */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}
.modell__info.ist-offen .modell__tooltip,
.modell__info:has(.modell__info-knopf:focus-visible) .modell__tooltip { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 767px) { /* Mobil: linke Spalte öffnet nach rechts */
	.modell:nth-child(2n+1) .modell__tooltip { right: auto; left: 0; }
}
.modell__titel { margin: 0 0 .3rem; font-weight: 600; }
.modell__infos { margin: 0; }
 
.marke__zurueck { margin-top: 3rem; text-align: center; }
 