/**
 * Single compound page (WEB-2E) — card layout consistent with the COA pages.
 * Full-width soft band, compact two-column hero, everything in white cards
 * with serif section headings. Commerce renderers keep WooCommerce structure;
 * these rules dress them.
 */

.pepselect-compound-page {
	background: var(--pep-color-surface);
	font-family: var(--pep-font-interface);
	padding-block: 40px 72px;
}

.pepselect-compound-page__inner {
	width: min(100%, calc(var(--pep-content-max-width) + (2 * var(--pep-layout-gutter))));
	margin: 0 auto;
	padding-inline: var(--pep-layout-gutter);
}

.pepselect-compound-page__breadcrumb {
	margin-bottom: 20px;
	color: var(--pep-color-slate);
	font-size: 13px;
}

.pepselect-compound-page__breadcrumb a {
	color: var(--pep-color-slate);
	text-decoration: none;
}

.pepselect-compound-page__breadcrumb a:hover {
	color: var(--pep-color-cyan);
}

.pepselect-compound-page__breadcrumb span[aria-hidden] {
	margin: 0 8px;
	color: var(--pep-color-neutral);
}

/* ---- Hero card: gallery + buy area, side by side ---- */
.pepselect-compound-page__top {
	display: grid;
	grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
	gap: 24px;
	align-items: stretch;
}

/* Image card — smaller, contained, its own card. */
.pepselect-compound-page__gallery {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 22px;
	border: 1px solid var(--pep-color-border);
	border-radius: 20px;
	background: linear-gradient(180deg, var(--pep-color-surface), var(--pep-color-cyan-soft));
	box-shadow: 0 10px 28px rgb(29 41 39 / 7%);
}

.pepselect-compound-page__image {
	display: block;
	width: 100%;
	max-width: 380px;
	height: auto;
	margin: 0 auto;
	border-radius: 12px;
	cursor: zoom-in;
}

.pepselect-compound-page__zoom {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--pep-color-border);
	border-radius: 50%;
	background: var(--pep-color-white);
	color: var(--pep-color-navy);
	font-size: 18px;
	cursor: zoom-in;
	transition: border-color 180ms ease;
}

.pepselect-compound-page__zoom:hover {
	border-color: var(--pep-color-cyan);
}

/* Buy card — compound identity + pricing + add to cart, its own card. */
.pepselect-compound-page__summary {
	padding: 32px 34px;
	border: 1px solid var(--pep-color-border);
	border-radius: 20px;
	background: var(--pep-color-white);
	box-shadow: 0 10px 28px rgb(29 41 39 / 7%);
}

/* Native summary elements restyled to the design system. */
.pepselect-compound-page__summary .product_title {
	margin: 0 0 12px;
	color: var(--pep-color-dark-navy);
	font-family: var(--pep-font-editorial);
	font-size: clamp(40px, 4.4vw, 54px);
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.02;
}

.pepselect-compound-page__summary .price {
	display: block;
	margin: 0 0 12px;
	color: var(--pep-color-navy);
	font-family: var(--pep-font-editorial);
	font-size: 26px;
	font-weight: var(--pep-font-weight-bold);
}

.pepselect-compound-page__summary .price del {
	margin-right: 8px;
	color: var(--pep-color-neutral);
	font-weight: 400;
}

.pepselect-compound-page__summary .stock {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: var(--pep-font-weight-semibold);
}

.pepselect-compound-page__summary .stock.in-stock {
	color: var(--pep-color-green);
}

.pepselect-compound-page__summary .stock.out-of-stock {
	color: var(--pep-color-red);
}

.pepselect-compound-page__summary .woocommerce-product-details__short-description {
	margin-bottom: 16px;
	color: var(--pep-color-slate);
	font-size: 15px;
	line-height: 1.6;
}

/* Quantity discount table and add-to-cart keep plugin structure; harmonize. */
.pepselect-compound-page__summary .button,
.pepselect-compound-page__summary button.single_add_to_cart_button,
.pepselect-compound-page__summary .single_add_to_cart_button,
.pepselect-compound-page__summary [name="add-to-cart"],
.pepselect-compound-page__summary .cart button[type="submit"] {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	padding: 14px 28px !important;
	border: 0 !important;
	border-radius: var(--pep-radius-medium) !important;
	background: var(--pep-color-cyan) !important;
	background-image: none !important;
	color: var(--pep-color-white) !important;
	font-family: var(--pep-font-interface) !important;
	font-size: 16px !important;
	font-weight: var(--pep-font-weight-semibold) !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background-color 180ms ease;
}

.pepselect-compound-page__summary .button:hover,
.pepselect-compound-page__summary button.single_add_to_cart_button:hover,
.pepselect-compound-page__summary .single_add_to_cart_button:hover,
.pepselect-compound-page__summary [name="add-to-cart"]:hover,
.pepselect-compound-page__summary .cart button[type="submit"]:hover {
	background: var(--pep-color-navy) !important;
}

