/**
 * Codehive Product Manager: website/assets/shop.css
 * The shop ([chpm_shop]) and a product page's Buy Now / Get Free buttons ([chpm_product_buttons]).
 * The tiles themselves are the Market Place tiles in market.css (.chpm-mk-grid, .chpm-mk-card …).
 *
 * Build:     1.0.87
 * Changelog:
 * 1.0.8 New.
 * 1.0.9 Tile styles removed: the shop uses the Market Place tiles from market.css. Here only what keeps them right
 *       inside a page (the page's link colour must not colour the tile title or buttons) and the product page buttons.
 * 1.0.10 Tiles only shop admins see (product page not published): dashed edge and a note. One wide button (hosting).
 * 1.0.11 Tiles across 1 to 5 (Website → Look → Shop): with 4 or 5 across the two buttons sit one above the other;
 *        with 1 across the tile is laid out picture left, words and buttons right.
 * 1.0.14 Tiles hidden by the Platform filter stay hidden.
 * 1.0.15 Every tile lines up: name on one line (… when too long), the price line always one line high (empty
 *        when there is no price), the short description always three lines high. The picture lifts under the
 *        pointer with a "Click to view more info" label. Every picture fills the same 4:3 box.
 * 1.0.16 The "Click to view more info" label: top left of the picture, in the pale amber of the old notes (it
 *        was hard to see). The "only you can see this tile" notes are gone (such tiles still have a dashed edge).
 * 1.0.17 Tiles line up without empty space: the tiles in a row share their rows (CSS subgrid), so each row is as
 *        tall as its tallest tile needs and no taller. The short description no longer keeps three empty lines
 *        when there is little or none. (Browsers without subgrid keep the 1.0.15 layout.)
 * 1.0.18 Product page built from the Product Page box: heading, featured image on the left with the words flowing
 *        round it, the gallery of same-size square tiles, and the full-size picture viewer.
 * 1.0.19 Every tile the same size, always: the short description is always three lines high and cut at three
 *        lines (the 1.0.17 row-sharing is removed).
 * 1.0.20 Product page heading a medium size; Product Images heading; price and buttons at the top and bottom;
 *        "From" before a From price.
 * 1.0.21 Product page description in a medium size (16 px); sizes copied in from the block editor are evened out.
 * 1.0.22 The 1.0.21 forced sizes are gone (sizes are set in the editor). Product pages (body.chpm-product-page):
 *        left-aligned pictures, and galleries (WordPress gallery or Gallery block) as same-size square tiles.
 * 1.0.23 Product page words start at the editor's M size (var(--wp--preset--font-size--medium)); a size chosen in
 *        the editor still wins.
 * 1.0.25 Platform logos on tiles: 60 px circles at the bottom right of the picture, half on it and half below
 *        (WARC training's logo is a quarter on; these sit a little higher), side by side when there are several;
 *        the name keeps clear of them.
 * 1.0.26 Platform logos: a centred row of slightly overlapping logos (44 px at most) under the short description,
 *        instead of on the picture, in the same place on every tile (the description always takes three lines),
 *        8 px under the words and 8 px above the buttons.
 * 1.0.27 One wide button on the tiles. Product page: the version boxes (free left, paid right), "← Back to shop"
 *        and "↑ Back to top".
 * 1.0.30 Version boxes: paid on the left, free on the right, equal widths across the whole page; the buttons stay
 *        the size they were (360 px), centred. The licence term after the price is at the page's text size. Both
 *        boxes have a 2 px edge, so their names, prices, bullet points and buttons line up.
 * 1.0.31 The licence term after the price is black, at the size of the page's body text.
 * 1.0.32 Version box buttons (Buy Now, Get Free) half the width: 180 px.
 * 1.0.34 Version box names black.
 * 1.0.35 Version box bullet points at the page's body text size (M), as the licence term is.
 * 1.0.41 The cross sells section on product pages (black H2, shop tiles).
 * 1.0.42 System Requirements on product pages (black H4, a line per platform with its logo).
 * 1.0.52 Product pages: the Product panel at the top of the sidebar (wide screens only; it is kept compact so it
 *        fits without scrolling), the shop picture beside the heading and brief description, version box bullet
 *        points a little smaller (set by the page) and the licence term smaller again, in italics.
 * 1.0.53 Product panel tidied: each version's name, then price and licence term with its button on the right;
 *        System Requirements as outlined boxes (logo and name, then bullet points); sections divided by a line.
 * 1.0.54 Sidebar: a little more room under Product, version names and platform names at the sidebar title's size,
 *        larger platform logos, Product Quick navigation as a dropdown. The page's System Requirements section
 *        shows the same boxes, side by side where there is room.
 * 1.0.55 Sidebar: each version in an outlined white box, like the System Requirements boxes.
 * 1.0.57 Version names and platform names in capitals; larger platform logos (44 px in the sidebar, 48 px on the page).
 * 1.0.58 The sidebar's Platform dropdown (System Requirements for more than one platform).
 * 1.0.62 Hero image beside one version box (the box is the picture's height, its list scrolls when too long, the
 *        buttons and swap links stay at the foot; the free version's box swaps in over the paid one). The shop
 *        picture small, on the heading's line, with the brief description underneath.
 * 1.0.63 The Buy Now / Get Free button always in the middle of the box's foot, the swap link smaller, beside it.
 *        (In the hero layout the bullet points are at most 16 px, set by the page, so 40 characters fit on one line.)
 * 1.0.73 The hero image is shown whole, at its own shape (never cropped), and the version box takes its height.
 * 1.0.74 Hero layout: the box's own padding a little smaller, so more of the list fits beside a wide picture.
 * 1.0.82 The Shop panel's buttons (the same as My Account's), on the shop and product pages.
 * 1.0.83 No grey line above Quick navigation or System Requirements; less room under the Shop panel.
 * 1.0.84 Shop panel now last in the sidebar, so the 1.0.83 padding under it is gone.
 * 1.0.85 Less room above the Shop panel: a lot on the shop (under the Filters), a little on product pages.
 * 1.0.86 Product pages: the gap above the Shop panel the same 14px as on the shop.
 * 1.0.87 Product pages: the Shop panel's spacing rules did not apply (a script sits between the panels); fixed.
 */

