/* Buy Together for WooCommerce – frontend styles */
.wcbt {
	margin: 2.5em 0;
	clear: both;
}

.wcbt__title {
	font-size: 1.25em;
	margin: 0 0 1em;
}

.wcbt__items {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 8px;
}

.wcbt__item {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	max-width: 185px;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	background: #fff;
	padding: 8px 8px 10px;
	font-size: 13px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	transition: opacity .2s ease, box-shadow .2s ease;
}

.wcbt__item:hover {
	box-shadow: 0 2px 10px rgba( 0, 0, 0, .08 );
}

.wcbt__item--unchecked {
	opacity: .55;
}

.wcbt__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #c9483a;
	color: #fff;
	font-weight: 700;
	font-size: .8em;
	padding: 2px 8px;
	border-radius: 3px;
	line-height: 1.4;
	z-index: 2;
}

.rtl .wcbt__badge,
[dir="rtl"] .wcbt__badge {
	left: auto;
	right: 12px;
}

.wcbt__check {
	position: absolute;
	top: 8px;
	right: 8px;
	margin: 0;
	z-index: 2;
	cursor: pointer;
}

.rtl .wcbt__check,
[dir="rtl"] .wcbt__check {
	right: auto;
	left: 12px;
}

.wcbt__checkbox {
	width: 16px;
	height: 16px;
	margin: 0;
	cursor: pointer;
	accent-color: #2f7ef5;
}

.wcbt__image {
	display: block;
	text-align: center;
	padding: 20px 0 4px;
	border-bottom: 1px solid #eee;
	margin-bottom: 6px;
}

.wcbt .wcbt__item .wcbt__image img {
	max-width: 100%;
	width: auto;
	height: 85px;
	max-height: 85px;
	object-fit: contain;
	object-position: center;
	display: inline-block;
	margin: 0 auto;
	box-shadow: none;
	border: 0;
	background: #fff;
}

.wcbt__name {
	font-size: .92em;
	margin: 0 0 4px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.wcbt__name a {
	text-decoration: none;
	color: inherit;
}

.wcbt__desc {
	font-size: .8em;
	color: #555;
	margin: 0 0 6px;
	flex: 1 1 auto;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wcbt__price {
	font-weight: 700;
	font-size: 1em;
	margin-top: auto;
}

.wcbt__price del {
	font-weight: 400;
	opacity: .6;
	margin: 0 6px;
}

.wcbt__plus {
	align-self: center;
	font-size: 1.4em;
	font-weight: 700;
	color: #2f5fb3;
	line-height: 1;
	flex: 0 0 auto;
	padding: 0 2px;
}

.wcbt .wcbt__footer .wcbt__button {
	font-size: .9em;
	padding: 8px 16px;
}

.wcbt__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 12px;
	padding: 10px 14px;
	background: #f7f7f7;
	border-radius: 4px;
}

.wcbt__total {
	font-size: .95em;
}

.wcbt__total-amount {
	font-weight: 700;
	font-size: 1.1em;
	margin: 0 6px;
}

.wcbt__button.loading {
	opacity: .7;
	cursor: wait;
}

.wcbt__button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.wcbt__message {
	flex-basis: 100%;
	font-size: .95em;
}

.wcbt__message:empty {
	display: none;
}

.wcbt__message--error {
	color: #b32d2e;
}

.wcbt__message--success {
	color: #1e7a3b;
}

/* Tablet: allow wrapping into two per row when there are many items. */
@media ( max-width: 900px ) {
	.wcbt__items {
		flex-wrap: wrap;
	}

	.wcbt__item {
		flex: 1 1 calc( 50% - 30px );
		max-width: none;
	}
}

/* Phone: one per row. */
@media ( max-width: 600px ) {
	.wcbt__item {
		flex-basis: 100%;
	}

	.wcbt__plus {
		flex-basis: 100%;
		text-align: center;
		padding: 0;
	}

	.wcbt__footer {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
}

.wcbt__variation-label {
	display: block;
	margin: 0 0 6px;
}

.wcbt .wcbt__variation {
	width: 100%;
	max-width: 100%;
	font-size: .85em;
	padding: 3px 4px;
	height: auto;
	min-height: 0;
	line-height: 1.4;
}

.wcbt__badge[hidden] {
	display: none;
}