.pepselect-compound-page__summary .product_meta {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--pep-color-border);
	color: var(--pep-color-neutral);
	font-size: 12px;
}

.pepselect-compound-page__summary .product_meta a {
	color: var(--pep-color-slate);
}

/* ---- Description card ---- */
.pepselect-compound {
	margin-top: 28px;
	padding: 30px 34px;
	border: 1px solid var(--pep-color-border);
	border-radius: 20px;
	background: var(--pep-color-white);
	box-shadow: 0 10px 28px rgb(29 41 39 / 7%);
}

.pepselect-compound__eyebrow {
	margin: 0 0 10px;
	color: var(--pep-color-cyan);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.pepselect-compound__description {
	margin: 0 0 22px;
	color: var(--pep-color-slate);
	font-size: 16px;
	line-height: 1.7;
}

.pepselect-compound__description sup {
	color: var(--pep-color-cyan);
	font-size: 11px;
	font-weight: 600;
	padding-left: 1px;
}

.pepselect-compound__context {
	margin-bottom: 22px;
}

.pepselect-compound__context h3 {
	margin: 0 0 12px;
	color: var(--pep-color-navy);
	font-family: var(--pep-font-interface);
	font-size: 14px;
	font-weight: var(--pep-font-weight-semibold);
}

.pepselect-compound__context ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 40px;
	margin: 0;
	padding: 0 0 0 18px;
	color: var(--pep-color-slate);
	font-size: 15px;
	line-height: 1.6;
}

@media (max-width: 767px) {
	.pepselect-compound__context ul {
		grid-template-columns: 1fr;
	}
}

.pepselect-compound__context sup {
	color: var(--pep-color-cyan);
	font-size: 10px;
	font-weight: 600;
}

.pepselect-compound__sources-toggle,
.pepselect-compound__sources-toggle:hover,
.pepselect-compound__sources-toggle:focus,
.pepselect-compound__sources-toggle:active {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--pep-color-border);
	border-radius: var(--pep-radius-medium);
	background: var(--pep-color-surface) !important;
	background-image: none !important;
	color: var(--pep-color-navy) !important;
	font-family: var(--pep-font-interface);
	font-size: 13px;
	font-weight: var(--pep-font-weight-semibold);
	cursor: pointer;
	box-shadow: none;
}

.pepselect-compound__sources-toggle:hover {
	border-color: var(--pep-color-cyan) !important;
}

.pepselect-compound__chevron {
	transition: transform 180ms ease;
}

.pepselect-compound__sources-toggle.is-open .pepselect-compound__chevron {
	transform: rotate(180deg);
}

.pepselect-compound__sources {
	margin: 10px 0 0;
	padding: 10px 14px 4px;
}

.pepselect-compound__sources[hidden] {
	display: none;
}

.pepselect-compound__cas {
	margin: 0 0 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--pep-color-border);
	color: var(--pep-color-slate);
	font-size: 12px;
}

.pepselect-compound__cas span {
	margin-left: 6px;
	color: var(--pep-color-navy);
	font-family: var(--pep-font-technical);
}

.pepselect-compound__sources ol {
	margin: 0;
	padding-left: 18px;
	color: var(--pep-color-neutral);
	font-size: 12px;
	line-height: 1.7;
}

.pepselect-compound__intended {
	margin-top: 22px;
	padding: 14px 16px;
	border-radius: var(--pep-radius-medium);
	background: var(--pep-color-cyan-soft);
}

.pepselect-compound__intended-label {
	margin: 0 0 4px;
	color: var(--pep-color-navy);
	font-size: 13px;
	font-weight: var(--pep-font-weight-semibold);
}

.pepselect-compound__intended p:last-child {
	margin: 0;
	color: var(--pep-color-navy);
	font-size: 13px;
	line-height: 1.55;
}

.pepselect-compound__disclaimer {
	margin: 14px 0 0;
	color: var(--pep-color-neutral);
	font-size: 11px;
	line-height: 1.5;
}

/* ---- Section headings (COA-consistent: eyebrow + serif h2) ---- */
.pepselect-compound-page__section-heading {
	margin: 40px 0 18px;
}

