/* Review Engine components. Colours come from the theme's --re-primary. */
:root {
	--re-primary: #2563eb;
	--re-primary-dark: color-mix(in srgb, var(--re-primary) 75%, #000);
	--re-primary-soft: color-mix(in srgb, var(--re-primary) 10%, #fff);
	--re-good: #15803d;
	--re-bad: #b91c1c;
	--re-border: #e5e7eb;
	--re-muted: #6b7280;
	--re-radius: 12px;
}

.re-disclaimer { font-size: .85rem; color: var(--re-muted); background: #f9fafb; border-left: 3px solid var(--re-primary); padding: .6rem .9rem; border-radius: 6px; }

.re-score { display: inline-flex; align-items: baseline; gap: 1px; background: var(--re-primary); color: #fff; border-radius: 10px; padding: .35rem .6rem; line-height: 1; white-space: nowrap; }
.re-score b { font-size: 1.35rem; }
.re-score small { font-size: .75rem; opacity: .85; }
.re-score.sm { padding: .25rem .45rem; border-radius: 8px; }
.re-score.sm b { font-size: 1rem; }
.re-score.lg { padding: .7rem .9rem; border-radius: 14px; }
.re-score.lg b { font-size: 2.2rem; }

.re-buttons { display: flex; flex-direction: column; gap: .45rem; margin: .6rem 0; }
.re-btn { display: block; text-align: center; font-weight: 700; font-size: .92rem; padding: .65rem .9rem; border-radius: 8px; text-decoration: none !important; background: var(--re-store, var(--re-primary)); color: var(--re-store-text, #fff) !important; transition: filter .15s, transform .15s; }
.re-btn:hover { filter: brightness(.94); transform: translateY(-1px); }
.re-summary .re-buttons, .re-compare .re-buttons { margin: 0; }
.re-summary .re-btn, .re-compare .re-btn { font-size: .8rem; padding: .45rem .6rem; }

.re-img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 8px; }
.re-img-empty { background: #f3f4f6; }
.re-price { display: block; font-weight: 700; margin-top: .5rem; }
.re-price small { font-weight: 400; color: var(--re-muted); }

/* Product card */
.re-card { border: 1px solid var(--re-border); border-radius: var(--re-radius); margin: 1.5rem 0; overflow: hidden; background: #fff; scroll-margin-top: 80px; }
.re-card-head { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem; background: var(--re-primary-soft); }
.re-pos { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--re-primary); color: #fff; font-weight: 800; display: grid; place-items: center; }
.re-card-title { flex: 1; min-width: 0; }
.re-card-title h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.re-brand { font-size: .85rem; color: var(--re-muted); margin-right: .5rem; }
.re-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--re-primary-dark); background: #fff; border: 1px solid color-mix(in srgb, var(--re-primary) 30%, #fff); padding: .1rem .5rem; border-radius: 99px; margin-top: .25rem; }
.re-card-body { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; padding: 1.1rem; }
.re-card-text > p:first-child { margin-top: 0; }
.re-more { font-size: .9rem; font-weight: 600; color: var(--re-primary-dark); }

/* Pros / cons */
.re-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .8rem 0; }
.re-proscons h4 { margin: 0 0 .4rem; font-size: .95rem; }
.re-pros h4 { color: var(--re-good); }
.re-cons h4 { color: var(--re-bad); }
.re-proscons ul { list-style: none; margin: 0; padding: 0; }
.re-proscons li { position: relative; padding-left: 1.4rem; margin: .3rem 0; font-size: .95rem; }
.re-list-pros li::before { content: "✓"; position: absolute; left: 0; color: var(--re-good); font-weight: 800; }
.re-list-cons li::before { content: "✕"; position: absolute; left: 0; color: var(--re-bad); font-weight: 800; }

/* Tables */
.re-table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--re-border); border-radius: var(--re-radius); }
.re-summary, .re-compare, .re-specs { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 0; }
.re-summary th, .re-summary td, .re-compare th, .re-compare td, .re-specs th, .re-specs td { padding: .7rem .8rem; border-bottom: 1px solid var(--re-border); text-align: left; vertical-align: middle; }
.re-summary thead th, .re-compare thead th { background: #f9fafb; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--re-muted); }
.re-summary tr:last-child td, .re-compare tr:last-child td { border-bottom: 0; }
.re-sum-pos { font-weight: 800; color: var(--re-primary); }
.re-sum-prod a { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: inherit; text-decoration: none; }
.re-sum-prod .re-img { width: 48px; flex: 0 0 48px; }
.re-compare thead th { text-transform: none; font-size: .95rem; color: inherit; text-align: center; min-width: 160px; }
.re-compare thead th .re-img { width: 90px; margin: 0 auto .4rem; }
.re-compare thead th em { display: block; font-style: normal; font-size: .75rem; font-weight: 800; color: #fff; background: var(--re-good); border-radius: 99px; padding: .1rem .5rem; margin: .3rem auto 0; width: max-content; }
.re-compare td { text-align: center; }
.re-compare tbody th { background: #f9fafb; font-weight: 600; white-space: nowrap; }
.re-compare .re-winner { background: color-mix(in srgb, var(--re-good) 8%, #fff); }
.re-specs { border: 1px solid var(--re-border); border-radius: var(--re-radius); overflow: hidden; }
.re-specs th { width: 40%; background: #f9fafb; font-weight: 600; }

/* Criteria bars */
.re-criteria { display: grid; gap: .55rem; }
.re-crit { display: grid; grid-template-columns: 160px 1fr 3rem; align-items: center; gap: .8rem; }
.re-bar { height: 10px; background: #f3f4f6; border-radius: 99px; overflow: hidden; }
.re-bar i { display: block; height: 100%; background: var(--re-primary); border-radius: 99px; }
.re-crit-val { font-weight: 700; text-align: right; }

/* Review verdict */
.re-verdict { display: grid; grid-template-columns: 180px 1fr auto; gap: 1.2rem; align-items: center; border: 2px solid var(--re-primary); border-radius: var(--re-radius); padding: 1.2rem; margin: 1.5rem 0; background: #fff; }
.re-verdict h2 { margin: .2rem 0 .4rem; font-size: 1.4rem; }
.re-verdict .re-buttons { flex-direction: row; flex-wrap: wrap; }
.re-kicker { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--re-primary-dark); }
.re-verdict-sum { margin: 0; }
.re-winner-box { border: 1px solid var(--re-border); border-left: 4px solid var(--re-good); border-radius: var(--re-radius); padding: 1rem 1.2rem; margin: 1.5rem 0; background: #fff; }
.re-winner-box p { margin: .3rem 0 .6rem; }
.re-winner-box .re-buttons { flex-direction: row; flex-wrap: wrap; }

.re-vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.re-vs-col { border: 1px solid var(--re-border); border-radius: var(--re-radius); padding: 1rem; }
.re-vs-col h3 { margin-top: 0; }
.re-vs .re-proscons { grid-template-columns: 1fr; }

.re-final { background: var(--re-primary-soft); border-radius: var(--re-radius); padding: 1rem 1.3rem; margin: 2rem 0; }
.re-final h2 { margin-top: .4rem; }

/* FAQ */
.re-faq details { border: 1px solid var(--re-border); border-radius: 10px; margin: .6rem 0; background: #fff; }
.re-faq summary { cursor: pointer; font-weight: 700; padding: .9rem 1rem; list-style: none; position: relative; padding-right: 2.5rem; }
.re-faq summary::-webkit-details-marker { display: none; }
.re-faq summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--re-primary); }
.re-faq details[open] summary::after { content: "–"; }
.re-faq details > div { padding: 0 1rem .6rem; }

@media (max-width: 640px) {
	.re-card-body { grid-template-columns: 1fr; }
	.re-card-media .re-img { max-width: 220px; margin: 0 auto; }
	.re-proscons { grid-template-columns: 1fr; }
	.re-verdict { grid-template-columns: 1fr; text-align: center; }
	.re-verdict-media .re-img { max-width: 200px; margin: 0 auto; }
	.re-verdict .re-buttons { justify-content: center; }
	.re-crit { grid-template-columns: 110px 1fr 2.5rem; }
}

.re-related ul { padding-left: 1.2rem; }
.re-related li { margin: .35rem 0; }
.re-toc { background: #f9fafb; border: 1px solid var(--re-border); border-radius: var(--re-radius); padding: .4rem 1rem; margin: 1.5rem 0; }
.re-toc summary { cursor: pointer; font-weight: 700; padding: .5rem 0; }
.re-toc ol { margin: .2rem 0 .8rem; padding-left: 1.3rem; }
.re-toc li { margin: .25rem 0; font-size: .95rem; }
.re-toc a { text-decoration: none; }
.re-toc a:hover { text-decoration: underline; }

/* ---------- Conversion layout: picks, table, sticky bar ---------- */
.re-intro > p:first-child { font-size: 1.08rem; }
.re-kicker { display: block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--re-primary); margin: 0 0 .5rem; }

.re-picks-wrap { margin: 1.4rem 0 1.8rem; }
.re-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.re-pick { position: relative; display: flex; flex-direction: column; gap: .5rem; border: 1px solid var(--re-border); border-radius: var(--re-radius); padding: 2.1rem .9rem .9rem; background: #fff; }
.re-pick-first { border: 2px solid var(--re-primary); box-shadow: 0 6px 20px color-mix(in srgb, var(--re-primary) 15%, transparent); }
.re-pick-label { position: absolute; top: 0; left: 0; right: 0; padding: .35rem .7rem; font-size: .75rem; font-weight: 800; color: var(--re-primary-dark); background: var(--re-primary-soft); border-radius: calc(var(--re-radius) - 1px) calc(var(--re-radius) - 1px) 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-pick-first .re-pick-label { background: var(--re-primary); color: #fff; }
.re-pick-media .re-img { max-width: 150px; margin: 0 auto; }
.re-pick-info { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; flex: 1; }
.re-pick-name { font-weight: 700; line-height: 1.3; color: inherit; text-decoration: none; font-size: .95rem; }
.re-pick-name:hover { text-decoration: underline; }
.re-pick-cta .re-buttons { margin: 0; }
.re-pick-more { display: block; text-align: center; font-size: .85rem; margin-top: .4rem; }

.re-summary tbody tr:first-child { background: var(--re-primary-soft); }
.re-summary .re-sum-why { color: var(--re-muted); font-size: .88rem; }
.re-summary .re-sum-cta .re-btn { white-space: nowrap; }
@media (min-width: 761px) { .re-summary .re-sum-prod span { min-width: 9rem; } }
.re-list > h2 { margin-bottom: .4rem; }
.re-final-cta { max-width: 360px; margin: 1rem 0 1.5rem; }

.re-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none; align-items: center; gap: .6rem; padding: .55rem 16px calc(.55rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--re-border); box-shadow: 0 -6px 18px rgba(0,0,0,.08); transform: translateY(110%); transition: transform .2s; }
.re-sticky .re-img { width: 42px; flex: 0 0 42px; }
.re-sticky-text { flex: 1; min-width: 0; line-height: 1.2; }
.re-sticky-text small { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--re-primary); }
.re-sticky-text strong { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-sticky .re-buttons { margin: 0; flex: 0 0 auto; }
.re-sticky .re-btn { padding: .55rem .8rem; font-size: .82rem; white-space: nowrap; }
.re-sticky.is-on { transform: none; }

@media (max-width: 900px) {
	.re-sticky { display: flex; }
}
@media (max-width: 760px) {
	.re-picks { grid-template-columns: 1fr; gap: .6rem; }
	.re-pick { display: grid; grid-template-columns: 76px 1fr; grid-template-areas: "media info" "cta cta"; align-items: center; padding: 2rem .75rem .75rem; }
	.re-pick-media { grid-area: media; }
	.re-pick-media .re-img { max-width: 76px; }
	.re-pick-info { grid-area: info; }
	.re-pick-cta { grid-area: cta; display: flex; align-items: center; gap: .8rem; }
	.re-pick-cta .re-buttons { flex: 1; }
	.re-pick-more { margin: 0; white-space: nowrap; }

	/* Table rows become compact cards on phones: no sideways scrolling. */
	.re-table-wrap:has(.re-summary) { border: 0; overflow: visible; }
	.re-summary thead { display: none; }
	.re-summary, .re-summary tbody { display: block; }
	.re-summary tr { display: grid; grid-template-columns: 1.6rem 1fr auto; grid-template-areas: "pos prod score" "pos why why" "pos cta cta"; gap: .3rem .6rem; align-items: center; padding: .7rem .75rem; border: 1px solid var(--re-border); border-radius: 10px; margin-bottom: .5rem; }
	.re-summary td { display: block; padding: 0; border: 0; }
	.re-summary .re-sum-pos { grid-area: pos; align-self: start; }
	.re-summary .re-sum-prod { grid-area: prod; }
	.re-summary .re-sum-score { grid-area: score; }
	.re-summary .re-sum-why { grid-area: why; }
	.re-summary .re-sum-cta { grid-area: cta; }
}
