/**
 * Redesigned product pages (#275): the fixed-plan page
 * (product-suite-annual.html mockup) and the plan chooser
 * (product-cartflows.html). Loaded only on those pages; every rule is scoped
 * to .cf-product-page.
 */
.cf-product-page {
	--cfpp-maroon: #4C1505;
	--cfpp-orange: #F06335;
	--cfpp-orange-d: #D9512A;
	--cfpp-orange-t: #FFF3EE;
	--cfpp-ink: #1F1A17;
	--cfpp-ink-2: #6E6560;
	--cfpp-line: #EDE6E2;
	--cfpp-mist: #F8F5F3;
	--cfpp-green: #1E8E4E;
	/* Darker shades for text and the button behind white text, so they pass
	   WCAG AA (4.5:1). The brand shades above stay on borders, outlines,
	   icons and tints, which need 3:1. */
	--cfpp-orange-text: #C2441C;
	--cfpp-orange-text-d: #A33916;
	--cfpp-green-text: #1A7F45;
	max-width: 1140px;
	margin: 0 auto;
	padding-bottom: 80px;
	color: var(--cfpp-ink);
	font-family: "Figtree", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	/* Break a word only when it can't fit, e.g. narrow screens with large text. */
	overflow-wrap: anywhere;
}

.cf-product-page *,
.cf-product-page *::before,
.cf-product-page *::after {
	box-sizing: border-box;
}

.cf-product-page h1,
.cf-product-page h2 {
	margin: 0;
	line-height: 1.2;
	color: var(--cfpp-ink);
	font-family: inherit;
}

.cf-product-page ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cf-product-page svg {
	flex: none;
}

/* The chooser script hides elements with [hidden]; beat their display rules. */
.cf-product-page [hidden] {
	display: none !important;
}

