/**
 * Olivenöl-Lexikon – Frontend-Styles.
 *
 * Einzeleinträge: zurückhaltend, erben Farben/Typografie vom Theme.
 * Übersicht und Themen-Archive (ab 1.1.0): eigenes Layout im Viva-il-Gusto-CI.
 * Alle Regeln sind auf .vig-lex* gescoped.
 */

/* Cross-Link im Fließtext. */
.entry-content a.vig-lex-link {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

/* Doppeltes Datum (Erstell- + Änderungsdatum) unterdrücken – nur ein Datum zeigen. */
.single-vig_lexikon .posted-on .updated:not(.published) {
	display: none;
}

/* ---- CTA-Box am Eintragsende ---- */
.vig-lex-cta {
	margin: 2.5rem 0 1rem;
	padding: 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.02);
}

.vig-lex-cta__title {
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	line-height: 1.2;
}

.vig-lex-cta__lead {
	margin: 0 0 1.25rem;
}

.vig-lex-cta__products {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	display: grid;
	/* Bei schmaler Spalte automatisch einspaltig statt gequetscht. */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 0.85rem;
}

.vig-lex-cta__product {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	background: #fff;
}

.vig-lex-cta__product > a {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex: 1 1 auto;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

/* Bildgröße hart festlegen, gegen Theme-Overrides absichern. */
.vig-lex-cta__thumb {
	width: 72px !important;
	height: 72px !important;
	max-width: 72px;
	flex: 0 0 72px;
	object-fit: cover;
	border-radius: 6px;
	margin: 0;
}

/* Textblock rechts vom Bild: Name oben, Preis darunter. Normale Wortumbrüche. */
.vig-lex-cta__text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.vig-lex-cta__name {
	font-weight: 600;
	line-height: 1.35;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: none;
}

.vig-lex-cta__price {
	font-size: 0.95em;
	opacity: 0.85;
}

.vig-lex-cta__price .amount {
	white-space: nowrap;
}

.vig-lex-cta__all {
	margin: 0.5rem 0 0;
}

.vig-lex-cta__button {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	background: var(--wp--preset--color--primary, #4a7c3a);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.2;
}

.vig-lex-cta__button:hover,
.vig-lex-cta__button:focus {
	opacity: 0.92;
	color: #fff !important;
}

@media (prefers-reduced-motion: no-preference) {
	.vig-lex-cta__button {
		transition: opacity 0.15s ease;
	}
}

/* =====================================================================
   Übersicht und Themen-Archive
   ===================================================================== */

.vig-lex-primary {
	clear: both;
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.vig-lex {
	--lex-ink: #2e342a;
	--lex-text: #4a5145;
	--lex-muted: #6b705f;
	--lex-green: #6a8f4e;
	--lex-green-dark: #4e6b38;
	--lex-cream: #f7f4ec;
	--lex-sand: #e7ddc6;
	--lex-gold: #c6a24b;
	--lex-gold-light: #d9be7a;
	--lex-radius: 16px;
	--lex-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	display: block;
	padding: 0.5rem 0 4rem;
	color: var(--lex-text);
}

.vig-lex [hidden] {
	display: none !important;
}

.vig-lex-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Hero ---- */
.vig-lex-hero {
	position: relative;
	overflow: hidden;
	margin: 0 0 1.75rem;
	padding: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 5vw, 4rem);
	border-radius: 24px;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(217, 190, 122, 0.24) 0%, rgba(217, 190, 122, 0) 55%),
		linear-gradient(135deg, #3b4630 0%, #4e6b38 58%, #6a8f4e 100%);
	color: var(--lex-cream);
}

.vig-lex-hero__body {
	position: relative;
	z-index: 1;
	max-width: 680px;
}

.vig-lex .vig-lex-hero__eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--lex-head);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--lex-gold-light);
}

.vig-lex .vig-lex-hero__title {
	margin: 0 0 1rem;
	font-family: var(--lex-head);
	font-size: clamp(2.1rem, 4.6vw, 3.4rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: #fff;
}

.vig-lex .vig-lex-hero__lead {
	margin: 0 0 1.5rem;
	font-size: clamp(1rem, 1.6vw, 1.12rem);
	line-height: 1.65;
	color: rgba(247, 244, 236, 0.92);
}

.vig-lex .vig-lex-hero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0 0 1.75rem;
	padding: 0;
	list-style: none;
	font-size: 0.92rem;
	color: rgba(247, 244, 236, 0.86);
}

.vig-lex .vig-lex-hero__facts li {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0;
}

.vig-lex .vig-lex-hero__facts li::before {
	content: "";
	flex: 0 0 6px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--lex-gold-light);
}

.vig-lex .vig-lex-hero__facts strong {
	color: #fff;
	font-weight: 700;
}

.vig-lex-hero__deco {
	position: absolute;
	right: -30px;
	bottom: -40px;
	z-index: 0;
	width: min(46%, 440px);
	height: auto;
	color: var(--lex-gold-light);
	opacity: 0.22;
	pointer-events: none;
}

