/* ------------------------------------------Shopping Cart------------------------------------------------------- */
.shopping-cart {
  display: flex;
  flex-direction: column;
  /* justify-content: start; */
  align-items: center;
  margin: 50px 0;
  & h1 {
    text-align: center;
  }
}

.progress-bar {
  display: flex;
  flex-direction: row;
  padding-bottom: 20px;
}
.progress-bar .icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
}
.progress-bar .icon i {
  color: white;
  background-color: #279e9b;
  border-radius: 50%;
  font-size: 16px;
  padding: 12px 15px;
}
.progress-bar .icon .cart-link {
  font-size: 16px;
  padding: 10px;
}
.progress-bar .icon.grey i {
  background-color: #e0eff6;
  color: white;
}

.progress-bar .line {
  /* width: 200px; */
  width: 70px;
  padding: 10px 0;
}
.progress-bar .line hr {
  border: 2px solid #279e9b;
  border-radius: 5px;
}
.progress-bar .line.grey hr {
  border: 2px solid #e0eff6;
  border-radius: 5px;
}

.cart-table {
  /* width: min(90vw, 1000px); */
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  width: 100%;
  grid-gap: 2rem;
}
.shipping-table {
  /* width: min(90vw, 1000px); */
  display: grid;
  grid-template-columns: 1fr;
  width: 90vw;
}
.cart-table .cart-empty {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  &>h2 {
    text-align: center;
    width: min(90%, 600px);
  }
  & .submit-button {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: white;
    text-transform: uppercase;
    background-color: #407D96;
    border-radius: 50px;
    cursor: pointer;
    padding: 0.8rem 1.1rem;
    max-width: 200px;;
  }
  & .submit-button:hover {
    background-color: #9cbeba;
  }
}

.cart-table #summary,
.shipping-table #summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 20px;
  margin: 20px auto;
  width: min(80vw, 400px);
  max-width: 100%;
  & h2 {
    text-align: center;
  }
}
.cart-table #summary>h2 {
  font-size: 2rem;
  margin-top: 0;
}
.cart-table #summary>.customer-info>.form-input {
  margin-bottom: 1rem;
}
.cart-table #summary>.customer-info>.form-input>input {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #999;
  border-radius: 5px;
  padding: 0.5rem;

  &:focus {
      outline: none;
  }
  &:read-only {
    cursor: default;
    background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3));
    color: light-dark(rgb(84, 84, 84), rgb(170, 170, 170));
  }
}
.cart-table .cart-items {
  width: 90vw;
  margin: auto;
}
.cart-table .cart-items .cart-product {
  outline: 5px dotted #FFC13E;
  border-radius: 20px;
  border-left: none;
  border-right: none;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: start;
  /* align-items: center; */
  /* gap: 0; */
  /* width: calc(100% - 40px); */
  /* padding: 10px; */
  margin: 20px 5px;
}

.shipping-table .cart-items .cart-product {
  border: 1px solid var(--colour-6);
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: start;
  margin: 20px 0;
}
.cart-table .cart-items .cart-product .image.desktop,
.shipping-table .cart-items .cart-product .image.desktop {
  display: none;
}
.cart-table .cart-items .cart-product .image.mobile,
.shipping-table .cart-items .cart-product .image.mobile {
  display: flex;
  width: 100%;
  align-self: center;
  /* margin: 1rem 0; */
  /* height: 40vw; */
  & img {
    /* max-width: 100%; */
    aspect-ratio: 1000/562;
    border-radius: 20px 20px 0 0;
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}
.cart-table .cart-items .cart-product .cart-description {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  padding: 1rem;
  width: 100%;
  & h3 {
    font-size: 1.5rem;
  }
}

.shipping-table .cart-items .cart-product .cart-description {
  display: flex;
  flex-direction: column;
  margin: 1rem;
  width: 100%;
  justify-content: center;
}

.cart-table .cart-items .cart-product .cart-description .item-total,
.shipping-table .cart-items .cart-product .cart-description .item-total {
  /* position: absolute; */
  text-wrap: nowrap;
  bottom: 10px;
  right: 1rem;
  & h3 {
    font-size: 1.2rem;
    margin: 0;
  }
}
.cart-table .cart-discount,
.shipping-table .cart-discount {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: start;
  gap: 5px;
}

.cart-table .cart-discount .apply-button,
.shipping-table .cart-discount .apply-button {
  font-size: 1rem;
  /* margin-top: 0.5rem; */
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #407D96;
  color: white;
  &:hover {
    background-color: #7FA6A1;
  }
}

/* .cart-table .cart-discount .apply-button:hover,
.shipping-table .cart-discount .apply-button:hover {
  background-color: #279e9b;
  color: white;
} */
.cart-table #summary .checkout-button {
  /* font-size: 1rem;
  margin-top: 0.5rem 2rem;
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: var(--colour-1);
  color: black;
  width: auto; */
  font-size: 1rem;
  margin: 0.5rem 0;
  padding: 0.8rem 0;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background-color: #407D96;
  color: white;
  width: 100%;
  &:hover {
    background-color: #7FA6A1;
  }
  &:disabled {
    background-color: #eeeeee;
    color: #dddd;
  }

}
.shipping-table .payment .checkout-button {
  font-size: 1rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background-color: #407D96;
  color: white;
  width: 200px;
  &:hover {
    background-color: #7FA6A1;
  }
}
#payment-form {
  width: 100%;
}
#fees-breakdown {
  position: relative;
  text-align: center;
  & h3 {
    font-size: 1.5rem;
  }
  & span {
    white-space: nowrap;
  }
}
#submit-button {
  display: flex;
  justify-items:  center;
  align-items: center;
  margin: auto;
  width: 100%;
}
#discount-code {
  border: 1px solid var(--colour-5);
  border-radius: 5px;
  font-size: 1rem;
  padding: 0.5rem;
  width: min(70%, 200px);
}
.qty-button {
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  margin: 4px;
  padding: 0;
  background-color: #F8F8F8;
  color: black;
  &:hover {
    background-color: #9cbeba;
  }
}


