/* Блокът „Подходящи / Купувани заедно“ на продукта (inc/product-page.php: lekuva_fbt_markup, assets/js/fbt.js).
   Една кутия: заглавие, ред малки снимки с „+“, списък с отметки, обобщение вдясно. */
.lk-fbt {
	border: 1px solid #e5e7ea;
	border-radius: 8px;
	background: #fff;
	padding: 14px 18px 16px;
	margin-bottom: 24px;
}
.lk-fbt > .title { margin: 0 0 12px; font-size: 20px; }
.lk-fbt .wd-fbt.wd-design-side {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) 280px;
	grid-template-areas: "thumbs list buy";
	align-items: center;
	gap: 16px 28px;
	margin: 0;
}
.lk-fbt .lk-fbt-stub { display: none !important; }
.lk-fbt .wd-fbt-form { display: contents; }

/* Снимки */
.lk-fbt-thumbs { grid-area: thumbs; display: flex; align-items: center; gap: 6px; }
.lk-fbt-thumb {
	display: block;
	flex: 0 0 auto;
	width: 132px;
	aspect-ratio: 1;
	border-radius: 8px;
	background: #f7f7f7;
	overflow: hidden;
	transition: opacity .2s ease, filter .2s ease;
}
.lk-fbt-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.lk-fbt-thumb.is-off { opacity: .35; filter: grayscale(1); }
.lk-fbt-plus { flex: 0 0 auto; width: 18px; text-align: center; font-size: 22px; line-height: 1; color: #6b7280; font-weight: 300; }

/* Списък с отметки */
.lk-fbt .wd-fbt-products { grid-area: list; display: flex; flex-direction: column; gap: 10px; }
.lk-fbt .wd-fbt-product:not(:last-child) { margin-bottom: 0; }
.lk-fbt .wd-fbt-form.wd-checkbox-on .wd-fbt-product-heading,
.lk-fbt .wd-fbt-product-heading {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr) auto;
	align-items: start;
	column-gap: 10px;
	padding-inline-start: 0;
	margin: 0;
}
.lk-fbt .wd-fbt-product input[type=checkbox] {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: #5e7a16;
}
.lk-fbt .wd-fbt-product input[type=checkbox]:focus-visible { outline: 2px solid #5e7a16; outline-offset: 2px; }
.lk-fbt .wd-fbt-product input[disabled] { opacity: .75; }
.lk-fbt .wd-fbt-product-heading label {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.4;
	color: #222;
}
.lk-fbt .wd-fbt-product-heading label:hover { opacity: 1; }
.lk-fbt .lk-fbt-this { font-weight: 700; }
.lk-fbt .wd-fbt-product-heading .wd-entities-title {
	display: inline;
	margin: 0;
	font-size: inherit;
	font-weight: 400;
	color: inherit;
}
.lk-fbt .wd-fbt-product-heading a.wd-entities-title:hover { color: #5e7a16; text-decoration: underline; }
.lk-fbt .wd-fbt-product-heading .price {
	white-space: nowrap;
	font-size: 15px;
	font-weight: 700;
	color: #5e7a16;
	line-height: 1.35;
	text-align: end;
}
.lk-fbt .wd-fbt-product-heading .price del { display: block; font-size: 12px; font-weight: 400; color: #6b7280; }
.lk-fbt .wd-fbt-product-heading .price ins { text-decoration: none; }
.lk-fbt .wd-fbt-product.is-off label,
.lk-fbt .wd-fbt-product.is-off .price { opacity: .5; }

/* Обобщение */
.lk-fbt .wd-fbt-purchase {
	grid-area: buy;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0;
	padding: 14px 16px;
	border-radius: 8px;
	background: #f5f6f7;
}
.lk-fbt .lk-fbt-total-l { font-size: 14px; color: #444; }
.lk-fbt .wd-fbt-purchase .price { display: block; margin-top: 2px; font-size: 26px; font-weight: 700; line-height: 1.15; color: #222; } /* цените са тъмни (assets/css/price.css) */
.lk-fbt .wd-fbt-purchase .price del { font-size: 15px; font-weight: 400; color: #6b7280; margin-inline-end: 6px; }
.lk-fbt .wd-fbt-purchase .price ins { text-decoration: none; }
.lk-fbt .wd-fbt-desc { margin-top: 2px; font-size: 13px; color: #555; }
.lk-fbt .lk-fbt-save { display: none; }
.lk-fbt .wd-fbt-purchase .lk-fbt-save { display: block; margin: 4px 0 0; font-size: 13px; font-weight: 600; color: #c62828; }
.lk-fbt .lk-fbt-save[hidden] { display: none !important; }
.lk-fbt .wd-fbt-purchase-btn {
	width: 100%;
	min-height: 40px; /* основен бутон 40 px (buttons.css) */
	margin-top: 12px;
	border-radius: 6px;
	padding-inline: 12px;
	font-size: 14px;
	text-transform: none;
	white-space: nowrap;
}
.lk-fbt .wd-fbt-purchase-btn.wd-disabled { opacity: .45; }
.lk-fbt .wd-loader-overlay { border-radius: 8px; }

/* Таблет: снимки и списък един до друг, обобщение отдолу. */
@media (max-width: 1200px) {
	.lk-fbt .wd-fbt.wd-design-side {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas: "thumbs list" "buy buy";
	}
	.lk-fbt .wd-fbt-purchase { display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; column-gap: 10px; }
	.lk-fbt .wd-fbt-purchase-btn { align-self: center; }
	.lk-fbt .wd-fbt-purchase .price { margin: 0; font-size: 22px; }
	.lk-fbt .wd-fbt-desc { margin: 0; }
	.lk-fbt .wd-fbt-purchase-btn { margin: 0; justify-self: end; width: auto; padding-inline: 24px; }
	.lk-fbt .wd-fbt-purchase .lk-fbt-save { grid-column: 1 / -1; order: 9; }
}

/* Телефон: снимки в един ред, списъкът под тях, обща цена и бутон по цялата ширина. */
@media (max-width: 768px) {
	.lk-fbt { padding: 12px; border-radius: 6px; }
	.lk-fbt > .title { font-size: 18px; margin-bottom: 10px; }
	.lk-fbt .wd-fbt.wd-design-side {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "thumbs" "list" "buy";
		gap: 12px;
	}
	.lk-fbt-thumbs { justify-content: center; gap: 4px; }
	.lk-fbt-thumb { width: calc((100% - (var(--lk-fbt-n, 3) - 1) * 22px) / var(--lk-fbt-n, 3)); max-width: 120px; }
	.lk-fbt-plus { width: 14px; font-size: 18px; }
	/* Обобщение (02.12.2026): „Обща цена“ и „За N продукта“ вляво, сумата вдясно на същия ред, отдолу бутонът 48 px. */
	.lk-fbt .wd-fbt-purchase { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 0; padding: 10px 12px; }
	.lk-fbt .lk-fbt-total-l { grid-column: 1; grid-row: 1; align-self: end; font-size: 14px; font-weight: 600; color: #222; }
	.lk-fbt .wd-fbt-desc { grid-column: 1; grid-row: 2; align-self: start; margin: 0; }
	.lk-fbt .wd-fbt-purchase .price { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 24px; text-align: end; white-space: nowrap; }
	.lk-fbt .wd-fbt-purchase .lk-fbt-save { grid-column: 1 / -1; grid-row: 3; }
	.lk-fbt .wd-fbt-purchase-btn { grid-column: 1 / -1; grid-row: 4; justify-self: stretch; width: 100%; min-height: 48px; margin: 10px 0 0; font-size: 15px; }
}
