/*
 * SV Produktboxen – Frontend-Optik der manuell gepflegten Boxen.
 *
 * Farben zentral anpassbar: --sv-box-accent bestimmt Titel- und Buttonfarbe.
 * Im Child-Theme überschreiben, z. B.:  .sv-box { --sv-box-accent: #2e7d32; }
 */

.sv-box {
	--sv-box-accent: #43a047;
	--sv-box-accent-hover: #388e3c;
	--sv-box-border: #e8e8e8;

	display: flex;
	align-items: flex-start;
	gap: 24px;
	box-sizing: border-box;
	margin: 28px 0;
	padding: 20px 24px;
	border: 1px solid var(--sv-box-border);
	border-radius: 2px;
	background: #fff;
}

.sv-box * {
	box-sizing: border-box;
}

/* Bild */
.sv-box__image {
	flex: 0 0 150px;
	max-width: 150px;
}

.sv-box__image img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* Textteil */
.sv-box__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.sv-box__title {
	display: block;
	color: var(--sv-box-accent);
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.sv-box__title:hover,
.sv-box__title:focus {
	text-decoration: underline;
}

.sv-box__description {
	margin: 12px 0 0;
	color: #444;
	line-height: 1.55;
}

/* Die Beschreibung darf HTML enthalten – Innenabstände sauber halten. */
.sv-box__description > :first-child {
	margin-top: 0;
}

.sv-box__description > :last-child {
	margin-bottom: 0;
}

.sv-box__description p {
	margin: 0 0 0.7em;
}

.sv-box__description ul,
.sv-box__description ol {
	margin: 0 0 0.7em;
	padding-left: 1.3em;
}

.sv-box__description li {
	margin: 0 0 0.25em;
}

.sv-box__description a {
	color: var(--sv-box-accent);
}

/* Preis und Button */
.sv-box__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 10px 20px;
	margin-top: 18px;
}

.sv-box__price-wrap {
	text-align: right;
}

.sv-box__price {
	display: block;
	color: #222;
	font-size: 1.4em;
	font-weight: 700;
	line-height: 1.2;
}

.sv-box__price-note {
	display: block;
	margin-top: 3px;
	color: #777;
	font-size: 0.72em;
	line-height: 1.3;
}

.sv-box__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 3px;
	background: var(--sv-box-accent);
	color: #fff !important;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color 0.15s ease-in-out;
}

.sv-box__button:hover,
.sv-box__button:focus {
	background: var(--sv-box-accent-hover);
	color: #fff !important;
}

.sv-box__cart {
	flex: 0 0 auto;
}

/*
 * Beschreibung einer AAWP-Box unterdrücken.
 *
 * AAWP kennt keinen Shortcode-Parameter dafür, deshalb bleibt nur CSS. Die Klassennamen
 * können sich je nach AAWP-Version und Template unterscheiden – hier sind die gängigen
 * abgedeckt. Falls die Beschreibung trotzdem stehen bleibt, im Browser mit Rechtsklick →
 * "Untersuchen" die tatsächliche Klasse ablesen und unten ergänzen.
 */
.sv-produktbox--ohne-beschreibung .aawp-product__description,
.sv-produktbox--ohne-beschreibung .aawp-product__description-list,
.sv-produktbox--ohne-beschreibung .aawp-product-description,
.sv-produktbox--ohne-beschreibung .aawp-product__content .aawp-product__description {
	display: none !important;
}

/* Schmale Viewports */
@media (max-width: 600px) {
	.sv-box {
		flex-direction: column;
		gap: 16px;
		padding: 16px;
	}

	.sv-box__image {
		flex-basis: auto;
		max-width: 180px;
		margin: 0 auto;
	}

	.sv-box__footer {
		justify-content: space-between;
		margin-top: 16px;
	}

	.sv-box__button {
		flex: 1 1 auto;
		justify-content: center;
	}
}