.cf-product-page :focus-visible {
	outline: 3px solid var(--cfpp-orange);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Back link */
.cfpp-back {
	font-size: 14px;
	color: var(--cfpp-ink-2);
	padding-block: 28px 20px;
}

.cfpp-back a {
	color: inherit;
	text-decoration: none;
}

.cfpp-back a:hover {
	color: var(--cfpp-orange-text);
}

/* Top: gallery and extras on the left, summary on the right */
.cfpp-top {
	display: grid;
	grid-template-columns: 1fr 1.05fr;
	grid-template-areas: "gal sum" "ext sum";
	grid-template-rows: auto 1fr;
	column-gap: 56px;
	row-gap: 24px;
	align-items: start;
}

.cfpp-gallery {
	grid-area: gal;
	background: linear-gradient(160deg, #FBF9F8, #F1ECE9);
	border-radius: 16px;
	padding: 40px;
	display: grid;
	place-items: center;
}

.cfpp-gallery img {
	width: 100%;
	max-width: 380px;
	height: auto;
	mix-blend-mode: multiply;
	display: block;
}

.cfpp-summary {
	grid-area: sum;
	display: grid;
	gap: 14px;
	min-width: 0;
}

.cfpp-eyebrow {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cfpp-orange-text);
}

.cf-product-page .product_title {
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.cfpp-short {
	margin: 0;
	font-size: 16.5px;
	color: var(--cfpp-ink-2);
	max-width: 52ch;
}

/* Buy box */
.cfpp-buy {
	border: 1px solid var(--cfpp-line);
	border-radius: 12px;
	padding: 18px;
	display: grid;
	gap: 10px;
	background: #fff;
	box-shadow: 0 16px 36px -30px rgba(76, 21, 5, .5);
}

.cfpp-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* The chooser's tag sits in the live region with the price; keep the buy box gap. */
.cfpc-live .cfpp-tags {
	margin-bottom: 10px;
}

.cfpp-tags span {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cfpp-ink-2);
	background: var(--cfpp-mist);
	border: 1px solid var(--cfpp-line);
	border-radius: 6px;
	padding: 3px 9px;
}

.cf-product-page .price {
	display: block;
	margin: 0;
	color: var(--cfpp-ink);
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

/* WooCommerce Subscriptions term ("/ year", "/ month for 6 months") */
.cf-product-page .price .subscription-details {
	font-size: 14px;
	font-weight: 600;
	color: var(--cfpp-ink-2);
	letter-spacing: 0;
}

.cfpp-price-ctx {
	display: block;
	font-size: 13.5px;
	color: var(--cfpp-ink-2);
	margin-top: 2px;
}

.cfpp-included {
	padding: 12px 14px !important;
	border: 1px solid var(--cfpp-line);
	border-radius: 10px;
	display: grid;
	gap: 8px;
	font-size: 14px;
}

.cfpp-included li {
	position: relative;
	padding-left: 22px;
	color: var(--cfpp-ink-2);
}

.cfpp-included li strong {
	color: var(--cfpp-ink);
	font-weight: 600;
}

.cfpp-included li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 6px;
	width: 9px;
	height: 5px;
	border-left: 2.4px solid var(--cfpp-green);
	border-bottom: 2.4px solid var(--cfpp-green);
	transform: rotate(-45deg);
}

.cf-product-page .cfpp-checkout {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 16px;
	background: var(--cfpp-orange-text);
	color: #fff;
	border-radius: 8px;
	padding: 12px 18px;
	text-decoration: none;
	transition: background .15s;
}

.cf-product-page .cfpp-checkout:hover,
.cf-product-page .cfpp-checkout:focus {
	background: var(--cfpp-orange-text-d);
	color: #fff;
}

.cfpp-checkout span {
	transition: transform .15s;
}

.cfpp-checkout:hover span {
	transform: translateX(3px);
}

/* In place of the button when the bundle can't be bought. */
.cf-product-page .cfpp-unavailable {
	margin: 0;
	padding: 12px 18px;
	border-radius: 8px;
	background: var(--cfpp-mist);
	color: var(--cfpp-ink-2);
	font-size: 15px;
	font-weight: 600;
	text-align: center;
}

.cfpp-guarantee {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 13px;
	text-align: left;
	color: var(--cfpp-green-text);
	font-weight: 600;
}

.cfpp-guarantee svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

/* Extras under the gallery */
.cfpp-extras {
	grid-area: ext;
	display: grid;
	gap: 14px;
	align-content: start;
	padding: 0 8px;
}

.cfpp-rating {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 14.5px;
	color: var(--cfpp-ink-2);
}

.cfpp-rating span {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cfpp-rating svg {
	width: 16px;
	height: 16px;
}

.cfpp-star {
	color: #F5A623;
}

.cfpp-tick {
	color: var(--cfpp-green);
}

.cfpp-benefits {
	display: grid;
	gap: 8px;
	font-size: 15.5px;
}

.cfpp-benefits li {
	display: flex;
	gap: 10px;
}

.cfpp-benefits svg {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	color: var(--cfpp-green);
}

/* Sections */
.cfpp-sec {
	padding-top: 72px;
}

.cfpp-sec h2 {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -.015em;
	margin-bottom: 6px;
}

.cfpp-sub {
	margin: 0 0 28px;
	color: var(--cfpp-ink-2);
}

.cfpp-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.cfpp-features > div {
	border: 1px solid var(--cfpp-line);
	border-radius: 12px;
	padding: 22px;
	display: grid;
	gap: 8px;
	align-content: start;
}

.cfpp-ic {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: var(--cfpp-orange-t);
	color: var(--cfpp-orange-d);
	display: grid;
	place-items: center;
	margin-bottom: 6px;
}

.cfpp-ic svg {
	width: 22px;
	height: 22px;
}

.cfpp-features b {
	font-size: 17px;
}

.cfpp-features p {
	margin: 0;
	font-size: 14.5px;
	color: var(--cfpp-ink-2);
}

.cfpp-faq {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	align-items: start;
}

.cfpp-faq details {
	border: 1px solid var(--cfpp-line);
	border-radius: 10px;
	padding: 16px 18px;
	/* Let the column shrink below its longest word on narrow screens with large text. */
	min-width: 0;
}

.cfpp-faq summary {
	cursor: pointer;
	font-weight: 700;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.cfpp-faq summary::-webkit-details-marker {
	display: none;
}

.cfpp-faq summary::after {
	content: "+";
	color: var(--cfpp-orange-d);
	font-weight: 800;
	font-size: 20px;
	line-height: 1;
}

.cfpp-faq details[open] summary::after {
	content: "–";
}

.cfpp-faq details p {
	margin: 10px 0 0;
	color: var(--cfpp-ink-2);
	font-size: 15px;
}

/* Plan chooser (.cf-plan-chooser) */
.cfpc-form {
	gap: 12px;
}

.cfpc-row {
	display: grid;
	gap: 6px;
}

.cfpc-label {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--cfpp-ink-2);
}

.cfpc-swatches {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	gap: 2px;
	background: var(--cfpp-mist);
	border: 1px solid var(--cfpp-line);
	border-radius: 9px;
	padding: 3px;
}

.cf-product-page .cfpc-sw {
	font: inherit;
	cursor: pointer;
	border: 0;
	background: transparent;
	border-radius: 7px;
	padding: 7px 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cfpp-ink-2);
	text-align: center;
	white-space: nowrap;
	box-shadow: none;
	transition: background .15s, color .15s;
}

.cf-product-page .cfpc-sw:hover:not(:disabled) {
	color: var(--cfpp-ink);
	background: rgba(255, 255, 255, .6);
}

.cf-product-page .cfpc-sw[aria-pressed="true"] {
	background: #fff;
	color: var(--cfpp-orange-text);
	box-shadow: 0 1px 3px rgba(76, 21, 5, .14), 0 0 0 1px var(--cfpp-orange);
}

.cf-product-page .cfpc-sw:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.cfpc-details {
	border: 1px solid var(--cfpp-line);
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 13.5px;
}

.cfpc-details[hidden] {
	display: none;
}

.cfpc-details b {
	display: block;
	font-size: 13.5px;
	margin-bottom: 6px;
}

.cfpc-details ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 14px;
}

