/*
 * Turf product page (templates/single-turf-product.php). Uses the tokens from htp-ui.css.
 * Signature: the "grower's tag" (.htp-tag), the facts card styled like a nursery plant tag.
 */

.htp-pdp {
	/* A deep-green band behind the overlaid site header, whose white links need a dark backdrop. */
	background: linear-gradient(to bottom, var(--htp-sward) 0, var(--htp-sward) var(--htp-header-h, 126px), #fff var(--htp-header-h, 126px));
	color: var(--htp-ink);
	font-family: Montserrat, sans-serif;
	padding: 150px 0 72px; /* clears the overlaid site header */
}
.htp-pdp__wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}
/* Doubled class: Breakdance's global heading colour (#1ab35b, 2.9:1 on white) would otherwise win. */
.htp-pdp.htp-pdp h1,
.htp-pdp.htp-pdp h2,
.htp-pdp.htp-pdp h3 {
	font-family: Poppins, sans-serif;
	color: var(--htp-ink);
	letter-spacing: -.01em;
}

/* Breadcrumb */
.htp-pdp__crumbs {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--htp-muted);
}
.htp-pdp.htp-pdp .htp-pdp__crumbs a { color: var(--htp-green); text-decoration: none; }
.htp-pdp__crumbs a:hover { text-decoration: underline; }

/* Imagify wraps images in <picture> for WebP, so the size classes land on the wrapper:
   size the wrapper and make the <img> inside fill it. */
.htp-pdp picture.htp-pdp__photo,
.htp-pdp picture.htp-pdp__thumb,
.htp-pdp picture.htp-variety__img {
	overflow: hidden;
}
.htp-pdp picture.htp-pdp__photo img,
.htp-pdp picture.htp-pdp__thumb img,
.htp-pdp picture.htp-variety__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Hero: photo | title, price, buy panel ─────────────────────────── */
.htp-pdp__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}
.htp-pdp__media {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}
.htp-pdp__photo {
	grid-column: 1 / -1;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 18px;
	display: block;
}
.htp-pdp__thumb {
	width: 100%;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}
.htp-pdp__eyebrow {
	margin: 0 0 8px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--htp-green);
}
.htp-pdp.htp-pdp .htp-pdp__title {
	margin: 0 0 14px;
	text-wrap: balance;
	font-size: clamp(30px, 3.4vw, 44px);
	font-weight: 700;
	line-height: 1.08;
}
.htp-pdp__summary p {
	margin: 0 0 16px;
	font-size: 17px;
	line-height: 1.6;
	color: #3d4a42;
}
.htp-pdp__rate {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 4px 0 18px;
}
.htp-pdp__rate-num {
	font: 700 36px/1 Poppins, sans-serif;
	color: var(--htp-green);
	font-variant-numeric: tabular-nums;
}
.htp-pdp__rate-unit { font-size: 15px; color: var(--htp-muted); }

/* Buy panel (the WooCommerce add-to-cart form) */
.htp-pdp form.cart {
	display: block;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--htp-line);
	border-radius: 18px;
	background: var(--htp-mist);
}
.htp-pdp form.cart div.quantity { display: none; } /* turf is priced by area, quantity stays 1 */
.htp-buy__panel { display: grid; gap: 10px; margin-bottom: 14px; }
.htp-buy__label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--htp-muted);
}
.htp-buy .htp-measure { width: 100%; }
.htp-buy .htp-measure input.sqmm-input {
	width: 100%;
	font-size: 20px;
	padding: 12px 14px 16px;
}
.htp-buy .htp-measure__unit { font-size: 16px; padding: 0 16px; }
.htp-buy__line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding-top: 4px;
	font-size: 15px;
}
.htp-buy__price {
	font: 700 24px/1 Poppins, sans-serif;
	color: var(--htp-ink);
	font-variant-numeric: tabular-nums;
}
.htp-buy__price.is-empty { font: 500 14px/1.2 Montserrat, sans-serif; color: var(--htp-muted); }
.htp-buy__note { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--htp-muted); }
.htp-pdp form.cart .single_add_to_cart_button {
	display: flex;
	width: 100%;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 9999px;
	background-image: linear-gradient(120deg, var(--htp-cta-from) 0%, var(--htp-cta-to) 100%);
	color: #fff;
	font: 600 15px/1 Montserrat, sans-serif;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
}
.htp-pdp form.cart .single_add_to_cart_button:hover { background-image: linear-gradient(120deg, #0b5c31 0%, #106c3d 100%); }
.htp-pdp form.cart .single_add_to_cart_button:focus-visible,
.htp-faq summary:focus-visible,
.htp-variety:focus-visible {
	outline: 2px solid var(--htp-green-deep);
	outline-offset: 3px;
}

/* ── Facts: intro + the grower's tag ───────────────────────────────── */
.htp-pdp__facts {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
	margin-top: 72px;
}
.htp-pdp__lead { font-size: 18.5px; line-height: 1.6; color: var(--htp-ink); }

.htp-tag {
	position: relative;
	padding: 34px 26px 22px;
	border: 1px solid var(--htp-line);
	border-radius: 14px 14px 28px 28px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.htp-tag::before { /* the punched hole a tag hangs from */
	content: "";
	position: absolute;
	top: 12px;
	left: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	border-radius: 50%;
	border: 2px solid var(--htp-line);
	background: var(--htp-mist);
}
.htp-tag__title {
	margin: 0 0 12px;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--htp-green);
	font: 600 17px/1.3 Poppins, sans-serif;
	color: var(--htp-ink);
	text-align: center;
}
.htp-tag__rows { margin: 0; }
.htp-tag__row {
	display: grid;
	grid-template-columns: 9.5em minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--htp-line);
}
.htp-tag__row:last-child { border-bottom: 0; }
.htp-tag dt {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--htp-muted);
	padding-top: 2px;
}
.htp-tag dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.htp-tag dd em { font-weight: 500; }

