@import "../css/global.css";
@import url("https://fonts.googleapis.com/css2?family=Sedgwick+Ave&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Special+Gothic+Condensed+One&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Teko:wght@300..700&display=swap");
/* -------------------------------spinner------------------------------ */
.spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #464646;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: girar 1s linear infinite;
  margin: 50px auto;
}

@keyframes girar {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

@keyframes girar {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 950px) {
  .spinner {
    width: 30px;
    height: 30px;
  }
}

/*----------------------------- PROMPT ------------------------------*/
.prompt {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  font-family: lato;
}

.prompt.hidden {
  display: none;
}

.prompt-box {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt-box input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.prompt-box .botoes {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.prompt-box button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.botoes {
  margin-top: 20px;
  padding: 10px;
  color: #fff;
  border: none;
  cursor: pointer;
}

.termos {
  display: flex;
  font-size: 2.5vh;
  margin-top: 1vh;
  margin-left: 0.2vw;
}

#termos {
  width: 30px;
  margin-left: 2vh;
}

.campo-invalido {
  border: 2px solid red;
}

.checkbox-invalido {
  outline: 2px solid red;
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------- */
body {
  background-color: #000000ef;
}

main {
  margin-top: 8vw;
}

.header-loja {
  display: flex;
  justify-content: space-between;
}

.subtitulo {
  color: rgb(22, 22, 22);
  font-size: 1.3vw;
  font-family: lato;
  font-weight: 700;
  margin-right: 2vw;
  padding: 1rem;
  text-align: center;
  background-color: #ffe969b9;
  border-radius: 50px;
}

.titulo {
  color: rgb(255, 255, 255);
  font-size: 4vw;
  font-family: "lato", sans-serif;
  font-weight: 900;
  margin-left: 2vw;
  width: 70%;
}

.content {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: nowrap;
  padding: 2rem;
}

/*---------------------- Cards de cerveja --------------------------*/

/* Container que agrupa todos os cards */
.cervejas-container {
  display: flex;
  flex-wrap: wrap; /* permite quebrar linha */
  gap: 1.5rem; /* espaço entre os cards */
  justify-content: center; /* centraliza horizontalmente */
}

/* O card em si */
.card-cerveja {
  width: 15rem;
  background: #dad8d8; /* fundo escuro */
  color: #000000;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: "lato", sans-serif;
}
.card-cerveja:hover {
  background-color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Imagem da cerveja */
.card-cerveja img {
  height: 14rem;
  padding-top: 1rem;
}

/* Título */
.card-cerveja h2 {
  display: none;
}

/* Parágrafos */
.abv-ibu {
  width: 12rem;
  padding: 0.1rem;
  border: solid black;
  box-shadow: 1px 1px 1px 1px rgba(92, 92, 92, 0.534);
  border-radius: 13px;
  font-size: 0.95rem;
  color: #000000;
  text-align: center; /* centraliza o texto horizontalmente */
  margin: 0 auto; /* centraliza a caixa se necessário */
  margin-bottom: 0.3rem;
}
.tamanho {
  font-weight: 600;
}
.valor {
  margin-top: 0.3rem;
  font-size: 1.3rem; /* aumenta o tamanho do texto */
  font-weight: bold; /* mantém em negrito */
  text-align: center; /* centraliza o texto */
}

/* Botão */
.card-cerveja .botao-add-carrinho {
  margin: 0.7rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 28px;
  background: #000000c7; /* amarelo destaque */
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.card-cerveja .botao-add-carrinho:hover {
  background: #0c7911;
}

/*---------------------- RESUMO DA COMPRA --------------------------*/
aside {
  position: sticky;
  top: 1vw;
  right: 0;
  transition: none;
  font-family: lato;
  width: 24vw;
  background-color: #f1f1f1;
  border-radius: 12px;
}

.box {
  padding: 1vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  top: 2vw;
  width: 21vw;
  margin: 0.5vw 0.5vw;
}

.resumo {
  font-size: 1.6vw;
  font-weight: 700;
  margin-bottom: 1.5vw;
  border-bottom: 1px solid#888;
}

.item-carrinho {
  display: flex;
  justify-content: flex-end;
  gap: 2vw;
  align-items: center;
  margin-bottom: 0.8vw;
  border-bottom: 1px solid #e9e9e9;
  padding-bottom: 0.5vw;
}

.nome {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9em;
}

.volume {
  font-weight: 400;
  color: #888;
  font-size: 0.9em;
}

.preco {
  font-size: 0.9em;
  margin-right: -1.3vw;
  font-weight: 500;
  margin-top: 4px;
}

.quantidade-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #dfdfdf;
  border-radius: 30px;
  padding: 0 6px;
}

.quantidade {
  width: 1.8vw;
  text-align: center;
  font-size: 0.9em;
}

.menos,
.mais {
  background-color: transparent;
  border: none;
  padding: 0 5px;
  cursor: pointer;
  font-size: 1.3rem;
  border-radius: 4px;
}

.mais {
  padding: 3px 4.5px;
  font-size: 1rem;
}

.info-total div,
.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-weight: 500;
}

.total {
  border-top: 1px solid #ccc;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  font-size: 1.1rem;
}

.btn {
  margin: 0.6rem;
  background-color: #479b37;
  border: none;
  color: white;
  width: 95%;
  padding: 0.65rem;
  font-weight: bold;
  font-size: 1.3rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn:hover {
  background-color: #168100;
}

.remover {
  width: 1vw;
}

/*------------------------------------- responsivo --------------------------------*/
@media (max-width: 950px) {
  .prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 19999;
  }

  .prompt-box {
    width: 90%;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .prompt-box h3 {
    font-size: 1rem;
  }

  .prompt-box input {
    font-size: 0.9rem;
  }

  .botoes button {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  .slide-carrinho {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    position: fixed;
    top: 5.7rem;
    right: 0;
    z-index: 1000;
  }

  .slide-carrinho.aberto {
    transform: translateX(0);
  }

  main {
    margin-top: 10vw;
  }

  .header-loja {
    flex-direction: column;
  }

  .subtitulo {
    font-size: 3.3vw;
    font-weight: 700;
    padding: 0.5rem;
    margin: 0 5vw;
    text-align: center;
    background-color: #ffe969b9;
    border-radius: 50px;
  }

  .titulo {
    margin-top: 15vw;
    font-size: 7vw;
    padding: 0.5rem;
  }

  .content {
    gap: 0rem;
    padding: 1rem;
  }

  /*---------------------- Cards de cerveja --------------------------*/
  .cervejas-container {
    gap: 1.5rem; /* espaço entre os cards */
  }

  /* O card em si */
  .card-cerveja {
    width: 42vw;
  }
  .card-cerveja:hover {
    background-color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  }

  /* Imagem da cerveja */
  .card-cerveja img {
    height: 9rem;
    padding-top: 0.5rem;
  }
  /* Parágrafos */
  .abv-ibu {
    width: 7rem;
    padding: 0.1rem;
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }
  .tamanho {
    font-weight: 600;
    font-size: 0.8rem;
  }
  .valor {
    margin-top: 0.3rem;
    font-size: 1rem; /* aumenta o tamanho do texto */
  }
  /* Botão */
  .card-cerveja .botao-add-carrinho {
    margin: 0.3rem;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .slide-carrinho {
    z-index: 1000;
  }

  aside {
    position: absolute;
    right: 0;
    top: 23vw;
    height: fit-content;
    padding: 0.5rem;
    width: 75vw;
    margin-left: 0;
  }

  .box {
    padding: 2vw;
    width: 73vw;
    margin: -1.2vw;
  }

  .resumo {
    font-size: 1.2rem;
  }

  .quantidade {
    width: 5.8vw;
    text-align: center;
    font-size: 0.9em;
  }

  .preco {
    font-size: 0.9em;
    margin-right: -3.3vw;
  }

  .item-carrinho {
    gap: 4vw;
    padding-bottom: 8px;
  }

  .remover {
    width: 20px;
  }
}
