/**
 * Bieži pērk kopā — Figma heading-parent styles.
 * Under product gallery (left column), without pushing summary down.
 */

/*
 * When FBT is present, use a 2-col grid so:
 * - gallery + FBT stack on the left
 * - summary stays top-aligned on the right (no gap from float/clear)
 */
@media print, screen and (min-width: 64em) {
	.single-product .main-info:has(> .fbt) {
		display: grid;
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		grid-template-rows: auto auto;
		column-gap: 40px;
		align-items: start;
		justify-content: space-between;
	}

	.single-product .main-info:has(> .fbt) > .woocommerce-product-gallery {
		grid-column: 1;
		grid-row: 1;
		float: none !important;
		width: 100% !important;
		max-width: 488px;
	}

	.single-product .main-info:has(> .fbt) > .fbt {
		grid-column: 1;
		grid-row: 2;
		float: none !important;
		clear: none;
		width: 100% !important;
		max-width: none;
		padding: 24px 0 0;
		box-sizing: border-box;
	}

	.single-product .main-info:has(> .fbt) > .summary.entry-summary,
	.single-product .main-info:has(> .fbt) > .summary {
		grid-column: 2;
		grid-row: 1 / -1;
		float: none !important;
		width: 100% !important;
		max-width: 546px;
		margin-left: auto !important;
		margin-right: 0 !important;
		margin-top: 0 !important;
		padding-top: 0 !important;
		align-self: start;
		justify-self: stretch;
	}
}

.fbt {
	width: 100%;
	padding: 24px 0 0;
	margin: 0;
	box-sizing: border-box;
	font-family: "Satoshi", "Satoshi Variable", sans-serif;
	color: #0d0d0d;
	text-align: left;
	font-size: 20px;
}

/* .heading-parent */
.fbt__container {
	width: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	text-align: left;
	font-size: 20px;
	color: #0d0d0d;
	box-sizing: border-box;
}