.pepselect-compound-page__eyebrow {
	margin: 0 0 7px;
	color: var(--pep-color-cyan);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.pepselect-compound-page__section-heading h2 {
	margin: 0;
	color: var(--pep-color-navy);
	font-family: var(--pep-font-editorial);
	font-size: clamp(28px, 3.4vw, 38px);
	font-weight: var(--pep-font-weight-bold);
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.pepselect-compound-page__section-lead {
	margin: 10px 0 0;
	color: var(--pep-color-slate);
	font-size: 15px;
	line-height: 1.6;
}

.pepselect-compound-page__section-heading--split {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
}

.pepselect-compound-page__view-all {
	flex: 0 0 auto;
	color: var(--pep-color-navy);
	font-size: 14px;
	font-weight: var(--pep-font-weight-semibold);
	text-decoration: none;
	white-space: nowrap;
}

.pepselect-compound-page__view-all:hover {
	color: var(--pep-color-cyan);
}

/* ---- Testing history: the plugin carousel sits in a card ---- */
.pepselect-compound-page__testing-body {
	padding: 4px 0;
}

/* ---- Related products grid ---- */
.pepselect-compound-page__related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pepselect-compound-page__related-grid > li {
	min-width: 0;
}

/* Related cards are secondary content — render them smaller than the
   primary shop cards so they don't compete with the product itself. */
.pepselect-compound-page__related .pepselect-card__media {
	aspect-ratio: 1 / 1;
	padding: 8px;
}

.pepselect-compound-page__related .pepselect-card__body {
	padding: 14px 16px 16px;
}

.pepselect-compound-page__related .pepselect-card .pepselect-card__title {
	min-height: 0;
	margin-bottom: 8px;
	font-size: 20px;
}

.pepselect-compound-page__related .pepselect-card__status {
	min-height: 0;
	margin-bottom: 8px;
}

.pepselect-compound-page__related .pepselect-card .pepselect-card__price {
	font-size: 20px;
	margin-bottom: 12px;
}

.pepselect-compound-page__related .pepselect-card__action {
	height: 40px;
	font-size: 14px;
}

.pepselect-compound-page__related .pepselect-card .pepselect-card__strength {
	margin-bottom: 10px;
	padding: 4px 10px;
	font-size: 11px;
}

@media (max-width: 1024px) {
	.pepselect-compound-page__top {
		grid-template-columns: 1fr;
	}

	.pepselect-compound-page__related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.pepselect-compound-page {
		padding-block: 24px 48px;
	}

	.pepselect-compound-page__summary {
		padding: 24px 22px;
	}

	.pepselect-compound {
		padding: 22px 20px;
	}

	.pepselect-compound__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.pepselect-compound-page__section-heading--split {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	/* Related products become a horizontal snap carousel on mobile,
	   matching the homepage, with compact cards. */
	.pepselect-compound-page__related-grid {
		display: flex;
		grid-template-columns: none;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		margin-inline: calc(-1 * var(--pep-layout-gutter));
		padding-inline: var(--pep-layout-gutter);
		scrollbar-width: none;
	}

	.pepselect-compound-page__related-grid::-webkit-scrollbar {
		display: none;
	}

	.pepselect-compound-page__related-grid > li {
		flex: 0 0 60%;
		max-width: 220px;
		scroll-snap-align: start;
	}
}

/* Points/rewards message rendered as a standalone pill above the pricing. */
.pepselect-compound-page__summary .ywpar_message_cart,
.pepselect-compound-page__summary .ywpar-message,
.pepselect-compound-page__summary .yith-par-message,
.pepselect-compound-page__summary p.ywpar_earn_points {
	display: inline-flex;
	align-items: center;
	margin: 0 0 18px;
	padding: 8px 16px;
	border: 1px solid var(--pep-color-cyan);
	border-radius: var(--pep-radius-pill);
	background: var(--pep-color-cyan-soft);
	color: var(--pep-color-navy);
	font-size: 13px;
	font-weight: var(--pep-font-weight-semibold);
}

/* --- Lightbox: floating image, notify-dialog language --- */
.pepselect-lightbox {
	position: fixed;
	z-index: 9999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vw;
	background: rgb(0 29 58 / 78%);
}

.pepselect-lightbox[hidden] {
	display: none;
}

.pepselect-lightbox__image {
	max-width: min(560px, 90vw);
	max-height: 82vh;
	border-radius: 16px;
	background: var(--pep-color-white);
	box-shadow: 0 30px 80px rgb(0 29 58 / 45%);
}

.pepselect-lightbox__close {
	position: absolute;
	top: 24px;
	right: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pep-color-white);
	color: var(--pep-color-navy);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

/*
 * COA carousel on the product page: the plugin renders its own heading and
 * cards. Nudge the incoming/report cards to a more vertical, less empty
 * proportion and constrain their width so they do not read as big squares.
 */
.pepselect-compound-page__testing .ps-coa-product-carousel__title {
	font-family: var(--pep-font-editorial);
}

.pepselect-compound-page__testing .ps-coa-product-carousel__track,
.pepselect-compound-page__testing .ps-coa-product-carousel__viewport {
	justify-content: flex-start;
}

.pepselect-compound-page__testing .ps-coa-incoming-card,
.pepselect-compound-page__testing .ps-coa-report-card,
.pepselect-compound-page__testing [class*="carousel__card"] {
	min-height: 340px;
	max-width: 320px;
	display: flex;
	flex-direction: column;
}
