/* Home Gym Picks UK – ranked list + homepage components.
   Works with or without the classic-theme .wp-block-group__inner-container wrapper. */
:root {
	--hgp-accent: #c2410c;        /* the one accent colour (burnt orange) */
	--hgp-accent-dark: #9a3412;
	--hgp-accent-tint: #fdf0e8;
	--hgp-ink: #1a202c;
	--hgp-muted: #5a6474;
	--hgp-line: #e5e9ef;
	--hgp-radius: 14px;
}

/* ---------- Lede, disclosure, meta ---------- */
.hgp-lede { font-size: 1.15em; color: var(--hgp-ink); }
.hgp-updated { font-size: .9em; color: var(--hgp-muted); }
.hgp-disclosure { font-size: .9em; }
.hgp-disclosure { background: #f7fafc; border-left: 4px solid var(--hgp-accent); padding: .75em 1em; border-radius: 6px; margin: 1.25em 0; }
.hgp-disclosure p { margin: 0; color: var(--hgp-muted); }
.hgp-placeholder-notice { background: #fff8e1; border: 1px dashed #c99a00; padding: .75em 1em; border-radius: 8px; font-weight: 600; }

/* ---------- Quick picks table ---------- */
.hgp-summary table { border-collapse: collapse; width: 100%; font-size: .95em; }
.hgp-summary th { background: var(--hgp-accent); color: #fff; text-align: left; }
.hgp-summary table, .hgp-summary th, .hgp-summary td { border: 1px solid var(--hgp-line) !important; }
.hgp-summary th, .hgp-summary td { padding: .6em .75em; }
.hgp-summary { margin-bottom: 2rem; }
.hgp-summary tr:nth-child(even) td { background: #f9fbfc; }
.hgp-summary td:first-child, .hgp-summary th:first-child, .hgp-summary td:nth-child(3), .hgp-summary th:nth-child(3) { width: 4.5em; text-align: center; }
.hgp-summary a { color: var(--hgp-accent-dark); font-weight: 600; text-decoration: none; }
.hgp-summary a:hover { text-decoration: underline; }

/* ---------- Ranked item card ---------- */
.hgp-rank-item {
	position: relative; border: 1px solid var(--hgp-line); border-radius: var(--hgp-radius);
	padding: 1.25rem 1.25rem 1.4rem; margin: 0 0 1.5rem; background: #fff;
	box-shadow: 0 1px 2px rgba(16,24,40,.04); scroll-margin-top: 90px;
}
.hgp-rank-item.is-top-pick { border: 2px solid var(--hgp-accent); box-shadow: 0 8px 24px rgba(15,118,110,.12); }
.hgp-rank-item p { margin: 0 0 .6rem; }

.hgp-rank-head > .wp-block-group__inner-container, .hgp-rank-head:not(:has(> .wp-block-group__inner-container)) {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem;
}
.hgp-rank-head { margin-bottom: .6rem; }
.hgp-rank-head > .wp-block-group__inner-container > *, .hgp-rank-head > :not(.wp-block-group__inner-container) { margin: 0 !important; }
.hgp-rank {
	width: 2.4rem; height: 2.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--hgp-ink); color: #fff; font-weight: 800; font-size: 1.05rem; line-height: 1;
}
.is-top-pick .hgp-rank { background: var(--hgp-accent); }
.hgp-rank::before { content: "#"; font-size: .7em; opacity: .8; margin-right: 1px; }
h3.hgp-product-name { font-size: 1.2rem; line-height: 1.3; margin: 0; }
.hgp-score {
	background: var(--hgp-accent); color: #fff; font-weight: 800; border-radius: 999px;
	padding: .35rem .75rem; white-space: nowrap; font-size: 1rem; line-height: 1.2;
}

.hgp-badges > .wp-block-group__inner-container, .hgp-badges:not(:has(> .wp-block-group__inner-container)) { display: flex; flex-wrap: wrap; gap: .4rem; }
.hgp-badges { margin-bottom: .6rem; }
.hgp-badges p, .hgp-badge { margin: 0 !important; }
.hgp-badge {
	display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .04em;
	padding: .3rem .6rem; border-radius: 6px; background: var(--hgp-accent-tint); color: var(--hgp-accent-dark);
	border: 1px solid rgba(15,118,110,.25);
}
.hgp-badge--top { background: var(--hgp-accent); color: #fff; border-color: var(--hgp-accent); }
.hgp-meta { font-size: .9rem; color: var(--hgp-muted); }
.hgp-why { color: var(--hgp-ink); }

/* ---------- #1 review box ---------- */
.hgp-review-box { background: var(--hgp-accent-tint); border-radius: 10px; padding: 1rem 1.15rem; margin: .9rem 0 1rem; }
.hgp-review-box h4 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--hgp-accent-dark); }
.hgp-review-box ul { margin: 0 0 .75rem 1.1rem; padding: 0; }
.hgp-review-box li { margin-bottom: .2rem; }
.hgp-pros li::marker { content: "✓  "; color: var(--hgp-accent); }
.hgp-cons li::marker { content: "–  "; color: var(--hgp-muted); }
.hgp-pros-label, .hgp-cons-label { margin-bottom: .25rem !important; }

/* ---------- CTA button ---------- */
.hgp-rank-item .wp-block-buttons { margin-top: .75rem; }
.wp-block-button.hgp-cta .wp-block-button__link {
	background: var(--hgp-accent); color: #fff; border-radius: 10px; font-weight: 700;
	padding: .8rem 1.4rem; text-decoration: none; display: inline-block; transition: background .15s ease;
}
.wp-block-button.hgp-cta .wp-block-button__link:hover, .wp-block-button.hgp-cta .wp-block-button__link:focus { background: var(--hgp-accent-dark); color: #fff; }
.wp-block-button.hgp-cta .wp-block-button__link::after { content: " →"; }

/* ---------- Homepage ---------- */
.hgp-hero { padding: 2.5rem 0 1rem; text-align: center; }
.hgp-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.15; margin: 0 0 .75rem; }
.hgp-hero .hgp-hero-sub { font-size: 1.15rem; color: var(--hgp-muted); max-width: 40rem; margin: 0 auto 1rem; }
.hgp-hero .wp-block-buttons { justify-content: center; }
.hgp-card-grid > .wp-block-group__inner-container, .hgp-card-grid:not(:has(> .wp-block-group__inner-container)) {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem;
}
.hgp-card-grid { margin: 1.5rem 0 2.5rem; }
.hgp-card { border: 1px solid var(--hgp-line); border-radius: var(--hgp-radius); padding: 1.25rem; background: #fff; position: relative; transition: box-shadow .15s ease, transform .15s ease; }
.hgp-card:hover { box-shadow: 0 10px 24px rgba(16,24,40,.08); transform: translateY(-2px); }
.hgp-card h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.hgp-card h3 a { color: var(--hgp-ink); text-decoration: none; }
.hgp-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.hgp-card p { margin: 0 0 .5rem; color: var(--hgp-muted); }
.hgp-card .hgp-card-cta { color: var(--hgp-accent); font-weight: 700; margin: 0; }
.hgp-card.is-coming-soon { background: #fafbfc; }
.hgp-card.is-coming-soon .hgp-card-cta { color: var(--hgp-muted); }
.hgp-icon { font-size: 1.8rem; line-height: 1; margin-bottom: .5rem !important; }
.hgp-trust > .wp-block-group__inner-container, .hgp-trust:not(:has(> .wp-block-group__inner-container)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.hgp-trust .hgp-trust-item { background: #f7fafc; border-radius: 12px; padding: 1rem 1.15rem; }
.hgp-trust .hgp-trust-item h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
.hgp-trust .hgp-trust-item p { margin: 0; color: var(--hgp-muted); font-size: .95rem; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.hgp-rank-item { padding: 1rem 1rem 1.15rem; }
	.hgp-rank-head > .wp-block-group__inner-container, .hgp-rank-head:not(:has(> .wp-block-group__inner-container)) { grid-template-columns: auto 1fr; }
	.hgp-rank-head .hgp-score { grid-column: 2; justify-self: start; }
	h3.hgp-product-name { font-size: 1.08rem; }
	.wp-block-button.hgp-cta, .wp-block-button.hgp-cta .wp-block-button__link { width: 100%; text-align: center; }
	.hgp-summary td:nth-child(4), .hgp-summary th:nth-child(4) { display: none; }
	.hgp-summary table { font-size: .88em; }
}

/* ---------- Tame classic-theme flow margins inside components ---------- */
.hgp-rank-item > .wp-block-group__inner-container > *,
.hgp-review-box > .wp-block-group__inner-container > *,
.hgp-card > .wp-block-group__inner-container > *,
.hgp-trust-item > .wp-block-group__inner-container > * { margin-top: 0; margin-bottom: .65rem; }
.hgp-rank-item > .wp-block-group__inner-container > :last-child,
.hgp-review-box > .wp-block-group__inner-container > :last-child,
.hgp-card > .wp-block-group__inner-container > :last-child,
.hgp-trust-item > .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
.hgp-card-grid > .wp-block-group__inner-container > *,
.hgp-trust > .wp-block-group__inner-container > * { margin: 0 !important; }
.hgp-rank-item .hgp-review-box { margin: .9rem 0 1rem; }

/* --- Photo-led homepage (Nov 2026) --- */
.hgp-hero.has-photo, .hgp-hero.has-photo > .wp-block-group__inner-container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; text-align: left; padding: 2rem 0 1.5rem; }
.hgp-hero.has-photo .hgp-hero-sub { margin: 0 0 1.25rem; }
.hgp-hero.has-photo .wp-block-buttons { justify-content: flex-start; }
.hgp-hero-img { margin: 0 !important; }
.hgp-hero-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--hgp-radius); box-shadow: 0 14px 34px rgba(194,65,12,.16); display: block; }
@media (max-width: 781px) {
	.hgp-hero.has-photo { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
	.hgp-hero.has-photo .wp-block-buttons { justify-content: center; }
	.hgp-hero.has-photo .hgp-hero-sub { margin: 0 auto 1rem; }
	.hgp-hero.has-photo .hgp-hero-img { order: -1; }
}
.hgp-card { overflow: hidden; }
.hgp-card-img { margin: -1.25rem -1.25rem 1rem !important; }
.hgp-card-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.hgp-card.is-coming-soon .hgp-card-img img { filter: saturate(.85); }
.hgp-score-label { font-size: .72em; font-weight: 600; opacity: .9; margin-left: .15em; text-transform: lowercase; }

/* --- Home Gym Picks fixes (9 Nov 2026) --- */
/* Kadence wraps group children in .wp-block-group__inner-container, so the hero grid must apply there too (only one grid level). */
.hgp-hero.has-photo:has(> .wp-block-group__inner-container) { display: block; padding: 2rem 0 1.5rem; }
.hgp-summary th { overflow-wrap: normal; word-break: normal; hyphens: none; }
.hgp-summary th:nth-child(1) { width: 3rem; }
.hgp-summary table.has-fixed-layout th:nth-child(3), .hgp-summary table.has-fixed-layout td:nth-child(3) { width: 7.5em !important; }
.hgp-summary td:nth-child(3) { text-align: center; }
@media (max-width: 781px) {
	.hgp-hero.has-photo > .wp-block-group__inner-container { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
	.hgp-hero.has-photo > .wp-block-group__inner-container .hgp-hero-img { order: -1; }
}