/* Section blocks: package offer, then cross-sells */
.fbt__block {
	align-self: stretch;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.fbt__block--cross-sell {
	margin-top: 4px;
}

/* .heading */
.fbt__heading {
	margin: 0;
	position: relative;
	line-height: 30px;
	font-size: 20px;
	font-weight: 500;
	font-variation-settings: "wght" 500;
	color: #0d0d0d;
}

/* .product-card-desktop-parent */
.fbt__bundle {
	align-self: stretch;
	border-radius: 2px;
	background-color: #f6f6f6;
	border: 1px solid #079455;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 24px;
	position: relative;
	isolation: isolate;
	gap: 24px;
	font-size: 14px;
	box-sizing: border-box;
}

/* .badge3 */
.fbt__savings-badge {
	height: 24px;
	margin: 0 !important;
	position: absolute;
	top: -12px;
	left: 24px;
	border-radius: 2px;
	background-color: #e04f16;
	display: flex;
	align-items: center;
	padding: 2px 6px 4px;
	box-sizing: border-box;
	z-index: 1;
	flex-shrink: 0;
	text-align: center;
	font-size: 12px;
	color: #fff;
}

.fbt__savings-text {
	position: relative;
	line-height: 18px;
	font-weight: 500;
}

/* .product-card-desktop */
.fbt__bundle-row {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
	isolation: isolate;
	gap: 16px;
	min-width: 0;
	z-index: 0;
	flex-shrink: 0;
}

@media print, screen and (min-width: 40em) {
	.fbt__bundle-row {
		flex-direction: row;
		align-items: center;
		gap: 20px;
	}
}

/* .image-parent */
.fbt__bundle-info {
	display: flex;
	align-items: center;
	gap: 16px;
	z-index: 1;
	min-width: 0;
	flex: 1 1 auto;
}

/* .image */
.fbt__bundle-image {
	height: 48px;
	width: 48px;
	border-radius: 2px;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

/* .product-details / .product-name */
.fbt__bundle-details {
	min-width: 0;
	max-width: none;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.fbt__bundle-name {
	align-self: stretch;
	position: relative;
	line-height: 20px;
	font-size: 14px;
	font-weight: 500;
	display: -webkit-box;
	overflow: hidden;
	text-overflow: ellipsis;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	color: #0d0d0d;
}

/* .price-badge-parent */
.fbt__bundle-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	z-index: 0;
	font-size: 18px;
	color: #c72c2e;
	flex-shrink: 0;
	flex-wrap: wrap;
}

/* .price-badge */
.fbt__bundle-price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}

.fbt__bundle-price-current {
	display: flex;
	align-items: center;
	color: #c72c2e;
	font-size: 18px;
	line-height: 28px;
	font-weight: 700;
}

.fbt__bundle-price-current .woocommerce-Price-amount,
.fbt__bundle-price-current bdi,
.fbt__bundle-price-current .amount {
	color: #c72c2e !important;
	font-size: 18px !important;
	line-height: 28px !important;
	font-weight: 700 !important;
	background: none !important;
	padding: 0 !important;
}

/* Hide any tax / extra WC price chrome */
.fbt__bundle-price-current small,
.fbt__bundle-price-regular small,
.fbt__item-price small,
.fbt .price-for-m2,
.fbt .woocommerce-price-suffix {
	display: none !important;
}

/* .regular-price-text */
.fbt__bundle-price-regular {
	position: relative;
	font-size: 12px;
	text-decoration: line-through;
	line-height: 18px;
	font-weight: 500;
	color: #6d6d6d;
}

.fbt__bundle-price-regular .woocommerce-Price-amount,
.fbt__bundle-price-regular bdi {
	font-size: 12px !important;
	line-height: 18px !important;
	font-weight: 500 !important;
	color: #6d6d6d !important;
	background: none !important;
	padding: 0 !important;
}

.fbt__bundle-form {
	margin: 0;
	display: flex;
}

/* .buttonsbutton */
.fbt__btn {
	border: none;
	border-radius: 2px;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	font-family: "Satoshi", "Satoshi Variable", sans-serif;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.fbt__btn--bundle {
	background-color: #067647;
	color: #fff;
}

.fbt__btn--bundle:hover,
.fbt__btn--bundle:focus-visible {
	background-color: #055c38;
	color: #fff;
	outline: none;
}

/* .product-card-desktop-group */
.fbt__list {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 0 8px;
	gap: 16px;
	font-size: 18px;
	box-sizing: border-box;
}

@media print, screen and (min-width: 40em) {
	.fbt__list {
		padding: 0 24px;
	}
}

/* .product-card-desktop2 */
.fbt__item {
	align-self: stretch;
	border-bottom: 1px solid #d1d1d1;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	padding: 0 0 8px;
	isolation: isolate;
	gap: 16px;
	min-width: 0;
	flex-wrap: nowrap;
}

.fbt__item-image-link {
	flex-shrink: 0;
	line-height: 0;
	z-index: 3;
}

/* .image-icon */
.fbt__item-image {
	height: 46px;
	width: 46px;
	position: relative;
	border-radius: 2px;
	object-fit: cover;
	display: block;
}

/* .description */
.fbt__item-desc {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	z-index: 2;
}

/* price + /gab. */
.fbt__item-price {
	display: flex;
	align-items: flex-start;
	gap: 2px;
	font-size: 18px;
	line-height: 28px;
	font-weight: 700;
	color: #0d0d0d;
}

.fbt__item-price .woocommerce-Price-amount,
.fbt__item-price bdi,
.fbt__item-price .amount {
	font-size: 18px !important;
	line-height: 28px !important;
	font-weight: 700 !important;
	color: #0d0d0d !important;
	background: none !important;
	padding: 0 !important;
}

/* .currency-symbol2 */
.fbt__item-unit {
	position: relative;
	line-height: 20px;
	font-size: 14px;
	font-weight: 500;
	color: #6d6d6d;
	align-self: center;
}

/* .product-name2 */
.fbt__item-name {
	align-self: stretch;
	position: relative;
	line-height: 20px;
	font-size: 14px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #0d0d0d;
	text-decoration: none;
	max-width: 100%;
}

.fbt__item-name:hover {
	color: #0d0d0d;
	text-decoration: underline;
}

/* .content qty */
.fbt__item-qty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	z-index: 1;
	flex-shrink: 0;
	height: 32px;
}

/* .buttonsbutton2 */
.fbt__qty-btn {
	border: none;
	border-radius: 2px;
	background-color: #3d3d3d;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	width: 32px;
	height: 32px;
	margin: 0;
	box-sizing: border-box;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color 0.15s ease;
}

.fbt__qty-btn:hover,
.fbt__qty-btn:focus-visible {
	background-color: #1e1e1e;
	outline: none;
}

.fbt__qty-btn svg {
	display: block;
	width: 12px;
	height: 12px;
}

/* .input-field 44×32 */
.fbt input.fbt__qty-input[type="number"] {
	width: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
	height: 32px !important;
	min-height: 32px !important;
	max-height: 32px !important;
	box-sizing: border-box !important;
	border-radius: 2px !important;
	background-color: #fff !important;
	border: 1px solid #85888e !important;
	padding: 0 4px !important;
	margin: 0 !important;
	text-align: center !important;
	font-size: 16px !important;
	line-height: 30px !important;
	color: #0d0d0d !important;
	font-family: "Satoshi", "Satoshi Variable", sans-serif !important;
	-moz-appearance: textfield;
	appearance: textfield;
	flex: 0 0 44px;
}

.fbt input.fbt__qty-input[type="number"]::-webkit-inner-spin-button,
.fbt input.fbt__qty-input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* .buttonsbutton4 */
.fbt__btn--item {
	border-radius: 2px;
	background-color: #d1d1d1;
	border: 1px solid #d1d1d1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	z-index: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: #0d0d0d;
	height: auto;
	min-height: 32px;
	box-sizing: border-box;
	flex-shrink: 0;
}

.fbt__btn--item:hover,
.fbt__btn--item:focus-visible {
	background-color: #c0c0c0;
	border-color: #c0c0c0;
	color: #0d0d0d;
	outline: none;
}

.fbt__btn--item.is-loading,
.fbt__btn--bundle.is-loading {
	opacity: 0.65;
	pointer-events: none;
}

.fbt__btn--item.is-added {
	background-color: #067647;
	border-color: #067647;
	color: #fff;
}

@media (max-width: 479px) {
	.fbt__item {
		flex-wrap: wrap;
	}

	.fbt__item-qty,
	.fbt__btn--item {
		margin-left: auto;
	}
}

/*
 * AJAX notices reuse theme sticky styles:
 * .single-product .woocommerce-message { position: fixed; bottom/right; .btn { display: none } }
 */
.single-product .woocommerce-message.fbt-ajax-notice {
	z-index: 10002;
}

/* Never show WC “Apskatīt grozu” link next to FBT buttons */
#frequently-bought-together a.added_to_cart,
#frequently-bought-together .wc-forward {
	display: none !important;
}

.single-product .woocommerce-message.fbt-ajax-notice .btn,
.single-product .woocommerce-message.fbt-ajax-notice a.wc-forward,
.single-product .woocommerce-message.fbt-ajax-notice a.button {
	display: none !important;
}
