/**
 * Bought Together — compact FBT for product summary column.
 */

.bsp-sp__bought-together.bsp-bt,
.bsp-bt {
	--bsp-bt-border: #e5e5e5;
	--bsp-bt-bg: #ffffff;
	--bsp-bt-accent: #111111;
	--bsp-bt-title: #111111;
	--bsp-bt-card: #f5f5f5;
	--bsp-bt-muted: #6b6b6b;
	--bsp-bt-line: #ececec;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	padding: 20px 18px;
	border: 1px solid var(--bsp-bt-border);
	border-radius: 0;
	background: var(--bsp-bt-bg);
	overflow: hidden;
}

.bsp-bt *,
.bsp-bt *::before,
.bsp-bt *::after {
	box-sizing: border-box;
}

.bsp-bt__header {
	margin: 0 0 16px;
}

.bsp-bt__title,
.bsp-sp__bought-together .bsp-sp__bt-title {
	display: block;
	margin: 0;
	color: var(--bsp-bt-title);
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
}

.bsp-bt__badge {
	display: inline-block;
	margin: 8px 0 0;
	padding: 3px 8px;
	border: 1px solid var(--bsp-bt-accent);
	color: var(--bsp-bt-accent);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* Always stack — summary column is narrow even on large viewports */
.bsp-bt__layout {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	margin: 0;
	padding: 0;
	border: 0;
}

.bsp-bt__list {
	margin: 0;
	padding: 0 0 4px;
	border-bottom: 1px solid var(--bsp-bt-line);
}

.bsp-bt__gallery,
.bsp-sp__bought-together .bsp-sp__bt-products {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: 100%;
	margin: 0;
	overflow: visible;
}

.bsp-bt__figure,
.bsp-sp__bought-together .bsp-sp__bt-item {
	display: block;
	flex: 0 0 auto;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.bsp-bt__thumb,
.bsp-sp__bought-together .bsp-sp__bt-thumb {
	display: block;
	position: relative;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border: 1px solid var(--bsp-bt-line);
	background: var(--bsp-bt-card);
}

.bsp-bt__thumb img,
.bsp-sp__bought-together .bsp-sp__bt-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Theme product-card hover swap breaks in FBT thumbs — lock to primary */
.bsp-bt__thumb .bsp-product-card-images,
.bsp-sp__bought-together .bsp-sp__bt-thumb .bsp-product-card-images {
	position: relative;
	width: 100%;
	height: 100%;
}

.bsp-bt__thumb .bsp-product-card-images__primary,
.bsp-sp__bought-together .bsp-sp__bt-thumb .bsp-product-card-images__primary {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	opacity: 1 !important;
}

.bsp-bt__thumb .bsp-product-card-images__secondary,
.bsp-sp__bought-together .bsp-sp__bt-thumb .bsp-product-card-images__secondary {
	display: none !important;
}

.bsp-bt__plus,
.bsp-sp__bought-together .bsp-sp__bt-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--bsp-bt-accent);
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.bsp-bt__equals {
	display: none; /* Useless in stacked layout */
}

.bsp-bt__buybox,
.bsp-sp__bought-together .bsp-sp__bt-totals {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	margin: 0;
}

.bsp-bt__price-block {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bsp-bt__total-label,
.bsp-sp__bought-together .bsp-sp__bt-total-label {
	color: var(--bsp-bt-muted);
	font-size: 13px;
	font-weight: 500;
}

.bsp-bt__prices {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
}

.bsp-bt__price-original,
.bsp-sp__bought-together .bsp-sp__bt-total-original {
	color: var(--bsp-bt-muted);
	font-size: 14px;
	text-decoration: line-through;
}

.bsp-bt__price-original.is-hidden,
.bsp-sp__bought-together .bsp-sp__bt-total-original.is-hidden {
	display: none;
}

.bsp-bt__price-sale,
.bsp-sp__bought-together .bsp-sp__bt-total-sale {
	color: var(--bsp-bt-accent);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
}

.bsp-bt__saving {
	margin: 2px 0 0;
	color: var(--bsp-bt-muted);
	font-size: 12px;
	line-height: 1.4;
}

.bsp-bt__add-all,
.bsp-sp__bought-together .bsp-sp__bt-add-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--bsp-bt-accent);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.bsp-bt__add-all:hover:not(:disabled),
.bsp-sp__bought-together .bsp-sp__bt-add-all:hover:not(:disabled) {
	background: #000000;
}

.bsp-bt__add-all:disabled,
.bsp-sp__bought-together .bsp-sp__bt-add-all:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Checklist */
.bsp-bt__list {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bsp-bt__list-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--bsp-bt-line);
}

.bsp-bt__list-item:last-child {
	border-bottom: 0;
}

.bsp-bt__check,
.bsp-sp__bought-together .bsp-sp__bt-check {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr) auto;
	align-items: start;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 11px 0;
	cursor: pointer;
}

.bsp-bt__check input,
.bsp-sp__bought-together .bsp-sp__bt-check input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	opacity: 0;
}

.bsp-bt__checkmark,
.bsp-sp__bought-together .bsp-sp__bt-checkmark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	flex-shrink: 0;
	border: 1.5px solid var(--bsp-bt-accent);
	border-radius: 2px;
	background: #ffffff;
}

.bsp-bt__check input:checked + .bsp-bt__checkmark,
.bsp-bt__check input:checked + .bsp-sp__bt-checkmark,
.bsp-sp__bought-together .bsp-sp__bt-check input:checked + .bsp-bt__checkmark,
.bsp-sp__bought-together .bsp-sp__bt-check input:checked + .bsp-sp__bt-checkmark {
	background: var(--bsp-bt-accent);
	border-color: var(--bsp-bt-accent);
}

.bsp-bt__check input:checked + .bsp-bt__checkmark::after,
.bsp-bt__check input:checked + .bsp-sp__bt-checkmark::after,
.bsp-sp__bought-together .bsp-sp__bt-check input:checked + .bsp-bt__checkmark::after,
.bsp-sp__bought-together .bsp-sp__bt-check input:checked + .bsp-sp__bt-checkmark::after {
	content: "";
	width: 9px;
	height: 5px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: rotate(-45deg) translateY(-1px);
}

.bsp-bt__check-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bsp-bt__check-name {
	display: block;
	color: var(--bsp-bt-title);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.bsp-bt__this-item {
	font-weight: 700;
}

.bsp-bt__name,
.bsp-sp__bought-together .bsp-sp__bt-name {
	display: inline;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-decoration: none;
}

.bsp-bt__name:hover,
.bsp-sp__bought-together .bsp-sp__bt-name:hover {
	text-decoration: underline;
}

.bsp-bt__meta,
.bsp-sp__bought-together .bsp-sp__bt-size {
	color: var(--bsp-bt-muted);
	font-size: 12px;
}

.bsp-bt__check-price,
.bsp-sp__bought-together .bsp-sp__bt-price {
	color: var(--bsp-bt-title);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.bsp-sp__bought-together.bsp-bt,
	.bsp-bt {
		padding: 16px 14px;
	}

	.bsp-bt__thumb,
	.bsp-sp__bought-together .bsp-sp__bt-thumb {
		width: 64px;
		height: 64px;
	}

	.bsp-bt__check,
	.bsp-sp__bought-together .bsp-sp__bt-check {
		grid-template-columns: 18px minmax(0, 1fr);
	}

	.bsp-bt__check-price,
	.bsp-sp__bought-together .bsp-sp__bt-price {
		grid-column: 2;
		justify-self: start;
	}
}
