/*
Theme Name: MelhorOferta
Theme URI: https://melhoroferta.com.br
Author: Afiliado Program
Description: Tema dark neon para blog de afiliados com Reviews, Comparativos e Achadinhos.
Version: 1.0.0
License: GNU General Public License v2
Text Domain: melhor-oferta
*/

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

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:            hsl(220, 20%, 7%);
  --fg:            hsl(210, 20%, 92%);
  --card-bg:       hsl(220, 18%, 11%);
  --card-bg-grad:  linear-gradient(145deg, hsl(220,18%,13%), hsl(220,18%,9%));
  --primary:       hsl(160, 100%, 50%);
  --primary-dark:  hsl(220, 20%, 7%);
  --accent:        hsl(185, 80%, 50%);
  --secondary-bg:  hsl(220, 15%, 16%);
  --muted:         hsl(220, 14%, 14%);
  --muted-fg:      hsl(215, 15%, 55%);
  --border:        hsl(220, 15%, 18%);
  --gradient-neon: linear-gradient(135deg, hsl(160,100%,50%), hsl(185,80%,50%));
  --shadow-neon:   0 0 20px hsl(160 100% 50% / 0.15);
  --shadow-card:   0 8px 32px hsl(0 0% 0% / 0.3);
  --radius:        0.75rem;
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--fg);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

/* ─── Layout Helpers ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ─── Utilities ─────────────────────────────────────────────────────────── */
.text-primary    { color: var(--primary); }
.text-muted      { color: var(--muted-fg); }
.text-gradient   {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-neon         { background: var(--gradient-neon); }
.bg-card         { background: var(--card-bg); }

.shadow-neon     { box-shadow: var(--shadow-neon); }
.shadow-card     { box-shadow: var(--shadow-card); }

.glass {
  background: hsl(220 18% 11% / 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(220 15% 20% / 0.5);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gradient-neon);
  color: var(--primary-dark);
}

.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--gradient-neon);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-neon:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-neon);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-outline:hover { border-color: hsl(160 100% 50% / 0.5); color: var(--primary); }

/* ─── Navbar ────────────────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}
.site-logo svg { color: var(--primary); }
.site-logo .logo-accent { background: var(--gradient-neon); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 0.25rem;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
  background: hsl(220 18% 11% / 0.95);
  border-top: 1px solid var(--border);
}
.nav-mobile a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  border-bottom: 1px solid hsl(220 15% 18% / 0.5);
  transition: color 0.15s;
}
.nav-mobile a:hover { color: var(--primary); }
.nav-mobile.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ─── Page offset for fixed nav ────────────────────────────────────────── */
.page-wrap { padding-top: 64px; }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, hsl(160 100% 50% / 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 80%, hsl(185 80% 50% / 0.04) 0%, transparent 50%);
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 30%, hsl(220 20% 7% / 0.6) 70%, transparent);
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, var(--bg), transparent 50%, hsl(220 20% 7% / 0.5));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
  max-width: 640px;
}

.hero-tag {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid hsl(160 100% 50% / 0.3);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-neon);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted-fg);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ─── Features Strip ────────────────────────────────────────────────────── */
.features-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}
.features-strip .container { padding-top: 2.5rem; padding-bottom: 2.5rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .features-grid { grid-template-columns: 1fr; } }

.feature-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.feature-icon {
  flex-shrink: 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: hsl(160 100% 50% / 0.1);
  color: var(--primary);
}
.feature-icon svg { width: 1.25rem; height: 1.25rem; display: block; }
.feature-item h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.125rem; }
.feature-item p  { font-size: 0.75rem; color: var(--muted-fg); }

/* ─── Section Header ────────────────────────────────────────────────────── */
.section-header { margin-bottom: 2rem; }
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-desc { color: var(--muted-fg); max-width: 560px; }

