/*
Theme Name: Ainimix
Theme URI: https://ainimix.com
Description: Honest, in-depth AI tool reviews — the Ainimix design (directory + deep reviews + buying guides). Lavender/violet identity converted from the original Next.js build.
Author: Ainimix
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: ainimix
*/

/* ------------------------------------------------------------------ */
/* Design tokens (from the Ainimix design system)                     */
/* ------------------------------------------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #ffffff;
  --fg: #211c3d;
  --muted: #f6f3fc;
  --muted-fg: #6b7280;
  --border: #e5e1f0;
  --primary: #6b21d9;
  --brand-2: #8b5cf6;
  --gold: #fbbf24;
  --coral: #f97362;
  --blue: #5fa8f5;
  --radius: 16px;
  --container: 1200px;
  --shadow: 0 16px 40px -20px rgba(107, 70, 193, 0.3);
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.section {
  padding: 56px 0;
}
.section--alt {
  background: var(--muted);
}
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--muted);
}
.btn-primary,
.entry-content a[rel~="sponsored"] {
  background-image: linear-gradient(135deg, var(--primary), var(--brand-2));
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px -8px rgba(107, 33, 217, 0.6);
}
.btn-primary:hover,
.entry-content a[rel~="sponsored"]:hover {
  opacity: 0.92;
  color: #fff;
  text-decoration: none;
}
/* sponsored (affiliate) links inside review content render as pill CTAs */
.entry-content a[rel~="sponsored"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
}
.entry-content a[rel~="sponsored"]::after {
  content: "→";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Header / nav                                                        */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--fg);
}
.brand:hover {
  text-decoration: none;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.main-nav a {
  color: rgba(33, 28, 61, 0.8);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 10px;
  border-radius: 8px;
}
.main-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}
.main-nav li {
  list-style: none;
  display: inline-flex;
  align-items: center;
}
.main-nav li + li::before {
  content: "/";
  color: var(--border);
  margin: 0 2px;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  background-image:
    radial-gradient(50% 60% at 85% 4%, rgba(139, 92, 246, 0.2) 0%, transparent 60%),
    radial-gradient(46% 56% at 10% 16%, rgba(167, 139, 250, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, #ede7fb 0%, #faf9fe 100%);
  text-align: center;
  padding: 80px 0;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 900px;
  margin: 14px auto 0;
}
.hero p.lead {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: 1.15rem;
  color: var(--muted-fg);
}
.hero .pill-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted-fg);
}
.hero-search {
  max-width: 620px;
  margin: 30px auto 0;
}
.hero-explore {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted-fg);
}
.hero-explore a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
  background: rgba(255, 255, 255, 0.7);
  color: rgba(33, 28, 61, 0.8);
  font-size: 0.88rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease;
}
.hero-explore a:hover {
  background: var(--muted);
  text-decoration: none;
}

/* Search form (pill) */
.search-form {
  position: relative;
  display: flex;
}
.search-form input[type="search"] {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 130px 0 22px;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.search-form input:focus {
  outline: 2px solid var(--primary);
}
.search-form button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background-image: linear-gradient(135deg, var(--primary), var(--brand-2));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 600;
  cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Cards grid                                                          */
/* ------------------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.card h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.card h3 a {
  color: var(--fg);
}
.card h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.card .excerpt {
  color: var(--muted-fg);
  font-size: 0.95rem;
  flex: 1;
}
.card .meta {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted-fg);
}
.card .card-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
.card .card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 9px 14px;
  font-size: 0.9rem;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(107, 33, 217, 0.1);
  color: var(--primary);
}
.badge-cat {
  background: var(--muted);
  color: var(--muted-fg);
}
.badge-pricing {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Section heading                                                     */
/* ------------------------------------------------------------------ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
}
.section-head p {
  margin: 6px 0 0;
  color: var(--muted-fg);
}

/* ------------------------------------------------------------------ */
/* Browse by type (category sub-categories)                            */
/* ------------------------------------------------------------------ */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}
.type-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg);
  transition: all 0.15s ease;
}
.type-card:hover {
  border-color: var(--primary);
  background: var(--muted);
  text-decoration: none;
}
.type-card.is-active {
  border-color: var(--primary);
  background: var(--accent, #ede7fb);
}
.type-card .type-name {
  display: block;
  font-weight: 600;
}
.type-card .type-count {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-fg);
}
/* type-grid responsive — see consolidated responsive section at end */

