/*
 * Product page (templates/single-product.html): the site's service page. A white card with the name,
 * the gold price, fact rows and the buy button sticks on the left; photo, description and the folding
 * sections (INCI, how to use, safety) on the right.
 */
.sb-product { padding: 32px var(--sb-gutter) 96px; }
.sb-product__breadcrumbs { margin-bottom: 24px; }
/* Desktop: the card on the left (sticky), gallery and details on the right. Phones: gallery, card, details. */
.sb-product__layout {
	display: grid;
	grid-template-columns: 400px minmax(0, 1fr);
	grid-template-areas: "aside gallery" "aside details";
	gap: 40px 48px;
	align-items: start;
}
.sb-product__layout > * { margin: 0 !important; }
.sb-product__gallery { grid-area: gallery; }
.sb-product__aside { grid-area: aside; position: sticky; top: calc(var(--layout-sticky-nav-offset, 160px) + 24px); }
.sb-product__details { grid-area: details; }

.sb-product-card {
	padding: 28px;
	border: 1px solid var(--sem-color-border-default);
	border-radius: 12px;
	background: var(--sem-color-surface-default);
	box-shadow: var(--sem-elevation-card-md, 0 8px 24px rgba(10, 10, 10, 0.06));
}
.sb-product-card h1.sb-product-card__title { margin: 0 0 20px !important; font-size: 32px !important; line-height: 1.15 !important; text-wrap: balance; }

.sb-facts { margin: 0 0 24px; }
.sb-facts__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--sem-color-border-default);
}
.sb-facts__row:last-child { border-bottom: 1px solid var(--sem-color-border-default); }
.sb-facts dt { color: var(--sem-color-text-muted); }
.sb-facts dd { margin: 0; color: var(--sem-color-text-strong); font-family: var(--font-heading); text-align: right; }
.sb-facts dd a { color: inherit; text-decoration: none; }
.sb-facts dd a:hover { color: var(--sem-color-text-brand); }
.sb-facts__price { display: block; color: var(--sem-color-text-brand); font-size: 24px; }
.sb-facts__price del { color: var(--sem-color-text-muted); font-size: 16px; }
.sb-facts__price ins { text-decoration: none; }
.sb-facts__price .sb-unit-price { display: none; }
.sb-facts__price .wc-price-history { display: block; margin-top: 4px; color: var(--sem-color-text-muted); font-family: var(--font-body); font-size: 13px; text-align: right; }
.sb-facts__price .wc-price-history .prior-price-value { display: inline; font-size: inherit !important; }

.sb-product-card__buy form.cart { display: flex; gap: 8px; margin: 0; }
.sb-product-card__buy .quantity input.qty { width: 64px; height: 48px; }
.sb-product-card__buy .single_add_to_cart_button { flex: 1; min-height: 48px; }
.sb-product-card__buy .stock { margin: 0 0 12px; color: var(--sem-color-text-muted); font-size: 14px; }
.sb-product-card__note { margin: 16px 0 0; color: var(--sem-color-text-muted); font-size: 14px; }
.sb-product-card__note + .sb-product-card__note { margin-top: 8px; }
.sb-product-card__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sb-product-card__note--sealed { color: var(--sem-color-text-default); }

.sb-product__gallery .woocommerce-product-gallery { margin: 0 !important; }
.sb-product__gallery .woocommerce-product-gallery__wrapper,
.sb-product__gallery .woocommerce-product-gallery__image { overflow: hidden; border-radius: 12px; background: var(--sem-color-surface-soft); }
.sb-product__gallery .woocommerce-product-gallery__image img { mix-blend-mode: multiply; }
/* Zoom on hover (desktop): the zoomed copy replaces the photo instead of showing through it. */
.sb-product__gallery .woocommerce-product-gallery__image:hover > a > img { opacity: 0; }
.sb-product__gallery .zoomImg { mix-blend-mode: multiply; background: transparent; }
.sb-product__gallery .woocommerce-product-gallery__trigger { display: none; }
.sb-product__gallery .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0 !important; padding: 0; }
.sb-product__gallery .flex-control-thumbs li { width: auto !important; margin: 0 !important; overflow: hidden; border-radius: 8px; background: var(--sem-color-surface-soft); }
.sb-product__gallery .flex-control-thumbs img { mix-blend-mode: multiply; opacity: 0.55; cursor: pointer; transition: opacity 160ms ease-out; }
.sb-product__gallery .flex-control-thumbs img:hover,
.sb-product__gallery .flex-control-thumbs img.flex-active { opacity: 1; }