/* ─── Sections ──────────────────────────────────────────────────────────── */
.section-light { padding: 4rem 0; }
.section-dark  { padding: 4rem 0; background: var(--card-bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ─── Product Card ──────────────────────────────────────────────────────── */
.product-card {
  background: var(--card-bg-grad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: hsl(160 100% 50% / 0.3);
}

.card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--secondary-bg);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img img { transform: scale(1.05); }

.card-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--gradient-neon);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-stars {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  margin-bottom: 0.5rem;
}
.card-stars svg { width: 1rem; height: 1rem; }
.star-filled { color: var(--primary); fill: var(--primary); }
.star-empty  { color: var(--muted-fg); }
.card-stars span { font-size: 0.8rem; color: var(--muted-fg); margin-left: 0.25rem; }

.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.product-card:hover .card-title { color: var(--primary); }

.card-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Duplo preço ML + Amazon */
.card-prices        { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.card-price-ml      { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card-price-amazon  { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.625rem; background: hsl(35 100% 50% / 0.08); border: 1px solid hsl(35 100% 50% / 0.2); border-radius: 0.5rem; }

.card-price-original {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  text-decoration: line-through;
}
.card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.amz-label { font-size: 0.7rem; font-weight: 600; color: hsl(35 100% 50%); text-transform: uppercase; letter-spacing: 0.05em; }
.amz-price { font-size: 1rem; font-weight: 700; color: hsl(35 100% 55%); }

.btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.375rem;
  background: hsl(35 100% 50%);
  color: hsl(220 20% 7%);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease;
  margin-left: auto;
}
.btn-amazon:hover { transform: scale(1.04); }

/* ─── About Section ─────────────────────────────────────────────────────── */
.about-section {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0;
  text-align: center;
}
.about-section .container { max-width: 720px; }
.about-section h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin: 0.5rem 0 1.25rem; }
.about-section p  { color: var(--muted-fg); line-height: 1.8; font-size: 1.0625rem; }

/* ─── Single Post ───────────────────────────────────────────────────────── */
.post-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.post-category-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.post-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.25;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.post-featured-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 16/9;
}
.post-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* Product info box inside single post */
.product-info-box {
  background: var(--card-bg-grad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.product-info-box .prices { display: flex; align-items: baseline; gap: 0.5rem; }
.product-info-box .price-original { font-size: 1rem; color: var(--muted-fg); text-decoration: line-through; }
.product-info-box .price-current  { font-size: 1.75rem; font-weight: 700; color: var(--primary); }

/* Post content typography */
.post-content { color: var(--fg); }
.post-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--fg); }
.post-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--fg); }
.post-content p  { margin-bottom: 1.25rem; color: hsl(210 15% 80%); line-height: 1.8; }
.post-content ul, .post-content ol { margin: 1rem 0 1.25rem 1.5rem; color: hsl(210 15% 80%); }
.post-content li { margin-bottom: 0.4rem; line-height: 1.7; }
.post-content strong { color: var(--fg); font-weight: 600; }
.post-content a  { color: var(--primary); border-bottom: 1px solid hsl(160 100% 50% / 0.3); transition: border-color 0.15s; }
.post-content a:hover { border-color: var(--primary); }
.post-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: hsl(160 100% 50% / 0.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted-fg);
  font-style: italic;
}

/* ─── Archive ───────────────────────────────────────────────────────────── */
.archive-wrap { padding: 3rem 0; }
.archive-header { margin-bottom: 2.5rem; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .archive-grid { grid-template-columns: 1fr; } }

/* ─── Pagination ────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--muted-fg);
  transition: all 0.15s;
}
.pagination a:hover, .pagination .current {
  border-color: var(--primary);
  color: var(--primary);
  background: hsl(160 100% 50% / 0.08);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--fg);
}
.footer-logo svg { color: var(--primary); }
.footer-logo .logo-accent { background: var(--gradient-neon); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.footer-desc { font-size: 0.875rem; color: var(--muted-fg); max-width: 280px; }

.footer-nav h4 { font-family: var(--font-display); font-weight: 600; margin-bottom: 0.75rem; font-size: 0.9375rem; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a  { font-size: 0.875rem; color: var(--muted-fg); transition: color 0.15s; }
.footer-nav a:hover { color: var(--primary); }

.footer-newsletter h4 { font-family: var(--font-display); font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9375rem; }
.footer-newsletter p  { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.75rem; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.newsletter-form input::placeholder { color: var(--muted-fg); }
.newsletter-form input:focus { border-color: hsl(160 100% 50% / 0.5); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* ─── Scroll animation ──────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
