/*------------ HEADER  ---------- */
header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  place-items: center;
}


.cart-link {
  place-self: start;
  align-self: center;
}


/*------------ TOTAL DO CARRINHO ---------- */
.totals,
form {
  border: solid 1px black;
  border-radius: var(--border-radius);
  box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.25);
}

.totals {
  height: 100px;
  width: 250px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;

  place-self: end;
  align-self: center;
}

.totals .title {
  font-weight: 500;
}

.totals .total-cart {
  font-weight: bold;
  color: var(--primary-color);
}


main {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/*------------ BOTOES E FORM DE OPCAO DE PAGAMENTO ---------- */
.buttons {
  display: flex;
  gap: 30px;

  margin-bottom: 30px;
}

.buttons button {
  width: 200px;
  aspect-ratio: 2/1;
  border: solid black 1px;
  border-radius: var(--border-radius);
  background-color: transparent;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;

  font-size: 24px;
  font-weight: bold;

  transition: all 0.2s ease-in-out;
}

.buttons button i {
  font-size: 30px;
  color: var(--primary-color);
}

.buttons button:hover {
  color: white;
  background-color: var(--primary-color);
}

.buttons button:hover i {
  color: white;
}

.active {
  box-shadow: 0px 0px 6px 3px var(--primary-color);
}

.qrcode-option {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.qrcode-option img {
  aspect-ratio: 1/1;
  width: 200px;
}

.qrcode-option input {
  background-color: transparent;
  border: 1px solid black;
  border-radius: var(--border-radius);

  color: black;

  padding: 5px;
  width: 75%;

  transition: all 0.2s ease-in-out;
}

.card-option {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.card-option form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 30px;

  padding: 30px;
}

.card-option form div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-option form div input {
  padding: 8px;
  border: solid black 1px;
  border-radius: var(--border-radius);
}

.card-option form div label {
  font-weight: 600;
}

.card-option form button,
.qrcode-option button {
  height: 34px;
  place-self: end;
  width: 100%;

  border-radius: var(--border-radius);
  border: solid 2px var(--hover-color);
  background-color: var(--primary-color);
  color: white;
  font-size: 18px;
  font-weight: 600;

  transition: all 0.2s ease-in-out;
}

.qrcode-option button {
  width: 40%;
  place-self: start;
}

.card-option form button:hover,
.qrcode-option button:hover {
  border-color: var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
}

.qrcode-option,
.card-option {
  display: none;
}

/*------------ CARDS DO CARRINHO ---------- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cards .card {
  border: solid 1px black;
  border-radius: var(--border-radius);

  padding: 10px;
  font-size: 18px;

  display: flex;
  justify-content: space-between;
}

.cards .card .price {
  font-weight: 600;
  color: var(--primary-color);
}

.cards .card i {
  font-size: 26px;
  color: var(--primary-color);
}

/*------------ RESPONSIVIDADE DO FINALIZAR COMPRA ---------- */
@media screen and (max-width: 780px) {
  .totals {
    width: 150px;
    font-size: 16px;
  }

  .card-option form {
    padding: 20px;
    gap: 20px;

    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 570px) {
  .card-option form {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 500px) {
  main {
    gap: 20px;
  }

  h1 {
    font-size: 20px;
  }

  .totals {
    width: 100px;
    height: 50px;
    gap: 5px;
    font-size: 12px;
  }

  .buttons button {
    width: 150px;
    font-size: 16px;
    gap: 10px;
  }

  .buttons button i {
    font-size: 22px;
  }

  .cards .card {
    font-size: 14px;
  }
}

@media screen and (max-width: 450px) {
  .cards .card {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .cards .card i {
    font-size: 16px;
  }
}
