/*
Theme Name: NicheKit
Description: A conversion-first review theme for Amazon-affiliate niche sites. Flat warm-paper layout, one Customizer accent that rethemes the whole site, and amber buy buttons that own the page. Swap the niche by changing content and the brand color — never theme code.
Author: Lea Edwards
Version: 5.7.0
License: GPL-2.0-or-later
Text Domain: nichekit
*/

:root {
  --bg: #FBFAF7;
  --card: #FFFFFF;
  --ink: #201D17;
  --text: #45403A;
  --muted: #7A736A;
  --line: #EAE6DE;
  --primary: #157A55;        /* overridden per-site in Customizer → Colors */
  --primary-tint: color-mix(in srgb, var(--primary) 9%, #FFFFFF);
  --primary-dark: color-mix(in srgb, var(--primary) 82%, #000000);
  --cta: #F6A821;
  --cta-dark: #EC9A0E;
  --pro: #178A50;
  --pro-tint: #EBF6EF;
  --con: #C0453E;
  --con-tint: #FAF0EE;
  --radius-lg: 16px;
  --radius-md: 12px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3 { color: var(--ink); }
::selection { background: var(--primary); color: #fff; }
:is(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- Header ---------- */
.site-head {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.site-title:hover { color: var(--primary); }
.site-logo { display: block; width: auto; max-width: min(60vw, 18rem); object-fit: contain; } /* height set inline from the logo-size setting */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero band ---------- */
.hero-band {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 2.75rem 0 6.5rem;
  margin-bottom: -4.75rem;
}
.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.hero-title {
  margin: 0 auto;
  color: #fff;
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 24ch;
}
.hero-sub {
  margin: 1rem auto 0;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 48ch;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}
.trust-row li { display: inline-flex; align-items: center; gap: 0.5rem; }
.trust-row li::before {
  content: "\2713";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}
.quick-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.quick {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.quick:hover { background: rgba(255, 255, 255, 0.26); }
.quick b { color: var(--cta); margin-right: 0.25rem; }

/* ---------- Product grid ---------- */
.products {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 1.5rem;
  padding-block: 1.5rem 2.5rem;
}
.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.product:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: 0 10px 28px -12px rgba(32, 29, 23, 0.18); }
.product { scroll-margin-top: 5.5rem; }

.rank {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}
.verdict {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #F5F3EE;
  text-decoration: none;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 1.25rem;
  mix-blend-mode: multiply; /* floats white-background product shots onto the tinted backdrop */
  transition: transform 0.35s ease;
}
.product:hover .thumb img { transform: scale(1.045); }
.thumb-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.thumb-ph span { font-weight: 800; font-size: 4rem; color: #D5D0C5; }

.info { flex: 1; padding: 1.2rem 1.25rem 0.5rem; }
.product h2 { margin: 0.1rem 0 0.3rem; font-weight: 800; font-size: 1.18rem; line-height: 1.3; letter-spacing: -0.015em; }
.product h2 a { color: var(--ink); text-decoration: none; }
.product h2 a:hover { color: var(--primary); }
.excerpt {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plist-row { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin-top: 1rem; }
.plist-col { border-radius: var(--radius-md); padding: 0.75rem 0.9rem; }
.plist-col.pros-col { background: var(--pro-tint); }
.plist-col.cons-col { background: var(--con-tint); }
.plist-col h3 {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plist-col.pros-col h3 { color: var(--pro); }
.plist-col.cons-col h3 { color: var(--con); }
.plist { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.plist li { position: relative; padding-left: 1.3rem; margin-block: 0.25rem; }
.plist li::before { position: absolute; left: 0; font-weight: 800; }
.plist.pros li::before { content: "\2713"; color: var(--pro); }
.plist.cons li::before { content: "\2715"; color: var(--con); font-size: 0.8em; top: 0.2em; }

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 0.75rem;
  margin: 1rem 1.25rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.rating { display: inline-flex; align-items: center; gap: 0.45rem; }
.rating b { color: var(--ink); font-weight: 800; font-size: 0.95rem; }
.stars {
  position: relative;
  display: inline-block;
  color: #E3DFD6;
  font-size: 1.02rem;
  line-height: 1;
  letter-spacing: 0.08em;
}
.stars-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--fill, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--cta);
}
.price-block { display: flex; flex-direction: column; align-items: flex-end; }
.price-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.price { font-weight: 800; font-size: 1.25rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.2; }
.cta {
  display: inline-block;
  background: var(--cta);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.93rem;
  text-align: center;
  text-decoration: none;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius-md);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover { background: var(--cta-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(236, 154, 14, 0.35); }
.buy .cta { flex: 1 1 100%; margin-top: 0.25rem; }

/* ---------- At-a-glance comparison table ---------- */
.glance {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 28px -12px rgba(32, 29, 23, 0.14);
  padding: 1.5rem 1.75rem 0.75rem;
}
.glance-scroll { overflow-x: auto; }
.glance table { width: 100%; min-width: 42rem; border-collapse: collapse; font-size: 0.93rem; }
.glance th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.glance td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.glance tbody tr:last-child td { border-bottom: 0; }
.glance tbody tr:hover { background: var(--primary-tint); }
.g-rank { font-weight: 800; color: var(--muted); width: 2.5rem; }
.g-product { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; }
.g-product img, .g-ph {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  background: #F5F3EE;
  object-fit: contain;
  padding: 0.2rem;
  flex: none;
}
.g-ph { display: inline-flex; align-items: center; justify-content: center; color: #D5D0C5; font-weight: 800; }
.g-product a { color: var(--ink); text-decoration: none; }
.g-product a:hover { color: var(--primary); }
.g-verdict {
  display: inline-block;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.g-rating b { color: var(--ink); }
.g-rating span { color: var(--muted); font-size: 0.8em; }
.g-price { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-link {
  display: inline-block;
  background: var(--cta);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 9px;
  transition: background 0.15s ease;
}
.g-link:hover { background: var(--cta-dark); }

.glance { margin-block: 0 2.5rem; }
.g-bestfor { font-weight: 600; color: var(--text); }

/* ---------- About / SEO section ---------- */
.about { border-top: 1px solid var(--line); padding: 2.5rem 0 0.5rem; }
.about-body { max-width: 46rem; }
.about-body :is(h2, h3) { letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.about-body h2 { font-size: 1.45rem; }
.about-body h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.about-body p { margin: 0 0 1rem; color: var(--text); font-size: 0.97rem; }

/* ---------- Why trust us ---------- */
.why { border-top: 1px solid var(--line); padding: 2.75rem 0 0.25rem; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.75rem; margin-top: 1.5rem; }
.why-grid h3 { margin: 0 0 0.35rem; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }
.why-grid p { margin: 0; font-size: 0.92rem; color: var(--muted); }

.section-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 -0.25rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Single product ---------- */
.single-wrap { max-width: 46rem; margin-inline: auto; padding-block: 3.25rem 1rem; }
.single-wrap .hero-badge {
  background: var(--primary-tint);
  border: 0;
  color: var(--primary);
  margin-bottom: 1rem;
}
.single-wrap .hero-title { color: var(--ink); max-width: none; font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: 0; }
.single-wrap .eyebrow-date { display: block; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--muted); }
.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-block: 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.report-head .cta { margin-left: auto; }
.report-head .price-block { align-items: flex-start; }

.single-thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-block: 2rem;
  background: #F5F3EE;
  padding: 2rem;
}
.single-thumb img { display: block; margin-inline: auto; max-height: 24rem; width: auto; mix-blend-mode: multiply; }

.scorecard { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-block: 2rem; }
.scorecard section { border-radius: var(--radius-md); padding: 1.2rem 1.35rem; }
.scorecard .pros-box { background: var(--pro-tint); }
.scorecard .cons-box { background: var(--con-tint); }
.scorecard h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scorecard .pros-box h3 { color: var(--pro); }
.scorecard .cons-box h3 { color: var(--con); }
.scorecard .plist { font-size: 0.92rem; }

.entry-content { color: var(--text); }
.entry-content :is(h2, h3) { letter-spacing: -0.02em; margin-top: 2rem; }
.entry-content img { border-radius: var(--radius-md); }

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  background: var(--primary-tint);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, #FFFFFF);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-block: 2.5rem;
}
.cta-panel p { margin: 0; font-weight: 800; font-size: 1.1rem; color: var(--ink); letter-spacing: -0.01em; }
.cta-panel small { display: block; margin-top: 0.35rem; font-weight: 500; font-size: 0.8rem; color: var(--muted); }

/* ---------- Other picks (single review) ---------- */
.more-picks { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.5rem; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.more-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.more-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: 0 10px 28px -12px rgba(32, 29, 23, 0.18); }
.more-thumb { display: block; aspect-ratio: 4 / 3; background: #F5F3EE; overflow: hidden; }
.more-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; mix-blend-mode: multiply; display: block; }
.more-thumb .thumb-ph { display: flex; }
.more-thumb .thumb-ph span { font-size: 2.5rem; }
.more-body { display: block; padding: 0.8rem 1rem 1rem; }
.more-body .g-verdict { margin-bottom: 0.4rem; }
.more-body b { display: block; font-size: 0.98rem; font-weight: 800; line-height: 1.35; letter-spacing: -0.01em; }
.more-price { display: block; margin-top: 0.3rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Pagination, footer ---------- */
.navigation.pagination { padding-block: 0.5rem 2.5rem; }
.navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.navigation .page-numbers {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.navigation .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

.site-foot { background: var(--primary-dark); color: rgba(255, 255, 255, 0.68); margin-top: 3.5rem; padding-block: 2.75rem 3.25rem; }
.site-foot-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.site-foot .site-title { color: #fff; margin-bottom: 0.6rem; }
.site-foot .site-title:hover { color: rgba(255, 255, 255, 0.8); }
.site-foot .logo-mark { background: rgba(255, 255, 255, 0.16); }
.site-foot p { margin: 0.2rem 0; font-size: 0.88rem; }
.site-foot strong { color: #fff; font-weight: 700; }
.site-foot p a { color: rgba(255, 255, 255, 0.85); }
.site-foot p a:hover { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 0.9rem; }
.foot-links a { color: rgba(255, 255, 255, 0.68); font-size: 0.88rem; text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-band { padding: 2.25rem 0 6rem; }
  .glance { padding: 1.25rem 1.1rem 0.5rem; }
  .why-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .scorecard { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .single-thumb { padding: 1.25rem; }
  .report-head .cta { margin-left: 0; flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .product:hover { transform: none; }
  .product:hover .thumb img { transform: none; }
}
