/* Tipografia e reset */
:root {
  --blue: #017dcb;
  --black: #111111;
  --bg: #F4F4F4;
  --white: #FFFFFF;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
  --primary-color: #5c5470;
  --text-color: #1e293b;
  --green: #16a34a;
  --orange: #ea580c;
  --red: #dc2626;
}

/* Dark mode */
.dark {
  --bg: #0d0f12;
  --card: #1a1d23;
  --border: #2d3748;
  --white: #e5e7eb;
  --black: #f7fafc; /* Texto ainda mais claro para melhor contraste */
  --muted: #a0aec0; /* Cor mais clara para texto secundário */
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Cores específicas para modo dark */
.dark .compat-list li.ok { color: #34d399; }
.dark .compat-list li.warn { color: #fbbf24; }
.dark .compat-list li.err { color: #f87171; }

/* Melhorar visibilidade de textos no modo dark */
.dark .price-disclaimer { color: #d1d5db; }
.dark .price-method { color: #d1d5db; background: #4b5563; }
.dark .real-badge { background: #065f46; }
.dark .fallback-badge { background: #92400e; }
.dark .realistic-badge { background: #1e40af; }
.dark input, .dark select, .dark .searchable-select {
  background: var(--card);
  color: var(--black);
  border-color: var(--border);
}
.dark ::placeholder {
  color: var(--muted);
}

/* Cards e botões no modo dark */
.dark .card h3, .dark .card h4, .dark .card h5 {
  color: var(--black);
}
.dark .btn {
  color: var(--black);
  background: var(--card);
  border-color: var(--border);
}
.dark .btn.ghost {
  background: transparent;
  color: var(--black);
}
.dark .nav a {
  color: var(--muted);
}
.dark .nav a:hover {
  color: var(--black);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--black); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Layout util */
.container { width: min(1200px, 92%); margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 24px; }
.section-head h2 { font-size: 28px; margin-bottom: 8px; }
.section-head p { color: var(--muted); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 6%; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { 
  width: 48px; 
  height: 48px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(11, 67, 141, 0.15));
  animation: logoAppear 0.6s ease-out;
}
.logo:hover {
  transform: scale(1.05);
}

/* Animação de entrada da logo */
@keyframes logoAppear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Opção alternativa: Logo grande sozinha */
.logo-large {
  width: 140px;
  height: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(11, 67, 141, 0.15));
  animation: logoAppear 0.6s ease-out;
}
.logo-large:hover {
  transform: scale(1.05);
}

.brand-name { 
  font-size: 24px; 
  font-weight: 700; 
  letter-spacing: 0.2px;
  transition: transform 0.3s ease;
}
.brand-name:hover {
  transform: translateX(2px);
}
.brand-black { color: var(--black); }
.brand-blue { color: var(--blue); }
.nav { display: none; gap: 18px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--black); }
.header-actions { display: flex; gap: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--white); color: var(--black); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.btn.primary { background: var(--blue); color: #fff; border-color: transparent; }
.btn.ghost { background: var(--card); }
.btn.lg { padding: 14px 22px; font-size: 16px; }

/* Hero */
.hero { position: relative; min-height: 56vh; display: grid; place-items: center; text-align: center; padding: 64px 6%; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 10%, rgba(0,123,255,.15), transparent 40%), radial-gradient(circle at 80% 90%, rgba(0,123,255,.12), transparent 40%), url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%221600%22 height=%22900%22><defs><pattern id=%22grid%22 width=%2280%22 height=%2280%22 patternUnits=%22userSpaceOnUse%22><path d=%22M0 40 H80 M40 0 V80%22 stroke=%22%23dbe3f1%22 stroke-width=%221%22 opacity=%220.35%22/></pattern></defs><rect width=%22100%%22 height=%22100%%22 fill=%22url(%23grid)%22/></svg>'); background-position: center; background-size: cover; opacity: .6; pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 860px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin-bottom: 14px; }
.hero p { color: var(--muted); margin-bottom: 22px; }

/* Compat */
.compat { padding: 40px 6%; }

.compat-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.compat-actions .btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 12px;
}

.compat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.field { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.field label { color: var(--muted); font-weight: 600; }
.field select { padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--white); color: var(--black); }

/* Indicador de filtro ativo */
.filter-indicator {
  background: linear-gradient(90deg, var(--accent-light, rgba(59, 130, 246, 0.1)), transparent);
  color: var(--accent, #3b82f6);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  border-left: 3px solid var(--accent, #3b82f6);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Select com pesquisa customizado */
.searchable-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.searchable-select input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  cursor: pointer;
}

.searchable-select input:focus {
  outline: none;
  border-color: var(--blue);
}

.searchable-select .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.searchable-select .dropdown.show {
  display: block;
}

.searchable-select .dropdown-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.searchable-select .dropdown-item:last-child {
  border-bottom: none;
}

.searchable-select .dropdown-item:hover {
  background-color: rgba(11, 67, 141, 0.1);
}

.searchable-select .dropdown-item.selected {
  background-color: var(--blue);
  color: white;
}

.results { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.results-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.results-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.compat-list { list-style: none; display: grid; gap: 6px; }
.compat-list li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.compat-list li.ok { color: #22c55e; } /* Verde mais claro */
.compat-list li.warn { color: #f59e0b; } /* Amarelo mais claro */
.compat-list li.err { color: #ef4444; } /* Vermelho mais claro */

/* Promos */
.promos { padding: 40px 6%; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.promo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: grid; }
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card-body { padding: 12px; display: grid; gap: 8px; }
.price { font-weight: 700; color: var(--black); }
.store { color: var(--muted); }
.card-actions { display: flex; justify-content: space-between; align-items: center; }
.card a.btn { font-weight: 600; }

/* Ofertas do Dia */
.ofertas-do-dia {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
  border-top: 3px solid #ef4444;
}

.ofertas-do-dia .section-head h2 {
  color: #ef4444;
}

.ofertas-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ofertas-tabs .tab-btn {
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: var(--card);
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ofertas-tabs .tab-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ofertas-tabs .tab-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.loading-ofertas {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  gap: 16px;
}

.loading-ofertas .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.no-ofertas {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  gap: 12px;
  text-align: center;
}

.no-ofertas.error {
  color: #ef4444;
}

.no-ofertas i {
  width: 48px;
  height: 48px;
}

/* Cards de Ofertas do Dia */
.promo-card.oferta-dia {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.promo-card.oferta-dia:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.promo-card.oferta-dia img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: white;
  padding: 10px;
}

.promo-card .fonte-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.promo-card .fonte-badge.mercadolivre {
  background: #ffe600;
  color: #333;
}

.promo-card .fonte-badge.amazon {
  background: #ff9900;
  color: #111;
}

.promo-card .desconto-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ef4444;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.promo-card .promo-content {
  padding: 16px;
}

.promo-card .promo-content h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.promo-card .preco-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.promo-card .preco-original {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

.promo-card .preco-atual {
  font-size: 20px;
  font-weight: 700;
  color: #22c55e;
}

.promo-card .btn.small {
  padding: 8px 16px;
  font-size: 13px;
  width: 100%;
  justify-content: center;
}

.promo-card.mercadolivre {
  border-color: #ffe600;
}

.promo-card.amazon {
  border-color: #ff9900;
}

/* Sobre */
.sobre { padding: 40px 6%; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; text-align: center; }
.feature i { color: var(--blue); }
.feature h3 { margin-top: 8px; margin-bottom: 8px; }
.feature p { color: var(--muted); }

/* Botão de teste */
#runTestsBtn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

#runTestsBtn i {
  width: 16px;
  height: 16px;
}

/* Card de Produtos Selecionados */
.selected-products {
  padding: 40px 6%;
  background: var(--bg);
}

.products-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.summary-info {
  display: flex;
  gap: 32px;
}

.summary-info > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-info .label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.summary-info .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.total-power .value {
  color: var(--orange);
}

.total-price .value {
  color: var(--green);
}

.selected-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 200px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-image .placeholder {
  color: var(--muted);
  font-size: 3rem;
}

.product-info {
  padding: 16px;
}

.product-category {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* Propriedade padrão para compatibilidade */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.spec-tag {
  background: var(--bg);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
}

.product-prices {
  margin-bottom: 16px;
}

.price-loading {
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.price-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.price-item:last-child {
  border-bottom: none;
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.price-store-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.price-store {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}

.price-value {
  font-weight: 600;
  color: var(--green);
  font-size: 1rem;
}

.price-best {
  background: var(--green);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.price-estimate {
  background: var(--orange);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 8px;
}

.price-estimated {
  border-left: 3px solid var(--orange);
  background: rgba(255, 193, 7, 0.1);
}

.price-disclaimer {
  color: var(--orange);
  font-size: 0.7rem;
  font-style: italic;
  margin-top: 4px;
  display: block;
}

.price-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-title {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
}

.price-condition {
  display: inline-block;
  background: var(--blue);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
}

.price-shipping {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 500;
}

.price-installments {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 8px 12px;
  font-size: 0.875rem;
  border-radius: 6px;
  flex: 1;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: white;
}

.btn-affiliate {
  background: var(--green);
  color: white;
  border: none;
}

.btn-affiliate:hover {
  background: #28a745;
}

/* Responsive para produtos selecionados */
@media (max-width: 768px) {
  .products-summary {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .summary-info {
    justify-content: center;
    gap: 24px;
  }
  
  .selected-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer Moderno */
.footer { 
  background: linear-gradient(135deg, var(--card) 0%, rgba(var(--card), 0.95) 100%);
  border-top: 1px solid var(--border);
  margin-top: 60px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), #60a5fa, var(--blue));
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr;
  gap: 48px;
  padding: 48px 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(11, 67, 141, 0.2));
}

.footer-brand h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
}

.footer-brand p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.footer-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
}

.stat span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.link-group h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 16px 0;
}

.link-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-group li {
  margin-bottom: 12px;
}

.link-group a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.link-group a:hover {
  color: var(--blue);
  transform: translateX(4px);
}

.footer-social h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 20px 0;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(var(--muted), 0.05);
  border: 1px solid rgba(var(--muted), 0.1);
  transition: all 0.3s ease;
  font-size: 14px;
}

.social-btn:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 67, 141, 0.2);
}

.social-btn.instagram:hover { background: #E4405F; }
.social-btn.twitter:hover { background: #1DA1F2; }
.social-btn.youtube:hover { background: #FF0000; }
.social-btn.github:hover { background: #333; }

.footer-newsletter {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-newsletter h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin: 0 0 8px 0;
}

.footer-newsletter p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px 0;
}

.newsletter-form {
  display: flex;
  gap: 8px;
}

.newsletter-input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--black);
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--blue);
}

.newsletter-btn {
  padding: 12px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-btn:hover {
  background: #0a3d7a;
  transform: scale(1.05);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.footer-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Footer Responsivo */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .footer-social {
    grid-column: 1 / -1;
  }
  
  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 0;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .footer-stats {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .promo-grid { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .logo { width: 40px; height: 40px; } /* Logo menor em mobile */
  .logo-large { width: 110px; } /* Logo grande menor em mobile */
  .brand-name { font-size: 20px; } /* Texto menor em mobile */
  .compat-grid { grid-template-columns: 1fr 1fr; }
  .results { grid-template-columns: 1fr; }
  .promo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .logo { width: 36px; height: 36px; } /* Logo ainda menor em telas muito pequenas */
  .logo-large { width: 90px; } /* Logo grande ainda menor */
  .brand-name { font-size: 18px; } /* Texto ainda menor */
  .compat-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .promo-grid { grid-template-columns: 1fr; }
}

/* Estilos para preços e cards de produtos */
.price-affiliate {
  background: #28a745;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}

.price-method {
  background: #6c757d;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}

.price-estimated {
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.price-disclaimer {
  color: #856404;
  font-style: italic;
  display: block;
  margin-top: 4px;
}

.price-item {
  transition: all 0.3s ease;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.price-item:hover {
  background: rgba(11, 67, 141, 0.05);
  border-color: #0b438d;
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.price-store-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.price-value {
  font-weight: bold;
  color: #28a745;
}

.price-best {
  background: #28a745;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
}

.price-estimate {
  background: #ffc107;
  color: #856404;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
}

.price-loading {
  text-align: center;
  padding: 20px;
  color: var(--muted);
}

.price-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Estilos para botões de compra - diferenciação visual */
.buy-now { transition: all 0.3s ease; }
.buy-now[title*="produto específico"] { background: #28a745 !important; border-color: #28a745 !important; }
.buy-now[title*="produto específico"]:hover { background: #218838 !important; border-color: #1e7e34 !important; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3); }
.buy-now[title*="busca"] { background: #ffc107 !important; border-color: #ffc107 !important; color: #212529 !important; }
.buy-now[title*="busca"]:hover { background: #e0a800 !important; border-color: #d39e00 !important; }

/* Seção de Promoções Mercado Livre */
.promo-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.promo-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-radius: 8px 8px 0 0;
  height: 200px;
}

.promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.promo-card:hover .promo-image img {
  transform: scale(1.05);
}

.desconto-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff4757, #ff3838);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
  z-index: 2;
}

.frete-gratis {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #2ed573, #1dd1a1);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(46, 213, 115, 0.3);
  z-index: 2;
}

/* Badge de loja (ML vs Amazon) */
.store-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Cards da Amazon */
.amazon-card {
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.amazon-card:hover {
  border-color: #FF9900;
}

.amazon-btn {
  background: linear-gradient(135deg, #FF9900, #FF8C00) !important;
  color: #232F3E !important;
}

.amazon-btn:hover {
  background: linear-gradient(135deg, #FF8C00, #FF9900) !important;
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4) !important;
}

/* Cards do Mercado Livre */
.ml-card {
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.ml-card:hover {
  border-color: #FFE600;
}

.ml-btn {
  background: linear-gradient(135deg, #FFE600, #FFC107) !important;
  color: #333 !important;
}

.ml-btn:hover {
  background: linear-gradient(135deg, #FFC107, #FFE600) !important;
  box-shadow: 0 6px 20px rgba(255, 230, 0, 0.4) !important;
}

/* Indicador de loja nos cards de preço */
.store-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  border-radius: 6px;
}

/* Botão comprar Amazon na seção de produtos selecionados */
.selected-product-card .btn-comprar.amazon-style {
  background: linear-gradient(135deg, #FF9900, #FF8C00);
  color: #232F3E;
}

.selected-product-card .btn-comprar.amazon-style:hover {
  background: linear-gradient(135deg, #FF8C00, #FF9900);
  box-shadow: 0 5px 15px rgba(255, 153, 0, 0.4);
}

.promo-titulo {
  font-size: 1rem;
  margin: 15px 0 10px 0;
  line-height: 1.4;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8em;
}

.promo-precos {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preco-original {
  font-size: 0.9rem;
  color: #888;
  text-decoration: line-through;
  opacity: 0.7;
}

.preco-atual {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color), #4834d4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.promo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 15px 0;
  font-size: 0.85rem;
  color: #666;
}

.vendedor {
  font-weight: 500;
  color: var(--primary-color);
}

.condicao {
  padding: 2px 6px;
  background: rgba(99, 110, 114, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
}

.promo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--primary-color), #4834d4);
  position: relative;
  overflow: hidden;
}

.promo-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.promo-btn:hover::before {
  left: 100%;
}

.promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 84, 112, 0.3);
}

.loading-promocoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
  text-align: center;
  grid-column: 1 / -1;
}

.loading-promocoes i {
  font-size: 2rem;
  margin-bottom: 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.no-promocoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
  text-align: center;
  grid-column: 1 / -1;
}

.no-promocoes i {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-promocoes h3 {
  margin: 0 0 10px 0;
  color: var(--text-color);
}

.no-promocoes p {
  margin: 0;
  opacity: 0.8;
}

.aviso-fallback {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.aviso-fallback i {
  font-size: 1.2rem;
}

/* ==================== CARDS DE PRODUTOS SELECIONADOS ==================== */

.selected-products {
  margin-top: 40px;
  padding: 30px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 2px solid var(--blue);
}

.selected-products .section-head {
  margin-bottom: 20px;
}

.selected-products .section-head h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--blue);
}

.products-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--blue), #0056b3);
  border-radius: 12px;
  margin-bottom: 25px;
  color: white;
  flex-wrap: wrap;
  gap: 15px;
}

.summary-info {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.total-power, .total-price {
  display: flex;
  flex-direction: column;
}

.summary-info .label {
  font-size: 0.85rem;
  opacity: 0.9;
}

.summary-info .value {
  font-size: 1.5rem;
  font-weight: bold;
}

#searchAllPrices {
  background: #FFE600;
  color: #333;
  border: none;
  padding: 12px 25px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

#searchAllPrices:hover {
  background: #fff;
  transform: scale(1.05);
}

.selected-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.selected-product-card {
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.selected-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-color: var(--blue);
}

.selected-product-card .card-header {
  background: linear-gradient(135deg, var(--blue), #0056b3);
  color: white;
  padding: 12px 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-product-card .card-body {
  padding: 15px;
}

.selected-product-card .product-name {
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 15px;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.selected-product-card .product-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  margin-bottom: 15px;
}

.selected-product-card .price-info {
  margin-bottom: 15px;
}

.selected-product-card .ml-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--green);
}

.selected-product-card .ml-original-price {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
}

.selected-product-card .ml-discount {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 8px;
}

.selected-product-card .shipping-info {
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.selected-product-card .btn-comprar {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #FFE600, #FFC107);
  color: #333;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.selected-product-card .btn-comprar:hover {
  background: linear-gradient(135deg, #FFC107, #FFE600);
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(255, 230, 0, 0.4);
}

.selected-product-card .loading-price {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

.selected-product-card .loading-price i {
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
  display: block;
}

.selected-product-card .no-price {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsividade para promoções */
@media (max-width: 768px) {
  .promo-image {
    height: 160px;
  }
  
  .promo-titulo {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
    min-height: 4.2em;
  }
  
  .preco-atual {
    font-size: 1.1rem;
  }
  
  .desconto-badge,
  .frete-gratis {
    font-size: 0.7rem;
    padding: 3px 6px;
  }
  
  .products-summary {
    flex-direction: column;
    text-align: center;
  }
  
  .summary-info {
    justify-content: center;
  }
  
  .selected-products-grid {
    grid-template-columns: 1fr;
  }
}
