@import url('https://fonts.googleapis.com/css2?family=Krona+One&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Montserrat:wght@100..900&family=Oswald:wght@200..700&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

:root{
    --fonte-principal: "Krona One", sans-serif;
    --cor-principal: #a259ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: 0.8s;
  text-decoration: none;
}

body {
  background-color: #121212;
  color: #f5f5f5;
  font-family: Arial, sans-serif;
}

header {
  background: #000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.logo span {
  color: var(--cor-principal);
}
nav {
    margin-top: 0.3rem;
    margin-left: 2rem;
}
nav a {
  
  margin: 0 1rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--fonte-principal);
  font-weight: 100;
}

nav a:hover{
    color: var(--cor-principal);
    text-decoration-line: underline;
    text-underline-offset: 5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.top-actions input {
  padding: 0.4rem;
}

.banner {
  background-image: url('./img/backgroundbanner.jpg');
  font-family: var(--fonte-principal);
  background-size: cover;
  text-align: center;
  padding: 4rem 2rem;
}
.banner h1 {
  font-size: 2.5rem;
  color: #fff;

  
}
.banner p {
  font-size: 1.5rem;
  color: #fff;

}

.benefits {
  display: flex;
  justify-content: center;
  gap: 10rem;
  padding: 2rem ;
  background: #1e1e1e;
}
.benefit {
  text-align: center;
  max-width: 12.5rem;
}
.benefit h3 {
  color: var(--cor-principal);
}

.produtos {
  padding-top: 2.5rem;
  padding-left: 12.5rem;
  padding-right: 12.5rem;
  
}

.topic{
  display: flex;
  justify-content: center;
}

.produtos h2 {
  margin-bottom: 1rem;
  margin-left: 4rem;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 2.5rem auto; /* centraliza e evita espaço exagerado */
  max-width: 1200px;   /* trava largura máxima no desktop */
}

.produto {
  background: #222;
  padding-top: 1rem;
  padding-bottom: 1.5rem;
  border-radius: 10px;
  text-align: center;
  width: 18.75rem;
  height: 18.2rem;
  margin-bottom: 2.5rem;
  
}

.produto:hover{
  box-shadow: 0 0 1rem 0.4rem rgba(139, 0, 139, 0.7);
}

.produto img {
  border: 0.3rem, solid, rgba(139, 0, 139, 0.7);
  max-width: 100%;
  width: 14.4rem;
  height: 8.2rem;
  border-radius: 0.4rem;
}
.produto h4 {
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
}
.produto .preco {
  color: var(--cor-principal);
  font-weight: bold;
  font-size: 1.2rem;
}
.produto .desconto {
  color: #888;
  text-decoration: line-through;
  margin-left: 0.4rem;
  font-size: 1.2rem;
}
.produto button {
  margin-top: 0.8rem;
  background: var(--cor-principal);
  color: #fff;
  border: none;
  padding: 0.5rem;
  border-radius: 0.4rem;
  cursor: pointer;
}


footer {
    font-weight: 200;
    background: #1e1e1e;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.icon-btn {
      display: inline-flex;          /* permite centralizar o ícone */
      justify-content: center;
      align-items: center;
      background-color: #1a1a1a;     /* fundo */
      border-radius: 50%;            /* círculo */
      width: 3.2rem;                   /* controla o tamanho do fundo */
      height: 3.2rem;                  /* controla o tamanho do fundo */
      
    }

    .icon-btn:hover {
      background-color: #292929;     /* muda cor ao passar mouse */
      transform: scale(1.1);
    }



/* -------- RESPONSIVIDADE -------- */

/* Tablets (até 1024px) */
@media (max-width: 1024px) {
  header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  nav {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .benefits {
    gap: 3rem;
    flex-wrap: wrap;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    margin: 2rem;
  }

  .produtos {
    padding: 2rem;
  }
}

/* Celulares (até 768px) */
@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-direction: column;
  }

  .logo {
    font-size: 1.2rem;
    text-align: center;
  }

  nav a {
    margin: 0.5rem;
    font-size: 0.9rem;
  }

  .banner {
    padding: 2rem 1rem;
  }

  .banner h1 {
    font-size: 1.8rem;
  }

  .banner p {
    font-size: 1rem;
  }

  .benefits {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .grid {
    grid-template-columns: 1fr; /* 1 produto por linha */
    margin: 1rem;
  }

  .produto {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto 2rem auto;
  }

  footer {
    text-align: center;
    font-size: 0.9rem;
  }
}


/* Carrinho */
#carrinho {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e1e1e;
  color: #fff;
  border: 2px solid var(--cor-principal);
  border-radius: 10px;
  padding: 15px;
  width: 250px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(162, 89, 255, 0.7);
}

#carrinho h3 {
  margin-bottom: 10px;
  text-align: center;
  color: var(--cor-principal);
}

#carrinho ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}

#carrinho li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

#carrinho p {
  font-weight: bold;
  text-align: center;
  margin-top: 10px;
}

#finalizar {
  margin: 0.3rem;
  width: 100%;
  padding: 8px;
  background: var(--cor-principal);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

#finalizar:hover {
  background: #8a3eff;
}


#lista-carrinho .remover {
  background: transparent;
  border: none;
  color: #c74bff;   /* roxo padrão */
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-left: 8px;
  transition: 0.3s;
}

#lista-carrinho .remover:hover {
  color: #fff;
  background: #c74bff;
  border-radius: 6px;
  padding: 2px 6px;
}
