/*
 * Woo Mietshop – Modul layout. Nur auf Shop-Seiten geladen (sf_shop_ist_shopseite()).
 * Teil A = Snippet 7 (Checkout/Warenkorb Layout-Fixes), Teil B = Snippet 16 (UX-Fixes 4a, CSS).
 * Die Regel für den WhatsApp-Knopf (16, Aufgabe 15) gilt auf allen Seiten und steht deshalb im PHP (Layout::UEBERALL).
 */

/* ===== A) Snippet 7 ===== */
/* 1) Lieferungs-Zeile: Preis bleibt rechtsbündig oben, auch wenn das Label (mit km) umbricht */
.wc-block-components-totals-shipping .wc-block-components-totals-item,
.wc-block-components-totals-fees .wc-block-components-totals-item {
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
}
.wc-block-components-totals-shipping .wc-block-components-totals-item__label,
.wc-block-components-totals-fees .wc-block-components-totals-item__label {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	padding-right: 12px;
}
.wc-block-components-totals-shipping .wc-block-components-totals-item__value,
.wc-block-components-totals-fees .wc-block-components-totals-item__value {
	flex: 0 0 auto !important;
	white-space: nowrap !important;
}
.wc-block-components-totals-shipping .wc-block-components-totals-item__description:empty,
.wc-block-components-totals-fees .wc-block-components-totals-item__description:empty {
	display: none !important;
}
/* 2) Warenkorb/Kasse auf dem Handy: volle Breite statt „alignwide“ */
@media (max-width: 768px) {
	.wp-block-woocommerce-cart.alignwide,
	.wp-block-woocommerce-checkout.alignwide {
		margin-left: 0 !important;
		margin-right: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}
/* 3) Knöpfe wie auf der Seite: Pille, keine Großschrift, keine Unterstreichung */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0.3px !important;
	font-family: "PT Sans", sans-serif !important;
	font-weight: 600 !important;
	border-radius: 50px !important;
	color: #fff !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-cart__submit-button:focus,
.wc-block-cart__submit-button:visited,
.wc-block-cart__submit-button:active,
.wc-block-components-checkout-place-order-button:hover {
	text-decoration: none !important;
	color: #fff !important;
}
.single_add_to_cart_button,
.wc-block-components-checkout-place-order-button {
	background-color: #1C1C1C !important;
	border-color: #1C1C1C !important;
	color: #fff !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0.3px !important;
	font-family: "PT Sans", sans-serif !important;
	font-weight: 600 !important;
	border-radius: 50px !important;
}
.single_add_to_cart_button:visited,
.single_add_to_cart_button:focus,
.wc-block-components-checkout-place-order-button:visited,
.wc-block-components-checkout-place-order-button:focus {
	color: #fff !important;
}
.single_add_to_cart_button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background-color: #1C1C1C !important;
	border-color: #1C1C1C !important;
	color: #fff !important;
	opacity: 0.9;
}
/* Gesamtsumme-Zeile: etwas kleiner für das längere Label */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 15px !important;
	letter-spacing: 0.2px !important;
}

/* ===== B) Snippet 16 ===== */
/* 6: Mengenfeld breit genug für 3-stellige Zahlen */
.quantity input.qty,
.woocommerce .quantity .qty { width: 4.5rem !important; min-width: 4.5rem; text-align: center; padding-left: 6px; padding-right: 6px; }
/* 7: Tap-Ziele Block-Checkout (AGB-Checkbox, Zahlungs-Radios) */
.wc-block-components-checkbox__input,
.wc-block-components-radio-control__input { width: 24px !important; height: 24px !important; }
.wc-block-components-checkbox,
.wc-block-components-radio-control__option { padding-top: 10px; padding-bottom: 10px; min-height: 44px; display: flex; align-items: center; }
.wc-block-components-checkbox__label,
.wc-block-components-radio-control__label { cursor: pointer; }
/* 5: Ladezustand am Add-to-Cart-Button */
.stf-loading { opacity: .6 !important; pointer-events: none; position: relative; }
.stf-loading::after { content: ""; position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: stf-spin .6s linear infinite; }
@keyframes stf-spin { to { transform: rotate(360deg); } }
/* 16: Layout-Sprung bei Variantenauswahl vermeiden */
.single_variation_wrap .woocommerce-variation { min-height: 60px; }
/* 17: Button-Stil in der Produktübersicht angleichen */
.woocommerce ul.products li.product .button { opacity: 1 !important; }
/* 10: kaputtes Bild-Icon abfangen (Notlösung bis Foto da ist) */
.woocommerce img[src=""],
.wc-block-cart-item__image img:not([src]) { visibility: hidden; background: #1C1C1C; }