.cfpc-details li {
	position: relative;
	padding-left: 22px;
	color: var(--cfpp-ink-2);
}

.cfpc-details li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 6px;
	width: 9px;
	height: 5px;
	border-left: 2.4px solid var(--cfpp-green);
	border-bottom: 2.4px solid var(--cfpp-green);
	transform: rotate(-45deg);
}

/* "Get the CartFlows Suite" banner */
.cfpc-upsell {
	margin-top: 56px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 20px;
	align-items: center;
	border: 1px solid var(--cfpp-line);
	border-radius: 14px;
	padding: 18px 22px;
	background: var(--cfpp-mist);
}

.cfpc-upsell-ic {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--cfpp-maroon);
	color: #fff;
	display: grid;
	place-items: center;
}

.cfpc-upsell-ic svg {
	width: 24px;
	height: 24px;
}

.cfpc-upsell b {
	font-size: 17px;
	display: block;
}

.cfpc-upsell > div > span {
	font-size: 14.5px;
	color: var(--cfpp-ink-2);
}

.cf-product-page .cfpc-upsell-btn {
	display: inline-flex;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border-radius: 6px;
	padding: 11px 18px;
	background: #fff;
	color: var(--cfpp-orange-text);
	box-shadow: inset 0 0 0 1.5px var(--cfpp-orange);
	white-space: nowrap;
}

.cf-product-page .cfpc-upsell-btn:hover,
.cf-product-page .cfpc-upsell-btn:focus {
	background: var(--cfpp-orange-t);
	color: var(--cfpp-orange-text);
}

/* Elementor alert in the Astra hook on woocommerce_before_single_product. Elementor pins the close button 10px from the top, which sits high on these pages, and leaves no room for it, so wrapped text ran under it. */
.single-product .elementor-alert {
	padding-right: 40px;
}

.single-product .elementor-alert .elementor-alert-dismiss {
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 960px) {
	.cfpp-top {
		grid-template-columns: 1fr;
		grid-template-areas: "gal" "sum" "ext";
	}

	.cfpp-gallery {
		padding: 16px;
	}

	.cfpp-gallery img {
		max-width: none;
		width: auto;
		height: 120px;
	}

	.cfpp-extras {
		padding: 0;
	}

	.cfpp-features {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.cfpp-eyebrow {
		display: none;
	}

	.cf-product-page .product_title {
		font-size: 30px;
	}

	.cfpp-features,
	.cfpp-faq,
	.cfpc-details ul,
	.cfpc-upsell {
		grid-template-columns: 1fr;
	}

	.cf-product-page .cfpc-sw {
		font-size: 13px;
		padding: 7px 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cf-product-page * {
		transition: none !important;
	}
}
