/*
 * Product page design, loaded only on pages using the "Product page" template
 * (body.pp-product-page). The global header, footer and CTA band are left as is.
 */

.pp-product-page {
	--pp-primary: #664e88;
	--pp-primary-dark: #482e70;
	--pp-primary-light: #7f6b9c;
	--pp-text: #212121;
	--pp-navy: #01184f;
	--pp-grey-100: #f5f5f5;
	--pp-shadow: 0 1px 3px #bdbdbd;
	--pp-pad-x: 64px;
	--pp-pad-y: 64px;
	--pp-gap: 80px;
	--pp-cross: url("../img/product-page/pf-cross-16.svg");
}

/* Figma breakpoints: desktop (1920/1440/1280), tablet (769/600), mobile (480/320). */
@media (max-width: 1200px) {
	.pp-product-page { --pp-pad-x: 48px; --pp-gap: 56px; }
}
@media (max-width: 991px) {
	.pp-product-page { --pp-pad-x: 32px; --pp-pad-y: 32px; --pp-gap: 40px; }
}
@media (max-width: 599px) {
	.pp-product-page { --pp-pad-x: 16px; --pp-pad-y: 16px; --pp-gap: 16px; }
}

/* ---------- Shared typography ---------- */

.pp-product-page .pp-prose,
.pp-product-page .two-columns,
.pp-product-page .pp-card {
	font-family: Roboto, sans-serif;
	color: var(--pp-text);
}

.pp-product-page .pp-prose h2,
.pp-product-page .two-columns h2 {
	font-family: Karma, serif;
	font-weight: 400;
	font-size: 36px;
	line-height: 1.334;
	letter-spacing: 0;
	color: var(--pp-primary);
	margin: 0 0 16px;
	padding: 0;
}

.pp-product-page .pp-prose h3 {
	font-family: Roboto, sans-serif;
	font-weight: 500;
	font-size: 22px;
	line-height: 1.4;
	letter-spacing: 0.15px;
	color: var(--pp-primary);
	margin: 24px 0 4px;
	padding: 0;
}
.pp-product-page .pp-prose h3:first-child { margin-top: 0; }

/* Section headings step down on smaller screens, like the rest of the site. */
@media (max-width: 991px) {
	.pp-product-page .pp-prose h2,
	.pp-product-page .two-columns h2 { font-size: 32px; }
}
@media (max-width: 599px) {
	.pp-product-page .pp-prose h2,
	.pp-product-page .two-columns h2 { font-size: 28px; }
}

.pp-product-page .pp-prose p,
.pp-product-page .two-columns p {
	font-size: 18px;
	line-height: 1.5;
	letter-spacing: 0.15px;
	color: var(--pp-text);
	margin: 0 0 16px;
	padding: 0;
}
.pp-product-page .pp-prose p:empty { display: none; }
.pp-product-page .pp-prose > :last-child { margin-bottom: 0; }

.pp-product-page .pp-prose a:not(.default-button):not(.pp-card__download) {
	color: var(--pp-primary);
	text-decoration: underline;
}

/* Plus-cross bullet list (content uses <div class="m-bullets"><ul>…) */
.pp-product-page .m-bullets { margin: 0 0 16px; }
.pp-product-page .m-bullets ul {
	column-count: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pp-product-page .m-bullets ul > li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.57;
	letter-spacing: 0.1px;
	color: var(--pp-text);
}
.pp-product-page .m-bullets ul > li span { font-weight: inherit !important; }
.pp-product-page .m-bullets ul > li:before {
	content: "";
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin: 0;
	background: var(--pp-cross) no-repeat center / 16px 16px;
}

