/* ============================================================
 * BIOTA · CART PAGE (biota/cart)
 * One template, two threshold states. Everything that differs between
 * "below the free-shipping threshold" and "above" is data, not markup:
 * only which .biota-cart__nudge renders, and the summary rows.
 *
 * Contrast is deliberate — amber #8a6410 carries text with NO opacity
 * (opacity drops it under 4.5:1 on the amber ground). Secondary #767676,
 * strike #8a93a0. Do not reach for #888 / #999 / #a0a8b4 here.
 * ============================================================ */

.biota-cart {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 var(--biota-cart-pad, 48px);
	font-family: var(--wp--preset--font-family--body, 'DM Sans', system-ui, sans-serif);
	color: #1a1a1a;
}
.biota-cart__crumb {
	padding-top: 20px;
	font-size: 12.5px;
	color: #767676;
}
.biota-cart__crumb a {
	color: #102C57;
	text-decoration: none;
}
.biota-cart__crumb span {
	color: #1a1a1a;
}
.biota-cart__h {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 14px 0 3px;
}
.biota-cart__sub {
	font-size: 13px;
	color: #767676;
	margin: 0 0 20px;
}
.biota-cart__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 26px;
	align-items: start;
	padding-bottom: 40px;
}

/* --- line items --- */
.biota-cart__item {
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 12px;
}
.biota-cart__item-row {
	display: flex;
	gap: 13px;
	align-items: flex-start;
}
.biota-cart__thumb {
	width: 68px;
	height: 68px;
	border-radius: 10px;
	overflow: hidden;
	background: #eef1f5;
	flex: none;
	display: block;
}
.biota-cart__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/* A service has no product photo — it gets the technician icon in its own well. */
.biota-cart__thumb--svc {
	background: #eaf0f9;
	display: flex;
	align-items: center;
	justify-content: center;
}
.biota-cart__item-main {
	flex: 1;
	min-width: 0;
}
.biota-cart__item-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.biota-cart__item-id {
	min-width: 0;
}
.biota-cart__item-name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 2px;
}
.biota-cart__item-var {
	font-size: 11.5px;
	color: #767676;
	line-height: 1.45;
}
.biota-cart__item-money {
	text-align: right;
	flex: none;
}
.biota-cart__price {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 600;
	color: #102C57;
	font-size: 15px;
	white-space: nowrap;
}
.biota-cart__strikes {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	margin-top: 2px;
}
/* Unit strike × qty, so the line maths stays honest. */
.biota-cart__strike {
	font-size: 11.5px;
	color: #8a93a0;
	text-decoration: line-through;
	white-space: nowrap;
}
.biota-cart__off {
	font-size: 10px;
	font-weight: 700;
	color: #b82c25;
	background: #fdecec;
	padding: 2px 6px;
	border-radius: 5px;
	white-space: nowrap;
}
/* Stepper and Hapus share a row between the title and the variant. */
.biota-cart__item-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 9px 0 7px;
}
.biota-cart__qty {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid #e2e5ea;
	border-radius: 999px;
	flex: none;
}
.biota-cart__qty button {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	font-size: 14px;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
}
.biota-cart__qty button[disabled] {
	opacity: 0.4;
	cursor: default;
}
.biota-cart__qty b {
	width: 24px;
	text-align: center;
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 600;
	font-size: 13px;
}
.biota-cart__rm {
	font-size: 12px;
	color: #767676;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
}
.biota-cart__rm:hover {
	color: #b82c25;
}
.biota-cart__back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	font-weight: 500;
	margin-top: 4px;
	color: #102C57;
	text-decoration: none;
}

/* --- free-shipping nudge: two states, deliberately different hues --- */
.biota-cart__nudge {
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 12px;
}
/* BELOW: amber — an invitation, not a confirmation. */
.biota-cart__nudge--below {
	background: #FFF7E6;
	border: 1px solid #f5d99b;
}
.biota-cart__nudge-row {
	display: flex;
	align-items: flex-start;
	gap: 9px;
}
.biota-cart__nudge-row svg {
	flex: none;
	margin-top: 1px;
}
.biota-cart__nudge--below .t {
	font-size: 12.5px;
	font-weight: 600;
	color: #8a6410;
	line-height: 1.45;
}
.biota-cart__nudge--below .t .amount,
.biota-cart__nudge--below .t b {
	color: #8a6410;
}
.biota-cart__nudge--below .s {
	font-size: 11px;
	color: #8a6410;
	margin-top: 2px;
}
.biota-cart__nudge--below .biota-cart__bar {
	background: #f0dcb4;
}
.biota-cart__nudge--below .biota-cart__bar span {
	background: #c99a2e;
}
.biota-cart__nudge--below a {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: #8a6410;
	margin-top: 9px;
	text-decoration: none;
}
/* ABOVE: green — full bar, never a ratio (a fraction over 1 informs nothing). */
.biota-cart__nudge--ok {
	background: #e7f8ee;
	border: 1px solid #c7ecd6;
}
.biota-cart__nudge--ok .t {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: #0f7a42;
	font-weight: 600;
}
.biota-cart__nudge--ok .biota-cart__bar {
	background: #cfe9da;
}
.biota-cart__nudge--ok .biota-cart__bar span {
	background: #128C4B;
}
.biota-cart__bar {
	height: 5px;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 9px;
}
.biota-cart__bar span {
	display: block;
	height: 100%;
	border-radius: 3px;
	transition: width 0.3s;
}