/* ------------------------------------------------------------------ */
/* How it works — 3 steps                                              */
/* ------------------------------------------------------------------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: center;
}
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.step:nth-child(1) .step-icon {
  background: var(--primary);
}
.step:nth-child(2) .step-icon {
  background: var(--coral);
}
.step:nth-child(3) .step-icon {
  background: var(--blue);
}
.step-label {
  display: inline-block;
  background: var(--muted);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-fg);
  margin-bottom: 8px;
}
.section-link {
  margin-top: 28px;
  text-align: center;
}
.section-link a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* Why trust — benefit cards                                           */
/* ------------------------------------------------------------------ */
.benefit-card {
  padding: 28px;
}
.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.15);
}
.check-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted-fg);
}
.check-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Stats row */
.stats-row {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: 16px;
  background: var(--muted);
  padding: 24px;
  text-align: center;
}
.stat-item p {
  margin: 0;
}
.stat-number {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-label {
  font-size: 0.88rem;
  color: var(--muted-fg);
  margin-top: 2px;
}

/* ------------------------------------------------------------------ */
/* Browse by category blocks                                           */
/* ------------------------------------------------------------------ */
.category-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.category-header h3 {
  font-size: 1.3rem;
  margin: 0;
}
.category-header a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* Popular buying guides — guide cards                                 */
/* ------------------------------------------------------------------ */
a.guide-card {
  display: flex;
  flex-direction: column;
  color: var(--fg);
  transition: box-shadow 0.2s ease;
}
a.guide-card:hover {
  box-shadow: 0 20px 50px -20px rgba(107, 70, 193, 0.45);
  text-decoration: none;
}
a.guide-card h3 {
  margin-top: 14px;
  transition: color 0.15s ease;
}
a.guide-card:hover h3 {
  color: var(--primary);
}
.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(107, 33, 217, 0.1);
}
.guide-link {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* Rankings — 3-column ranked lists                                    */
/* ------------------------------------------------------------------ */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ranking-col {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.ranking-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.ranking-col-head h3 {
  font-size: 1.05rem;
  margin: 0;
}
.ranking-col--violet .ranking-col-head {
  color: var(--primary);
}
.ranking-col--coral .ranking-col-head {
  color: var(--coral);
}
.ranking-col--blue .ranking-col-head {
  color: var(--blue);
}
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ranking-item:last-child {
  border-bottom: none;
}
.ranking-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--muted);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted-fg);
}
.ranking-info {
  display: flex;
  flex-direction: column;
}
.ranking-info a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
}
.ranking-info a:hover {
  color: var(--primary);
  text-decoration: none;
}
.ranking-cat {
  font-size: 0.78rem;
  color: var(--muted-fg);
  margin-top: 1px;
}
.ranking-see-all {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* CTA banner                                                          */
/* ------------------------------------------------------------------ */
.cta-banner {
  background-image: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
  border-radius: 24px;
  color: #fff;
  text-align: center;
  padding: 56px 24px;
}
.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
}
.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 460px;
  margin: 12px auto 0;
}

/* ------------------------------------------------------------------ */
/* Single post / entry content                                         */
/* ------------------------------------------------------------------ */
.entry {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted-fg);
  margin-bottom: 16px;
}
.entry-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 10px;
}
.entry-meta {
  color: var(--muted-fg);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.entry-content {
  font-size: 1.06rem;
}
.entry-content > * + * {
  margin-top: 20px;
}
.entry-content h2 {
  font-size: 1.6rem;
  margin-top: 40px;
}
.entry-content h3 {
  font-size: 1.25rem;
  margin-top: 28px;
}
.entry-content ul,
.entry-content ol {
  padding-left: 24px;
}
.entry-content li {
  margin: 6px 0;
}
.entry-content ul li::marker {
  color: var(--primary);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.entry-content th,
.entry-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.entry-content th {
  background: var(--muted);
}
.entry-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 0;
  padding-left: 16px;
  color: var(--muted-fg);
  font-style: italic;
}
.entry-content code {
  background: var(--muted);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}
.entry-content em {
  color: var(--muted-fg);
}

/* ------------------------------------------------------------------ */
/* Verdict box (score + The Good / The Bad + CTA)                      */
/* ------------------------------------------------------------------ */
.verdict-box {
  border: 1px solid rgba(229, 225, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
  margin-bottom: 32px;
}
.verdict-box .vb-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
}
.verdict-box .vb-score {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  background-image: linear-gradient(135deg, var(--primary), var(--brand-2));
  color: #fff;
}
.verdict-box .vb-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.verdict-box .vb-out {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-top: 4px;
}
.verdict-box .vb-label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
}
.verdict-box .vb-verdict p {
  margin: 4px 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
}
.verdict-box .vb-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}
.verdict-box .vb-good,
.verdict-box .vb-bad {
  padding: 20px 22px;
}
.verdict-box .vb-good {
  background: #ecfdf5;
}
.verdict-box .vb-bad {
  background: #fef2f2;
  border-left: 1px solid var(--border);
}
.verdict-box h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.verdict-box .vb-good h4 {
  color: #047857;
}
.verdict-box .vb-bad h4 {
  color: #b91c1c;
}
.verdict-box ul {
  margin: 0;
  padding-left: 20px;
}
.verdict-box .vb-good li {
  margin: 5px 0;
}
.verdict-box .vb-good li::marker {
  color: #059669;
}
.verdict-box .vb-bad li::marker {
  color: #dc2626;
}
.verdict-box .vb-cta {
  padding: 20px 22px 8px;
  background: var(--muted);
}
/* verdict-box responsive — see consolidated responsive section at end */