.sb-details__description { margin-bottom: 32px; color: var(--sem-color-text-default); font-size: 17px; line-height: 1.65; }
.sb-details__description p { max-width: 68ch; }
.sb-details__description strong { color: var(--sem-color-text-strong); font-weight: 500; }
.sb-details__section { border-top: 1px solid var(--sem-color-border-default); }
.sb-details__section:last-child { border-bottom: 1px solid var(--sem-color-border-default); }
.sb-details__section summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 0;
	color: var(--sem-color-text-strong);
	font-family: var(--font-heading);
	font-size: 20px;
	list-style: none;
	cursor: pointer;
}
.sb-details__section summary::-webkit-details-marker { display: none; }
.sb-details__section summary::after { content: "+"; font-family: var(--font-body); font-size: 24px; font-weight: 300; transition: transform 200ms ease-out; }
.sb-details__section[open] summary::after { transform: rotate(45deg); }
.sb-details__body { padding: 0 0 24px; color: var(--sem-color-text-default); }
.sb-details__body p { max-width: 68ch; margin: 0 0 12px; }

.sb-product__related { margin-top: 96px; }

/* Phones and tablets: the price and the buy button stay at the bottom of the screen. */
.sb-buy-bar { display: none; }
@media (max-width: 1023px) {
	.sb-buy-bar {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 35;
		display: flex;
		align-items: center;
		gap: 16px;
		padding: 12px var(--sb-gutter) calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--sem-color-dark-zone-border, rgba(245, 245, 245, 0.14));
		background: var(--sem-color-dark-zone-bg, #0a0a0a);
		color: var(--sem-color-dark-zone-text, #f5f5f5);
	}
	.sb-buy-bar__info { display: grid; min-width: 0; flex: 1; }
	.sb-buy-bar__name { overflow: hidden; color: var(--sem-color-dark-zone-text-default, #dcdcdc); font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
	.sb-buy-bar__price { font-family: var(--font-heading); font-size: 18px; }
	.sb-buy-bar__price del { color: var(--sem-color-dark-zone-text-muted, #9e9e9e); font-size: 14px; }
	.sb-buy-bar__price ins { text-decoration: none; }
	.sb-buy-bar__price .sb-unit-price,
	.sb-buy-bar__price .wc-price-history { display: none; }
	.sb-buy-bar__button {
		flex-shrink: 0;
		min-height: 48px;
		padding: 0 24px;
		border: 0;
		border-radius: var(--radius-md, 4px);
		background: var(--pr-color-white, #fff);
		color: var(--sem-color-text-strong, #171717);
		font-family: var(--font-heading);
		font-size: 16px;
		word-spacing: 0.12em;
		cursor: pointer;
	}
	.sb-buy-bar__button:active { transform: scale(0.97); }
	.sb-buy-bar__button[disabled] { opacity: 0.6; }
}

@media (max-width: 1023px) {
	.sb-product__layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "gallery" "aside" "details"; gap: 24px; }
	.sb-product__aside { position: static; }
	/* Room for the fixed buy bar. */
	.single-product { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
	.sb-product { padding: 20px var(--sb-gutter) 64px; }
	.sb-product-card { padding: 20px; }
	.sb-product-card h1.sb-product-card__title { font-size: 26px !important; }
	.sb-product__related { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
	.sb-details__section summary::after { transition: none; }
}
