/* Estilos globais */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s;
}

/* Tema claro com degradê */
body.light-theme {
  background: linear-gradient(to bottom, #ffffff, #f2f2f2);
  color: #000000;
}

/* Tema escuro */
body.dark-theme {
  background-color: #121212;
  color: #ffffff;
}

/* Ajusta cor de textos/links no tema escuro */
body.dark-theme a, 
body.dark-theme h1, 
body.dark-theme h3, 
body.dark-theme span {
  color: #ffffff !important;
}

body.dark-theme a:hover {
  color: #cccccc !important;
}

/* Cabeçalho */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(to right, #ff0000, #0000ff); /* tema claro padrão */
  color: white;
  position: relative;
  transition: background 0.3s ease;
}

/* Cabeçalho no tema escuro */
body.dark-theme header {
  background: linear-gradient(to right, #1a1a1a, #333333); /* escuro suave */
}

/* Logo */
header .logo img {
  max-width: 80px;
  height: auto;
}

/* Navegação */
nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li a {
  text-decoration: none;
  color: white;
  padding: 8px 12px;
  transition: background-color 0.3s;
  border-radius: 4px;
}

nav ul li a:hover {
  background-color: #c62828;
}

/* Opções do usuário */
.user-options {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style-type: none;
}

.user-options a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
}

.user-options i {
  font-size: 1.5rem;
}

/* Botão de tema */
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease;
  padding: 8px;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

/* Produtos */
.produtos {
  padding: 20px;
  text-align: center; 
}

.produtos h2 {
  font-size: 36px;
  color: #D62828;
}

.grid-produtos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.produto {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  background-color: white;
}

body.dark-theme .produto {
  background-color: #1e1e1e;
  border-color: #444;
}

.produto img {
  max-width: 40%;
  height: auto;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
}

.produto h3 {
  font-size: 18px;
  color: #333;
}

body.dark-theme .produto h3 {
  color: #fff;
}

.produto p {
  font-size: 16px;
  font-weight: bold;
  color: #DE9800;
}

.produto button {
  padding: 10px 20px;
  background-color: #D62828;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.produto button:hover {
  background-color: #b71c1c;
}

/* Rodapé */
footer {
  background-color: #D62828;
  color: white;
  text-align: center;
  padding: 15px 20px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

footer img {
  margin: 10px 0;
  width: 80px;
  height: auto;
}

footer .contato {
  margin-top: 15px;
  font-size: 14px;
}

footer .contato p {
  margin: 5px 0;
}

footer .contato a {
  color: #fcfcfc;
  text-decoration: none;
  font-weight: bold;
}

footer .contato a:hover {
  text-decoration: underline;
}

footer p {
  margin: 0;
  font-size: 14px;
}

/* Modal do carrinho */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: rgb(255, 0, 0);
  text-decoration: none;
  cursor: pointer;
}



/* ---------- Estilos do Carrinho ---------- */

.cart-container {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

#cart-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: #ffffff;
  position: relative;
}

#cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: rgb(15, 156, 156);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  padding: 2px 6px;
}

.cart-dropdown {
  position: absolute;
  right: 0;
  top: 35px;
  width: 280px;
  background: linear-gradient(to right, #1d1616, #780d7c);
  border: 1px solid #000000;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 15px;
  z-index: 999;
  display: block;
  transition: all 0.3s ease;
}

.cart-dropdown.hidden {
  display: none;
}

.cart-dropdown h4 {
  margin: 0 0 10px;
  font-size: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

#cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  max-height: 200px;
  overflow-y: auto;
}

#cart-items li {
  margin-bottom: 12px;
  font-size: 14px;
  background-color: #a0a0a1;
  padding: 8px;
  border-radius: 6px;
  position: relative;
}

.remove-item {
  position: absolute;
  top: 5px;
  right: 8px;
  background: transparent;
  border: none;
  color: rgb(255, 255, 255);
  font-size: 16px;
  cursor: pointer;
}

#cart-total {
  font-weight: bold;
  color: #ffffff;
  font-size: 15px;
}

