/* =========================================================================
 * Pasani Kurse — Karten-Styling.
 *
 * Das CSS ist selbsttragend (funktioniert ohne aktives WooCommerce-Plugin),
 * setzt aber bewusst NICHT alles mit !important, damit das Theme die
 * Detail-Optik weiter steuern kann (Schatten, Radius, Typo).
 * Nur die Layout-/Reset-Regeln, die das Grid sonst zerschiessen, sind
 * mit !important abgesichert.
 * ========================================================================= */

.kurs-grid {
	margin: 30px 0;
}

/* --- Liste reset (sonst Browser-Default: list-style:disc + padding-left:40px) */
.kurs-grid ul.products,
.kurs-grid .products {
	list-style: none !important;
	margin: 0 0 1em 0 !important;
	padding: 0 !important;
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 15px !important;
}

.kurs-grid ul.products li.product,
.kurs-grid .products .product {
	list-style: none !important;
	flex: 0 0 calc(50% - 7.5px) !important;
	max-width: calc(50% - 7.5px) !important;
	margin: 0 !important;
	padding: 15px !important;
	box-sizing: border-box !important;
	background: #fff;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
	border-radius: 10px;
	overflow: hidden;

	/* Flex-Layout: Bild links, Body rechts, vertikal zentriert */
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 20px !important;
}

.kurs-grid ul.products li.product::before,
.kurs-grid .products .product::before {
	content: none !important;
}

/* --- Bild: feste Groesse links als Flex-Item */
.kurs-grid .product picture {
	display: block;
	flex: 0 0 180px;
	width: 180px;
	height: 180px;
	margin: 0;
	border-radius: 10px;
	overflow: hidden;
}

.kurs-grid .product picture img,
.kurs-grid .product > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	margin: 0;
	float: none !important;
}

/* Falls das Bild als <img> direkt unter .product haengt (ohne picture-Wrapper) */
.kurs-grid .product > img {
	flex: 0 0 180px;
	width: 180px;
	height: 180px;
}

/* --- Body-Wrapper rechts, vertikal zentriert, Inhalt linksbuendig */
.kurs-grid__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	text-align: left;
}

/* Texte duerfen die volle Body-Breite nutzen (Titel-Clamp, Excerpt).
 * Theme-Margins (.products .product .name hat margin-top:35px) werden
 * hier zurueckgesetzt — sonst wird die vertikale Mitte verschoben und
 * der "Mehr erfahren"-Link faellt aus der Zentrierung heraus. */
.kurs-grid__body .name,
.kurs-grid__body .suptitle,
.kurs-grid__body .subtitle {
	width: 100%;
	margin-top: 0 !important;
}

.kurs-grid__body .name {
	margin: 0 0 6px 0 !important;
}
.kurs-grid__body .suptitle {
	margin: 0 0 8px 0 !important;
}
.kurs-grid__body .subtitle {
	margin: 0 0 12px 0 !important;
}

/* "Mehr erfahren"-Link nur so breit wie der Inhalt — bleibt linksbuendig
 * und ist Teil der vertikal-zentrierten Gruppe. */
.kurs-grid__body .btn-link {
	align-self: flex-start;
	margin: 0 !important;
}

/* --- Mobile: Bild oben, Text drunter */
@media (max-width: 767px) {
	.kurs-grid ul.products li.product,
	.kurs-grid .products .product {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}
	.kurs-grid .product picture,
	.kurs-grid .product > img {
		flex: 0 0 auto !important;
		width: 100%;
		height: 200px;
		margin: 0 0 15px 0;
	}
}

/* --- Footer "Weitere Kurse entdecken" */
.kurs-grid__footer {
	margin-top: 20px;
	text-align: center;
	clear: both;
}

.kurs-grid__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: #E30516;
	text-decoration: none;
}

.kurs-grid__more:hover {
	text-decoration: none;
}

.kurs-grid__more.is-loading {
	opacity: 0.6;
	pointer-events: none;
}
