.wm-fbt {
	margin: 18px 0;
	padding: 14px 16px;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	background: #fafafa;
}

.wm-fbt .wm-fbt-heading {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 12px;
	color: #222;
}

.wm-fbt .wm-fbt-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wm-fbt .wm-fbt-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	flex-wrap: wrap;
}

.wm-fbt .wm-fbt-image {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	display: block;
	border-radius: 6px;
	overflow: hidden;
}

.wm-fbt .wm-fbt-image img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 6px;
}

.wm-fbt .wm-fbt-info {
	flex: 1 1 140px;
	min-width: 140px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wm-fbt .wm-fbt-title {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	line-height: 1.3;
}

.wm-fbt .wm-fbt-title:hover {
	text-decoration: underline;
}

.wm-fbt .wm-fbt-price {
	font-size: 13px;
	color: #555;
}

.wm-fbt .wm-fbt-price .amount {
	font-weight: 700;
}

/* Inline variation selects */
.wm-fbt .wm-fbt-variations {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.wm-fbt .wm-fbt-variation-select {
	height: 32px;
	max-width: 100%;
	font-size: 12px;
	padding: 0 8px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	color: #333;
}

.wm-fbt .wm-fbt-actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wm-fbt .wm-fbt-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.wm-fbt .wm-fbt-qty button {
	width: 30px;
	height: 34px;
	border: 0;
	background: #f2f2f2;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #333;
	padding: 0;
}

.wm-fbt .wm-fbt-qty button:hover {
	background: #e7e7e7;
}

.wm-fbt .wm-fbt-qty-input {
	width: 42px;
	height: 34px;
	border: 0;
	text-align: center;
	font-size: 14px;
	-moz-appearance: textfield;
	background: #fff;
	padding: 0;
}

.wm-fbt .wm-fbt-qty-input::-webkit-outer-spin-button,
.wm-fbt .wm-fbt-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.wm-fbt .wm-fbt-add {
	height: 34px;
	line-height: 34px;
	padding: 0 14px;
	font-size: 13px;
	border-radius: 6px;
	white-space: nowrap;
	cursor: pointer;
}

.wm-fbt .wm-fbt-add[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.wm-fbt .wm-fbt-add.loading {
	opacity: 0.7;
	pointer-events: none;
}

.wm-fbt .wm-fbt-add.added {
	background: #2e7d32 !important;
	color: #fff !important;
	opacity: 1;
}

.wm-fbt .wm-fbt-view-cart {
	font-size: 12px;
	text-decoration: underline;
	color: #0C5996;
}

@media (max-width: 480px) {
	.wm-fbt .wm-fbt-row {
		gap: 8px;
	}
	.wm-fbt .wm-fbt-actions {
		width: 100%;
		justify-content: flex-start;
	}
	.wm-fbt .wm-fbt-info {
		flex-basis: 100%;
	}
}

/* ---------------------------------------------------------------------
 * Checkbox mode
 * ------------------------------------------------------------------- */

.wm-fbt .wm-fbt-check {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	position: relative;
	margin-inline-start: 2px;
}

.wm-fbt .wm-fbt-check-input {
	position: absolute;
	opacity: 0;
	width: 22px;
	height: 22px;
	margin: 0;
	cursor: pointer;
}

.wm-fbt .wm-fbt-check-box {
	width: 22px;
	height: 22px;
	border: 2px solid #bbb;
	border-radius: 5px;
	background: #fff;
	display: inline-block;
	position: relative;
	transition: all 0.15s ease;
}

.wm-fbt .wm-fbt-check-input:checked + .wm-fbt-check-box {
	background: #0C5996;
	border-color: #0C5996;
}

.wm-fbt .wm-fbt-check-input:checked + .wm-fbt-check-box::after {
	content: "";
	position: absolute;
	inset-inline-start: 7px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.wm-fbt .wm-fbt-check-input:disabled + .wm-fbt-check-box {
	opacity: 0.4;
	cursor: not-allowed;
}

.wm-fbt .wm-fbt-row.wm-fbt-needs-choice {
	outline: 1px dashed #d9a300;
	outline-offset: -1px;
}

/* Footer / running total */
.wm-fbt .wm-fbt-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e6e6e6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.wm-fbt .wm-fbt-total-row {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 15px;
}

.wm-fbt .wm-fbt-total-label {
	font-weight: 600;
	color: #333;
}

.wm-fbt .wm-fbt-total-amount {
	font-weight: 700;
	font-size: 17px;
	color: #0C5996;
}

.wm-fbt .wm-fbt-add-selected {
	height: 42px;
	line-height: 42px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
}

.wm-fbt .wm-fbt-add-selected[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.wm-fbt .wm-fbt-add-selected.loading {
	opacity: 0.7;
	pointer-events: none;
}

.wm-fbt .wm-fbt-add-selected.added {
	background: #2e7d32 !important;
	color: #fff !important;
	opacity: 1;
}

@media (max-width: 480px) {
	.wm-fbt .wm-fbt-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.wm-fbt .wm-fbt-add-selected {
		width: 100%;
	}
	.wm-fbt .wm-fbt-total-row {
		justify-content: space-between;
	}
}

/* Transient notice (with_main mode, when a variable FBT item isn't chosen) */
.wm-fbt .wm-fbt-notice {
	margin-top: 10px;
	padding: 8px 12px;
	background: #fff4e5;
	border: 1px solid #f0c36d;
	border-radius: 6px;
	color: #8a5a00;
	font-size: 13px;
	text-align: center;
}

/* Main add-to-cart button while we push FBT items first (with_main mode) */
.single_add_to_cart_button.wm-fbt-mainloading {
	opacity: 0.7;
	pointer-events: none;
}
