/* ============================================== */
/* --- ESTILOS GERAIS E COMUNS (Base para tudo) --- */
/* ============================================== */

/* Reset e Padrões do Body */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fffef9;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Garante que o footer fique no final */
}

/* ================================== */
/* --- ESTILO DO BANNER DA HOME PAGE --- */
/* ================================== */

.banner-home {
  /* Caminho correto a partir da pasta /css */
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../assets/img/banner-home.png');
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 3rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white; 
}

.banner-home h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 6px #000;
    margin: 0 0 1rem 0;
}

.banner-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 12px 24px;
  background-color: #ff9f1c;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.banner-btn:hover {
  transform: scale(1.05);
  background-color: #e88e00;
}

/* Ajuste do banner para telas menores */
@media (max-width: 768px) {
    .banner-home h2 {
        font-size: 1.8rem;
    }
}

main {
  flex: 1; /* Faz o conteúdo principal ocupar o espaço disponível */
  padding: 2rem;
  text-align: center;
}

/* Títulos */
h1, h2 {
  color: #ff9f1c;
  text-align: center;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 30px;
}

h2 {
  font-size: 1.8rem;
  margin-top: 40px;
}

/* --- Cabeçalho e Menu --- */
.cabecalho {
  background-color: #ff9f1c;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.menu a {
  margin-left: 20px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: color 0.3s;
}

.menu a:hover {
  color: #ffeeba;
}

/* --- Rodapé --- */
.footer {
  background-color: #1a1a1a;
  color: #fff;
  padding: 40px 20px;
  margin-top: auto;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: auto;
}

.footer-section {
  flex: 1 1 220px; /* Em telas maiores, ocupa espaço. Em menores, quebra a linha */
}

.footer-section h3 {
  color: #f1c40f;
  margin-bottom: 10px;
}

.footer-section p, .footer-section a, .footer-section li {
  font-size: 14px;
  color: #ccc;
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
  color: #fff;
}

/* --- Formulários (Login, Cadastro, etc.) --- */
.login-container {
  max-width: 450px;
  margin: 40px auto;
  padding: 30px;
  border-radius: 15px;
  background-color: #f8f8f8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-container label {
  display: block;
  text-align: left;
  margin-bottom: 5px;
  font-weight: 500;
}

.login-container input[type="text"],
.login-container input[type="email"],
.login-container input[type="password"],
.login-container input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box; /* Evita que o padding aumente a largura total */
}

.login-container button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #ff9f1c;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-container button[type="submit"]:hover {
  background-color: #e88e00;
}

/* --- Cards de Produto --- */
.produtos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.produto-card, .produto {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  width: 250px;
  text-align: center;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.produto-card:hover, .produto:hover {
  transform: scale(1.03);
}

.produto-card img, .produto img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

.produto-card h3, .produto h3 {
  font-size: 1.1rem;
  color: #333;
  margin: 0.8rem 0 0.5rem;
  min-height: 48px;
}

.produto-card p, .produto p {
  font-size: 1rem;
  color: #444;
  margin: 0.25rem 0;
}

.produto-card button, .produto button {
  margin-top: auto;
  background-color: #ff9900;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

/* ========================================== */
/* --- A MÁGICA DA RESPONSIVIDADE COMEÇA AQUI --- */
/* ========================================== */

@media (max-width: 768px) {
  
  /* Ajusta o padding geral para telas menores */
  main {
    padding: 1rem;
  }

  /* --- Cabeçalho Responsivo --- */
  .cabecalho {
    flex-direction: column; /* Coloca o logo acima do menu */
    padding: 15px;
    gap: 10px; /* Espaço entre o logo e o menu */
  }

  .menu {
    display: flex;
    flex-wrap: wrap; /* Permite que os links quebrem a linha */
    justify-content: center;
    gap: 10px;
  }

  .menu a {
    margin-left: 0; /* Remove a margem da versão desktop */
  }
  
  /* --- Formulários Responsivos --- */
  .login-container {
    width: 90%; /* Ocupa 90% da tela ao invés de um valor fixo */
    margin: 20px auto;
    padding: 20px;
  }
  
  /* --- Cards de Produto Responsivos --- */
  .produtos-container {
    gap: 1rem; /* Diminui o espaço entre os cards */
  }

  .produto-card, .produto {
    width: 85%; /* Faz o card ocupar quase toda a largura da tela */
    max-width: 300px; /* Limita para não ficar gigante em telas intermediárias */
  }

  /* --- Rodapé Responsivo --- */
  .footer-container {
    flex-direction: column; /* Empilha as seções verticalmente */
    text-align: center;
  }
}
/* ================================== */
/* --- ESTILOS PARA O PAINEL VENDEDOR --- */
/* ================================== */

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-section {
  margin-bottom: 40px;
}

.dashboard-section h2 {
  text-align: left;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.cards-dashboard {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center; /* <-- MELHORIA APLICADA AQUI */
}
.card {
  background-color: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  flex: 1 1 300px; /* Base de 300px, cresce para ocupar espaço */
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: #555;
}

.card p {
  margin: 0;
  font-size: 2.2rem;
  font-weight: bold;
  color: #333;
}

/* --- Seção de Relatório --- */
.relatorio-container {
  position: relative;
  display: none; /* COMEÇA ESCONDIDO POR PADRÃO */
  margin-top: 20px;
  padding: 30px;
  background-color: #fdfdfd;
  border-radius: 12px;
  border: 1px solid #ddd;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn-fechar-relatorio {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #eee;
  border: 1px solid #ccc;
  color: #555;
  width: 30px;
  height: 30px;
  border-radius: 50%; /* Deixa o botão redondo */
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s, color 0.2s;
}

.btn-fechar-relatorio:hover {
  background-color: #d9534f;
  color: white;
  border-color: #d9534f;
}

.relatorio-container h2 {
    font-size: 1.5rem;
}

.relatorio-container p {
    color: #666;
    margin-bottom: 1rem;
}

.relatorio-box {
  width: 100%;
  height: 300px;
  background-color: #f0f0f0;
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 14px;
  font-family: monospace;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.btn-limpar {
  display: block;
  margin: 0 auto;
  padding: 12px 24px;
  background-color: #d9534f; /* Vermelho para ação destrutiva */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-limpar:hover {
  background-color: #c9302c;
}