/* ── Readable description sections ─────────────────────────────────── */
.htp-pdp__section { margin-top: 56px; }
.htp-pdp__prose { max-width: 70ch; }
.htp-pdp.htp-pdp .htp-pdp__prose h2 { margin: 0 0 14px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; line-height: 1.2; }
.htp-pdp.htp-pdp .htp-pdp__prose h3 { margin: 26px 0 10px; font-size: 19px; font-weight: 600; }
.htp-pdp__prose p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.7; color: #3d4a42; }
.htp-pdp.htp-pdp .htp-pdp__prose a { color: var(--htp-green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.htp-pdp__prose ul { margin: 0 0 16px; padding: 0; list-style: none; }
.htp-pdp__prose ul li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 28px;
	font-size: 16px;
	line-height: 1.55;
}
.htp-pdp__prose ul li::before { /* check mark */
	content: "";
	position: absolute;
	left: 2px;
	top: 6px;
	width: 12px;
	height: 7px;
	border-left: 2.5px solid var(--htp-green);
	border-bottom: 2.5px solid var(--htp-green);
	transform: rotate(-45deg);
}
/* Comparison tables written into the description (e.g. Wintergreen vs Sir Walter). */
.htp-pdp__prose table {
	width: 100%;
	margin: 8px 0 20px;
	border-collapse: collapse;
	font-size: 15px;
}
.htp-pdp__prose table th,
.htp-pdp__prose table td {
	padding: 10px 12px !important; /* the description carries inline cell styles */
	border: 1px solid var(--htp-line) !important;
	text-align: left;
	vertical-align: top;
}
.htp-pdp__prose table th { background: var(--htp-mist) !important; font-weight: 600; }
.htp-pdp__prose table caption { text-align: left; font-weight: 600; padding-bottom: 8px; }

/* ── FAQ accordion ─────────────────────────────────────────────────── */
.htp-pdp__faqs { max-width: 820px; margin-top: 64px; }
.htp-pdp.htp-pdp .htp-pdp__faqs > h2 { margin: 0 0 12px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; }
.htp-faq { border-bottom: 1px solid var(--htp-line); }
.htp-faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 44px;
	padding: 16px 0;
	font: 600 17px/1.35 Poppins, sans-serif;
	color: var(--htp-ink);
	cursor: pointer;
	list-style: none;
}
.htp-faq summary::-webkit-details-marker { display: none; }
.htp-faq summary::after { /* plus / minus */
	content: "+";
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--htp-mist);
	color: var(--htp-green);
	font: 600 20px/30px Montserrat, sans-serif;
	text-align: center;
}
.htp-faq[open] summary::after { content: "–"; }
.htp-faq__answer { padding: 0 0 12px; }