/* ---- Suche ---- */
.vig-lex-search {
	position: relative;
	max-width: 460px;
}

.vig-lex-search__icon {
	position: absolute;
	top: 50%;
	left: 1.15rem;
	z-index: 1;
	width: 18px;
	height: 18px;
	color: var(--lex-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.vig-lex .vig-lex-search input[type="search"] {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 1.25rem 0 3rem;
	border: 2px solid transparent;
	border-radius: 999px;
	background: #fff;
	color: var(--lex-ink);
	font-size: 1rem;
	line-height: normal;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	-webkit-appearance: none;
	appearance: none;
}

.vig-lex .vig-lex-search input[type="search"]::placeholder {
	color: var(--lex-muted);
	opacity: 1;
}

.vig-lex .vig-lex-search input[type="search"]:focus {
	outline: none;
	border-color: var(--lex-gold);
}

/* ---- Toolbar: Themen + A–Z ---- */
.vig-lex-toolbar {
	display: grid;
	gap: 1rem;
	margin: 0 0 2.75rem;
}

.vig-lex-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.vig-lex a.vig-lex-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.7rem 0.55rem 1rem;
	border: 1px solid var(--lex-sand);
	border-radius: 999px;
	background: #fff;
	color: var(--lex-ink);
	font-family: var(--lex-head);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vig-lex a.vig-lex-chip span {
	display: inline-flex;
	justify-content: center;
	min-width: 1.6rem;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	background: var(--lex-cream);
	color: var(--lex-muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.vig-lex a.vig-lex-chip:hover,
.vig-lex a.vig-lex-chip:focus-visible {
	border-color: var(--lex-green);
	color: var(--lex-green-dark);
}

.vig-lex a.vig-lex-chip.is-active {
	border-color: var(--lex-green);
	background: var(--lex-green);
	color: #fff;
}

.vig-lex a.vig-lex-chip.is-active span {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

.vig-lex .vig-lex-az__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vig-lex .vig-lex-az__list li {
	margin: 0;
	padding: 0;
}

.vig-lex .vig-lex-az__list a,
.vig-lex .vig-lex-az__list span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.3rem;
	height: 2.3rem;
	border-radius: 10px;
	font-family: var(--lex-head);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.vig-lex .vig-lex-az__list a {
	border: 1px solid var(--lex-sand);
	background: #fff;
	color: var(--lex-ink);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vig-lex .vig-lex-az__list a:hover,
.vig-lex .vig-lex-az__list a:focus-visible {
	border-color: var(--lex-green);
	background: var(--lex-green);
	color: #fff;
}

.vig-lex .vig-lex-az__list span {
	color: rgba(46, 52, 42, 0.28);
}

/* ---- Abschnittsköpfe ---- */
.vig-lex-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.35rem 1.5rem;
	margin: 0 0 1.25rem;
}

.vig-lex .vig-lex-section-head h2 {
	margin: 0;
	font-family: var(--lex-head);
	font-size: clamp(1.4rem, 2.4vw, 1.75rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--lex-ink);
}

.vig-lex .vig-lex-section-head p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--lex-muted);
}

/* ---- Ratgeber ---- */
.vig-lex-guides {
	margin: 0 0 3.25rem;
}

.vig-lex-guides__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 1.25rem;
}

.vig-lex .vig-lex-guide {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--lex-sand);
	border-radius: var(--lex-radius);
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vig-lex .vig-lex-guide:hover {
	transform: translateY(-3px);
	border-color: var(--lex-gold-light);
	box-shadow: 0 18px 40px rgba(46, 52, 42, 0.12);
}

.vig-lex-guide__media {
	position: relative;
	min-height: 200px;
	margin: 0;
	background: linear-gradient(135deg, #eef2e6 0%, #f7f4ec 100%);
}

.vig-lex .vig-lex-guide__media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.vig-lex-guide__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 52%;
	height: auto;
	color: var(--lex-green);
	opacity: 0.55;
	transform: translate(-50%, -50%);
}

.vig-lex-guide__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 1.5rem 1.5rem 1.4rem;
}

.vig-lex .vig-lex-guide__title {
	margin: 0;
	font-family: var(--lex-head);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.3;
}

.vig-lex .vig-lex-guide__excerpt {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--lex-text);
}

/* ---- Buchstabengruppen und Karten ---- */
.vig-lex-group {
	margin: 0 0 2.5rem;
	scroll-margin-top: 140px;
}

.vig-lex .vig-lex-group__letter {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1rem;
	font-family: var(--lex-head);
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: var(--lex-gold);
}

.vig-lex .vig-lex-group__letter::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--lex-sand);
}

.vig-lex-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 1rem;
}

