/*--------------------------------------------------------------
# B&S Media CRO additions (inc/cro.php)
--------------------------------------------------------------*/

.bs-cro-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

/*--------------------------------------------------------------
# Header contact ([bs_header_contact])
--------------------------------------------------------------*/

.bs-header-contact {
	display: inline-flex;
	align-items: center;
	gap: 1.25rem;
	margin-right: auto;
	font-size: 0.9rem;
	white-space: nowrap;
}

.basti-banner .bs-header-contact a.bs-header-contact__link,
.bs-header-contact__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: inherit;
	text-decoration: none;
}

.bs-header-contact__link .bs-cro-icon {
	width: 18px;
	height: 18px;
	color: var(--wp--preset--color--tertiary);
}

/* Mobile drawer variant. */
.bs-mobile-contact {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1.25rem;
	padding: 1.25rem 0 0;
	border-top: 1px solid var(--wp--preset--color--quinary);
	font-size: 0.95rem;
}

.bs-mobile-contact__link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: inherit;
	text-decoration: none;
}

/*--------------------------------------------------------------
# Homepage hero
--------------------------------------------------------------*/

.bs-hero.wp-block-cover {
	min-height: clamp(360px, 46vw, 560px);
}

/* One shared left edge for all hero content, aligned to the 1224px grid. */
.bs-hero.wp-block-cover .wp-block-cover__inner-container {
	box-sizing: border-box;
	/* !important: core's .has-custom-content-position rule sets width:auto. */
	width: 100% !important;
	max-width: 1224px;
	margin: 0 auto !important;
	padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.bs-hero .wp-block-cover__inner-container > * {
	margin-right: 0 !important;
	margin-left: 0 !important;
}

.bs-hero .bs-hero__title {
	max-width: 13em;
	margin-top: 0;
	margin-bottom: 0;
	font-size: clamp(2rem, 3.4vw, 3.1rem);
	line-height: 1.1;
}

.bs-hero .bs-hero__text {
	max-width: 27em;
	margin-top: 1rem;
}

.bs-hero .wp-block-buttons {
	margin-top: 1.75rem;
}

.bs-hero .wp-block-button__link.wp-element-button {
	padding: 0.95em 2.6em;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--tertiary);
	box-shadow: none;
	color: var(--wp--preset--color--background);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: background-color 0.2s ease;
}

.bs-hero .wp-block-button__link.wp-element-button:hover,
.bs-hero .wp-block-button__link.wp-element-button:focus-visible {
	background: var(--wp--preset--color--foreground);
	box-shadow: none;
	color: var(--wp--preset--color--background);
}

@media screen and (max-width: 810px) {
	.bs-hero.wp-block-cover {
		min-height: 600px;
		align-items: flex-end;
		padding-bottom: 2rem;
	}

	.bs-hero .wp-block-cover__image-background {
		object-position: 64% 0% !important;
	}

	.bs-hero .bs-hero__title {
		max-width: none;
		font-size: 1.85rem;
	}

	.bs-hero .wp-block-cover__background {
		background: linear-gradient(0deg, rgba(251, 242, 238, 0.97) 0%, rgba(251, 242, 238, 0.9) 42%, rgba(251, 242, 238, 0) 62%) !important;
		opacity: 1 !important;
	}
}

/*--------------------------------------------------------------
# USPs ([bs_usps])
--------------------------------------------------------------*/