/* ── Other varieties ───────────────────────────────────────────────── */
.htp-pdp__others { margin-top: 72px; }
.htp-pdp.htp-pdp .htp-pdp__others h2 { margin: 0 0 18px; font-size: clamp(22px, 2.2vw, 26px); font-weight: 600; }
.htp-pdp__others-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
	max-width: 760px;
}
.htp-pdp .htp-variety {
	display: grid;
	gap: 4px;
	padding-bottom: 14px;
	border: 1px solid var(--htp-line);
	border-radius: 16px;
	overflow: hidden;
	color: var(--htp-ink);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease;
}
.htp-variety:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .1); }
.htp-variety__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 8px; }
.htp-pdp .htp-variety__name { padding: 0 16px; font: 600 17px/1.3 Poppins, sans-serif; color: var(--htp-ink); }
.htp-pdp .htp-variety__price { padding: 0 16px; font-weight: 700; color: var(--htp-green); }
.htp-variety__price small { font-weight: 500; color: var(--htp-muted); }

/* ── Tablets and phones ────────────────────────────────────────────── */
@media (max-width: 960px) {
	.htp-pdp { padding-top: 132px; --htp-header-h: 108px; }
	.htp-pdp__hero { gap: 28px; }
	.htp-pdp__facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.htp-pdp__facts { margin-top: 48px; }
	.htp-tag { max-width: 520px; }
}
@media (max-width: 760px) {
	.htp-pdp__hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.htp-pdp__wrap { padding: 0 16px; }
	/* Wide comparison tables scroll inside their own box instead of the whole page. */
	.htp-pdp__prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	/* Phones: get the buy panel into the first screen. Shorter photo, no extra thumbnail,
	   and the summary paragraph moves below the panel. */
	.htp-pdp__photo { aspect-ratio: 16 / 9; }
	.htp-pdp__thumb { display: none; }
	.htp-pdp__buy { display: flex; flex-direction: column; }
	.htp-pdp__summary { order: 5; margin-top: 18px; }
	.htp-pdp__media { gap: 8px; }
	.htp-pdp__rate-num { font-size: 30px; }
	.htp-tag { padding: 32px 18px 18px; }
	.htp-tag__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.htp-faq summary { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.htp-pdp .htp-variety { transition: none; }
	.htp-pdp .htp-variety:hover { transform: none; }
}

/* ── WooCommerce notices (e.g. "please enter your area") ───────────── */
.htp-pdp .woocommerce-notices-wrapper ul,
.htp-pdp .woocommerce-notices-wrapper .woocommerce-message,
.htp-pdp .woocommerce-notices-wrapper .woocommerce-info {
	list-style: none;
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 12px;
	border: 1px solid var(--htp-line);
	background: var(--htp-mist);
	font-size: 15px;
	line-height: 1.5;
	color: var(--htp-ink);
}
.htp-pdp .woocommerce-notices-wrapper ul.woocommerce-error {
	border-color: rgba(180, 35, 24, .45);
	background: #fdf4f3;
	color: var(--htp-clay);
}
.htp-pdp .woocommerce-notices-wrapper li { margin: 0; padding: 0; }

/* ── Trust row (under the buy panel) ───────────────────────────────── */
.htp-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--htp-ink);
}
.htp-trust li { position: relative; padding-left: 22px; }
.htp-trust li::before { /* check mark, as in the description lists */
	content: "";
	position: absolute;
	left: 2px;
	top: 4px;
	width: 11px;
	height: 6px;
	border-left: 2.5px solid var(--htp-green);
	border-bottom: 2.5px solid var(--htp-green);
	transform: rotate(-45deg);
}

/* ── Client testimonials ───────────────────────────────────────────── */
.htp-quotes { margin-top: 72px; }
.htp-pdp.htp-pdp .htp-quotes h2 { margin: 0 0 6px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; }
.htp-quotes__intro { margin: 0 0 22px; font-size: 16px; color: var(--htp-muted); }
.htp-quotes__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 18px;
}
.htp-quote {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 18px;
	margin: 0;
	padding: 24px;
	border: 1px solid var(--htp-line);
	box-shadow: inset 0 4px 0 var(--htp-green);
	border-radius: 16px;
	background: #fff;
}
.htp-quote blockquote { margin: 0; }
.htp-quote blockquote p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: #3d4a42; }
.htp-quote blockquote p:last-child { margin-bottom: 0; }
.htp-quote figcaption { display: grid; gap: 2px; }
.htp-quote__name { font: 600 16px/1.3 Poppins, sans-serif; color: var(--htp-ink); }
.htp-quote__role { font-size: 13.5px; color: var(--htp-muted); }
