/* =========================================================
   Anderl Manager – WooCommerce Shopdesign
   Blocksy + WooCommerce + WooCommerce Germanized
   Verbindliche Anderl-Palette aus global-ui.css
========================================================= */

/* ---------- Produktarchive / Kategorien ---------- */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
	min-width: 0;
	color: var(--am-ui-text);
}

/* Produktkarten als echte Anderl-Karten statt losem Inhalt auf der Seitenfläche. */
body.woocommerce-shop ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 12px;
	background: var(--am-ui-card);
	border: 1px solid rgba(94, 33, 41, .09);
	border-radius: var(--am-ui-radius);
	box-shadow: 0 5px 18px rgba(45, 38, 31, .06);
}

body.woocommerce-shop ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img {
	border-radius: var(--am-ui-radius);
}

body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
	color: var(--am-ui-text);
	font-weight: 700;
	line-height: 1.18;
}

/* Kurzbeschreibung in Produktkarten: ruhig und kompakt. */
body.woocommerce-shop ul.products li.product .woocommerce-product-details__short-description,
body.tax-product_cat ul.products li.product .woocommerce-product-details__short-description,
body.tax-product_tag ul.products li.product .woocommerce-product-details__short-description,
body.woocommerce-shop ul.products li.product .short-description,
body.tax-product_cat ul.products li.product .short-description,
body.tax-product_tag ul.products li.product .short-description {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: .92rem;
	line-height: 1.42;
	color: var(--am-ui-text);
}

/*
 * WooCommerce Germanized: gesetzlich notwendiger Grund-/Literpreis.
 * Er bleibt sichtbar, ist aber bewusst deutlich kleiner als der Verkaufspreis.
 */
body.woocommerce-shop ul.products li.product .price-unit,
body.woocommerce-shop ul.products li.product .unit-price,
body.woocommerce-shop ul.products li.product p.wc-gzd-additional-info.price-unit,
body.tax-product_cat ul.products li.product .price-unit,
body.tax-product_cat ul.products li.product .unit-price,
body.tax-product_cat ul.products li.product p.wc-gzd-additional-info.price-unit,
body.tax-product_tag ul.products li.product .price-unit,
body.tax-product_tag ul.products li.product .unit-price,
body.tax-product_tag ul.products li.product p.wc-gzd-additional-info.price-unit {
	margin: 4px 0 3px !important;
	font-size: .72rem !important;
	font-weight: 400 !important;
	line-height: 1.25 !important;
	color: rgba(69, 66, 62, .72) !important;
}

/* Verkaufspreis klar dominanter als der Grundpreis. */
body.woocommerce-shop ul.products li.product .price:not(.price-unit),
body.tax-product_cat ul.products li.product .price:not(.price-unit),
body.tax-product_tag ul.products li.product .price:not(.price-unit) {
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--am-ui-text);
}

/* Germanized-Zusatzinfos (Versand, enthaltene Menge) zurückhaltend. */
body.woocommerce-shop ul.products li.product .wc-gzd-additional-info:not(.price-unit),
body.tax-product_cat ul.products li.product .wc-gzd-additional-info:not(.price-unit),
body.tax-product_tag ul.products li.product .wc-gzd-additional-info:not(.price-unit) {
	font-size: .76rem;
	font-weight: 400;
	line-height: 1.35;
	color: rgba(69, 66, 62, .76);
}

/* Kaufbutton in engen Produktkarten – Anderl-Grün, ohne künstliche Mindestbreite. */
body.woocommerce-shop ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button {
	box-sizing: border-box;
	width: 100%;
	min-width: 0 !important;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid var(--am-ui-green);
	border-radius: var(--am-ui-radius) !important;
	background: var(--am-ui-green);
	color: var(--am-ui-shell) !important;
	font-size: .9rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	white-space: normal;
}

body.woocommerce-shop ul.products li.product .button:hover,
body.woocommerce-shop ul.products li.product .button:focus-visible,
body.tax-product_cat ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:focus-visible,
body.tax-product_tag ul.products li.product .button:hover,
body.tax-product_tag ul.products li.product .button:focus-visible {
	border-color: var(--am-ui-green-hover);
	background: var(--am-ui-green-hover);
	color: var(--am-ui-red) !important;
}