.bs-usps {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bs-usps--bar {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	text-align: center;
}

.bs-usps--bar .bs-usps__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

.bs-usps--bar .bs-usps__icon .bs-cro-icon {
	width: 30px;
	height: 30px;
	color: var(--wp--preset--color--tertiary);
}

.bs-usps--bar .bs-usps__body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.bs-usps--bar .bs-usps__title {
	font-size: 1rem;
}

.bs-usps--bar .bs-usps__text {
	font-size: 0.85rem;
	opacity: 0.8;
}

@media screen and (max-width: 810px) {
	.bs-usps--bar {
		grid-template-columns: 1fr;
		gap: 0.9rem;
		padding: 1.25rem 1.25rem;
		text-align: left;
	}

	.bs-usps--bar .bs-usps__item {
		flex-direction: row;
		align-items: center;
		gap: 0.9rem;
	}
}

.bs-usps--list {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.bs-usps--list .bs-usps__item {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	font-size: 0.95rem;
	line-height: 1.4;
}

.bs-usps--list .bs-usps__icon .bs-cro-icon {
	width: 22px;
	height: 22px;
	color: var(--wp--preset--color--tertiary);
}

/*--------------------------------------------------------------
# Product page
--------------------------------------------------------------*/

.bs-select-options {
	margin: 1.25rem 0;
}

.single-product .summary .bs-select-options__button {
	display: inline-block;
	min-width: 220px;
	text-align: center;
}

.bs-variation-table-anchor {
	display: block;
	height: 0;
}

.bs-product-trust {
	margin: 1.5rem 0 0;
	/* Padding, not margin: the summary's flow rules reset sibling margins. */
	padding-bottom: 2rem;
}

.bs-product-usps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem 1.25rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.bs-product-usps li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.95rem;
	line-height: 1.4;
}

.bs-product-usps .bs-cro-icon {
	width: 20px;
	height: 20px;
	color: var(--wp--preset--color--primary);
}

.bs-product-trust__box {
	padding: 1.1rem 1.25rem;
	border-radius: 8px;
	background: var(--wp--preset--color--senary);
}

.bs-product-trust__payment {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	margin: 0.9rem 0 0;
	padding-top: 0.9rem;
	border-top: 1px solid var(--wp--preset--color--quinary);
	font-size: 0.85rem;
	opacity: 0.85;
}

.bs-product-trust__payment .bs-cro-icon {
	width: 20px;
	height: 20px;
}

@media screen and (max-width: 500px) {
	.bs-product-usps {
		grid-template-columns: 1fr;
	}
}

/*--------------------------------------------------------------
# Sticky add-to-cart (mobile)
--------------------------------------------------------------*/

.bs-sticky-atc {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 0.9rem calc(0.65rem + env(safe-area-inset-bottom));
	background: var(--wp--preset--color--background);
	box-shadow: 0 -4px 18px rgba(33, 31, 29, 0.12);
	transform: translateY(110%);
	transition: transform 0.25s ease;
}

.bs-sticky-atc[hidden] {
	display: none;
}

.bs-sticky-atc.is-visible {
	transform: translateY(0);
}

.bs-sticky-atc__product {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-width: 0;
}

.bs-sticky-atc__image {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 4px;
	object-fit: cover;
}

.bs-sticky-atc__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.bs-sticky-atc__title {
	overflow: hidden;
	font-size: 0.85rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.bs-sticky-atc__price {
	font-size: 0.9rem;
	font-weight: 600;
}

.bs-sticky-atc__price del {
	font-weight: 400;
	opacity: 0.6;
}

.bs-sticky-atc .bs-sticky-atc__button {
	flex: none;
	margin: 0;
	padding: 0.8em 1.2em;
	white-space: nowrap;
}

@media screen and (min-width: 811px) {
	.bs-sticky-atc {
		display: none !important;
	}
}

/* Keep the bottom of the page reachable behind the bar. */
@media screen and (max-width: 810px) {
	body.has-bs-sticky-atc {
		padding-bottom: 72px;
	}
}

/*--------------------------------------------------------------
# Added-to-cart toast
--------------------------------------------------------------*/

.bs-cart-toast {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 99999;
	width: min(380px, calc(100vw - 2rem));
	padding: 1.1rem 1.2rem 1.2rem;
	border-radius: 10px;
	background: var(--wp--preset--color--background);
	box-shadow: 0 12px 40px rgba(33, 31, 29, 0.18);
	font-size: 0.95rem;
	opacity: 0;
	transform: translateY(-12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-bar .bs-cart-toast {
	top: calc(32px + 1.25rem);
}

.bs-cart-toast[hidden] {
	display: none;
}

.bs-cart-toast.is-open {
	opacity: 1;
	transform: translateY(0);
}

.bs-cart-toast__head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bs-cart-toast__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
}

.bs-cart-toast__check .bs-cro-icon {
	width: 18px;
	height: 18px;
}

.bs-cart-toast__title {
	flex: 1;
	font-size: 1rem;
}

.bs-cart-toast__close {
	display: inline-flex;
	padding: 4px;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.bs-cart-toast__body {
	margin-top: 0.75rem;
}

.bs-cart-toast__summary {
	margin: 0;
}

.bs-cart-toast__shipping {
	margin-top: 0.75rem;
	padding: 0.7rem 0.8rem;
	border-radius: 6px;
	background: var(--wp--preset--color--senary);
	font-size: 0.875rem;
}

.bs-cart-toast__shipping p {
	margin: 0 0 0.45rem;
}

.bs-cart-toast__bar {
	display: block;
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--wp--preset--color--quinary);
}

.bs-cart-toast__bar > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--wp--preset--color--primary);
	transition: width 0.4s ease;
}

.bs-cart-toast__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1rem;
}

