.bcpc-public-composition {
	margin-top: 24px;
}

.bcpc-public-composition[hidden] {
	display: none;
}

.bcpc-public-composition__title {
	/* Match the theme's Tags heading, including its mobile size. */
	font-size: 20px;
	font-weight: 400;
	line-height: 1.15;
	margin: 0 0 14px;
}

.bcpc-public-composition__list {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 6px 24px;
	/* Match ordinary paragraphs in the full product description. */
	font-size: 15px;
	font-weight: 300;
	line-height: 25px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bcpc-public-composition__item {
	min-width: 0;
	padding: 0;
	overflow-wrap: anywhere;
}

.bcpc-public-composition__quantity::before {
	content: ' — ';
}

.bcpc-public-composition__quantity {
	font-variant-numeric: tabular-nums;
	font-weight: inherit;
	white-space: nowrap;
}

@media only screen and (max-width: 767px) {
	.bcpc-public-composition {
		margin: 20px 20px 0;
	}

	.bcpc-public-composition__title {
		font-size: 16px;
	}

	.bcpc-public-composition__list {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		column-gap: 16px;
		font-size: 13px;
		line-height: 23px;
	}
}

/* One reading column for composition, linked tags and description.
 * Enabled only on products with an existing composition; product data stays intact.
 */
.base .bcpc-details-refined > .bcpc-public-composition,
.base .bcpc-details-refined > .p-product__tags,
.base .bcpc-details-refined > .p-product__description-and-comments {
	box-sizing: border-box;
	width: calc( 100% - 56px );
	max-width: 960px;
	margin: 28px auto 0;
	padding: 0;
}

.base .bcpc-details-refined .p-product__tags-title {
	display: none;
}

.base .bcpc-details-refined .p-product__tags-list {
	gap: 8px;
	margin: 0;
}

.base .bcpc-details-refined .p-product__tag-flag {
	background: none;
	margin: 0;
	padding: 0;
}

.base .bcpc-details-refined .p-product__tag {
	display: block;
	height: auto;
	min-height: 0;
	padding: 5px 10px;
	border-radius: 5px;
	background: #f3f4f2;
	color: #262626;
	font-family: 'Fira Sans', sans-serif;
	font-size: 13px;
	font-weight: 400;
	line-height: 20px;
	text-transform: none;
	white-space: normal;
}

.base .bcpc-details-refined .p-product__tag:hover {
	background: #e8ede8;
}

.base .bcpc-details-refined .p-product__description {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	border: 0;
	border-top: 1px solid #e7e9e5;
	margin: 0;
	padding: 28px 0 0;
	font-size: 15px;
	line-height: 25px;
}

.base .bcpc-details-refined .p-product__description .c-content > h1:first-child,
.base .bcpc-details-refined .p-product__description .c-content > h2:first-child {
	font-family: 'Fira Sans', sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
	margin: 0 0 16px;
}

.base .bcpc-details-refined .p-product__description .c-content > ol {
	margin: 0;
	padding-left: 20px;
}

.base .bcpc-details-refined .p-product__description .c-content > ol > li {
	margin: 0 0 10px;
	padding-left: 3px;
}

.base .bcpc-details-refined .p-product__description .c-content > ol > li:last-child {
	margin-bottom: 0;
}

.base .bcpc-details-refined .p-product__description .c-content > ol > li > p {
	margin: 0;
}

@media only screen and (max-width: 767px) {
	.base .bcpc-details-refined > .bcpc-public-composition,
	.base .bcpc-details-refined > .p-product__tags,
	.base .bcpc-details-refined > .p-product__description-and-comments {
		width: calc( 100% - 40px );
		margin-top: 24px;
	}

	.base .bcpc-details-refined .p-product__description {
		padding-top: 24px;
		font-size: 13px;
		line-height: 23px;
	}

	.base .bcpc-details-refined .p-product__description .c-content > h1:first-child,
	.base .bcpc-details-refined .p-product__description .c-content > h2:first-child {
		font-size: 16px;
	}

	.base .bcpc-details-refined .p-product__tag {
		font-size: 12px;
		line-height: 18px;
		padding: 5px 9px;
	}
}

/* Shared vertical rhythm; keep typography, data and horizontal alignment. */
.base .bcpc-details-refined {
	--bcpc-block-gap: 32px;
	--bcpc-section-gap: 40px;
	--bcpc-heading-gap: 20px;
}

.base .bcpc-details-refined .p-product__info-column {
	row-gap: var( --bcpc-block-gap );
}

.base .bcpc-details-refined .p-product__info-column > .p-product__title,
.base .bcpc-details-refined .p-product__info-column > .p-product__preview,
.base .bcpc-details-refined .p-product__info-column > .p-product__variants,
.base .bcpc-details-refined .p-product__info-column > .p-product__price,
.base .bcpc-details-refined .p-product__info-column > .p-product__buy-row {
	margin-top: 0;
	margin-bottom: 0;
}

.base .bcpc-details-refined .p-product__preview {
	border-top: 0;
	border-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.base .bcpc-details-refined .p-product__preview > p {
	margin: 0 0 16px;
}

.base .bcpc-details-refined .p-product__preview > :last-child {
	margin-bottom: 0;
}

.base .bcpc-details-refined .p-product__variants {
	display: flex;
	flex-direction: column;
	row-gap: 16px;
}

.base .bcpc-details-refined .p-product__size-row,
.base .bcpc-details-refined .p-product__color-row {
	padding-top: 0;
	padding-bottom: 0;
}

.base .bcpc-details-refined > .bcpc-public-composition,
.base .bcpc-details-refined > .p-product__tags,
.base .bcpc-details-refined > .p-product__description-and-comments,
.base .bcpc-details-refined > .p-product__suitable-products {
	margin-top: var( --bcpc-section-gap );
}

.base .bcpc-details-refined .bcpc-public-composition__title,
.base .bcpc-details-refined .p-product__description .c-content > h1:first-child,
.base .bcpc-details-refined .p-product__description .c-content > h2:first-child {
	margin-bottom: var( --bcpc-heading-gap );
}

.base .bcpc-details-refined .bcpc-public-composition__list {
	row-gap: 10px;
}

.base .bcpc-details-refined .p-product__tags-list {
	gap: 10px;
}

.base .bcpc-details-refined .p-product__description {
	padding-top: var( --bcpc-block-gap );
}

.base .bcpc-details-refined .p-product__description .c-content > ol > li:not(:last-child) {
	margin-bottom: 14px;
}

.base .bcpc-details-refined .p-product__suitable-products-title {
	margin-bottom: var( --bcpc-block-gap );
}

@media only screen and (max-width: 767px) {
	.base .bcpc-details-refined {
		--bcpc-block-gap: 24px;
		--bcpc-section-gap: 32px;
		--bcpc-heading-gap: 16px;
	}
}

/* Align the gallery/purchase section and related items with the reading column. */
.base .bcpc-details-refined {
	padding-bottom: 64px;
}

.base .bcpc-details-refined > .p-product__info,
.base .bcpc-details-refined > .p-product__suitable-products {
	box-sizing: border-box;
	width: calc( 100% - 56px );
	max-width: 960px;
	margin-left: auto;
	margin-right: auto;
	padding: 0;
}

.base .bcpc-details-refined > .p-product__info {
	border: 0;
}

@media only screen and (min-width: 768px) {
	.base .bcpc-details-refined > .p-product__info {
		display: grid;
		grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr );
		gap: 40px;
		align-items: start;
	}

	.base .bcpc-details-refined .p-product__images-column {
		flex: none;
		width: 100%;
		max-width: none;
		min-width: 0;
		gap: 12px;
		align-items: flex-start;
	}

	.base .bcpc-details-refined .p-product__gallery {
		flex: 0 0 72px;
		width: 72px;
		height: auto;
		margin: 0;
	}

	.base .bcpc-details-refined .p-product__gallery--hidden {
		display: none;
	}

	.base .bcpc-details-refined .p-product__gallery-item,
	.base .bcpc-details-refined .p-product__gallery-item-image {
		width: 72px;
		height: 96px;
	}

	.base .bcpc-details-refined .p-product__image-container {
		flex: 1 1 0%;
		min-width: 0;
		width: 100%;
		max-width: none;
		height: auto;
		aspect-ratio: 3 / 4;
	}

	.base .bcpc-details-refined .p-product__image {
		width: 100%;
		max-width: none;
		height: auto;
		aspect-ratio: 3 / 4;
		object-fit: cover;
	}

	.base .bcpc-details-refined .p-product__info-column {
		width: 100%;
		min-width: 0;
	}

	.base .bcpc-details-refined .p-product__title,
	.base .bcpc-details-refined .p-product__price,
	.base .bcpc-details-refined .p-product__buy-row {
		margin-left: 0;
		margin-right: 0;
	}

	.base .bcpc-details-refined .p-product__preview,
	.base .bcpc-details-refined .p-product__size-row,
	.base .bcpc-details-refined .p-product__color-row {
		padding-left: 0;
		padding-right: 0;
	}

	.base .bcpc-details-refined .p-product__add-button {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		margin-left: 24px;
	}
}

@media only screen and (max-width: 767px) {
	.base .bcpc-details-refined {
		padding-bottom: 48px;
	}

	.base .bcpc-details-refined > .p-product__info,
	.base .bcpc-details-refined > .p-product__suitable-products {
		width: calc( 100% - 40px );
	}
}