/* Outlined button (e.g. "See All Features") */
.pp-product-page .pp-prose .default-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	padding: 6px 16px;
	border: 1px solid rgba(102, 78, 136, 0.5);
	border-radius: 4px;
	background: transparent;
	font-family: Roboto, sans-serif;
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	letter-spacing: 0.4px;
	text-transform: none;
	color: var(--pp-primary);
	text-decoration: none;
	transition: background-color 0.2s;
}
.pp-product-page .pp-prose .default-button:hover,
.pp-product-page .pp-prose .default-button:focus-visible {
	background-color: rgba(102, 78, 136, 0.08);
	color: var(--pp-primary);
}
.pp-product-page .pp-prose .default-button:after,
.pp-product-page .pp-prose .default-button:before { display: none; }

/* ---------- Hero (page.php banner) ---------- */

.pp-product-page .page-banner-container {
	padding: 0;
	border-bottom: 0;
	overflow: visible;
}
.pp-product-page .page-banner-container:after { display: none; } /* Hide the banner watermark. */
.pp-product-page .page-banner-container .bg-image {
	background-size: cover !important;
	background-position: center !important;
	overflow: hidden;
}
.pp-product-page .page-banner-container .bg-image:after {
	background-color: rgba(127, 107, 156, 0.6);
}