/* ---------- Einzelprodukt ---------- */
body.single-product div.product .summary .price-unit,
body.single-product div.product .summary .unit-price,
body.single-product div.product .summary p.wc-gzd-additional-info.price-unit {
	margin: 5px 0 14px !important;
	font-size: .78rem !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	color: rgba(69, 66, 62, .72) !important;
}

body.single-product div.product .summary > .price:not(.price-unit) {
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--am-ui-text);
}

body.single-product div.product .summary .wc-gzd-additional-info:not(.price-unit),
body.single-product div.product .summary .legal-price-info,
body.single-product div.product .summary .shipping-costs-info {
	font-size: .9rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--am-ui-text);
}

/* Primärer Warenkorbbutton. */
body.single-product div.product form.cart .single_add_to_cart_button {
	min-height: 52px;
	border-radius: var(--am-ui-radius) !important;
	border-color: var(--am-ui-green);
	background: var(--am-ui-green);
	color: var(--am-ui-shell) !important;
	font-weight: 650;
}

body.single-product div.product form.cart .single_add_to_cart_button:hover,
body.single-product div.product form.cart .single_add_to_cart_button:focus-visible {
	border-color: var(--am-ui-green-hover);
	background: var(--am-ui-green-hover);
	color: var(--am-ui-red) !important;
}

/* "Weiter einkaufen" ist sekundär und soll den Warenkorbbutton nicht übertrumpfen. */
body.single-product div.product a.wc-forward,
body.single-product div.product .continue-shopping,
body.single-product div.product .wc-gzd-continue-shopping-button,
body.single-product div.product a.button[href*="product-category"],
body.single-product div.product a.button[href*="/shop/"] {
	min-height: 46px;
	border: 1px solid var(--am-ui-green) !important;
	border-radius: var(--am-ui-radius) !important;
	background: transparent !important;
	color: var(--am-ui-green) !important;
	font-size: .95rem;
	font-weight: 600;
}

body.single-product div.product a.wc-forward:hover,
body.single-product div.product .continue-shopping:hover,
body.single-product div.product .wc-gzd-continue-shopping-button:hover {
	background: rgba(97, 105, 66, .08) !important;
	color: var(--am-ui-red) !important;
}

/* Produktschlagwörter sind interne Klassifikation, keine wichtige Kaufinformation. */
body.single-product div.product .product_meta .tagged_as {
	display: none !important;
}

/* Produkt-Meta insgesamt etwas leiser. */
body.single-product div.product .product_meta {
	font-size: .85rem;
	line-height: 1.45;
	color: rgba(69, 66, 62, .78);
}

/* Woo-Tabs im Anderl-Stil. */
body.single-product .woocommerce-tabs ul.tabs {
	border-color: rgba(97, 105, 66, .24);
}

body.single-product .woocommerce-tabs ul.tabs li a {
	color: var(--am-ui-text);
	font-weight: 600;
}

body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product .woocommerce-tabs ul.tabs li a:hover,
body.single-product .woocommerce-tabs ul.tabs li a:focus-visible {
	color: var(--am-ui-red);
}

/* WooCommerce wiederholt im Beschreibungs-Tab oft dieselbe Überschrift. */
body.single-product .woocommerce-Tabs-panel--description > h2:first-child {
	font-size: clamp(1.65rem, 2.3vw, 2.25rem);
	line-height: 1.2;
	color: var(--am-ui-text);
}

/* Ähnliche Produkte: dieselben Grundpreis-/Button-Regeln wie Archive. */
body.single-product .related.products .price-unit,
body.single-product .related.products .unit-price,
body.single-product .related.products p.wc-gzd-additional-info.price-unit {
	font-size: .72rem !important;
	font-weight: 400 !important;
	line-height: 1.25 !important;
	color: rgba(69, 66, 62, .72) !important;
}

body.single-product .related.products li.product .button {
	width: 100%;
	min-width: 0 !important;
	border-radius: var(--am-ui-radius) !important;
	background: var(--am-ui-green);
	color: var(--am-ui-shell) !important;
}