.bs-cart-toast__secondary {
	color: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bs-cart-toast .bs-cart-toast__primary {
	flex: 1;
	max-width: 180px;
	margin: 0;
	text-align: center;
}

@media screen and (max-width: 810px) {
	.bs-cart-toast {
		top: auto;
		right: 0.75rem;
		bottom: 0.75rem;
		left: 0.75rem;
		width: auto;
		transform: translateY(16px);
	}

	.admin-bar .bs-cart-toast {
		top: auto;
	}

	.has-bs-sticky-atc .bs-cart-toast {
		bottom: 80px;
	}
}

/*--------------------------------------------------------------
# Product page buttons: one primary CTA style, one secondary
# (High specificity + !important on purpose: the Custom CSS plugin
# styles these buttons with !important rules, e.g. the green
# .single_add_to_cart_button.button.alt.wp-element-button.)
--------------------------------------------------------------*/

body.single-product .summary form.cart .single_add_to_cart_button.button.alt,
body.single-product .wpt-wrap .all_check_header_footer .button.add_to_cart_all_selected.add2c_selected,
body.single-product .wpt-wrap .button.add_to_cart_all_selected.add2c_selected,
body.single-product .summary .bs-select-options a.bs-select-options__button.button,
body .bs-sticky-atc button.bs-sticky-atc__button.button,
body .bs-cart-toast a.bs-cart-toast__primary.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 54px;
	padding: 0.85em 2.2em !important;
	border: 1.5px solid var(--wp--preset--color--tertiary) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 1rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.06em;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	cursor: pointer;
}

/* Primary: filled. */
body.single-product .summary form.cart .single_add_to_cart_button.button.alt,
body.single-product .wpt-wrap .all_check_header_footer .button.add_to_cart_all_selected.add2c_selected,
body.single-product .wpt-wrap .button.add_to_cart_all_selected.add2c_selected,
body .bs-sticky-atc button.bs-sticky-atc__button.button,
body .bs-cart-toast a.bs-cart-toast__primary.button {
	background: var(--wp--preset--color--tertiary) !important;
	color: var(--wp--preset--color--background) !important;
}

body.single-product .summary form.cart .single_add_to_cart_button.button.alt:hover,
body.single-product .summary form.cart .single_add_to_cart_button.button.alt:focus-visible,
body.single-product .wpt-wrap .button.add_to_cart_all_selected.add2c_selected:hover,
body.single-product .wpt-wrap .button.add_to_cart_all_selected.add2c_selected:focus-visible,
body .bs-sticky-atc button.bs-sticky-atc__button.button:hover,
body .bs-cart-toast a.bs-cart-toast__primary.button:hover,
body .bs-cart-toast a.bs-cart-toast__primary.button:focus-visible {
	border-color: var(--wp--preset--color--foreground) !important;
	background: var(--wp--preset--color--foreground) !important;
	color: var(--wp--preset--color--background) !important;
}

/* WooCommerce's disabled state (variable product without a full choice). */
body.single-product .summary form.cart .single_add_to_cart_button.button.alt.disabled {
	opacity: 0.45;
}

/* Secondary: outline, same size and shape. */
body.single-product .summary .bs-select-options a.bs-select-options__button.button {
	background: transparent !important;
	color: var(--wp--preset--color--tertiary) !important;
}

body.single-product .summary .bs-select-options a.bs-select-options__button.button:hover,
body.single-product .summary .bs-select-options a.bs-select-options__button.button:focus-visible {
	background: var(--wp--preset--color--tertiary) !important;
	color: var(--wp--preset--color--background) !important;
}

/* Main add-to-cart: the biggest button on the page. */
body.single-product .summary form.cart .single_add_to_cart_button.button.alt {
	min-width: 260px;
	min-height: 58px;
	font-size: 1.1rem !important;
}

body.single-product .summary .bs-select-options a.bs-select-options__button.button {
	min-width: 260px;
}

/* Quantity + button on one line, vertically centred. */
body.single-product .summary form.cart:not(.variations_form),
body.single-product .summary form.cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

body.single-product .summary form.cart .quantity {
	margin: 0 !important;
}

/* Table bulk button: keep it compact enough to sit beside "Alles selecteren". */
body.single-product .wpt-wrap .button.add_to_cart_all_selected.add2c_selected {
	min-height: 48px;
	padding: 0.7em 1.6em !important;
	font-size: 0.9rem !important;
}

/* Sticky bar + toast: smaller variants of the primary button. */
body .bs-sticky-atc button.bs-sticky-atc__button.button {
	min-height: 46px;
	padding: 0.7em 1.3em !important;
	font-size: 0.85rem !important;
}

body .bs-cart-toast a.bs-cart-toast__primary.button {
	min-height: 46px;
	padding: 0.7em 1.4em !important;
	font-size: 0.9rem !important;
}

@media screen and (max-width: 500px) {
	body.single-product .summary form.cart:not(.variations_form) .single_add_to_cart_button.button.alt {
		flex: 1;
		min-width: 0;
		padding: 0.85em 1em !important;
		font-size: 1rem !important;
		white-space: nowrap;
	}

	body.single-product .summary .bs-select-options a.bs-select-options__button.button {
		width: 100%;
		min-width: 0;
	}
}