.verdict-box .vb-logo img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 4px;
  display: block;
}
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
.review-shot {
  margin: 0;
}
.review-shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
  background: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.site-footer .container {
  padding-top: 44px;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}
.site-footer h4 {
  font-size: 0.95rem;
  margin: 0 0 12px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li {
  margin: 6px 0;
}
.site-footer a {
  color: var(--muted-fg);
  font-size: 0.92rem;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted-fg);
  padding: 18px 0;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--fg);
}
.pagination .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ------------------------------------------------------------------ */
/* Enhanced card (logo + rating + visit)                               */
/* ------------------------------------------------------------------ */
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.card-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: contain;
  padding: 4px;
  display: block;
}
.card-logo-fallback {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  background: var(--primary);
}
.card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.card-info h3 {
  margin: 0;
}
.card-info .badge {
  align-self: flex-start;
}
.card-rating {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--fg);
  white-space: nowrap;
}
.card-rating::before {
  content: "\2605";
  color: var(--gold);
  font-size: 1rem;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.card-tags .badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--muted);
  color: var(--muted-fg);
}

/* ------------------------------------------------------------------ */
/* "Why trust our reviews" — benefit cards + stats row                 */
/* ------------------------------------------------------------------ */
.benefit-card {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.benefit-card h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.95rem;
  color: var(--muted-fg);
}
.check-icon {
  flex: 0 0 16px;
  margin-top: 3px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
  overflow: hidden;
  margin-top: 28px;
}
.stat-item {
  text-align: center;
  padding: 22px 16px;
}
.stat-item + .stat-item {
  border-left: 1px solid var(--border);
}
.stat-number {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary);
  line-height: 1.1;
  margin: 0;
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted-fg);
  margin-top: 4px;
}

/* ------------------------------------------------------------------ */
/* "Browse by category" — category sections                            */
/* ------------------------------------------------------------------ */
.category-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.category-section {
  margin: 0;
}
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.category-header h3 {
  font-size: 1.3rem;
  margin: 0;
}
.category-header a {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* "Popular buying guides"                                             */
/* ------------------------------------------------------------------ */
.guide-card {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.guide-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-decoration: none;
}
.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(107, 33, 217, 0.1);
  margin-bottom: 14px;
}
.guide-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.guide-card .excerpt {
  color: var(--muted-fg);
  font-size: 0.92rem;
  flex: 1;
  margin: 0 0 12px;
}
.guide-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}
.guide-card:hover .guide-link {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Rankings                                                             */
/* ------------------------------------------------------------------ */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ranking-col {
  background: #fff;
  border: 1px solid rgba(229, 225, 240, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.ranking-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.ranking-col-head svg { flex: 0 0 auto; }
.ranking-col-head h3 { font-size: 1.05rem; margin: 0; }
.ranking-col--violet .ranking-col-head svg { color: var(--primary); }
.ranking-col--violet .ranking-num { background: var(--primary); }
.ranking-col--coral .ranking-col-head svg { color: var(--coral); }
.ranking-col--coral .ranking-num { background: var(--coral); }
.ranking-col--blue .ranking-col-head svg { color: var(--blue); }
.ranking-col--blue .ranking-num { background: var(--blue); }
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.ranking-item + .ranking-item {
  border-top: 1px solid var(--border);
}
.ranking-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
}
.ranking-info {
  flex: 1;
  min-width: 0;
}
.ranking-info a {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--fg);
}
.ranking-info a:hover {
  color: var(--primary);
  text-decoration: none;
}
.ranking-cat {
  display: block;
  font-size: 0.78rem;
  color: var(--muted-fg);
  margin-top: 2px;
}
.ranking-see-all {
  display: block;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}
.ranking-see-all:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/* Responsive (consolidated)                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .card-grid,
  .steps,
  .ranking-grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer .container {
    grid-template-columns: 1fr 1fr;
  }
  .type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .card-grid,
  .steps,
  .ranking-grid,
  .stats-row,
  .site-footer .container {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
  }
  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* verdict box */
  .verdict-box .vb-cols {
    grid-template-columns: 1fr;
  }
  .verdict-box .vb-bad {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .verdict-box .vb-top {
    flex-direction: column;
    text-align: center;
  }
  /* category / cards */
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  .card-rating {
    order: -1;
    align-self: flex-end;
  }
}
