/* ====== Reset & Base ====== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a; /* slate-900 */
  background: #f8fafc; /* slate-50 */
  line-height: 1.5;
}

a { color: #0ea5e9; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.ad-wrap { min-height: 300px; }
/* ====== Header ====== */
.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand img.logo {
  height: 36px;
  width: 36px;
  object-fit: contain;
  border-radius: 8px;
}
.brand .name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .2px;
}
.slogan {
  font-size: 12px;
  color: #a1a1aa;
  margin-left: 4px;
  white-space: nowrap;
}
.badge-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E8FFF2;
  color: #128C7E;
  border: 1px solid #BFF1D9;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .85rem;
}

/* ====== Hero/Search ====== */
.hero {
  background: radial-gradient(1200px 600px at 90% -20%, rgba(37,211,102,.18), transparent 40%),
              radial-gradient(800px 600px at -10% 0%, rgba(20,163,98,.15), transparent 45%);
  padding: 36px 0 12px;
  border-bottom: 1px solid #e2e8f0;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.2rem + 1.2vw, 2rem);
}
.hero p {
  margin: 0 0 18px;
  color: #475569;
}

/* Busca padrão (usada em heros/áreas de conteúdo) */
.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 6px 24px rgba(2,6,23,.06);
  position: relative; /* necessário para o dropdown absoluto */
}
.searchbar input[type="text"] {
  border: none;
  outline: none;
  padding: 14px 14px;
  font-size: 1rem;
  border-radius: 10px;
}
.btn {
  border: none;
  background: #25D366;
  color: #062814;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn:active { transform: translateY(1px); }

/* ====== Header: deixar a barra de busca como flex e expandir ====== */
.header .searchbar {
  display: flex;             /* sobrescreve o grid */
  grid-template-columns: none;
  gap: 8px;
  flex: 1 1 auto;            /* ocupa espaço restante do cabeçalho */
  max-width: 800px;          /* opcional: limita muito largo em telas enormes */
}
.header .searchbar input[type="text"] {
  width: 100%;
  min-width: 0;
}

/* ====== Layout ====== */
.section {
  padding: 24px 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 1.1rem;
  margin: 0;
}

/* ====== Cards grid ====== */
.grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 920px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(2,6,23,.08); transform: translateY(-2px); }
.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #e2e8f0;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 12px;
  display: grid;
  gap: 8px;
}
.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
  padding: 4px 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  font-size: .75rem;
  color: #334155;
}
.chip.tier-silver { background: #f7fafc; border-color: #e2e8f0; }
.chip.tier-gold   { background: #FFF8E1; border-color: #FACC15; }
.chip.tier-premium{ background: #EEF2FF; border-color: #6366F1; }
.meta {
  font-size: .85rem;
  color: #475569;
}

/* ====== Ads blocks ====== */
.ad-block {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px;
}
.ad-label {
  font-size: .7rem;
  color: #64748b;
  padding: 6px 8px 0;
}

/* ====== Footer ====== */
.footer {
  margin-top: 24px;
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 18px 0;
  color: #475569;
  font-size: .9rem;
}

.kicker {
  font-size: .8rem;
  color: #0f766e;
  background: #ECFDF5;
  border: 1px solid #CFFAFE;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }

/* ====== Search Suggestions (autocomplete) ====== */
#search-suggest.suggestions{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: none;
  background: #fff;               /* fundo branco */
  border: 1px solid #e5e7eb;      /* borda cinza clara */
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  max-height: 50vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#search-suggest .suggest-item{
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  color: #111827;                 /* texto escuro */
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f3f4f6; /* separador suave */
}
#search-suggest .suggest-item:last-child{ border-bottom: none; }
#search-suggest .suggest-item:hover,
#search-suggest .suggest-item:focus {
  background: #f9fafb;            /* hover cinza claro */
  color: #111827 !important;      /* mantém texto escuro */
  text-decoration: none !important;
}
/* âncoras dentro dos itens do autocomplete — evita azul/sublinhado */
#search-suggest .suggest-item a,
#search-suggest .suggest-item a:hover,
#search-suggest .suggest-item a:focus {
  color: #111827 !important;
  text-decoration: none !important;
  display: block;
}

/* ====== Header - Responsivo (empilha no mobile) ====== */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;              /* permite quebrar linha */
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    justify-content: center;      /* centraliza logo + nome */
    flex: 0 0 auto;
    width: 100%;
  }

  .brand img.logo {
    height: 32px;
    width: 32px;
  }

  .brand .name {
    font-size: 1.05rem;
  }

  .slogan, .badge-whatsapp {
    font-size: 12px;
  }

  /* busca vai para a linha de baixo e ocupa toda a largura */
  .header .searchbar {
    order: 3;
    width: 100%;
    max-width: none;
  }

  /* nav centralizado e antes/ao lado conforme espaço */
  nav.flex {
    order: 2;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
  }
}