/* --- summary --- */
.biota-cart__sum {
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 16px 18px;
}
.biota-cart__sum-h {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 600;
	font-size: 14.5px;
	margin-bottom: 13px;
}
.biota-cart__sum-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	padding: 6px 0;
}
.biota-cart__sum-row span:first-child {
	color: #555;
}
.biota-cart__sum-row span:last-child {
	white-space: nowrap;
}
.biota-cart__sum-row .is-free,
.biota-cart__sum-row .is-cut {
	color: #0f7a42;
}
.biota-cart__sum-row .is-muted {
	color: #767676;
}
.biota-cart__rule {
	border-top: 1px solid #f2f4f7;
	margin-top: 6px;
	padding-top: 11px;
}

/* Coupon: the input state and the applied state are mutually exclusive. */
.biota-cart__cpn-in {
	display: flex;
	gap: 7px;
}
.biota-cart__cpn-in input {
	flex: 1;
	min-width: 0;
	padding: 9px 11px;
	border: 1.5px solid #e2e5ea;
	border-radius: 10px;
	font-family: inherit;
	font-size: 12.5px;
	outline: none;
}
.biota-cart__cpn-in input:focus {
	border-color: #2563EB;
}
.biota-cart__cpn-in button {
	padding: 9px 15px;
	font-size: 12.5px;
	border-radius: 10px;
	background: #fff;
	color: #444;
	border: 1.5px solid #d5d9e0;
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 500;
	cursor: pointer;
}
.biota-cart__cpn-in button[disabled] {
	opacity: 0.55;
	cursor: default;
}
.biota-cart__cpn-on {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #e7f8ee;
	border: 1px solid #c7ecd6;
	border-radius: 10px;
	padding: 9px 11px;
}
.biota-cart__cpn-id {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}
.biota-cart__cpn-code {
	font-size: 12px;
	font-weight: 600;
	color: #0f7a42;
}
.biota-cart__cpn-note {
	font-size: 11px;
	color: #0f7a42;
}
.biota-cart__cpn-rm {
	color: #0f7a42;
	font-size: 11px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
}
.biota-cart__cpn-err {
	font-size: 11px;
	color: #b82c25;
	margin-top: 7px;
}

/* "Estimasi", never "Total": shipping is only final once an address exists. */
.biota-cart__est {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: baseline;
	padding-top: 12px;
	margin-top: 6px;
	border-top: 1px solid #eef0f3;
}
.biota-cart__est-l {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 600;
	font-size: 14px;
}
.biota-cart__est-n {
	font-size: 10.5px;
	color: #767676;
	line-height: 1.45;
	margin-top: 2px;
}
.biota-cart__est-v {
	font-size: 20px;
}
.biota-cart__co {
	display: flex;
	/* The theme has no global border-box reset, so an <a> is content-box: the
	   28px of horizontal padding landed on top of width:100% and the button
	   pushed 9px past the summary's right edge. */
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px;
	border-radius: 999px;
	background: #2563EB;
	color: #fff;
	border: none;
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 500;
	font-size: 14.5px;
	cursor: pointer;
	margin: 14px 0 9px;
	text-decoration: none;
}
.biota-cart__co:hover {
	background: #1d4ed8;
	color: #fff;
}
.biota-cart__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 11px;
	color: #767676;
}
.biota-cart__trust {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-top: 12px;
	font-size: 11.5px;
	color: #555;
}

/* --- empty --- */
.biota-cart__empty {
	border: 1px solid #eef0f3;
	border-radius: 14px;
	padding: 40px 24px;
	text-align: center;
	margin-bottom: 40px;
}
.biota-cart__empty-title {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-weight: 600;
	font-size: 16px;
	margin-bottom: 6px;
}
.biota-cart__empty-text {
	font-size: 13px;
	color: #767676;
	margin-bottom: 18px;
}
.biota-cart__empty-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 280px;
	margin: 0 auto;
}
.biota-cart__empty-actions .biota-cart__back {
	justify-content: center;
}

/* --- busy state while a mutation is in flight --- */
.biota-cart.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

/* --- mobile --- */
.biota-cart__buybar {
	display: none;
}
@media (max-width: 860px) {
	.biota-cart {
		--biota-cart-pad: 20px;
	}
	.biota-cart__grid {
		grid-template-columns: 1fr;
		/* One column here, so the gap is the space between the last line item's
		   "Lanjut belanja" and the free-shipping nudge that opens the summary. */
		gap: 20px;
		padding-bottom: 20px;
	}
	.biota-cart__h {
		font-size: 20px;
	}
	.biota-cart__thumb {
		width: 58px;
		height: 58px;
	}
	.biota-cart__item {
		padding: 12px;
	}
	.biota-cart__trust {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px 16px;
	}
	.biota-cart__buybar {
		display: flex;
		position: sticky;
		bottom: 0;
		background: rgba(255, 255, 255, 0.97);
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
		border-top: 1px solid #eef0f3;
		padding: 11px 16px;
		gap: 11px;
		align-items: center;
		z-index: 20;
		margin: 0 calc(-1 * var(--biota-cart-pad, 20px));
	}
	/* The sticky bar already carries the CTA, and both were on screen together at
	   the foot of the summary. The reassurance line under it stays — it is the
	   only place that names the payment methods — and takes over the button's
	   top margin. */
	.biota-cart__sum .biota-cart__co {
		display: none;
	}
	.biota-cart__secure {
		margin-top: 14px;
	}
	.biota-cart__buybar-l {
		font-size: 10px;
		color: #767676;
	}
	.biota-cart__buybar-v {
		font-size: 16px;
	}
	.biota-cart__buybar .biota-cart__co {
		margin: 0;
		flex: 1;
		padding: 0;
		height: 44px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.biota-cart__bar span {
		transition: none;
	}
}
