/**
 * Gin-Suche.
 *
 * FARBEN
 * Das Gold stammt aus dem Ginnatic-Logo, ausgelesen als #A09060. Es traegt
 * die Akzente. Als Gegenspieler dient ein warmes Fast-Schwarz statt reinem
 * Schwarz, weil sich Gold darauf waermer liest und nicht kalt wirkt.
 *
 * DEFENSIVE
 * Alle Regeln setzen Rahmen, Abstaende und Hintergruende ausdruecklich auf
 * ihren gewuenschten Wert, statt sich auf Vorgaben zu verlassen. Das Theme
 * bringt eigene Regeln fuer Elemente im Inhaltsbereich mit, die sonst
 * durchschlagen. Genau daher kamen die Rahmen um die Sortenangabe.
 */

.gs {
	--gs-gold: #a09060;
	--gs-gold-dunkel: #857748;
	--gs-gold-hell: #f6f2e7;
	--gs-dunkel: #26231d;
	--gs-dunkel-2: #383327;
	--gs-text: #1a1a1a;
	--gs-leise: #6e6e73;
	--gs-linie: #e4e2dc;
	--gs-flaeche: #f8f7f4;
	--gs-radius: 12px;

	font-size: 15px;
	line-height: 1.55;
	color: var(--gs-text);
}

.gs *,
.gs *::before,
.gs *::after {
	box-sizing: border-box;
}

/* Vorgaben des Themes fuer Elemente im Inhaltsbereich neutralisieren. */
.gs div,
.gs span,
.gs h3,
.gs p {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.gs__ueberschrift {
	margin: 0 0 0.7em;
	font-size: 1.5em;
}

/* ================================================================
 * Suchzeile
 * ============================================================= */

.gs__suchzeile {
	position: relative;
	display: block;
	margin-bottom: 1em;
}

/*
 * Senkrecht mittig ueber inset statt ueber einen negativen Rand.
 * Der Rand haengt an der genauen Symbolhoehe, die inset-Variante
 * nicht, und bleibt deshalb auch bei anderer Schriftgroesse mittig.
 */
.gs__lupe {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 17px;
	width: 19px;
	height: 19px;
	margin: auto 0;
	color: var(--gs-leise);
	pointer-events: none;
}

.gs__eingabe {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 14px 46px;
	border: 1px solid var(--gs-linie);
	border-radius: var(--gs-radius);
	background: #fff;
	font-size: 16px;
	line-height: 1.4;
	color: var(--gs-text);
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.gs__eingabe:focus {
	outline: none;
	border-color: var(--gs-gold);
	box-shadow: 0 0 0 3px rgba(160, 144, 96, 0.18);
}

.gs__loeschen {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 12px;
	width: 26px;
	height: 26px;
	margin: auto 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gs-flaeche);
	color: var(--gs-leise);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.gs__loeschen:hover {
	background: var(--gs-linie);
	color: var(--gs-text);
}

/* ================================================================
 * Filterleiste
 * ============================================================= */

.gs__leiste {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
	gap: 0.8em 0.9em;
	align-items: end;
	margin-bottom: 1em;
	padding: 1.05em 1.15em;
	background: var(--gs-flaeche);
	border: 1px solid var(--gs-linie);
	border-radius: var(--gs-radius);
}

.gs__feld {
	display: flex;
	flex-direction: column;
	gap: 0.32em;
	min-width: 0;
	margin: 0;
}

.gs__feldtitel {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gs-leise);
}

.gs__feld select,
.gs__feld input {
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 9px 11px;
	border: 1px solid var(--gs-linie);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	line-height: 1.3;
	color: var(--gs-text);
	box-shadow: none;
}

.gs__feld select:focus,
.gs__feld input:focus {
	outline: none;
	border-color: var(--gs-gold);
	box-shadow: 0 0 0 3px rgba(160, 144, 96, 0.18);
}

/* Ein gesetzter Filter hebt sich in Gold ab. */
.gs__feld select:not([data-leer]) {
	border-color: var(--gs-gold);
	background: var(--gs-gold-hell);
	font-weight: 600;
	color: var(--gs-dunkel);
}

.gs__schalterreihe {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.35em;
	min-width: 0;
}

.gs__schalter {
	display: flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	font-size: 13px;
	color: var(--gs-text);
	cursor: pointer;
	white-space: nowrap;
}

.gs__schalter input {
	width: auto;
	margin: 0;
	accent-color: var(--gs-gold);
}

/* ================================================================
 * Aktive Filter
 * ============================================================= */

.gs__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin-bottom: 0.9em;
}

.gs__chips:empty {
	display: none;
}

.gs__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	padding: 0.34em 0.6em 0.34em 0.85em;
	border: 0;
	border-radius: 100px;
	background: var(--gs-gold);
	color: #fff;
	font-size: 12.5px;
	line-height: 1.2;
	cursor: pointer;
}

.gs__chip:hover {
	background: var(--gs-gold-dunkel);
}

.gs__chip span {
	font-size: 15px;
	line-height: 1;
	opacity: 0.7;
}

