:root {
  --color-bg-light: #f5f5f5;
  --color-text-light: #1a1a1a;
  --color-header-light: #eaeaea;

  --color-bg-dark: #121212;
  --color-text-dark: #f0f0f0;
  --color-header-dark: #1e1e1e;

  --max-width: 1400px;
}

/* Tema claro */
[data-theme="light"] {
  background-color: var(--color-bg-light);
  color: var(--color-text-light);
}

[data-theme="light"] .header {
  background-color: var(--color-header-light);
  border-bottom: 1px solid #ccc;
}

/* Tema escuro */
[data-theme="dark"] {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}

[data-theme="dark"] .header {
  background-color: var(--color-header-dark);
  border-bottom: 1px solid #333;
}

/* Reset básico e body */
body {
  margin: 0;
  font-family: sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

/* Header fixo no topo */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--color-header-dark);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #333;
  padding: 0 20px;
  justify-content: space-between;
}

/* Container principal para evitar conteúdo atrás do header */
.main-container {
  padding-top: 60px;
}

/* Container interno centralizado */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  font-weight: bold;
  font-size: 1.2rem;
}

/* Input de busca */
.search {
  flex: 1;
  max-width: 500px;
  margin: 0 20px;
  padding: 8px 12px;
  border: 1px solid #888;
  border-radius: 4px;
  background: inherit;
  color: inherit;
  font-size: 1rem;
}

/* Botão alternar tema */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: inherit;
  user-select: none;
}

/* Cards principais - estilo similar aos cards normais, mas com destaque */
.main-cards {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 40px auto;
}

/* Card principal */
.main-card {
  position: relative;
  width: 48%;
  background-color: #2a2a2a; /* mesmo fundo do card normal */
  color: #eee;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6); /* sombra mais forte */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.main-card:hover {
  transform: scale(1.07);
}

/* Badge desconto verde no canto esquerdo */
.main-card .card-badge.discount {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #159e3f;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  user-select: none;
  z-index: 10;
  box-shadow: 0 0 8px rgba(21, 158, 63, 0.7);
}

/* Imagem no card principal preenchendo todo o espaço */
.main-card .card-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.main-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: filter 0.3s ease, transform 0.3s ease;
  display: block;
  margin: 0;
}

.main-card:hover .card-image img {
  filter: brightness(1);
  transform: scale(1.05);
}

/* Conteúdo texto do card principal */
.main-card-content {
  padding: 16px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-align: left;
}

.main-card-content h2 {
  font-size: 1.6rem;
  margin: 0;
}

.main-card-content p {
  font-size: 1.05rem;
  color: #ccc;
  margin: 0 0 15px 0;
  flex-grow: 1;
}

/* Preços dentro do conteúdo para melhor alinhamento */
.main-card .price-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.main-card .price-old {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 500;
}

.main-card .price-new {
  font-weight: 700;
  font-size: 1.4rem;
  color: #e0e0e0;
}

/* Botão comprar igual aos cards menores */
.main-card .buy-btn {
  background-color: #fff;
  color: #222;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  user-select: none;
  margin-top: auto;
}

.main-card .buy-btn:hover {
  background-color: #ddd;
}

/* Container dos cards menores */
.cards-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px; /* Espaço extra no final da lista de cards */
}


/* Card padrão */
.card {
  background-color: #2a2a2a;
  color: #eee;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.4);
  width: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.05);
}

/* Imagem do card */
.card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.card:hover .card-image img {
  filter: brightness(1);
  transform: scale(1.05);
}

/* Badges dos cards menores */
.card-badge {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  user-select: none;
  transition: box-shadow 0.3s ease;
}

.card-badge.discount {
  left: 12px;
  background-color: #159e3f;
}

.card-badge.lightning {
  right: 12px;
  background-color: #2563eb;
  font-size: 1.2rem;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card:hover .card-badge {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* Conteúdo do card menor */
.card-content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 700;
  color: inherit;
}

/* Preço nos cards */
.price-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 500;
}

.price-new {
  font-weight: 700;
  font-size: 1.4rem;
  color: #e0e0e0;
}

.card-content small {
  color: #ccc;
  font-size: 0.85rem;
}

/* Botão comprar card menor */
.buy-btn {
  margin-top: auto;
  background-color: #fff;
  color: #222;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s ease;
  user-select: none;
}

.buy-btn:hover {
  background-color: #ddd;
}

/* Ícone carrinho (se usar) */
.icon-cart {
  font-size: 1.2rem;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
  .container {
    padding: 10px;
    justify-content: center;
  }

  .main-cards {
    flex-direction: column;
    max-width: 100%;
  }

  .main-card {
    width: 100%;
  }

  .cards-container {
    max-width: 100%;
  }

  .card {
    width: 100%;
  }
}

/* Título seções */
.section-title {
  width: 100%;
  max-width: var(--max-width);
  margin: 40px auto 20px auto;
  padding: 0 20px;
  font-size: 1.8rem;
  font-weight: 700;
  color: inherit;
}

/* Footer */
.footer {
  background-color: var(--color-header-dark);
  color: var(--color-text-dark);
  padding: 40px 0 20px 0;
  border-top: 1px solid #333;
  font-size: 0.9rem;
  margin-top: 40px;
}

.footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer p {
  margin: 0;
}

.footer-nav a {
  color: var(--color-text-dark);
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.footer-nav a:first-child {
  margin-left: 0;
}

.footer-nav a:hover {
  color: #5599ff;
}

/* Badge vermelha de desconto (extra) */
.discount-badge {
  background-color: #ff4444;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-left: 8px;
}

/* Remover sublinhado somente nos links que envolvem os cards */
.cards-container > a,
.main-cards > a {
  text-decoration: none;
  color: inherit;
}

/* Permitir que o preço antigo mantenha o sublinhado (riscado) */
.price-old {
  text-decoration: line-through;
  color: #aaa;
  font-weight: 500;
}

/* Botão comprar com estilo correto */
.buy-btn {
  background-color: #fff;
  color: #222;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s ease;
  user-select: none;
}

.buy-btn:hover {
  background-color: #ddd;
}
