/**
 * Single product page — minimal / clinical redesign.
 *
 * Loads only on single product pages, after product-details.css. Pairs with
 * inc/single-product.php (layout hooks, accordions, sticky bar). Monochrome
 * with green reserved for calls to action; generous whitespace; hairline rules.
 */

/* =========================================================================
 * Layout — two-column sticky on desktop, stacked below.
 * Everything is full-width by default; only the gallery + summary occupy the
 * two top columns. The accordions, upsells and related blocks span full width.
 * ===================================================================== */
.single-product div.product {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-top: 1.5rem;
}

.single-product div.product > * {
	min-width: 0;
}

@media ( min-width: 900px ) {
	.single-product div.product {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: 3.5rem;
		align-items: start;
	}
	.single-product div.product > .woocommerce-product-gallery {
		grid-column: 1;
		grid-row: 1;
		position: sticky;
		top: 1.5rem;
	}
	.single-product div.product > .summary {
		grid-column: 2;
		grid-row: 1;
	}
	/* Any other direct child (accordions, upsells, related, .clear) spans full width. */
	.single-product div.product > .bf-sp-accordions,
	.single-product div.product > .upsells,
	.single-product div.product > .related {
		grid-column: 1 / -1;
	}
}

/* =========================================================================
 * Gallery
 * ===================================================================== */
.single-product .woocommerce-product-gallery {
	margin: 0;
	position: relative;
}

.single-product .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .woocommerce-product-gallery__image:first-child {
	border: 1px solid var(--bf-hairline);
	border-radius: calc( var(--bf-radius) + 4px );
	overflow: hidden;
	background: var(--bf-paper);
}

.single-product .woocommerce-product-gallery__image img {
	border-radius: calc( var(--bf-radius) + 4px );
	display: block;
}

.single-product ol.flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}

.single-product ol.flex-control-thumbs li {
	width: 64px;
	margin: 0;
}

.single-product ol.flex-control-thumbs img {
	border: 1px solid var(--bf-hairline);
	border-radius: 6px;
	opacity: 0.55;
	cursor: pointer;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.single-product ol.flex-control-thumbs img.flex-active,
.single-product ol.flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--bf-graphite);
}

.single-product .woocommerce-product-gallery__trigger {
	top: 1rem;
	right: 1rem;
	background: #fff;
	border: 1px solid var(--bf-hairline);
	border-radius: 999px;
}

.single-product span.onsale {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 2;
	margin: 0;
	min-height: 0;
	min-width: 0;
	padding: 0.3rem 0.7rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--bf-graphite);
	color: #fff;
	border-radius: 999px;
	line-height: 1;
}

/* =========================================================================
 * Summary column
 * ===================================================================== */
.single-product .summary.entry-summary {
	margin: 0;
}

.bf-sp-brand {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bf-stone-deep);
}

.bf-sp-brand a {
	color: inherit;
	text-decoration: none;
}

.bf-sp-brand a:hover {
	color: var(--bf-green);
}

.single-product .product_title.entry-title {
	font-size: clamp( 1.6rem, 3vw, 2.2rem );
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 0.85rem;
	color: var(--bf-graphite);
}

.single-product .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1rem;
	font-size: 0.88rem;
}

.single-product .woocommerce-product-rating .star-rating {
	margin: 0;
	color: var(--bf-green);
}

.single-product .woocommerce-product-rating .woocommerce-review-link {
	color: var(--bf-stone-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.single-product .summary .price {
	margin: 0 0 1.25rem;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--bf-graphite);
	line-height: 1.2;
}

.single-product .summary .price del {
	margin-right: 0.5rem;
	font-size: 1.1rem;
	font-weight: 400;
	color: var(--bf-stone);
	opacity: 1;
}

.single-product .summary .price ins {
	text-decoration: none;
	color: var(--bf-green-deep);
}

.single-product .woocommerce-product-details__short-description {
	margin: 0 0 1.25rem;
	color: var(--bf-stone-deep);
	line-height: 1.65;
}

.single-product .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* ---- Buy area: variations, quantity, add to cart ---- */
.single-product form.cart {
	margin: 1.5rem 0 1rem;
}

.single-product form.cart:not(.variations_form),
.single-product .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
}

