@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== VARIABLES ===== */
:root {
  --bg:            #f4f6f8;
  --surface:       #ffffff;
  --surface-alt:   #f0fdf4;
  --surface-hover: #fafafa;
  --border:        #e5e7eb;
  --border-light:  #f3f4f6;

  --text:       #111827;
  --text-muted: #4b5563;
  --text-faint: #9ca3af;

  --accent:        #16a34a;
  --accent-light:  #22c55e;
  --accent-dark:   #15803d;
  --accent-glow:   rgba(22, 163, 74, 0.07);
  --accent-border: rgba(22, 163, 74, 0.20);

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 2px 8px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.10), 0 0 0 1px rgba(22,163,74,0.12);

  --max-width:         1100px;
  --max-width-article: 720px;
  --radius:    10px;
  --radius-sm:  6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

/* ===== UTILITIES ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-article {
  max-width: var(--max-width-article);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HEADER ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: inherit;
}
.site-logo:hover { color: inherit; }
.logo-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo-name span { color: var(--accent); }
.logo-slogan {
  font-size: 0.65rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-top: 3px;
}

/* ===== NAV ===== */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--text); background: var(--border-light); }
.site-nav a.active { color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* ===== HERO ===== */
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(155deg, #ffffff 0%, #f0fdf4 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -100px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(34,197,94,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.hero-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.6px;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.72;
}

/* ===== SECTION ===== */
.section { padding: 2.5rem 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.section-link { font-size: 0.83rem; color: var(--accent); font-weight: 500; }

/* ===== ARTICLE GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 580px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.25s, transform 0.25s;
  color: inherit;
  box-shadow: var(--shadow);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  color: inherit;
}
.card-image {
  width: 100%;
  height: 168px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0fdf4, #e5e7eb);
  flex-shrink: 0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card-image img { transform: scale(1.04); }

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
/* Fallback: cards without .card-image / .card-content use padding directly */
.card:not(:has(.card-content)) { padding: 1.25rem; gap: 0.6rem; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  background: rgba(22, 163, 74, 0.08);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.badge.comparativo {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.20);
}
.badge.review {
  background: rgba(234, 88, 12, 0.07);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.20);
}
.badge.ranking {
  background: rgba(180, 83, 9, 0.07);
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.18);
}

.card-read-time { font-size: 0.72rem; color: var(--text-faint); }
.card-title {
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
}
.card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.card-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 0.25rem;
}
.card-cta::after { content: ' →'; }

/* ===== ARTICLE HEADER ===== */
.article-header {
  background: var(--surface);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.article-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}
.article-breadcrumb a { color: var(--text-faint); }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb span { margin: 0 0.35rem; }

.article-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 1rem 0;
  color: var(--text);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.article-meta-item { font-size: 0.78rem; color: var(--text-faint); }
.article-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.78;
}

/* ===== ARTICLE HERO IMAGE ===== */
.article-hero-img-wrap {
  width: 100%;
  max-height: 440px;
  overflow: hidden;
  background: var(--bg);
}
.article-hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  padding: 2.5rem 0 3rem;
  background: var(--surface);
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
  color: var(--text);
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.75rem 0 0.6rem;
  color: var(--text);
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}
.article-body p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  line-height: 1.82;
}
.article-body strong { color: var(--text); font-weight: 600; }
.article-body ul, .article-body ol {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--text-muted);
}
.article-body li { margin-bottom: 0.5rem; line-height: 1.72; }

/* ===== PRODUCT IMAGE IN ARTICLE ===== */
.product-img-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0 0;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: 320px;
}
.product-img-wrap img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  padding: 1.5rem;
}

/* ===== COMPARISON TABLE ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 500px;
}
.comparison-table th {
  background: var(--bg);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  vertical-align: middle;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background: var(--bg); }
.comparison-table tr.winner td { background: rgba(22, 163, 74, 0.05); }

.product-name { font-weight: 600; color: var(--text); }
.price-cell { font-weight: 600; }
.price-cell.price-updated { color: var(--accent); transition: color 0.4s; }
.rating { color: var(--accent); font-weight: 700; }
.badge-melhor {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  border-radius: 100px;
  background: var(--accent);
  color: #ffffff;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ===== CTA BOX COM PREÇO DINÂMICO ===== */
.cta-box {
  background: var(--surface-alt);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cta-box p { color: var(--text-muted); margin-bottom: 0.5rem; font-size: 0.9rem; }

.cta-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.price-label {
  font-size: 0.82rem;
  color: var(--text-faint);
}
.price-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  transition: all 0.3s;
}
.price-value.loading {
  font-size: 0.85rem;
  color: var(--text-faint);
  opacity: 0.7;
}
.price-value.error {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(22,163,74,0.25);
}
.btn:hover {
  background: var(--accent-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22,163,74,0.30);
}

/* ===== AFFILIATE NOTICE ===== */
.affiliate-notice {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.65;
  margin: 2rem 0;
}
.affiliate-notice strong { color: var(--text-muted); }

/* ===== VERDICT ===== */
.verdict {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.verdict-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.verdict h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; padding: 0; border: none; }
.verdict p { font-size: 0.9rem; color: var(--text-muted); margin: 0; line-height: 1.72; }

/* ===== FAQ ===== */
.article-faq {
  padding: 2.5rem 0 3rem;
  border-top: 2px solid var(--border);
  background: var(--surface);
}
.article-faq > .container-article > h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.faq-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
  line-height: 1.4;
  border: none;
  padding: 0;
}
.faq-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ===== CATEGORY PAGE ===== */
.category-header {
  background: var(--surface);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.category-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.category-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.category-desc { color: var(--text-muted); font-size: 0.95rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: #111827;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 580px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr; }
}
.footer-brand .logo-name { color: #ffffff; }
.footer-brand p {
  font-size: 0.83rem;
  color: #6b7280;
  line-height: 1.65;
  max-width: 320px;
  margin-top: 0.5rem;
}
.footer-nav h4 {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav a { font-size: 0.85rem; color: #6b7280; }
.footer-nav a:hover { color: var(--accent-light); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1f2937;
  font-size: 0.75rem;
  color: #6b7280;
}
.footer-affiliate { margin-top: 0.6rem; line-height: 1.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .menu-toggle { display: block; }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    padding: 0.5rem 1.25rem 0.75rem;
    gap: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.65rem 0.5rem;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
  }
  .site-nav a:last-child { border-bottom: none; }

  .header-inner { position: relative; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero::before { display: none; }
  .article-header { padding: 2rem 0 1.5rem; }
  .article-hero-img-wrap { max-height: 240px; }
  .product-img-wrap { min-height: 160px; }
}