.vig-lex .vig-lex-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.55rem;
	margin: 0;
	padding: 1.35rem 1.4rem 1.25rem;
	border: 1px solid var(--lex-sand);
	border-radius: var(--lex-radius);
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vig-lex .vig-lex-card:hover {
	transform: translateY(-3px);
	border-color: var(--lex-gold-light);
	box-shadow: 0 16px 36px rgba(46, 52, 42, 0.1);
}

.vig-lex-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.vig-lex .vig-lex-badge {
	display: inline-block;
	padding: 0.22rem 0.6rem;
	border-radius: 999px;
	background: #eef2e6;
	color: var(--lex-green-dark);
	font-family: var(--lex-head);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
}

.vig-lex .vig-lex-badge--guide {
	background: #f6edd5;
	color: #85661d;
}

.vig-lex .vig-lex-card__title {
	margin: 0;
	font-family: var(--lex-head);
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.3;
}

.vig-lex .vig-lex-card__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 0.93rem;
	line-height: 1.6;
	color: var(--lex-text);
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

/* Ganze Karte klickbar (Stretched Link), Text bleibt markierbar über den Link. */
.vig-lex a.vig-lex-card__link,
.vig-lex a.vig-lex-guide__link {
	color: var(--lex-ink);
	text-decoration: none;
	transition: color 0.15s ease;
}

.vig-lex a.vig-lex-card__link::after,
.vig-lex a.vig-lex-guide__link::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	border-radius: inherit;
}

.vig-lex .vig-lex-card:hover a.vig-lex-card__link,
.vig-lex .vig-lex-guide:hover a.vig-lex-guide__link {
	color: var(--lex-green-dark);
}

.vig-lex a.vig-lex-card__link:focus,
.vig-lex a.vig-lex-guide__link:focus {
	outline: none;
}

.vig-lex .vig-lex-card:focus-within,
.vig-lex .vig-lex-guide:focus-within {
	outline: 2px solid var(--lex-green);
	outline-offset: 3px;
}

.vig-lex-more {
	margin-top: auto;
	padding-top: 0.35rem;
	font-family: var(--lex-head);
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--lex-green);
}

.vig-lex-more::after {
	content: "\00a0\2192";
	display: inline-block;
	transition: transform 0.15s ease;
}

.vig-lex-card:hover .vig-lex-more::after,
.vig-lex-guide:hover .vig-lex-more::after {
	transform: translateX(3px);
}

.vig-lex .vig-lex-empty {
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	border: 1px dashed var(--lex-sand);
	border-radius: var(--lex-radius);
	background: rgba(255, 255, 255, 0.6);
	color: var(--lex-muted);
}

/* ---- Abschluss-Band ---- */
.vig-lex-band {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2rem;
	margin: 3.5rem 0 0;
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border-radius: 24px;
	background: var(--lex-ink);
	color: var(--lex-cream);
}

.vig-lex-band__body {
	max-width: 620px;
}

.vig-lex .vig-lex-band__eyebrow {
	margin: 0 0 0.5rem;
	font-family: var(--lex-head);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--lex-gold-light);
}

.vig-lex .vig-lex-band__title {
	margin: 0 0 0.6rem;
	font-family: var(--lex-head);
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
}

.vig-lex .vig-lex-band__text {
	margin: 0;
	line-height: 1.6;
	color: rgba(247, 244, 236, 0.86);
}

.vig-lex-band__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.vig-lex a.vig-lex-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.8rem 1.4rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: var(--lex-head);
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vig-lex a.vig-lex-btn--primary {
	background: var(--lex-gold);
	color: var(--lex-ink);
}

.vig-lex a.vig-lex-btn--primary:hover,
.vig-lex a.vig-lex-btn--primary:focus-visible {
	background: var(--lex-gold-light);
	color: var(--lex-ink);
}

.vig-lex a.vig-lex-btn--ghost {
	border-color: rgba(247, 244, 236, 0.45);
	color: var(--lex-cream);
}

.vig-lex a.vig-lex-btn--ghost:hover,
.vig-lex a.vig-lex-btn--ghost:focus-visible {
	border-color: var(--lex-cream);
	background: rgba(247, 244, 236, 0.08);
	color: #fff;
}

/* ---- Responsiv ---- */
@media (max-width: 640px) {
	.vig-lex .vig-lex-az__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 0.35rem;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.vig-lex .vig-lex-az__list::-webkit-scrollbar {
		display: none;
	}

	.vig-lex .vig-lex-az__list li {
		flex: 0 0 auto;
	}

	.vig-lex .vig-lex-guide {
		grid-template-columns: minmax(0, 1fr);
	}

	.vig-lex-guide__media {
		min-height: 160px;
	}

	.vig-lex-hero__deco {
		width: 75%;
		opacity: 0.12;
	}

	.vig-lex-band__actions,
	.vig-lex a.vig-lex-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vig-lex .vig-lex-card,
	.vig-lex .vig-lex-guide,
	.vig-lex-more::after {
		transition: none;
	}

	.vig-lex .vig-lex-card:hover,
	.vig-lex .vig-lex-guide:hover {
		transform: none;
	}
}