.single-product table.variations {
	width: 100%;
	margin: 0 0 1rem;
	border: 0;
}

.single-product table.variations th,
.single-product table.variations td {
	padding: 0.35rem 0;
	vertical-align: middle;
}

.single-product table.variations th {
	width: 30%;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bf-stone-deep);
}

.single-product table.variations select {
	width: 100%;
	min-height: 3rem;
	padding: 0 0.75rem;
	border: 1px solid var(--bf-hairline);
	border-radius: var(--bf-radius);
	background: #fff;
	font-size: 0.95rem;
}

.single-product .woocommerce-variation-price {
	margin: 0.5rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--bf-graphite);
}

.single-product .reset_variations {
	font-size: 0.82rem;
	color: var(--bf-stone-deep);
}

.single-product form.cart .quantity {
	display: flex;
}

.single-product form.cart .quantity .qty {
	width: 4.5rem;
	height: 3.25rem;
	padding: 0 0.25rem;
	text-align: center;
	border: 1px solid var(--bf-hairline);
	border-radius: var(--bf-radius);
	font-size: 1rem;
	-moz-appearance: textfield;
}

.single-product .single_add_to_cart_button.button {
	flex: 1 1 12rem;
	min-height: 3.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.5rem;
	border: 0;
	border-radius: var(--bf-radius);
	background: var(--bf-green);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease;
}

.single-product .single_add_to_cart_button.button:hover {
	background: var(--bf-green-hover);
}

.single-product .single_add_to_cart_button.button:active {
	transform: translateY(1px);
}

.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button:disabled {
	background: var(--bf-hairline);
	color: var(--bf-stone);
	cursor: not-allowed;
}

/* ---- Reassurance row ---- */
.bf-sp-reassure {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 1.25rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	color: var(--bf-stone-deep);
}

.bf-sp-reassure li {
	position: relative;
	padding-left: 1.1rem;
}

.bf-sp-reassure li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 0.55rem;
	height: 0.3rem;
	border-left: 2px solid var(--bf-green);
	border-bottom: 2px solid var(--bf-green);
	transform: rotate(-45deg);
}

/* ---- Product meta (SKU / category / tags) ---- */
.single-product .product_meta {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--bf-hairline);
	font-size: 0.82rem;
	color: var(--bf-stone-deep);
}

.single-product .product_meta > span {
	display: block;
	margin-bottom: 0.35rem;
}

.single-product .product_meta a {
	color: var(--bf-stone-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.single-product .product_meta a:hover {
	color: var(--bf-green);
}

/* =========================================================================
 * Minimal pill override (product-details.css ships mint-filled pills).
 * ===================================================================== */
.single-product .bf-pd-pill {
	background: transparent;
	border-color: var(--bf-hairline);
	color: var(--bf-stone-deep);
}

.single-product .bf-pd-pills--free .bf-pd-pill {
	background: transparent;
}

/* =========================================================================
 * Information accordion
 * ===================================================================== */
.bf-sp-accordions {
	margin: 3rem 0 0;
	max-width: 860px;
}

.bf-acc {
	border-top: 1px solid var(--bf-hairline);
}

.bf-sp-accordions .bf-acc:last-child {
	border-bottom: 1px solid var(--bf-hairline);
}

.bf-acc__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.2rem 0.25rem 1.2rem 0;
	cursor: pointer;
	list-style: none;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--bf-graphite);
	transition: color 0.15s ease;
}

.bf-acc__summary::-webkit-details-marker {
	display: none;
}

.bf-acc__summary:hover {
	color: var(--bf-green-deep);
}

.bf-acc__icon {
	flex: none;
	color: var(--bf-stone-deep);
	transition: transform 0.2s ease;
}

.bf-acc[open] .bf-acc__icon {
	transform: rotate(180deg);
}

.bf-acc__body {
	padding: 0 0.25rem 1.6rem;
	max-width: 68ch;
	color: var(--bf-stone-deep);
	line-height: 1.7;
	animation: bf-acc-in 0.25s ease;
}

@keyframes bf-acc-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}

.bf-acc__body :where(p, ul, ol) {
	margin: 0 0 0.85rem;
}

.bf-acc__body :where(p, ul, ol):last-child {
	margin-bottom: 0;
}

