/* -------------------------------------------------------------------------
 * Eltechnika – machine add-ons: cart and mini-cart rows
 *
 * Loaded by the add-ons plugin on every page: the mini cart is in the header.
 * ---------------------------------------------------------------------- */

/* --- Cart: add-on rows ------------------------------------------------- */

.eltechnika-cart-addon {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-family: "Barlow Condensed", sans-serif;
	font-weight: 600;
}

.eltechnika-cart-addon__label {
	padding: 2px 7px;
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--c-accent);
	border-radius: 2px;
	font-family: "IBM Plex Mono", monospace;
}

.eltechnika-cart-addon__qty {
	color: #9a9a9a;
}

/* --- Grouping machine + add-ons ---------------------------------------
 * Children always sit immediately after their parent in the cart, so the
 * two are joined visually rather than wrapped in a container element —
 * no template override, and it survives AJAX fragment refreshes.
 *
 * These resets are card oriented; the cart page is a table, where margin
 * and radius on a row do nothing.
 * -------------------------------------------------------------------- */

.eltechnika-cart-item--parent {
	margin-bottom: 0 !important;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.eltechnika-cart-item--addon {
	margin-top: 0 !important;
	border-top: 0;
	border-radius: 0;
}

/* Sold-individually add-ons (installation) show their quantity as plain text,
   not a stepper; centre it in the column under the machine's stepper. */
.eltechnika-cart-item--addon .product-quantity {
	text-align: center;
}

/* Cart page only: the product cell is narrow, so the badge sits above the
   name rather than beside it. The mini-cart keeps them on one line. */
.woocommerce-cart .eltechnika-cart-addon {
	flex-direction: column;
	align-items: flex-start;
}

/* Last add-on closes the group. */
.eltechnika-cart-item--addon:not(:has(+ .eltechnika-cart-item--addon)) {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
}