.remove-button {
  position: absolute;
  right: 0;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  margin: 4px;
  padding: 0;
  background-color: white;
  color: black;
  &:hover {
    color: #407D96;
  }
}


.shipping-table .payment .checkout-button:disabled {
  background-color: var(--colour-6);
  color: var(--colour-5);
}
.form-input input.error {
  border: none;
  outline: 2px solid red;
}

@media screen and (min-width: 425px) {
  .progress-bar .line {
    width: 100px;
  }
  .progress-bar .icon p {
    font-weight: 700;
  }
  .shipping-table {
    width: 80vw;
  }
  .cart-table .cart-items .cart-product .cart-description .item-total,
  .shipping-table .cart-items .cart-product .cart-description .item-total {
    position: absolute;
  }
  .cart-table .cart-items .cart-product .cart-description .item-total h3,
  .shipping-table .cart-items .cart-product .cart-description .item-total h3 {
    /* margin: 1em 0; */
  }
  .cart-table .cart-items .cart-product .cart-description h3,
  .shipping-table .cart-items .cart-product .cart-description h3 {
    margin-bottom: 1em;
  }
  .cart-table .cart-items .cart-product .image,
  .shipping-table .cart-items .cart-product .image {
    margin: 0;
  }

}
@media screen and (min-width: 769px) {
  .progress-bar .line {
    width: 200px;
  }
  .progress-bar .icon i {
    font-size: 20px;
  }
  .cart-table {
    /* grid-template-columns: 70% 1fr;
    grid-gap: 20px; */
    grid-template-columns: 60% 1fr;
    grid-gap: 20px;
    width: min(90vw, 1000px);
  }

  .shipping-table {
    grid-template-columns: 60% 1fr;
    grid-gap: 20px;
    width: min(90vw, 1000px);
  }
  .cart-table .cart-items {
    width: 100%;
    margin: auto;
    margin-top: 10px;
  }

  .cart-table .cart-items .cart-product,
  .shipping-table .cart-items .cart-product {
    border-radius: 20px;
    border-left: none;
    border-right: none;
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: start;
    /* align-items: center; */
    /* gap: 0; */
    /* width: calc(100% - 40px); */
    margin: 20px 0;
    gap: 10px;
  }
  .cart-table .cart-items .cart-product .cart-description h3,
  .shipping-table .cart-items .cart-product .cart-description h3 {
    margin: 1rem 0;
  }

  .cart-table .cart-items .cart-product .image.desktop,
  .shipping-table .cart-items .cart-product .image.desktop {
    display: flex;
    width: 100%;
    align-self: center;
    /* margin: 1rem 0; */
    /* height: 40vw; */
    & img {
      /* max-width: 100%; */
      aspect-ratio: 4/5;
      border-radius: 20px 0 0 20px;
      width: 100%;
      height: auto;
      object-fit: cover;
    }
  }

  .cart-table .cart-items .cart-product .image.mobile,
  .shipping-table .cart-items .cart-product .image.mobile {
    display: none;
    & img {
      /* max-width: 100%; */
      aspect-ratio: 1000/562;
      width: 40%;
      height: auto;
      object-fit: cover;
    }
  }
  .cart-table #summary,
  .shipping-table #summary {
    width: fit-content;
    max-width: 100%;
  }
  #submit-button {
    margin: auto;
    margin-left: 0;
  }
}