.pp-product-page .page-banner-container .page-banner {
	max-width: none;
	padding: 0 var(--pp-pad-x);
	text-align: left;
}
.pp-product-page .page-banner-container .page-banner h1 {
	font-family: Karma, serif;
	font-weight: 400;
	font-size: 64px;
	line-height: 1.167;
	letter-spacing: -1.5px;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.pp-product-page .page-banner-container .page-banner h1 strong {
	display: block;
	float: none;
	margin: 0;
	padding: 0;
	font-weight: 400;
	background: none;
}

/* Hero text sits in a centred 1312px column (Figma: x64 at 1440, x304 at 1920). */
.pp-product-page .page-banner .has-laptop,
.pp-product-page .page-banner .centered-text {
	box-sizing: border-box;
	padding-left: max(0px, calc((100% - 1312px) / 2));
}

/* Hero with laptop (Investment, Super & Pension): 560px */
.pp-product-page .page-banner .has-laptop {
	position: relative;
	max-width: none;
	height: 560px;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	display: flex;
	align-items: center;
}
.pp-product-page .page-banner .has-laptop .text {
	position: relative;
	top: auto;
	left: auto;
	max-width: none;
	z-index: 3;
}
.pp-product-page .page-banner .has-laptop .text p { display: none; }
/* Laptop: 634px, 105px from the window's right edge at 1280–1440 and 165px at 1920 (Figma), overhanging the hero by 15px. */
.pp-product-page .page-banner .has-laptop .laptop-wrap {
	position: absolute;
	left: auto;
	right: max(41px, calc(41px + (100% - 1312px) * 0.125));
	bottom: -15px;
	width: 634px;
	margin: 0;
	float: none;
}

/* Title-only hero (Investment Menu): 280px */
.pp-product-page .page-banner .centered-text {
	min-height: 280px;
	align-items: flex-start;
	text-align: left;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
}
.pp-product-page .page-banner .centered-text strong { padding: 0; }

@media (max-width: 1200px) {
	.pp-product-page .page-banner .has-laptop { height: 460px; }
	.pp-product-page .page-banner-container .page-banner h1 { font-size: 52px; }
}
/* Tablet and mobile: 150px hero, 28px title (Figma 769/600/480/320). */
@media (max-width: 991px) {
	.pp-product-page .page-banner .has-laptop { height: 150px; }
	.pp-product-page .page-banner .has-laptop .text { text-align: left; }
	.pp-product-page .page-banner .has-laptop .text h1 strong { display: block; }
	/* Laptop: 235px, 53px from the window's right edge at 769 and 30px at 600, overhanging by 6px. */
	.pp-product-page .page-banner .has-laptop .laptop-wrap {
		left: auto;
		right: calc((100% - 551px) * 0.136);
		bottom: -6px;
		width: 235px;
	}
	.pp-product-page .page-banner-container .page-banner h1,
	.pp-product-page .page-banner .has-laptop .text h1 {
		font-size: 28px;
		line-height: 1.167;
		letter-spacing: -0.5px;
		max-width: none;
		margin: 0;
		padding: 0;
	}
	.pp-product-page .page-banner .centered-text { min-height: 150px; }
	/* A title in four or more parts (Super & Pension: one word per part) flows onto two lines, as in Figma;
	   a three-part title (Explore. Invest. Achieve.) keeps one part per line. */
	.pp-product-page .page-banner .has-laptop .text h1:has(> strong:nth-of-type(4)) { max-width: 340px; }
	.pp-product-page .page-banner .has-laptop .text h1:has(> strong:nth-of-type(4)) strong { display: inline; }
}
@media (max-width: 599px) {
	.pp-product-page .page-banner .has-laptop .laptop-wrap { display: none; }
}

/* ---------- Intro: two_columns + key features (grey band) ---------- */

.pp-product-page section.container.grid-outer:has(> .content > .two-columns) {
	background: var(--pp-grey-100);
	padding: 0;
}
/* Full width with 64px sides up to 1920 (Figma), then held at 1792px of content on wider screens. */
.pp-product-page section.grid-outer > .content.grid:has(> .two-columns) {
	max-width: 1920px;
	margin: 0 auto;
	padding: var(--pp-pad-y) var(--pp-pad-x);
	box-sizing: border-box;
}
@media (max-width: 599px) {
	.pp-product-page section.grid-outer > .content.grid:has(> .two-columns) { padding-top: 32px; padding-bottom: 32px; }
}
.pp-product-page .two-columns {
	display: flex;
	align-items: flex-start;
	gap: var(--pp-gap);
	margin: 0;
}
.pp-product-page .two-columns .left {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	padding: 0;
	margin: 0;
}
.pp-product-page .two-columns .right {
	flex: 0 0 539px;
	width: 539px;
	padding: 0;
	margin: 0;
}
/* Closing call-out line in the intro */
.pp-product-page .two-columns .left p:last-of-type:not(:first-of-type) {
	font-weight: 700;
	font-size: 16px;
	line-height: 1.43;
	letter-spacing: 0.17px;
	color: var(--pp-navy);
	margin-top: 16px;
}
.pp-product-page .two-columns .left p:last-of-type:not(:first-of-type) span { font-weight: inherit !important; }

.pp-product-page .key-features { margin: 0; }
.pp-product-page .key-features p { margin: 0; }
.pp-product-page .key-features h4.title {
	font-family: Roboto, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 2.66;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--pp-text);
	text-align: center;
}
.pp-product-page .key-features h4.title:before { display: none; }
.pp-product-page .key-features h4.title span { background: none; padding: 0; }
.pp-product-page .key-features .features {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: 16px;
	margin: 0;
}
.pp-product-page .key-features .features > p { display: contents; }
.pp-product-page .key-features .features .item {
	flex: 0 1 167px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 16px;
	box-sizing: border-box;
	text-align: center;
}
/* Font Awesome icon: 25px draws a ~28.8px glyph (~1.14em), in proportion to the 18px labels. */
.pp-product-page .key-features .features .item i {
	display: block;
	font-size: 25px;
	line-height: 1;
	color: var(--pp-primary);
}
.pp-product-page .key-features .features .item img {
	width: 36px; /* Scaled with the 18px labels. */
	height: 36px;
	max-width: none;
	margin: 0;
}
.pp-product-page .key-features .features .item p:empty { display: none; } /* wpautop's empty paragraph would add a gap. */
.pp-product-page .key-features .features .item p {
	font-weight: 500;
	font-size: 18px;
	line-height: 1.57;
	letter-spacing: 0.1px;
	color: var(--pp-text);
	margin: 0;
}

