/**
 * PharmZu — Phase 3 product archive and single product
 */

.pharmzu-product-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 40px;
}

.pharmzu-product-filters button {
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.pharmzu-product-filters button:hover,
.pharmzu-product-filters button:focus-visible {
	border-color: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--primary);
}

.pharmzu-product-filters button.is-active {
	border-color: transparent;
	background: var(--wp--preset--gradient--brand);
	color: #fff;
}

.pharmzu-product-card[hidden] {
	display: none;
}

.pharmzu-product-grid--archive {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pharmzu-product-card h3 a {
	color: inherit;
	text-decoration: none;
}

.pharmzu-product-card h3 a:hover,
.pharmzu-product-card h3 a:focus-visible {
	color: var(--wp--preset--color--primary);
}

.pharmzu-product-card__media {
	height: 300px;
	max-height: 300px;
	flex-shrink: 0;
	background:
		radial-gradient(circle at 80% 12%, rgba(73, 178, 194, 0.16), transparent 28%),
		linear-gradient(180deg, #f4fafc 0%, #e9f5f8 100%);
}

.pharmzu-product-hero {
	padding: var(--pharmzu-section-y, 96px) 0;
	background: var(--wp--preset--color--surface, #f4fafc);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.pharmzu-product-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	gap: 56px;
	align-items: center;
}

.pharmzu-product-hero__media {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 520px;
	padding: 36px;
	border-radius: var(--wp--custom--radius--lg, 24px);
	background:
		radial-gradient(circle at 18% 18%, rgba(73, 178, 194, 0.18), transparent 34%),
		linear-gradient(180deg, #fff 0%, #e9f5f8 100%);
	border: 1px solid var(--wp--preset--color--line);
}

.pharmzu-product-hero__media > .pharmzu-product-hero__zoom img,
.pharmzu-product-hero__media > img {
	display: block;
	width: min(100%, 420px);
	height: auto;
	object-fit: contain;
	border-radius: var(--wp--custom--radius--md);
}

.pharmzu-product-hero__zoom {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	border-radius: inherit;
}

.pharmzu-product-hero__zoom:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

.pharmzu-product-thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 18px;
}

.pharmzu-product-thumbs__item {
	width: 72px;
	height: 72px;
	padding: 4px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
}

.pharmzu-product-thumbs__item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pharmzu-product-thumbs__item.is-active,
.pharmzu-product-thumbs__item:focus-visible {
	border-color: var(--wp--preset--color--primary-dark);
	box-shadow: 0 0 0 3px rgba(36, 85, 119, 0.16);
}

.pharmzu-photo-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin-top: 36px;
}

.pharmzu-photo-gallery__item {
	margin: 0;
}

.pharmzu-photo-gallery__open {
	display: block;
	width: 100%;
	padding: 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
	background: var(--wp--preset--color--surface, #f4fafc);
	overflow: hidden;
	cursor: zoom-in;
}

.pharmzu-photo-gallery__open img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: contain;
}

.pharmzu-photo-gallery__open:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

@media (max-width: 1100px) {
	.pharmzu-photo-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.pharmzu-photo-gallery {
		grid-template-columns: 1fr;
	}

	.pharmzu-photo-gallery__open img {
		height: 220px;
	}
}

.pharmzu-lightbox {
	position: relative;
	width: min(920px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	padding: 28px 56px 24px;
	border: 0;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 24px 64px rgba(14, 52, 73, 0.28);
}

.pharmzu-lightbox__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--navy, #103449);
	color: #fff;
	transform: translateY(-50%);
	cursor: pointer;
}

.pharmzu-lightbox__nav--prev {
	left: 10px;
}

.pharmzu-lightbox__nav--next {
	right: 10px;
}

.pharmzu-lightbox__nav:hover,
.pharmzu-lightbox__nav:focus-visible {
	background: var(--wp--preset--color--primary-dark, #245577);
}

.pharmzu-lightbox::backdrop {
	background: rgba(14, 52, 73, 0.72);
}

.pharmzu-lightbox img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 96px);
	object-fit: contain;
	border-radius: var(--wp--custom--radius--md);
}

.pharmzu-lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--surface, #f4fafc);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

.pharmzu-lightbox__close:hover,
.pharmzu-lightbox__close:focus-visible {
	background: var(--wp--preset--gradient--brand);
	color: #fff;
}

body.pharmzu-lightbox-open {
	overflow: hidden;
}

.pharmzu-pack--hero {
	width: 140px;
	height: 190px;
}

.pharmzu-breadcrumb {
	margin: 0 0 20px;
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}

.pharmzu-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pharmzu-breadcrumb li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.pharmzu-breadcrumb li + li::before {
	content: "/";
}

.pharmzu-breadcrumb--center ol {
	justify-content: center;
}

.pharmzu-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.pharmzu-breadcrumb a:hover,
.pharmzu-breadcrumb a:focus-visible {
	color: var(--wp--preset--color--primary);
}

.pharmzu-product-hero__copy h1 {
	margin: 0 0 8px;
	font-size: clamp(40px, 5vw, 64px);
	letter-spacing: -0.04em;
	line-height: 1.05;
}

.pharmzu-product-hero__generic {
	margin: 0 0 16px;
	font-size: 18px;
	color: var(--wp--preset--color--muted);
}

.pharmzu-product-hero__lead {
	margin: 0 0 28px;
	max-width: 36em;
	font-size: 18px;
	line-height: 1.55;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 28px;
}

.pharmzu-product-specs div {
	min-width: 140px;
	padding: 14px 16px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
}

.pharmzu-product-specs dt {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-dark);
}

