/**
 * Product extras — description tabs + benefits, review histogram, in-salon CTA.
 * Structure + theme tokens (TOKENS.md); system-colour fallbacks so the block
 * reads under a theme that never heard of Quartier's tokens.
 */

.wp-block-quartier-product-extras {
	margin-top: var( --wp--preset--spacing--60, 4rem );
}

/* ------------------------------------------------- Tabs + benefits */

.anps-pdp-extras__cols {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 56px;
	align-items: start;
}

.anps-tabs__radio {
	position: absolute;
	/* 1px, not auto: out of flow it would inherit the theme's
	   `input { width: 100% }` and overflow the viewport. */
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.anps-tabs__list {
	display: flex;
	gap: 28px;
	border-bottom: 1px solid color-mix( in srgb, var( --wp--preset--color--border, ButtonBorder ) 55%, transparent );
}

.anps-tabs__tab {
	padding: 12px 4px;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-weight: 600;
	font-size: 1rem;
	color: var( --wp--preset--color--muted, GrayText );
	cursor: pointer;
}

.anps-tabs__panel {
	display: none;
	margin-top: 22px;
	max-width: 640px;
}

.anps-tabs__panel p {
	font-size: 1rem;
	line-height: 1.75;
	color: var( --wp--preset--color--muted, GrayText );
	margin: 0;
}

/* CSS-only tab switching: the nth radio checked shows the nth tab + panel. */
.anps-tabs__radio:nth-of-type( 1 ):checked ~ .anps-tabs__list .anps-tabs__tab:nth-of-type( 1 ),
.anps-tabs__radio:nth-of-type( 2 ):checked ~ .anps-tabs__list .anps-tabs__tab:nth-of-type( 2 ),
.anps-tabs__radio:nth-of-type( 3 ):checked ~ .anps-tabs__list .anps-tabs__tab:nth-of-type( 3 ) {
	color: var( --wp--preset--color--contrast, CanvasText );
	border-bottom-color: var( --wp--preset--color--cta, Highlight );
}

.anps-tabs__radio:nth-of-type( 1 ):checked ~ .anps-tabs__panels .anps-tabs__panel:nth-of-type( 1 ),
.anps-tabs__radio:nth-of-type( 2 ):checked ~ .anps-tabs__panels .anps-tabs__panel:nth-of-type( 2 ),
.anps-tabs__radio:nth-of-type( 3 ):checked ~ .anps-tabs__panels .anps-tabs__panel:nth-of-type( 3 ) {
	display: block;
}

.anps-tabs__tab:focus-visible {
	outline: 2px solid var( --wp--preset--color--cta, Highlight );
	outline-offset: 2px;
}

/* Benefits card */
.anps-benefits {
	background: var( --wp--preset--color--surface, Canvas );
	border-radius: 20px;
	padding: 26px;
}

.anps-benefits__title {
	font-family: var( --wp--preset--font-family--heading, Georgia, serif );
	font-weight: 500;
	font-size: 1.375rem; /* 22px */
	margin: 0;
}

.anps-benefits__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 16px;
}

.anps-benefits__row {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var( --wp--preset--color--contrast, CanvasText );
}

.anps-benefits__check {
	color: var( --wp--preset--color--cta, Highlight );
	flex: 0 0 auto;
	margin-top: 1px;
	display: flex;
}

/* ------------------------------------------------- Reviews */

.anps-reviews {
	margin-top: 64px;
	padding-top: 44px;
	border-top: 1px solid color-mix( in srgb, var( --wp--preset--color--border, ButtonBorder ) 55%, transparent );
}

.anps-reviews__grid {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 56px;
	align-items: start;
}

.anps-reviews__title {
	font-family: var( --wp--preset--font-family--heading, Georgia, serif );
	font-weight: 500;
	font-size: 2.125rem; /* 34px */
	line-height: 1.12;
	letter-spacing: -0.3px;
	margin: 0;
}

.anps-reviews__score {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
}

.anps-reviews__avg {
	font-family: var( --wp--preset--font-family--heading, Georgia, serif );
	font-weight: 600;
	font-size: 2.875rem; /* 46px */
	line-height: 1;
}

.anps-reviews__score .anps-stars-inline {
	color: var( --wp--preset--color--accent, GoldText );
	font-size: 17px;
	letter-spacing: 3px;
}

.anps-reviews__based {
	display: block;
	font-size: 0.84375rem;
	color: var( --wp--preset--color--muted, GrayText );
	margin-top: 4px;
}

.anps-reviews__bars {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-top: 20px;
}

.anps-reviews__bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.anps-reviews__bar-star {
	width: 26px;
	font-size: 0.78125rem;
	color: var( --wp--preset--color--muted, GrayText );
}

.anps-reviews__bar {
	flex: 1;
	height: 7px;
	border-radius: 999px;
	background: color-mix( in srgb, var( --wp--preset--color--border, ButtonBorder ) 55%, transparent );
	overflow: hidden;
}

.anps-reviews__bar-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var( --wp--preset--color--accent, GoldText );
}

.anps-reviews__bar-pct {
	width: 34px;
	text-align: right;
	font-size: 0.75rem;
	color: var( --wp--preset--color--muted, GrayText );
}

.anps-reviews__cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.anps-review-item {
	background: var( --wp--preset--color--paper, Canvas );
	border: 1px solid color-mix( in srgb, var( --wp--preset--color--border, ButtonBorder ) 45%, transparent );
	border-radius: 18px;
	padding: 20px 22px;
}

.anps-review-item__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.anps-review-item__head .anps-stars-inline {
	color: var( --wp--preset--color--accent, GoldText );
	letter-spacing: 2px;
}

.anps-review-item__date {
	font-size: 0.8125rem;
	color: var( --wp--preset--color--muted, GrayText );
}

.anps-review-item__body {
	margin: 12px 0 0;
	font-size: 0.96875rem;
	line-height: 1.55;
	color: var( --wp--preset--color--contrast, CanvasText );
}

.anps-review-item__by {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	font-size: 0.84375rem;
	color: var( --wp--preset--color--contrast, CanvasText );
}

.anps-review-item__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var( --wp--preset--color--muted, GrayText );
	font-weight: 400;
}

.anps-review-item__verified svg {
	color: var( --wp--preset--color--secondary, CanvasText );
}

@media ( max-width: 781px ) {
	.anps-pdp-extras__cols,
	.anps-reviews__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}