@media (max-width: 991px) {
	.pp-product-page .two-columns { flex-direction: column; }
	.pp-product-page .two-columns .right { flex-basis: auto; width: 100%; }
	.pp-product-page .key-features { margin-top: 8px; }
}
@media (max-width: 599px) {
	.pp-product-page .key-features .features { flex-direction: column; align-items: center; }
	.pp-product-page .key-features .features .item { flex: none; width: 167px; } /* Figma 480/320: stacked, 167px, centred. */
}

/* ---------- Shared section wrapper ---------- */

.pp-product-page .pp-section {
	background: #fff;
	padding: var(--pp-pad-y) var(--pp-pad-x);
	box-sizing: border-box;
}

/* ---------- Image / text rows ---------- */

.pp-product-page .pp-row {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: var(--pp-gap);
	max-width: 875px;
	margin: 0 auto;
}
.pp-product-page .pp-row + .pp-row { margin-top: calc(var(--pp-pad-y) * 2); }
.pp-product-page .pp-row--text-left .pp-row__image { order: 2; }
.pp-product-page .pp-row__image {
	flex: 0 0 350px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.pp-product-page .pp-row__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}
.pp-product-page .pp-row__text { flex: 0 1 445px; min-width: 0; }

/* Tablet: two equal columns of up to 280px (Figma: 280 at 769, 248 at 600), square images. */
@media (max-width: 991px) {
	.pp-product-page .pp-row__image { flex: 0 1 280px; }
	.pp-product-page .pp-row__text { flex: 0 1 280px; }
}
/* Mobile: stacked in page order (a text-first row keeps its text on top), 288px square image, centred. */
@media (max-width: 599px) {
	.pp-product-page .pp-row { flex-direction: column; align-items: stretch; }
	.pp-product-page .pp-row__image { flex: none; width: 288px; max-width: 100%; align-self: center; }
	.pp-product-page .pp-row__text { flex: none; width: 100%; }
}

/* ---------- Text + Core vs Select ---------- */

.pp-product-page .pp-text-table {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: var(--pp-gap);
}
.pp-product-page .pp-text-table__text { flex: 0 1 445px; min-width: 0; }
.pp-product-page .pp-text-table__table { flex: 0 0 350px; }

.pp-product-page .pp-compare {
	width: 100%;
	border-collapse: collapse;
	font-family: Roboto, sans-serif;
	color: var(--pp-text);
	margin: 0;
}
.pp-product-page .pp-compare th,
.pp-product-page .pp-compare td {
	padding: 16px;
	border: 0;
	border-bottom: 1px solid var(--pp-primary-light);
	text-align: left;
	vertical-align: middle;
	background: transparent;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.43;
	letter-spacing: 0.17px;
	min-width: 0;
}
.pp-product-page .pp-compare th:not(:first-child),
.pp-product-page .pp-compare td { width: 80px; box-sizing: border-box; }
.pp-product-page .pp-compare thead th {
	font-weight: 500;
	font-size: 24px;
	line-height: 1.6;
	letter-spacing: 0.15px;
	color: var(--pp-primary-dark);
	width: auto;
}
.pp-product-page .pp-compare__labels th {
	font-size: 14px;
	line-height: 2.66;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding-top: 7px;
	padding-bottom: 7px;
}
.pp-product-page .pp-compare__group th {
	font-weight: 500;
	font-size: 18px;
	line-height: 1.57;
	letter-spacing: 0.1px;
}
.pp-product-page .pp-compare__tick { display: inline-flex; width: 16px; height: 16px; }
.pp-product-page .pp-compare__tick svg { width: 16px; height: 16px; }

@media (max-width: 991px) {
	.pp-product-page .pp-text-table__text { flex: 0 1 280px; }
	.pp-product-page .pp-text-table__table { flex: 0 1 280px; }
}
@media (max-width: 599px) {
	.pp-product-page .pp-text-table { flex-direction: column; }
	.pp-product-page .pp-text-table__text,
	.pp-product-page .pp-text-table__table { flex-basis: auto; width: 100%; }
}
/* Narrow tablet (Figma 600: a 248px table), the Core and Select columns are 60px. */
@media (min-width: 600px) and (max-width: 700px) {
	.pp-product-page .pp-compare th:not(:first-child),
	.pp-product-page .pp-compare td { width: 60px; padding-left: 0; padding-right: 0; }
}