.gs__chip--reset {
	padding-left: 0.5em;
	background: transparent;
	color: var(--gs-leise);
	text-decoration: underline;
}

.gs__chip--reset:hover {
	background: transparent;
	color: var(--gs-text);
}

/* ================================================================
 * Trefferzahl
 * ============================================================= */

.gs__anzahl {
	margin: 0 0 0.95em;
	font-size: 14px;
	color: var(--gs-leise);
}

.gs__anzahl strong {
	color: var(--gs-text);
	font-size: 17px;
	font-weight: 700;
}

/* ================================================================
 * Karten
 * ============================================================= */

.gs__karten {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
	gap: 1.1em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gs__karten--laedt {
	opacity: 0.4;
	pointer-events: none;
}

.gs__karte {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	border: 1px solid var(--gs-linie);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gs__karte:hover,
.gs__karte:focus-visible {
	transform: translateY(-3px);
	border-color: var(--gs-gold);
	box-shadow: 0 12px 26px rgba(38, 35, 29, 0.13);
}

.gs__karte:focus-visible {
	outline: 2px solid var(--gs-gold);
	outline-offset: 2px;
}

/* ---- Kopf mit Namen, wenn kein Bild vorhanden ist ---- */

.gs__kopf {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 92px;
	padding: 1em 1.05em;
	background: linear-gradient(150deg, var(--gs-dunkel) 0%, var(--gs-dunkel-2) 100%);
}

/* Feine Goldlinie am unteren Rand des Kopfes. */
.gs__kopf::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--gs-gold) 0%, rgba(160, 144, 96, 0.35) 100%);
}

.gs__name {
	margin: 0;
	padding: 0;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: #e8dfc7;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.gs__getestet {
	position: absolute;
	top: 9px;
	right: 9px;
	padding: 0.2em 0.6em;
	border-radius: 100px;
	background: var(--gs-gold);
	color: #fff;
	font-size: 8.5px;
	font-weight: 800;
	letter-spacing: 0.09em;
	line-height: 1.7;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---- Bild statt Farbkopf ---- */

.gs__bild {
	position: relative;
	aspect-ratio: 5 / 4;
	background: linear-gradient(165deg, #fdfcfa 0%, #f2f0ea 100%);
	border-bottom: 2px solid var(--gs-gold);
	overflow: hidden;
}

.gs__bild img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 13px;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.gs__karte:hover .gs__bild img {
	transform: scale(1.05);
}

/* ---- Inhalt ---- */

.gs__inhalt {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.32em;
	padding: 0.85em 1.05em 0.85em;
}

.gs__sorte {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--gs-gold-dunkel);
}

.gs__nameklein {
	margin: 0;
	padding: 0;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--gs-text);
	overflow-wrap: anywhere;
}

.gs__hersteller {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.4;
	color: var(--gs-leise);
}

.gs__fuss {
	display: flex;
	align-items: center;
	gap: 0.5em;
	min-width: 0;
	margin-top: auto;
	padding-top: 0.75em;
	border-top: 1px solid var(--gs-linie);
	font-size: 12px;
	color: var(--gs-leise);
}

.gs__prozent {
	flex: 0 0 auto;
	padding: 0.18em 0.5em;
	border-radius: 5px;
	background: var(--gs-gold-hell);
	font-size: 11.5px;
	font-weight: 700;
	color: var(--gs-gold-dunkel);
	font-variant-numeric: tabular-nums;
}

.gs__herkunft {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- Kein Treffer ---- */

.gs__leer {
	grid-column: 1 / -1;
	padding: 3em 1.5em;
	text-align: center;
	color: var(--gs-leise);
	background: var(--gs-flaeche);
	border-radius: var(--gs-radius);
}

.gs__leer strong {
	display: block;
	margin-bottom: 0.35em;
	color: var(--gs-text);
	font-size: 17px;
}

/* ================================================================
 * Blaettern
 * ============================================================= */

.gs__blaettern {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.3em;
	margin-top: 1.8em;
}

.gs__blaettern:empty {
	display: none;
}

.gs__seite {
	min-width: 38px;
	margin: 0;
	padding: 0.5em 0.75em;
	border: 1px solid var(--gs-linie);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	color: var(--gs-text);
	cursor: pointer;
}

.gs__seite:hover {
	border-color: var(--gs-gold);
	color: var(--gs-gold-dunkel);
}

.gs__seite--aktiv {
	background: var(--gs-gold);
	border-color: var(--gs-gold);
	color: #fff;
	cursor: default;
}

.gs__seite--luecke {
	border: 0;
	background: none;
	color: var(--gs-leise);
	cursor: default;
}

.gs__hinweis {
	padding: 1em;
	background: var(--gs-flaeche);
	border-radius: var(--gs-radius);
	color: var(--gs-leise);
}

/* ================================================================
 * Schmale Bildschirme
 * ============================================================= */

@media (max-width: 600px) {
	.gs__leiste {
		grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
		padding: 0.85em;
	}

	.gs__karten {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 0.8em;
	}

	.gs__kopf {
		min-height: 76px;
		padding: 0.8em 0.85em;
	}

	.gs__name {
		font-size: 13.5px;
	}
}