/* ---------- Smartphone ---------- */
@media (max-width: 767px) {
	/*
	 * Mobile Schnellkauf: zwei Produkte bleiben nebeneinander, die Karten
	 * werden aber deutlich kompakter als auf Desktop.
	 */
	body.woocommerce-shop ul.products,
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products {
		gap: 14px 8px;
	}

	body.woocommerce-shop ul.products li.product,
	body.tax-product_cat ul.products li.product,
	body.tax-product_tag ul.products li.product {
		padding: 7px;
		box-shadow: 0 3px 10px rgba(45, 38, 31, .05);
	}

	/* Hohe Flaschenfotos dürfen die gesamte Karte nicht mehr bestimmen. */
	body.woocommerce-shop ul.products li.product img,
	body.tax-product_cat ul.products li.product img,
	body.tax-product_tag ul.products li.product img {
		display: block;
		width: 100%;
		height: auto;
		max-height: 220px;
		object-fit: contain;
		object-position: center;
		margin-bottom: 8px;
	}

	/*
	 * Die Kurzbeschreibung wiederholt auf Mobil oft Bio/Vegan/Alkohol und
	 * macht die Karte unnötig lang. Die Detailseite enthält diese Angaben.
	 */
	body.woocommerce-shop ul.products li.product .woocommerce-product-details__short-description,
	body.tax-product_cat ul.products li.product .woocommerce-product-details__short-description,
	body.tax-product_tag ul.products li.product .woocommerce-product-details__short-description,
	body.woocommerce-shop ul.products li.product .short-description,
	body.tax-product_cat ul.products li.product .short-description,
	body.tax-product_tag ul.products li.product .short-description {
		display: none !important;
	}

	body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
	body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
	body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
		margin: 4px 0 7px;
		font-size: .94rem;
		line-height: 1.16;
	}

	body.woocommerce-shop ul.products li.product .price-unit,
	body.woocommerce-shop ul.products li.product .unit-price,
	body.woocommerce-shop ul.products li.product p.wc-gzd-additional-info.price-unit,
	body.tax-product_cat ul.products li.product .price-unit,
	body.tax-product_cat ul.products li.product .unit-price,
	body.tax-product_cat ul.products li.product p.wc-gzd-additional-info.price-unit,
	body.tax-product_tag ul.products li.product .price-unit,
	body.tax-product_tag ul.products li.product .unit-price,
	body.tax-product_tag ul.products li.product p.wc-gzd-additional-info.price-unit {
		margin: 2px 0 !important;
		font-size: .64rem !important;
		line-height: 1.18 !important;
	}

	body.woocommerce-shop ul.products li.product .price:not(.price-unit),
	body.tax-product_cat ul.products li.product .price:not(.price-unit),
	body.tax-product_tag ul.products li.product .price:not(.price-unit) {
		margin: 1px 0 7px;
		font-size: 1rem;
		line-height: 1.15;
	}

	body.woocommerce-shop ul.products li.product .wc-gzd-additional-info:not(.price-unit),
	body.tax-product_cat ul.products li.product .wc-gzd-additional-info:not(.price-unit),
	body.tax-product_tag ul.products li.product .wc-gzd-additional-info:not(.price-unit) {
		margin: 5px 0 0 !important;
		font-size: .64rem;
		line-height: 1.28;
	}

	body.woocommerce-shop ul.products li.product .button,
	body.tax-product_cat ul.products li.product .button,
	body.tax-product_tag ul.products li.product .button {
		min-height: 38px;
		margin-top: 6px;
		padding: 7px 5px;
		font-size: .72rem;
		line-height: 1.12;
		white-space: normal;
	}

	body.single-product div.product .summary .price-unit,
	body.single-product div.product .summary .unit-price,
	body.single-product div.product .summary p.wc-gzd-additional-info.price-unit {
		font-size: .75rem !important;
	}

	body.single-product div.product .summary > .price:not(.price-unit) {
		font-size: 1.28rem;
	}

	body.single-product div.product .product_title {
		font-size: clamp(1.9rem, 8vw, 2.35rem);
		line-height: 1.08;
	}

	body.single-product div.product form.cart .single_add_to_cart_button {
		min-height: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce-shop ul.products li.product .button,
	body.tax-product_cat ul.products li.product .button,
	body.tax-product_tag ul.products li.product .button,
	body.single-product div.product form.cart .single_add_to_cart_button {
		transition: none;
	}
}