/* ---------- Shop tiles: keep the Market Place look inside a page's content ---------- */
.chpm-shop {
	margin: 8px 0 24px;
}
.chpm-shop .chpm-mk-card-title a {
	color: #1d2327 !important;
	text-decoration: none !important;
}
.chpm-shop .chpm-mk-card:hover .chpm-mk-card-title a,
.chpm-shop .chpm-mk-card-title a:focus-visible {
	color: var(--chpm-mk-accent, #2e7d32) !important;
}
.chpm-shop a.chpm-mk-card-btn {
	text-decoration: none !important;
}
.chpm-shop a.chpm-mk-card-view {
	color: var(--chpm-mk-accent, #2e7d32) !important;
}
.chpm-shop a.chpm-mk-card-contact {
	color: #fff !important;
}
.chpm-shop .chpm-mk-card-image img {
	max-width: none;
	height: 100%;
}
.chpm-shop .chpm-mk-card-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}
.chpm-shop .chpm-mk-card-price del {
	opacity: 0.55;
	font-size: 0.75em;
	font-weight: 600;
}
.chpm-shop-also-free {
	color: #646970;
	font-size: 13px;
	font-weight: 600;
}
.chpm-shop-empty {
	padding: 20px 0;
}

/* Seen only by shop admins: the product page is not published yet. */
.chpm-shop .chpm-mk-card.is-hidden-tile {
	border-style: dashed;
	border-color: #b26200;
}
.chpm-shop .chpm-shop-note {
	right: 10px;
	background: #fff7e6;
	color: #8a4b00;
	font-size: 12px;
	white-space: normal;
}
/* One button across the tile (hosting). */
.chpm-shop .chpm-shop-wide {
	grid-column: 1 / -1;
}

/* ---------- Product page: price, Buy Now and Get Free ---------- */
.chpm-product-buttons {
	margin: 20px 0;
}
.chpm-tile-price {
	margin: 0 0 10px;
	font-weight: 800;
	font-size: 22px;
	color: var(--chpm-mk-accent, #2e7d32);
}
.chpm-shop-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.chpm-shop-buttons a.chpm-shop-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	border: 1px solid var(--chpm-mk-accent, #2e7d32);
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	transition: filter 0.15s ease, background 0.15s ease;
}
/* !important: the website layout's link colour (Website → Colours) must not colour the button text. */
.chpm-shop-buttons a.chpm-shop-buy {
	background: var(--chpm-mk-accent, #2e7d32);
	color: #fff !important;
}
.chpm-shop-buttons a.chpm-shop-free {
	background: #fff;
	color: var(--chpm-mk-accent, #2e7d32) !important;
}
.chpm-shop-buttons a.chpm-shop-btn:hover,
.chpm-shop-buttons a.chpm-shop-btn:focus-visible {
	filter: brightness(0.92);
}

/* ---------- 1.0.11: Tiles across (Website → Look → Shop) ---------- */
/* 4 or 5 across: narrow tiles, so the two buttons sit one above the other. */
.chpm-shop-cols-4 .chpm-mk-card-footer,
.chpm-shop-cols-5 .chpm-mk-card-footer {
	grid-template-columns: minmax(0, 1fr);
}
.chpm-shop-cols-5 .chpm-mk-card-title {
	font-size: 16px;
}
.chpm-shop-cols-5 .chpm-mk-card-price {
	font-size: 19px;
}
/* 1 across: picture on the left, words and buttons on the right (stacked again on a phone). */
@media (min-width: 641px) {
	.chpm-shop-cols-1 .chpm-mk-card {
		display: grid;
		grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		column-gap: 20px;
	}
	.chpm-shop-cols-1 .chpm-mk-card-image {
		grid-row: 1 / span 2;
	}
	.chpm-shop-cols-1 .chpm-mk-card-footer {
		grid-column: 2;
		align-self: end;
		max-width: 420px;
	}
}

/* 1.0.14: tiles hidden by the Platform filter (the card's own display would show them). */
.chpm-shop .chpm-mk-card[hidden],
.chpm-shop-empty[hidden] {
	display: none !important;
}

/* ---------- 1.0.15: every tile lines up, row for row ---------- */
.chpm-shop .chpm-mk-card-content {
	gap: 4px;
}
.chpm-shop .chpm-mk-card-title {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis; /* One line: the full name is in the tooltip and on the product page. */
}
.chpm-shop .chpm-mk-card-price {
	display: block;
	min-height: 1.3em;
	line-height: 1.3;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.chpm-shop .chpm-mk-card-price.is-empty {
	visibility: hidden;
}
.chpm-shop .chpm-mk-card-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	height: calc(1.55em * 3); /* Always three lines high, so the buttons line up too. */
}

/* ---------- 1.0.15: the picture lifts under the pointer ---------- */
.chpm-shop .chpm-shop-pic {
	position: relative;
	z-index: 2; /* Above the whole-tile link, so it can be pointed at on its own. */
	overflow: visible;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chpm-shop .chpm-shop-pic {
	aspect-ratio: 4 / 3;
	height: auto;
	min-height: 0;
}
/* The picture (or the no-picture box) fills the same 4:3 box on every tile, so the rows below line up. */
.chpm-shop .chpm-shop-pic img,
.chpm-shop .chpm-shop-pic .chpm-mk-nophoto {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	border-radius: 3px;
}
.chpm-shop .chpm-shop-pic:hover,
.chpm-shop .chpm-shop-pic:focus-visible {
	transform: translateY(-5px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}
/* The label: top left of the picture, pale amber, as the "only you can see this" notes were. */
.chpm-shop .chpm-shop-pic::after {
	content: attr(data-tip);
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	max-width: calc(100% - 20px);
	padding: 5px 10px;
	border-radius: 6px;
	background: #fff7e6;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
	color: #8a4b00;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-3px);
	transition: opacity 0.18s ease, transform 0.18s ease;
}
.chpm-shop .chpm-shop-pic:hover::after,
.chpm-shop .chpm-shop-pic:focus-visible::after {
	opacity: 1;
	transform: translateY(0);
}
@media (hover: none) {
	.chpm-shop .chpm-shop-pic::after {
		display: none; /* No pointer on phones and tablets: no label. */
	}
}
@media (prefers-reduced-motion: reduce) {
	.chpm-shop .chpm-shop-pic,
	.chpm-shop .chpm-shop-pic::after {
		transition: none;
	}
}

/* ---------- 1.0.19: every tile the same size, always ---------- */
/* (1.0.17's row-sharing is gone: tiles in different rows could still differ.) The short description is always
   exactly three lines high, empty or not, and anything longer is cut at three lines with "…". */
.chpm-shop .chpm-mk-card-excerpt,
.chpm-shop .chpm-mk-card-excerpt.is-empty {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	line-height: 1.55;
	height: calc(1.55em * 3);
	min-height: calc(1.55em * 3);
	max-height: calc(1.55em * 3);
}

/* ---------- 1.0.18: the product page (Product Page box → Create page) ---------- */
.chpm-pp {
	overflow: hidden;
}
.chpm-pp .chpm-pp-heading {
	margin: 0 0 18px;
	color: #c95918;
	font-size: 26px;
	line-height: 1.25;
}
.chpm-pp .chpm-pp-desc::after {
	content: "";
	display: block;
	clear: both;
}
.chpm-pp img.chpm-pp-feature {
	float: left;
	width: auto;
	max-width: min(45%, 520px);
	height: auto;
	margin: 4px 24px 14px 0;
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.chpm-pp-clear {
	clear: both;
}
@media (max-width: 640px) {
	.chpm-pp img.chpm-pp-feature {
		float: none;
		display: block;
		max-width: 100%;
		margin: 6px 0 16px;
	}
}

/* The gallery: every picture in the same square tile, filled edge to edge. */
.chpm-pp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 14px;
	margin: 28px 0 10px;
	clear: both;
}
.chpm-pp-gallery a.chpm-pp-gallery-item {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 6px;
	background: #f0f0f1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	cursor: zoom-in;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chpm-pp-gallery a.chpm-pp-gallery-item img {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.chpm-pp-gallery a.chpm-pp-gallery-item:hover,
.chpm-pp-gallery a.chpm-pp-gallery-item:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}
.chpm-pp-gallery a.chpm-pp-gallery-item:hover img {
	transform: scale(1.04);
}

/* The full-size picture viewer. */
.chpm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 70px;
	background: rgba(10, 12, 14, 0.9);
}
.chpm-lightbox[hidden] {
	display: none;
}
.chpm-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.chpm-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}
.chpm-lightbox button:hover,
.chpm-lightbox button:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}
.chpm-lightbox button[hidden] {
	display: none;
}
.chpm-lightbox .chpm-lb-close {
	top: 16px;
	right: 16px;
}
.chpm-lightbox .chpm-lb-prev {
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
}
.chpm-lightbox .chpm-lb-next {
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}
body.chpm-lb-open {
	overflow: hidden;
}
@media (max-width: 640px) {
	.chpm-lightbox {
		padding: 60px 10px;
	}
}

/* ---------- 1.0.20 ---------- */
.chpm-shop-from {
	margin-right: 2px;
	font-size: 0.7em;
	font-weight: 700;
	text-transform: none;
	opacity: 0.85;
}
.chpm-pp .chpm-pp-buttons .chpm-product-buttons {
	margin: 0;
}
.chpm-pp .chpm-pp-buttons-top {
	margin: 0 0 22px;
}
.chpm-pp .chpm-pp-buttons-bottom {
	margin: 28px 0 8px;
	padding-top: 18px;
	border-top: 1px solid #e5e7eb;
	clear: both;
}
.chpm-pp .chpm-pp-gallery-title {
	margin: 30px 0 0;
	font-size: 20px;
	line-height: 1.3;
	clear: both;
}
.chpm-pp .chpm-pp-gallery {
	margin-top: 14px;
}

/* ---------- 1.0.22: product pages built as ordinary, editable HTML (body class chpm-product-page) ---------- */
/* No sizes are forced on the words: change them in the editor. Pictures aligned left keep clear of the words. */
.chpm-product-page .chpm-mp-content img.alignleft,
.chpm-product-page .chpm-mp-content .alignleft img,
.chpm-product-page .chpm-mp-content figure.alignleft {
	margin: 4px 24px 14px 0;
	border-radius: 6px;
}
.chpm-product-page .chpm-mp-content img.alignleft {
	float: left;
	max-width: 100%;
	height: auto;
}
@media (max-width: 640px) {
	.chpm-product-page .chpm-mp-content img.alignleft,
	.chpm-product-page .chpm-mp-content figure.alignleft {
		float: none;
		display: block;
		margin: 6px 0 16px;
	}
}

/* Galleries on a product page (a WordPress gallery, or a Gallery block once converted): same-size square tiles,
   each picture filling its tile; a click opens it full size. */
.chpm-product-page .chpm-mp-content .gallery,
.chpm-product-page .chpm-mp-content .wp-block-gallery {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 14px !important;
	margin: 18px 0 10px !important;
	clear: both;
}
.chpm-product-page .chpm-mp-content .gallery > br {
	display: none;
}
.chpm-product-page .chpm-mp-content .gallery .gallery-item,
.chpm-product-page .chpm-mp-content .wp-block-gallery > figure.wp-block-image {
	position: relative;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 6px;
	background: #f0f0f1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chpm-product-page .chpm-mp-content .gallery .gallery-icon,
.chpm-product-page .chpm-mp-content .gallery .gallery-icon a,
.chpm-product-page .chpm-mp-content .wp-block-gallery > figure.wp-block-image a {
	display: block;
	position: absolute;
	inset: 0;
	cursor: zoom-in;
}
.chpm-product-page .chpm-mp-content .gallery img,
.chpm-product-page .chpm-mp-content .wp-block-gallery > figure.wp-block-image img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	max-width: none;
	height: 100% !important;
	margin: 0;
	border: 0 !important;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.chpm-product-page .chpm-mp-content .gallery .gallery-item:hover,
.chpm-product-page .chpm-mp-content .wp-block-gallery > figure.wp-block-image:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}
.chpm-product-page .chpm-mp-content .gallery .gallery-item:hover img,
.chpm-product-page .chpm-mp-content .wp-block-gallery > figure.wp-block-image:hover img {
	transform: scale(1.04);
}
.chpm-product-page .chpm-mp-content .gallery .gallery-caption,
.chpm-product-page .chpm-mp-content .wp-block-gallery figcaption {
	display: none;
}
.chpm-product-page .chpm-mp-content hr {
	clear: both;
	margin: 28px 0 18px;
	border: 0;
	border-top: 1px solid #e5e7eb;
}

/* ---------- 1.0.23: product page words at the editor's M size ---------- */
/* The page layout's 16 px is too small here. A size chosen in the editor (a class or a style) still wins. */
.chpm-product-page .chpm-mp-content p:not(.chpm-tile-price):not([class*="-font-size"]):not([style*="font-size"]),
.chpm-product-page .chpm-mp-content li:not([class*="-font-size"]) {
	font-size: var(--wp--preset--font-size--medium, 1.25rem);
}

/* ---------- 1.0.26: platform logos under the short description ---------- */
/* The description always takes three lines, so the logos are in the same place on every tile, whatever the
   number of lines: 8 px under the third line, and 8 px above the buttons. The logos row is on every tile (empty
   when there are none), so every tile is the same size. */
.chpm-shop .chpm-shop-blurb {
	--chpm-logo: 44px;
	--chpm-logo-gap: 8px;
	display: flow-root; /* Keeps the logos' bottom margin inside, so the gap above the buttons is the 8 px. */
	font-size: 14px;
	container-type: inline-size;
}
.chpm-shop .chpm-shop-blurb .chpm-mk-card-excerpt,
.chpm-shop .chpm-shop-blurb .chpm-mk-card-excerpt.is-empty {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	line-height: 1.55;
	height: calc(1.55em * 3);
	min-height: calc(1.55em * 3);
	max-height: calc(1.55em * 3);
}
.chpm-shop .chpm-shop-logos-space {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--chpm-logo);
	margin: var(--chpm-logo-gap) 0;
	padding: 0;
}
.chpm-shop .chpm-mk-card-footer {
	padding-top: 0;
}
/* Centred, so the space either side is the same; each logo a little over the one before. Sized so all six fit
   across the tile (44 px each at most, smaller on narrow tiles). */
.chpm-shop .chpm-shop-logos-row {
	--chpm-logo-size: min(var(--chpm-logo), calc(100cqw / 5.1));
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	margin: 0;
}
.chpm-shop .chpm-shop-logos-row img {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: var(--chpm-logo-size) !important;
	max-width: none !important;
	height: var(--chpm-logo-size) !important;
	margin: 0 0 0 calc(var(--chpm-logo-size) * -0.18);
	border-radius: 50%;
	object-fit: contain;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.chpm-shop .chpm-shop-logos-row img:first-child {
	margin-left: 0;
}
/* The tile's own gaps are set here, so the gap above the buttons is exactly the 8 px under the logos. */
.chpm-shop .chpm-shop-tile {
	gap: 0;
}
.chpm-shop .chpm-shop-tile .chpm-mk-card-content {
	margin-top: 12px; /* Under the picture, as before. */
}

/* ---------- 1.0.27: one button on the tiles ---------- */
.chpm-shop .chpm-mk-card-footer {
	grid-template-columns: minmax(0, 1fr);
}

/* ---------- 1.0.27: product page ---------- */
.chpm-product-page .chpm-pp-back {
	margin: 0 0 14px;
	font-size: 15px;
}
.chpm-product-page .chpm-pp-back a,
.chpm-product-page .chpm-pp-top a {
	font-weight: 600;
	text-decoration: none;
}
.chpm-product-page .chpm-pp-back a:hover,
.chpm-product-page .chpm-pp-top a:hover {
	text-decoration: underline;
}
.chpm-product-page .chpm-pp-top {
	clear: both;
	margin: 32px 0 8px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
	text-align: center;
	font-size: 15px;
}

/* 1.0.42: System Requirements on a product page: a black H4, then a line per platform with its logo. */
.chpm-product-page .chpm-pp-sysreq {
	clear: both;
	margin: 24px 0 8px;
}
.chpm-product-page .chpm-mp-content .chpm-pp-sysreq-title {
	margin: 0 0 10px;
	color: #000 !important;
}
.chpm-product-page .chpm-mp-content .chpm-pp-sysreq-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.chpm-product-page .chpm-mp-content .chpm-pp-sysreq-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	padding: 0;
}
.chpm-product-page .chpm-mp-content .chpm-pp-sysreq-list li::before {
	content: none;
}
.chpm-product-page .chpm-mp-content img.chpm-pp-sysreq-logo,
.chpm-product-page .chpm-pp-sysreq-logo.is-empty {
	flex: 0 0 24px;
	width: 24px !important;
	height: 24px !important;
	margin: 0;
	object-fit: contain;
}

/* 1.0.41: the cross sells section at the foot of a product page: a black H2, then shop tiles. */
.chpm-product-page .chpm-pp-cross {
	clear: both;
	margin: 32px 0 8px;
}
.chpm-product-page .chpm-mp-content .chpm-pp-cross-title {
	margin: 0 0 14px;
	color: #000 !important;
}
.chpm-product-page .chpm-pp-cross .chpm-shop {
	margin: 0;
}

/* The version boxes: paid on the left, free on the right, equal widths across the page, the same height, each
   button at the foot of its box. */
.chpm-tiers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 18px 0 28px;
	clear: both;
}
.chpm-tiers.chpm-tiers-1 {
	grid-template-columns: minmax(0, 1fr);
	max-width: 400px;
}
.chpm-tier {
	display: flex;
	flex-direction: column;
	padding: 18px 20px 20px;
	border: 2px solid #dcdcde; /* 2 px like the paid box, so both boxes' contents line up. */
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.chpm-tier-paid {
	border: 2px solid var(--chpm-mk-accent, #2e7d32);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.chpm-product-page .chpm-mp-content .chpm-tier-name {
	margin: 0 0 4px;
	color: #000 !important;
	font-size: 19px;
	line-height: 1.3;
	clear: none;
}
.chpm-product-page .chpm-mp-content p.chpm-tier-price {
	margin: 0 0 12px;
	color: var(--chpm-mk-accent, #2e7d32);
	font-size: 22px !important;
	font-weight: 800;
	line-height: 1.2;
}
.chpm-product-page .chpm-mp-content p.chpm-tier-price .chpm-tier-term {
	font-size: var(--wp--preset--font-size--medium, 1.25rem); /* Set to the body text's own size by the page. */
	font-weight: 400;
	color: #000 !important;
	white-space: nowrap;
}
.chpm-tier-price del {
	opacity: 0.55;
	font-size: 0.75em;
	font-weight: 600;
}
.chpm-product-page .chpm-mp-content .chpm-tier-list {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}
.chpm-product-page .chpm-mp-content .chpm-tier-list li {
	position: relative;
	margin: 0 0 6px;
	padding-left: 24px;
	font-size: var(--wp--preset--font-size--medium, 1.25rem); /* Set to the body text's own size by the page. */
	line-height: 1.45;
}
.chpm-product-page .chpm-mp-content .chpm-tier-list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--chpm-mk-accent, #2e7d32);
	font-weight: 800;
}
.chpm-tier .chpm-tier-btn {
	margin-top: auto;
	justify-content: center;
}
.chpm-tier .chpm-tier-btn a.chpm-shop-btn {
	flex: 0 1 180px; /* Half the 360 px they were in 1.0.30. */
}
@media (max-width: 640px) {
	.chpm-tiers {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- 1.0.52: product pages ---------- */
/* The licence term after a version box's price: smaller, in italics (its size is set by the page). */
.chpm-product-page .chpm-mp-content p.chpm-tier-price .chpm-tier-term {
	font-style: italic;
}
.chpm-product-page .chpm-mp-content .chpm-tier-list li {
	margin-bottom: 4px;
	line-height: 1.4;
}

/* The shop picture to the left of the heading and brief description. */
.chpm-product-page .chpm-pp-intro {
	display: flex;
	align-items: flex-start;
	gap: 22px;
}
.chpm-product-page .chpm-mp-content img.chpm-pp-icon {
	flex: 0 0 auto;
	width: 150px;
	height: 112px;
	margin: 6px 0 0;
	object-fit: cover;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	float: none;
}
.chpm-product-page .chpm-pp-intro-text {
	flex: 1 1 auto;
	min-width: 0;
}
.chpm-product-page .chpm-pp-intro-text > :first-child {
	margin-top: 0;
}
.chpm-product-page .chpm-pp-intro-text > :last-child {
	margin-bottom: 0;
}
/* Phones: the picture floats at the top left and the words wrap round it. */
@media (max-width: 640px) {
	.chpm-product-page .chpm-pp-intro {
		display: flow-root;
	}
	.chpm-product-page .chpm-mp-content img.chpm-pp-icon {
		float: left;
		width: 96px;
		height: 72px;
		margin: 6px 14px 6px 0;
		border-radius: 8px;
	}
}

/* The Product panel at the top of the sidebar. */
.chpm-ps {
	padding: 16px 16px 4px;
	font-size: 13px;
	line-height: 1.35;
	color: #1d2327;
}
.chpm-ps .chpm-ps-title {
	margin: 0 0 12px;
}
.chpm-ps ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.chpm-ps-ver {
	margin: 0 0 10px;
	padding: 10px 12px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}
.chpm-ps-name {
	margin: 0 0 4px;
	color: #1d2327;
	font-size: 15px;
	font-weight: 700;
}
.chpm-ps-line {
	display: flex;
	align-items: center;
	gap: 10px;
}
.chpm-ps-price {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--chpm-mk-accent, #2e7d32);
	font-size: 17px;
	font-weight: 800;
	line-height: 1.25;
}
.chpm-ps-price del {
	opacity: 0.55;
	font-size: 0.8em;
	font-weight: 600;
}
.chpm-ps-term {
	color: #000;
	font-size: 12px;
	font-style: italic;
	font-weight: 400;
	white-space: nowrap;
}
.chpm-ps .chpm-ps-btn {
	flex: 0 0 96px;
	flex-wrap: nowrap;
}
.chpm-ps .chpm-ps-btn a.chpm-shop-btn {
	width: 100%;
	padding: 8px 6px;
	font-size: 13px;
}
.chpm-ps-sec {
	margin-top: 4px;
	padding-top: 12px;
}
/* System Requirements: an outlined box for each platform. */
.chpm-ps-req {
	margin: 0 0 10px;
	padding: 10px 12px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}
.chpm-ps-req-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: #1d2327;
	font-size: 15px;
	font-weight: 700;
}
.chpm-ps-req-head img {
	width: 32px;
	height: 32px;
	object-fit: contain;
}
.chpm-ps .chpm-ps-req ul {
	padding-left: 16px;
	list-style: disc;
}
.chpm-ps-req li {
	margin: 0 0 4px;
	color: #1d2327;
	font-size: 12.5px;
	line-height: 1.4;
}
.chpm-ps-req li:last-child {
	margin-bottom: 0;
}
.chpm-ps-req li b {
	font-weight: 700;
}
.chpm-ps-toc .chpm-mk-filter {
	margin: 0 0 14px;
}
.chpm-product-page .chpm-mp-content :is(h2, h3, h4)[id] {
	scroll-margin-top: 24px;
}
/* Tablets and phones: the sidebar drops below the page, and the version boxes already hold all of this. */
@media (max-width: 1000px) {
	.chpm-ps {
		display: none;
	}
}

/* 1.0.54: the page's System Requirements: the sidebar's boxes, side by side where there is room. */
.chpm-product-page .chpm-mp-content p.chpm-pp-sysreq-version {
	margin: 0 0 12px;
}
.chpm-pp-req-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 14px;
	align-items: start;
}
.chpm-product-page .chpm-pp-req-grid .chpm-ps-req {
	margin: 0;
	padding: 14px 18px;
}
.chpm-product-page .chpm-pp-req-grid .chpm-ps-req-head {
	margin: 0 0 10px;
	font-size: 1.05em;
}
.chpm-product-page .chpm-pp-req-grid .chpm-ps-req-head img {
	width: 36px !important;
	height: 36px !important;
	margin: 0;
}
.chpm-product-page .chpm-mp-content .chpm-pp-req-grid ul {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
}
.chpm-product-page .chpm-mp-content .chpm-pp-req-grid li {
	margin: 0 0 6px;
	padding: 0;
	font-size: 0.88em;
	line-height: 1.45;
}
.chpm-product-page .chpm-mp-content .chpm-pp-req-grid li::before {
	content: none;
}

/* 1.0.57: names in capitals, larger platform logos. */
.chpm-ps-name,
.chpm-ps-req-head span {
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.chpm-ps-req-head {
	gap: 10px;
}
.chpm-ps-req-head img {
	width: 44px;
	height: 44px;
}
.chpm-product-page .chpm-pp-req-grid .chpm-ps-req-head img {
	width: 48px !important;
	height: 48px !important;
}

/* 1.0.58: the Platform dropdown above the System Requirements box, for a product on more than one platform. */
.chpm-ps .chpm-ps-plat {
	margin: 0 0 10px;
}
.chpm-ps .chpm-ps-req[hidden] {
	display: none;
}

/* ---------- 1.0.62: the shop picture on the heading's line ---------- */
.chpm-product-page .chpm-pp-intro {
	display: block;
}
.chpm-product-page .chpm-pp-titleline {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 10px;
}
.chpm-product-page .chpm-pp-titleline h1 {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0 !important;
}
.chpm-product-page .chpm-mp-content img.chpm-pp-icon {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	margin: 0;
	float: none;
	object-fit: cover;
	border-radius: 10px;
}
@media (max-width: 640px) {
	.chpm-product-page .chpm-mp-content img.chpm-pp-icon {
		width: 48px;
		height: 48px;
		margin: 0;
		float: none;
	}
}

/* ---------- 1.0.62: hero image beside one version box ---------- */
.chpm-tiers.chpm-tiers-hero {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	align-items: stretch;
	max-width: none;
}
.chpm-tier-hero {
	position: relative;
	min-height: 420px;
	max-height: 500px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.chpm-product-page .chpm-mp-content img.chpm-tier-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	float: none;
}
/* The box column takes the picture's height: the boxes sit over it and never make the row taller. */
.chpm-tier-stack {
	position: relative;
	min-width: 0;
}
.chpm-tiers-hero .chpm-tier {
	position: absolute;
	inset: 0;
	overflow: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.chpm-tiers-hero .chpm-tier .chpm-tier-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto; /* Only when the list is longer than the box (8 short bullet points fit). */
}
.chpm-tiers-swap .chpm-tier-free,
.chpm-tiers-swap[data-on="free"] .chpm-tier-paid {
	opacity: 0;
	visibility: hidden;
}
.chpm-tiers-swap[data-on="free"] .chpm-tier-free {
	opacity: 1;
	visibility: visible;
}
/* The buttons row: the swap link beside the button. */
.chpm-tiers-hero .chpm-tier .chpm-tier-btn {
	flex: 0 0 auto;
	align-items: center;
	flex-wrap: nowrap;
	gap: 12px;
	margin-top: 12px;
}
.chpm-tiers-swap .chpm-tier .chpm-tier-btn {
	justify-content: space-between;
}
.chpm-product-page .chpm-mp-content a.chpm-tier-swap {
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}
.chpm-product-page .chpm-mp-content a.chpm-tier-swap:hover,
.chpm-product-page .chpm-mp-content a.chpm-tier-swap:focus-visible {
	text-decoration: underline;
}
.chpm-tiers-swap .chpm-tier-paid .chpm-tier-btn a.chpm-shop-btn,
.chpm-tiers-swap .chpm-tier-free .chpm-tier-btn a.chpm-shop-btn {
	flex: 0 0 120px;
}
/* Phones and narrow pages: the picture above the box, and the box as tall as it needs. */
@media (max-width: 760px) {
	.chpm-tiers.chpm-tiers-hero {
		grid-template-columns: minmax(0, 1fr);
	}
	.chpm-tier-hero {
		min-height: 0;
	}
	.chpm-tiers-hero .chpm-tier {
		position: static;
	}
	.chpm-tiers-hero .chpm-tier .chpm-tier-list {
		overflow: visible;
	}
	.chpm-tiers-swap .chpm-tier-free,
	.chpm-tiers-swap[data-on="free"] .chpm-tier-paid {
		display: none;
	}
	.chpm-tiers-swap[data-on="free"] .chpm-tier-free {
		display: flex;
	}
}

/* ---------- 1.0.63: the button in the middle, the swap link beside it ---------- */
.chpm-tiers-swap .chpm-tier .chpm-tier-btn {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 10px;
}
.chpm-tiers-swap .chpm-tier .chpm-tier-btn a.chpm-shop-btn {
	grid-column: 2;
	grid-row: 1;
	width: 150px;
}
.chpm-product-page .chpm-mp-content .chpm-tiers-swap a.chpm-tier-swap {
	grid-row: 1;
	font-size: 12.5px;
	white-space: normal;
}
.chpm-product-page .chpm-mp-content .chpm-tiers-swap a.chpm-tier-swap-free {
	grid-column: 1;
	justify-self: start;
	text-align: left;
}
.chpm-product-page .chpm-mp-content .chpm-tiers-swap a.chpm-tier-swap-paid {
	grid-column: 3;
	justify-self: end;
	text-align: right;
}

/* ---------- 1.0.73: the hero image whole; the version box takes its height ---------- */
.chpm-tier-hero {
	min-height: 0;
	max-height: none;
	aspect-ratio: auto;
	align-self: start;
}
.chpm-product-page .chpm-mp-content img.chpm-tier-hero-img {
	position: static;
	display: block;
	width: 100%;
	height: auto;
	object-fit: initial;
}
@media (max-width: 760px) {
	.chpm-tier-hero {
		align-self: auto;
	}
}

/* 1.0.74: a little less padding in the hero layout's box. */
.chpm-tiers-hero .chpm-tier {
	padding: 14px 18px 14px;
}
.chpm-product-page .chpm-mp-content .chpm-tiers-hero p.chpm-tier-price {
	margin-bottom: 8px;
}
.chpm-tiers-hero .chpm-tier .chpm-tier-btn {
	margin-top: 8px;
}

/* ---------- 1.0.82: the Shop panel (Login / My Account, Cart, Checkout), as My Account's buttons ---------- */
.chpm-shop-nav .chpm-acc-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.chpm-shop-nav .chpm-acc-list li {
	margin: 0;
	padding: 0;
}
.chpm-shop-nav a.chpm-acc-link {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	color: #1d2327 !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none !important;
	transition: border-color 0.15s ease, color 0.15s ease;
}
.chpm-shop-nav a.chpm-acc-link:hover,
.chpm-shop-nav a.chpm-acc-link:focus-visible {
	border-color: #8c8f94;
}
.chpm-shop-nav a.chpm-acc-link.is-current {
	border-color: #8c8f94;
	background: #f6f7f7;
	font-weight: 700;
}
.chpm-shop-nav .chpm-acc-icon {
	flex: 0 0 auto;
	color: #1d2327;
}

/* 1.0.85: less room above the Shop panel */
.chpm-shop-filters:has(+ .chpm-shop-nav) {
	padding-bottom: 0;
}
.chpm-shop-filters + .chpm-shop-nav {
	padding-top: 2px;
}
.chpm-ps:has(~ .chpm-shop-nav) {
	padding-bottom: 0;
}
.chpm-ps ~ .chpm-shop-nav {
	padding-top: 2px;
}
.chpm-ps .chpm-ps-sec > .chpm-ps-req:last-child {
	margin-bottom: 14px;
}
