@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');

/* Helper variables */
:root {
  --bg: #ffffff;
  --gray1: #333333;
  --gray2: #4f4f4f;
  --gray3: #828282;
  --gray4: #e0e0e0;
  --gray4: #f2f2f2;
  --orange: #f2994a;
}
/* REset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body style */
body {
  font-family: 'Montserrat', sans-serif;
  width: 100%;
  height: 100vh;
}
/* Container - entire page content */
.container {
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
}

/* HEADER */
.header {
  margin: 2rem 0 2rem 0;
}
.header h1 {
  font-weight: 600;
  font-size: 2.25rem;
}
/* MAIN */
.main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
/* form section */
.form-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.form-area {
  margin-bottom: 1rem;
}

.form-area h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.contact-info {
  margin-bottom: 2rem;
}

.label {
  font-size: 0.8rem;
  color: var(--gray2);
  margin-bottom: 1rem;
}

.input-area {
  height: 2.7rem;
  border: 1px solid var(--gray3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 450px;
  margin: 0.5rem 0 1rem 0;
}

.input-area .material-icons {
  padding: 0.5rem;
  color: var(--gray3);
}

.input-area input,
select {
  outline: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray3);
  background-color: white;
  height: 100%;
}
select {
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

.btn-area {
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
button {
  border: none;
  background-color: var(--orange);
  color: white;
  font-family: inherit;
  width: 6.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
}

/* cart section */
.cart-section {
  background-color: var(--gray4);
  padding: 1rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.item {
  margin: 0 2rem 1rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.item img {
  width: 130px;
  height: 130px;
  border-radius: 10px;
}

.item-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  margin-left: 1rem;
  width: 100%;
}
.item-name {
  font-size: 1rem;
  color: var(--gray3);
}
.price {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--orange);
}
.prev-price {
  display: inline;
  font-size: 0.7rem;
  color: var(--gray3);
  margin-left: 1rem;
  text-decoration: line-through;
}
.add-reduce-item {
  margin-top: 30%;
  width: 90%;
  height: 2.5rem;
  border: 1px solid var(--gray3);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
}

.num {
  color: #333333;
  font-weight: 700;
}

.reduce,
.add {
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 400;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #e0e0e0;
  text-align: center;
  border-radius: 5px;
}
.shipping-total {
  margin: 4rem 0 1rem 0;
}
.shipping-area,
.total-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray3);
  height: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
}
/* FOOTER */
footer {
  text-align: center;
  font-size: 0.875rem; /* 14px */
  padding: 1rem 0;
}
footer a {
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}
@media (max-width: 820px) {
  .input-area {
    max-width: 350px;
  }
  .cart-section {
    width: 350px;
  }
}
@media (max-width: 740px) {
  .header {
    margin: 1rem 0 1rem 0;
  }
  .header h1 {
    font-weight: 600;
    font-size: 1.5rem;
  }

  .main {
    align-items: center;
    flex-direction: column-reverse;
  }
  .input-area input,
  select {
    font-size: 0.8rem;
  }
  .item-name {
    font-size: 0.8rem;
  }
  .price {
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }
  .prev-price {
    font-size: 0.6rem;
    margin-left: 0.5rem;
  }
  .shipping-area,
  .total-area {
    font-size: 0.8rem;
    font-weight: 600;
  }
}