.pharmzu-product-specs dd {
	margin: 0;
	font-weight: 650;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-benefits {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pharmzu-product-benefits li {
	position: relative;
	margin: 0;
	padding: 22px 22px 22px 56px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg, 24px);
	background: #fff;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

.pharmzu-product-benefits li::before {
	content: "";
	position: absolute;
	left: 20px;
	top: 22px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background:
		linear-gradient(#fff, #fff) padding-box,
		var(--wp--preset--gradient--brand) border-box;
	border: 2px solid transparent;
	box-shadow: inset 0 0 0 4px #fff;
}

.pharmzu-product-glance + .pharmzu-page__section,
.pharmzu-product-glance + .pharmzu-page__section--surface {
	padding-top: var(--pharmzu-section-y, 96px) !important;
}

.pharmzu-product-glance {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 12% 20%, rgba(73, 178, 194, 0.18), transparent 32%),
		radial-gradient(circle at 88% 80%, rgba(47, 110, 168, 0.1), transparent 36%),
		var(--wp--preset--color--surface, #f4fafc);
}

.pharmzu-product-highlights {
	counter-reset: pharmzu-glance;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pharmzu-product-highlights li {
	counter-increment: pharmzu-glance;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
	padding: 28px 24px 26px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--lg, 24px);
	box-shadow: 0 10px 28px rgba(16, 52, 73, 0.05);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.25;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-highlights li::before {
	content: counter(pharmzu-glance, decimal-leading-zero);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.16em;
	color: var(--wp--preset--color--primary-dark);
}

.pharmzu-product-highlights li::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--wp--preset--gradient--brand);
}

.pharmzu-product-facts {
	display: grid;
	grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
	gap: 48px 64px;
	align-items: start;
}

.pharmzu-product-facts__head h2 {
	margin: 0;
}

.pharmzu-product-composition,
.pharmzu-product-indications,
.pharmzu-product-dosage {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pharmzu-product-composition {
	counter-reset: pharmzu-formula;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
}

.pharmzu-product-composition li {
	counter-increment: pharmzu-formula;
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-composition li::before {
	content: counter(pharmzu-formula, decimal-leading-zero);
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 30% 30%, rgba(73, 178, 194, 0.22), transparent 58%),
		var(--wp--preset--color--surface-alt, #e9f5f8);
	color: var(--wp--preset--color--accent-deep, #2f6ea8);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.pharmzu-product-indications {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pharmzu-product-indications li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px 10px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	font-size: 15px;
	font-weight: 650;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-indications li::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--gradient--brand);
}

.pharmzu-product-dosage {
	counter-reset: pharmzu-dose;
	display: grid;
	gap: 0;
	padding-left: 16px;
}

.pharmzu-product-dosage li {
	--pharmzu-dose-size: 32px;
	--pharmzu-dose-top: 14px;
	counter-increment: pharmzu-dose;
	position: relative;
	margin: 0;
	padding: 18px 8px 22px 48px;
	border-left: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

.pharmzu-product-dosage li:last-child {
	padding-bottom: 0;
}

.pharmzu-product-dosage li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: calc(var(--pharmzu-dose-top) + var(--pharmzu-dose-size));
	bottom: calc(var(--pharmzu-dose-top) * -1);
	left: 0;
	width: 1px;
	background: var(--wp--preset--color--line);
}

.pharmzu-product-dosage li::before {
	content: counter(pharmzu-dose);
	position: absolute;
	top: var(--pharmzu-dose-top);
	left: calc(var(--pharmzu-dose-size) / -2);
	z-index: 1;
	display: grid;
	place-items: center;
	width: var(--pharmzu-dose-size);
	height: var(--pharmzu-dose-size);
	border-radius: 50%;
	background: var(--wp--preset--gradient--brand);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
}

@media (max-width: 1100px) {
	.pharmzu-product-grid--archive {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pharmzu-product-hero__grid,
	.pharmzu-product-benefits,
	.pharmzu-product-facts,
	.pharmzu-product-composition {
		grid-template-columns: 1fr;
	}

	.pharmzu-product-hero__media {
		min-height: 380px;
	}
}

@media (max-width: 700px) {
	.pharmzu-product-grid--archive {
		grid-template-columns: 1fr;
	}

	.pharmzu-product-hero {
		padding: 72px 0;
	}

	.pharmzu-product-hero__copy h1 {
		font-size: 36px;
	}

	.pharmzu-product-hero__media {
		min-height: 300px;
		padding: 24px;
	}

	.pharmzu-product-facts {
		gap: 20px;
	}

	.pharmzu-product-dosage {
		padding-left: 20px;
	}

	.pharmzu-product-dosage li {
		--pharmzu-dose-size: 28px;
		--pharmzu-dose-top: 10px;
		padding: 10px 0 14px 40px;
		font-size: 15px;
	}

	.pharmzu-product-dosage li::before {
		font-size: 12px;
	}
}