.bf-acc__body h3 {
	color: var(--bf-graphite);
}

/* Additional information (attributes) table */
.bf-acc__body table.woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.bf-acc__body table.woocommerce-product-attributes th,
.bf-acc__body table.woocommerce-product-attributes td {
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--bf-hairline);
	text-align: left;
}

.bf-acc__body table.woocommerce-product-attributes th {
	width: 32%;
	color: var(--bf-graphite);
	background: var(--bf-paper);
}

/* Reviews inside the accordion */
.bf-acc--reviews .bf-acc__body {
	max-width: none;
}

.bf-acc--reviews #reviews #comments ol.commentlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bf-acc--reviews .commentlist li.review {
	margin: 0 0 1.5rem;
	padding: 0 0 1.5rem;
	border-bottom: 1px solid var(--bf-hairline);
}

.bf-acc--reviews .comment-form-rating .stars a {
	color: var(--bf-green);
}

.bf-acc--reviews .comment-form input[type="text"],
.bf-acc--reviews .comment-form input[type="email"],
.bf-acc--reviews .comment-form textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--bf-hairline);
	border-radius: var(--bf-radius);
	font: inherit;
}

.bf-acc--reviews .comment-form .submit {
	min-height: 2.85rem;
	padding: 0 1.4rem;
	border: 0;
	border-radius: var(--bf-radius);
	background: var(--bf-green);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.bf-acc--reviews .comment-form .submit:hover {
	background: var(--bf-green-hover);
}

/* =========================================================================
 * Upsells & related products
 * ===================================================================== */
.single-product .upsells,
.single-product .related {
	margin-top: 4rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--bf-hairline);
}

.single-product .upsells > h2,
.single-product .related > h2 {
	margin: 0 0 1.5rem;
	font-size: clamp( 1.3rem, 2.2vw, 1.6rem );
	color: var(--bf-graphite);
}

.single-product .upsells ul.products,
.single-product .related ul.products {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media ( min-width: 700px ) {
	.single-product .upsells ul.products,
	.single-product .related ul.products {
		grid-template-columns: repeat( 4, 1fr );
		gap: 1.25rem;
	}
}

.single-product .upsells ul.products::before,
.single-product .related ul.products::before {
	content: none;
}

/* =========================================================================
 * Sticky add-to-cart bar
 * ===================================================================== */
.bf-buy-anchor {
	display: block;
	position: relative;
	top: -100px;
	width: 0;
	height: 0;
}

.bf-sticky-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	background: #fff;
	border-top: 1px solid var(--bf-hairline);
	box-shadow: 0 -2px 18px rgba( 20, 20, 20, 0.07 );
	transform: translateY( 110% );
	transition: transform 0.28s cubic-bezier( 0.4, 0, 0.2, 1 );
}

.bf-sticky-bar.is-visible {
	transform: none;
}

.bf-sticky-bar__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 1rem;
}

.bf-sticky-bar__info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.bf-sticky-bar__info img {
	width: 44px;
	height: 44px;
	flex: none;
	object-fit: cover;
	border: 1px solid var(--bf-hairline);
	border-radius: 6px;
}

.bf-sticky-bar__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.bf-sticky-bar__name {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--bf-graphite);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 46vw;
}

.bf-sticky-bar__price {
	font-size: 0.85rem;
	color: var(--bf-stone-deep);
}

.bf-sticky-bar__price del {
	margin-right: 0.3rem;
	opacity: 0.6;
}

.bf-sticky-bar__price ins {
	text-decoration: none;
}

.bf-sticky-bar__btn.button {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1.5rem;
	border: 0;
	border-radius: var(--bf-radius);
	background: var(--bf-green);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.bf-sticky-bar__btn.button:hover {
	background: var(--bf-green-hover);
}

@media ( max-width: 560px ) {
	.bf-sticky-bar__info img {
		display: none;
	}
	.bf-sticky-bar__name {
		max-width: 52vw;
	}
	.bf-sticky-bar__btn.button {
		padding: 0.75rem 1.1rem;
	}
}

/* Keep the sticky bar from covering the last content on mobile. */
@media ( max-width: 899px ) {
	.single-product.bf-has-sticky main {
		padding-bottom: 5rem;
	}
}
