/* =========================================================================
   The medicine page (design of 2026-11-06)

   Loaded on the Medicine template after services-prescriptions.css,
   whose tokens (.rx-build: the 1280 container, the inks, the blues, the
   pill buttons, the questions) it draws on. The product block sits 55px
   inside the container on either side, as the design has it: the picture
   column 572 wide, a 60 gap, and the copy column 536.

   Markup: template-parts/sections/md-product.php.
   ====================================================================== */

/* 40 below, as every section on a desktop (2026-11-13); 64 before. */
.md-product {
	padding-block-end: 2.5rem;
}

.md-product__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2.5rem;
	max-width: 1168px;
	margin-inline: auto;
}

@media (min-width: 992px) {
	.md-product__inner {
		grid-template-columns: 572px minmax(0, 1fr);
		gap: 60px;
		align-items: start;
	}

	/* The picture stays in view while the text beside it scrolls (2026-11-19):
	   under the sticky header, and under the admin bar too when it is shown.
	   The gallery stops at the foot of the product section. */
	.md-product__gallery {
		position: sticky;
		top: 7rem;
	}

	.admin-bar .md-product__gallery {
		top: calc(7rem + 32px);
	}
}

/* -------------------------------------------------------------------------
   The pictures
   ---------------------------------------------------------------------- */

.md-product__main {
	overflow: hidden;
	border-radius: 20px;
	background: #f3f4f6;
}

.md-product__main img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 572 / 479;
	object-fit: cover;
}

/* The thumbnails: 106 square, 10 apart, an arrow in a hairline circle at
   either end of the row. The chosen one is lifted on a blue hairline. */
.md-product__thumbs {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 1.25rem;
}

.md-product__thumb-list {
	display: flex;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.md-product__thumb {
	display: block;
	width: 106px;
	height: 106px;
	padding: 0;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: 12px;
	background: #e4e7ea;
	cursor: pointer;
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.md-product__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.md-product__thumb:hover {
	transform: translateY(-2px);
}

.md-product__thumb.is-active {
	border-color: var(--rx-line);
	box-shadow: 0 6px 16px rgba(12, 52, 100, 0.14);
}

.md-product__thumb:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

.md-product__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid #c9d0d4;
	border-radius: 50%;
	background: #ffffff;
	color: var(--rx-ink);
	cursor: pointer;
	transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.md-product__arrow svg {
	width: 12px;
	height: 12px;
}

.md-product__arrow:hover {
	border-color: var(--rx-blue);
	color: var(--rx-blue);
}

/* -------------------------------------------------------------------------
   The copy
   ---------------------------------------------------------------------- */

.md-product__title {
	margin: 0;
	color: var(--rx-ink);
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.375rem);
	font-weight: var(--fw-semibold);
	line-height: 1.2;
	letter-spacing: 0;
	text-wrap: balance;
}

/* The stars, the count and the size on one line, a hairline between the
   count and the size. */
.md-product__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
	margin: 1.25rem 0 0;
	color: var(--rx-ink);
	font-size: 1rem;
	line-height: 1.4;
}

.md-product__stars {
	display: inline-flex;
	gap: 0.125rem;
}

.md-star {
	position: relative;
	display: inline-block;
	width: 20px;
	height: 20px;
	color: #e3e7ea;
}

.md-star svg {
	display: block;
	width: 20px;
	height: 20px;
}

.md-star__fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	overflow: hidden;
	color: #ffb30f;
}

.md-product__size {
	padding-left: 0.75rem;
	border-left: 1px solid #c9d0d4;
}

.md-product__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75rem;
	margin: 1.5rem 0 0;
	line-height: 1.1;
}

.md-product__amount {
	color: var(--rx-blue);
	font-family: var(--font-display);
	font-size: 2.125rem;
	font-weight: var(--fw-semibold);
}

.md-product__price-note {
	color: var(--rx-ink);
	font-size: 1rem;
}

.md-product__rule {
	height: 1px;
	margin: 1.5rem 0 1.5rem;
	border: 0;
	background: #dbe3ec;
}

.md-product__text {
	color: var(--rx-ink-soft);
	font-size: 1rem;
	line-height: 1.65;
}

.md-product__text p {
	margin: 0;
}

.md-product__text p + p,
.md-product__text .md-product__sub {
	margin-top: 0.75rem;
}

.md-product__sub {
	color: var(--rx-ink);
	font-size: 1.0625rem;
	font-weight: var(--fw-semibold);
}

.md-product__text a {
	color: var(--rx-blue);
	text-decoration: underline;
}

/* The ticked points: a tick in a circle in the brand blue, 18 square. */
.md-product__points {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	padding: 0 0 0 2rem;
	list-style: none;
	color: var(--rx-ink-soft);
	font-size: 1rem;
	line-height: 1.5;
}

.md-product__points li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.md-product__tick {
	display: inline-flex;
	flex: none;
	margin-top: 0.1875rem;
	color: #196bb6;
}

.md-product__tick svg {
	width: 18px;
	height: 18px;
}

.md-product__text--after {
	margin-top: 1.25rem;
}

.md-product__cta {
	margin-top: 1.5rem;
}

/* -------------------------------------------------------------------------
   The details panel: a pale box on the blue hairline, 16px corners, its
   rows on hairlines with the chevron turning as one opens.
   ---------------------------------------------------------------------- */

