/*
 * Shared — order summary rail.
 * Prototype map: .sum → .mgk-sum, .sum .r → .mgk-sum__r, .r.tot → --tot.
 * The progress bar is the cart's free-delivery meter (.t/.tr in the prototype).
 */

.mgk-sum {
	border: 1px solid var(--mgk-line);
	border-color: var(--mgk-line) var(--mgk-line) var(--mgk-line-d);
	border-radius: var(--mgk-radius);
	padding: 18px;
	background: var(--mgk-paper);
	box-shadow: var(--mgk-highlight);
	/* 70px clears the sticky nav (52px) plus breathing room. */
	position: sticky;
	top: 70px;
}

.mgk-sum__h { font-size: 16.5px; margin-bottom: 10px; }

.mgk-sum__r { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; }

.mgk-sum__r--tot {
	border-top: 1px solid var(--mgk-line);
	margin-top: 8px;
	padding-top: 13px;
	font-family: var(--mgk-font);
	font-weight: 800;
	font-size: 18px;
}

.mgk-sum__neg { color: var(--mgk-green); }

.mgk-sum__bar { margin-bottom: 10px; }
.mgk-sum__bar-t { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mgk-ink-2); margin-bottom: 6px; }

.mgk-sum__bar-track {
	display: block;
	height: 6px;
	border-radius: 3px;
	background: var(--mgk-line-2);
	overflow: hidden;
}

.mgk-sum__bar-track i {
	display: block;
	height: 100%;
	background: var(--mgk-green);
	transition: width var(--mgk-t2) var(--mgk-ease);
}

.mgk-sum__cta { width: 100%; margin-top: 12px; }
.mgk-sum__secondary { width: 100%; margin-top: 9px; }
.mgk-sum__note { margin: 12px 0 0; color: var(--mgk-ink-3); font-size: 11.5px; line-height: 1.5; }

/* ── itemised lines ────────────────────────────────────────
 * Checkout restates the basket above the totals. Stacked, not two columns: the
 * product name, its pack size, then ONE ROW PER MODIFIER GROUP, and only then
 * the quantity and the money. A product with four groups used to print all four
 * joined into a wrapping paragraph where no single choice could be read.
 * Only rendered when the caller passes items, so the cart page and order detail
 * — which list the items themselves — are unchanged. */

.mgk-sum__items { list-style: none; margin: 0 0 14px; padding: 0; }

.mgk-sum__item { padding: 10px 0; }
.mgk-sum__item + .mgk-sum__item { border-top: 1px solid var(--mgk-line-2); }

.mgk-sum__item-name { display: block; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--mgk-ink); }
.mgk-sum__item-meta { display: block; margin-top: 2px; font-size: 11.5px; color: var(--mgk-ink-3); }

/* One group per line, label and value together and left-aligned — the same run
   of text the joined version printed, only broken per group. Two columns read as
   though the price had been dropped. */
.mgk-sum__item-opt {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	line-height: 1.45;
	color: var(--mgk-ink-3);
}

.mgk-sum__item-foot {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-top: 7px;
}

.mgk-sum__item-qty { font-size: 11.5px; color: var(--mgk-ink-3); }
.mgk-sum__item-total { font-size: 13px; font-weight: 700; white-space: nowrap; }
.mgk-sum__item.is-oos .mgk-sum__item-name { color: var(--mgk-ink-3); text-decoration: line-through; }
