* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f6f7f9;
  color: #1e232a;
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Cabeçalho */
header {
  background: #ffffff;
  border-bottom: 1px solid #e2e6ec;
  padding: 16px 0;
  margin-bottom: 24px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span {
  color: #2563eb;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  margin-left: 20px;
  font-size: 0.95rem;
}

nav a:hover, nav a.ativo {
  color: #2563eb;
}

.btn-tema {
  margin-left: 20px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #111827;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-tema:hover {
  border-color: #2563eb;
}

/* Barra de Busca e Filtro */
.filtros {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filtros input, .filtros select {
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
}

.filtros input {
  flex: 1;
  min-width: 220px;
}

/* Grade de Produtos */
.grid-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.card-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.categoria-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
}

.selo {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
}

.selo-recomendado { background: #dcfce7; color: #166534; }
.selo-preco { background: #fef3c7; color: #92400e; }
.selo-nao { background: #fee2e2; color: #991b1b; }

.card-img, .ficha-img, .comp-img {
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  height: 190px;
  margin: 10px 0 16px;
}

.card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #111827;
}

.card-specs-resumo {
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 16px;
}

.btn {
  display: block;
  text-align: center;
  padding: 10px 14px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
}

.btn-primario {
  background: #1e293b;
  color: #ffffff;
}

.btn-primario:hover {
  background: #0f172a;
}

.btn-amazon {
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
}

.btn-amazon:hover {
  background: #d97706;
}

/* Paginação */
.paginacao {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.paginacao button {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.paginacao button.ativa {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.paginacao button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ficha Técnica Individual (produto.html) */
.voltar {
  display: inline-block;
  margin-bottom: 18px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.ficha-topo {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
}

.ficha-img {
  width: 100%;
  height: 260px;
}

.ficha-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ficha-info h1 {
  font-size: 1.7rem;
  margin: 8px 0 12px;
  color: #111827;
}

.ficha-resumo {
  color: #374151;
  margin-bottom: 20px;
  font-size: 1rem;
}

.bloco {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 20px;
}

.bloco h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #111827;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.lista-caixa {
  list-style: none;
}

.lista-caixa li {
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
  font-size: 0.95rem;
}

.lista-caixa li:last-child {
  border-bottom: none;
}

.tabela-specs {
  width: 100%;
  border-collapse: collapse;
}

.tabela-specs th, .tabela-specs td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.tabela-specs th {
  width: 34%;
  color: #4b5563;
  font-weight: 600;
  background: #f9fafb;
}

.grid-pros-contras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.lista-pontos {
  padding-left: 18px;
  font-size: 0.94rem;
}

.lista-pontos li {
  margin-bottom: 8px;
}

/* Comparador Neutro (comparar.html) */
.seletores-comparacao {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.seletores-comparacao select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.vs-badge {
  font-weight: 800;
  color: #6b7280;
  text-align: center;
}

.tabela-comparar {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  border-collapse: collapse;
  overflow: hidden;
}

.tabela-comparar th, .tabela-comparar td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: middle;
  font-size: 0.95rem;
}

.tabela-comparar thead th {
  background: #f9fafb;
  text-align: center;
  width: 38%;
}

.tabela-comparar thead th:first-child {
  width: 24%;
  text-align: left;
}

.tabela-comparar tbody th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
}

.comp-img {
  height: 130px;
  margin-bottom: 10px;
}

.comp-img img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* Rodapé */
footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 0.82rem;
  color: #6b7280;
}

/* MODO ESCURO */
body.escuro {
  background-color: #0f172a;
  color: #e2e8f0;
}

body.escuro header,
body.escuro .card,
body.escuro .ficha-topo,
body.escuro .bloco,
body.escuro .seletores-comparacao,
body.escuro .tabela-comparar {
  background-color: #1e293b;
  border-color: #334155;
}

body.escuro .logo,
body.escuro .card h2,
body.escuro .ficha-info h1,
body.escuro .bloco h2 {
  color: #f8fafc;
}

body.escuro nav a,
body.escuro .ficha-resumo,
body.escuro .card-specs-resumo,
body.escuro .categoria-tag {
  color: #cbd5e1;
}

body.escuro nav a:hover,
body.escuro nav a.ativo,
body.escuro .voltar {
  color: #60a5fa;
}

body.escuro .filtros input,
body.escuro .filtros select,
body.escuro .seletores-comparacao select,
body.escuro .paginacao button {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.escuro .tabela-specs th,
body.escuro .tabela-comparar thead th,
body.escuro .tabela-comparar tbody th {
  background-color: #0f172a;
  color: #94a3b8;
  border-color: #334155;
}

body.escuro .tabela-specs td,
body.escuro .tabela-comparar td,
body.escuro .lista-caixa li,
body.escuro .bloco h2,
body.escuro footer {
  border-color: #334155;
}

body.escuro .btn-primario {
  background-color: #2563eb;
}

body.escuro .btn-primario:hover {
  background-color: #1d4ed8;
}

body.escuro .btn-tema {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

@media (max-width: 720px) {
  .ficha-topo, .grid-pros-contras, .seletores-comparacao {
    grid-template-columns: 1fr;
  }
}