.md-details {
	margin-top: 2.5rem;
	padding: 0.25rem 1.25rem;
	border: 1px solid var(--rx-line);
	border-radius: 16px;
	background: #f5f9fe;
}

.md-details__item + .md-details__item {
	border-top: 1px solid #dbe3ec;
}

.md-details__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.375rem 0;
	color: var(--rx-ink);
	font-size: 1.0625rem;
	font-weight: var(--fw-medium);
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
	transition: color var(--dur) var(--ease);
}

.md-details__summary::-webkit-details-marker {
	display: none;
}

.md-details__summary:hover {
	color: var(--rx-blue);
}

.md-details__mark {
	display: inline-flex;
	flex: none;
	color: var(--rx-ink);
	transition: transform var(--accordion-dur, var(--dur)) var(--ease);
}

.md-details__mark svg {
	width: 18px;
	height: 18px;
}

.md-details__item[open] .md-details__mark {
	transform: rotate(180deg);
}

/* While the answer slides shut it is still [open] (main.js), so the
   mark turns back from .is-closing, over the slide's own time. */
.md-details__item.is-closing .md-details__mark {
	transform: none;
}

.md-details__body {
	padding: 0 0 1.5rem;
	color: var(--rx-ink-soft);
	font-size: 0.9375rem;
	line-height: 1.65;
}

.md-details__body > * + * {
	margin-top: 0.75rem;
}

.md-details__body h4 {
	margin: 1rem 0 0;
	color: var(--rx-ink);
	font-size: 1rem;
	font-weight: var(--fw-semibold);
}

.md-details__body > h4:first-child {
	margin-top: 0;
}

.md-details__body p {
	margin: 0;
}

.md-details__body strong {
	color: var(--rx-ink);
	font-weight: var(--fw-semibold);
}

.md-details__body ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.md-details__body li + li {
	margin-top: 0.375rem;
}

/* -------------------------------------------------------------------------
   Phones
   ---------------------------------------------------------------------- */

@media (max-width: 639.98px) {
	.md-product {
		padding-block-end: 2rem;
	}

	.md-product__main {
		border-radius: 16px;
	}

	.md-product__thumbs {
		gap: 0.75rem;
	}

	.md-product__thumb {
		width: 72px;
		height: 72px;
		border-radius: 10px;
	}

	.md-product__amount {
		font-size: 1.75rem;
	}

	.md-product__points {
		padding-left: 0;
	}

	.md-details {
		padding: 0.125rem 1rem;
	}

	.md-details__summary {
		padding: 1.125rem 0;
		font-size: 1rem;
	}
}

/* -------------------------------------------------------------------------
   The weight loss injections' design (2026-11-12)
   ---------------------------------------------------------------------- */

/* Short facts in a row under the name, in the soft grey, a hairline
   between each. Every fact carries its hairline just outside its own
   left edge, half the gap from the fact before; the row is pulled left
   by that half-gap and clips, so a fact that starts a line - the first,
   or one that wrapped on a narrow screen - loses its hairline over the
   edge, and no line ever starts with a stray one. */
.md-product__tags {
	display: flex;
	flex-wrap: wrap;
	row-gap: 0.25rem;
	margin: 1rem 0 0 -0.875rem;
	overflow: hidden;
	color: var(--rx-ink-soft);
	font-size: 0.875rem;
	line-height: 1.4;
}

.md-product__tags span {
	position: relative;
	margin-left: -1px;
	padding: 0 0.875rem;
}

.md-product__tags span::before {
	content: "";
	position: absolute;
	top: 0.15em;
	bottom: 0.15em;
	left: 0;
	width: 1px;
	background: #c9d0d4;
}

/* The strengths as pills: the brand blue on a pale blue hairline, 36
   tall, the first filled pale blue as the strength treatment starts on. */
/* Room above the pills, clear of the facts line (2026-11-19). */
.md-product .md-product__body .md-product__strengths {
	margin-top: 1.5rem;
}

.md-product__strengths {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

/* Each pill a button (2026-11-16): the chosen one filled, the others
   outlined and tinting under the pointer. */
.md-product__strength {
	display: inline-flex;
	align-items: center;
	min-height: 2.25rem;
	padding: 0.375rem 1rem;
	border: 1px solid var(--rx-line);
	border-radius: 999px;
	background: transparent;
	color: var(--rx-blue);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.md-product__strength:hover,
.md-product__strength:focus-visible {
	background: #eaf3fe;
}

.md-product__strength[aria-pressed="true"] {
	border-color: transparent;
	background: #d6e8fb;
}

/* The help band ("Not Sure Where to Start?") on the pale blue across the
   whole page, as the design has it: the band stands clear of the product
   above it, and keeps its own room inside, so the picture sits well in
   from the band's top and foot rather than on its edges (2026-11-12).
   Three classes, to outweigh the prescriptions design's join and padding
   rules for the section. */
.page-template-template-medicine .section.rx-what {
	margin-block-start: 2.5rem;
	padding-block: 2.5rem;
	background: var(--rx-pale, #eaf3fe);
}

/* Phones: the one rhythm every section keeps (2026-11-16) - the product
   section's 40 of bottom padding and the band's own 40 of top padding
   make the join, so the band's extra 40 of margin is let go. */
@media (max-width: 575.98px) {
	.md-product {
		padding-block-end: 2.5rem;
	}

	.page-template-template-medicine .section.rx-what {
		margin-block-start: 0;
	}
}
