/* WooCommerce Cross-Sell — Flatsome-kompatibles Styling */

.wccs-wrap {
	margin: 12px 0;
	padding: 10px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wccs-section + .wccs-section {
	margin-top: 16px;
}

.wccs-heading {
	font-size: 0.95em;
	font-weight: 700;
	margin: 0 0 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: inherit;
}

.wccs-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wccs-wrap .wccs-item {
	position: relative !important;
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px !important;
	padding: 10px 10px 50px !important;
	background: rgba(0, 0, 0, 0.02);
	border-radius: 4px;
	transition: background 0.15s ease;
	min-height: 0 !important;
	height: auto !important;
	max-height: none !important;
	margin: 0 !important;
	box-sizing: border-box;
}

.wccs-wrap .wccs-item:hover {
	background: rgba(0, 0, 0, 0.04);
}

.wccs-item-image {
	flex: 0 0 56px;
	width: 56px;
	line-height: 0;
	position: relative;
}

.wccs-item-image img {
	width: 100%;
	height: auto;
	border-radius: 3px;
	display: block;
}

.wccs-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #e2401c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 10px;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wccs-badge--floating {
	top: 6px;
	right: 6px;
}

.wccs-item-body {
	flex: 1;
	min-width: 0;
	padding-right: 4px;
}

.wccs-item-title {
	display: block;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 4px;
	color: inherit;
	text-decoration: none;
}

a.wccs-item-title:hover {
	text-decoration: underline;
}

.wccs-item-desc {
	font-size: 0.78em;
	line-height: 1.3;
	opacity: 0.75;
	margin-bottom: 6px;
}

.wccs-item-price {
	font-size: 0.85em;
	margin-bottom: 6px;
}

.wccs-item-price del {
	opacity: 0.6;
	margin-right: 4px;
}

.wccs-item-price ins {
	text-decoration: none;
	font-weight: 700;
	color: #e2401c;
}

/* Falls WooCommerce/Flatsome trotz allem den nativen „Warenkorb anzeigen"-Link
   in unsere Vorschlagskarte einfügt, unsichtbar machen (defensiv). */
.wccs-wrap .added_to_cart:not(.wccs-add-to-cart),
.wccs-wrap .wccs-item .wc-forward:not(.wccs-add-to-cart) {
	display: none !important;
}

/* Action-Bar unten rechts im Item: Menge + Add-to-Cart */
.wccs-wrap .wccs-item .wccs-actions {
	position: absolute !important;
	right: 10px !important;
	bottom: 10px !important;
	top: auto !important;
	left: auto !important;
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	z-index: 0;
	margin: 0 !important;
}

/* Menge-Selector im Flatsome-Stil */
.wccs-wrap .wccs-item .wccs-quantity {
	display: inline-flex !important;
	align-items: stretch !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-minus,
.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-plus,
.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-input {
	height: 30px !important;
	min-height: 30px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid rgba(0, 0, 0, 0.15) !important;
	background: #fff !important;
	color: inherit !important;
	font-size: 0.85em !important;
	line-height: 1 !important;
	box-shadow: none !important;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: textfield !important;
	border-radius: 0 !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-minus,
.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-plus {
	width: 26px !important;
	cursor: pointer;
	user-select: none;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-minus {
	border-radius: 3px 0 0 3px !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-plus {
	border-radius: 0 3px 3px 0 !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-input {
	width: 34px !important;
	text-align: center !important;
	border-left: 0 !important;
	border-right: 0 !important;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-input::-webkit-outer-spin-button,
.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-minus:hover,
.wccs-wrap .wccs-item .wccs-quantity .wccs-qty-plus:hover {
	background: #f4f4f4 !important;
}

/* Add-to-cart Button */
.wccs-wrap .wccs-item .wccs-add-to-cart {
	position: static !important;
	font-size: 0.75em !important;
	padding: 6px 12px !important;
	line-height: 1.2 !important;
	min-height: 30px !important;
	height: 30px !important;
	margin: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	width: auto !important;
	max-width: none !important;
}

.wccs-btn-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	object-fit: contain;
	vertical-align: middle;
}

.wccs-add-to-cart--icon-only {
	padding: 6px 8px !important;
}

.wccs-add-to-cart--icon-only .wccs-btn-icon {
	width: 16px;
	height: 16px;
}

.wccs-add-to-cart.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Das originale Theme-/WooCommerce-Rädchen behalten, nur mittig zentrieren.
   position:relative gibt dem absoluten ::after einen Bezugspunkt am Button;
   inset:0 + margin:auto zentriert es in beide Richtungen, ohne die Dreh-
   Animation zu stören (im Gegensatz zu transform:translate). !important +
   4-Klassen-Selektor, um die Positions-Werte des Themes zu überschreiben. */
.wccs-wrap .wccs-item .wccs-add-to-cart.loading {
	position: relative !important;
}

.wccs-wrap .wccs-item .wccs-add-to-cart.loading::after {
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	margin: auto !important;
}

/* Item ohne Bild — Badge floaten */
.wccs-item--no-image {
	padding-left: 12px;
}

/* Warenkorb-Zeile — durchgestrichener Preis wenn Rabatt aktiv */
.wccs-price del,
.wccs-subtotal del {
	opacity: 0.6;
	margin-right: 4px;
}

.wccs-price ins,
.wccs-subtotal ins {
	text-decoration: none;
	font-weight: 700;
}

.wccs-price .wccs-badge {
	position: static;
	display: inline-block;
	margin-left: 6px;
	font-size: 10px;
	padding: 1px 5px;
}

/* Checkout-Kontext */
.wccs-context-checkout {
	margin: 20px 0;
	padding: 16px 0 0;
	background: transparent;
	border-radius: 0;
}

.wccs-context-checkout .wccs-heading {
	font-size: 1.05em;
}

.wccs-context-checkout .wccs-items {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px;
}

.wccs-context-checkout .wccs-item {
	flex: 1 1 220px;
	max-width: 100%;
}