/* ---------- Download card ---------- */

.pp-product-page .pp-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between; /* Download button at the bottom, so cards side by side line up. */
	gap: 32px;
	width: 316px;
	max-width: 100%;
	padding: 16px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 4px;
	box-shadow: var(--pp-shadow);
}
.pp-product-page .pp-card .pp-card__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.pp-product-page .pp-card .pp-card__icon { display: inline-flex; width: 28px; height: 28px; margin-bottom: 16px; }
.pp-product-page .pp-card .pp-card__icon svg { width: 28px; height: 28px; }
.pp-product-page .pp-card .pp-card__title {
	font-family: Karma, serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.334;
	color: var(--pp-primary);
	margin: 0 0 8px;
	padding: 0;
	text-transform: none;
}
.pp-product-page .pp-card .pp-card__text {
	font-size: 18px;
	line-height: 1.5;
	letter-spacing: 0.15px;
	color: var(--pp-text);
	margin: 0;
}
/* One button per menu (Core, Select), stacked at the bottom of the card. */
.pp-product-page .pp-card .pp-card__downloads {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.pp-product-page .pp-card .pp-card__download {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	background: #fff;
	border-radius: 4px;
	box-shadow: var(--pp-shadow);
	color: var(--pp-text);
	text-decoration: none;
	font-family: Roboto, sans-serif;
	transition: box-shadow 0.2s;
}
.pp-product-page .pp-card .pp-card__download:hover,
.pp-product-page .pp-card .pp-card__download:focus-visible {
	box-shadow: 0 2px 6px #9e9e9e;
	color: var(--pp-text);
}
.pp-product-page .pp-card .pp-card__download:focus-visible { outline: 2px solid var(--pp-primary); outline-offset: 2px; }
.pp-product-page .pp-card .pp-card__pdf { width: 19.5px; height: 24px; margin: 0; flex: 0 0 auto; }
.pp-product-page .pp-card .pp-card__label {
	flex: 1 1 auto;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.57;
	letter-spacing: 0.1px;
}
.pp-product-page .pp-card .pp-card__arrow {
	display: inline-flex;
	padding: 5px;
	border-radius: 100px;
}
.pp-product-page .pp-card .pp-card__arrow svg { width: 16px; height: 16px; }

/* ---------- Investment Menu page: intro + cards ---------- */

.pp-product-page .pp-menus { padding-top: var(--pp-pad-y); padding-bottom: var(--pp-pad-y); }
.pp-product-page .pp-menus__intro,
.pp-product-page .pp-menus__cards {
	width: 664px;
	max-width: 100%;
	margin: 0 auto;
}
.pp-product-page .pp-menus__intro { margin-bottom: 32px; }
.pp-product-page .pp-menus__cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center; /* When the two cards wrap (just above the mobile layout), keep them centred. */
	gap: 32px;
}
/* Tablet: cards up to 280px side by side (Figma: 280 at 769, 252 at 600); 32px top and bottom. */
@media (max-width: 991px) {
	.pp-product-page .pp-menus { padding-top: 32px; padding-bottom: 32px; }
	.pp-product-page .pp-menus__cards { flex-wrap: nowrap; } /* Shrink side by side rather than wrap. */
	.pp-product-page .pp-menus__cards .pp-card { flex: 0 1 280px; width: auto; min-width: 0; }
}
/* Mobile: stacked, 280px, 16px apart. */
@media (max-width: 599px) {
	.pp-product-page .pp-menus__cards { flex-direction: column; align-items: center; gap: 16px; }
	.pp-product-page .pp-menus__cards .pp-card { flex: none; width: 280px; max-width: 100%; }
}

.pp-product-page .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
