@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
}

body::-webkit-scrollbar {
  width: 5px;
  background-color: #fff;
}

body::-webkit-scrollbar-thumb {
  background: gray;
  border-radius: 5px;
}

#container {
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-columns: 55% 45%;
}

#container h3 {
  font-weight: 500;
  text-align: justify;
}

#container h5 {
  opacity: 0.7;
  margin: 10px 0 20px 0;
}

#container h4 a {
  font-size: 13px;
}

.main-left {
  width: 50%;
  margin: 0 auto;
}

.logo {
  display: block;
  margin: 20px auto;
  width: 200px;
}

form {
  display: grid;
  grid-template-columns: 30% 30% 30%;
  gap: 20px;
  margin: 0 auto;
  margin-bottom: 50px;
}

form input {
  height: 40px;
  border: 1px solid gray;
  border-radius: 7px;
  padding: 0 15px;
  outline-color: #6c5ce7;
  font-size: 16px;
}

form input::placeholder {
  letter-spacing: 1px;
  font-size: 14px;
}

.name {
  grid-column: 1/ 4;
}

.email {
  grid-column: 1/ 3;
}

.address {
  grid-column: 1/4;
}

.control {
  display: grid;
  grid-template-columns: 60% 40%;
}

.back-cart {
  height: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
}

.back-cart i {
  font-size: 10px;
}

.back-cart:hover {
  color: #6c5ce7;
}

.method-payment {
  display: flex;
  flex-direction: column;
  row-gap: 40px;
}

.method-payment .btn-pay {
  position: relative;
  height: 60px;
  background: #fff;
  border: 1px solid #000;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 1;
  cursor: pointer;
}

.method-payment .btn-pay::after {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: #000;
  transition: 0.5s;
  z-index: -1;
}

.method-payment .btn-pay:hover {
  color: #fff;
}

.method-payment .btn-pay:hover::after {
  width: 100%;
}

.method-payment select {
  padding: 5px;
  outline-color: #6c5ce7;
}

.card-right {
  background: #fafafa;
  border-left: 1px solid #d8d6d6;
  padding: 30px 0;
}

.show-product {
  display: none;
}

.card-right h2 {
  text-align: center;
  margin-bottom: 50px;
}

.card-right h2 span {
  font-size: 14px;
  opacity: .7;
}

.main-right {
  width: 70%;
  margin: 0 auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 30px;
  margin-bottom: 50px;
}

.item-products {
  display: flex;
  align-items: center;
  column-gap: 15px;
  color: #333333;
}

.item-img {
  position: relative;
  width: 100px;
  height: 100px;
}

.item-img::after {
  position: absolute;
  content: attr(data-quantity);
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  color: #000;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  background: #dfe6e9;
  border-radius: 50%;
}

.title-products {
  flex-grow: 3;
  line-height: 1.8;
}

.title-products .color-size {
  font-size: 10px;
  font-weight: 600;
}

.price {
  font-weight: 500;
}

.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.total {
  width: 70%;
  margin: 0 auto;
  font-size: 20px;
  font-weight: 600;
  border-top: 1px solid #d8d6d6;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.total p:nth-child(1) {
  font-size: 25px;
}

.total p:nth-child(1) span {
  font-size: 10px;
  color: red;
}

.notice-success {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.5s;
  z-index: 999999;
}

.notice-success .notice {
  position: relative;
  width: 500px;
  height: 100px;
  border: 1px solid #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.5;

}

.notice-success .notice .close {
  position: absolute;
  width: 25px;
  height: 25px;
  background: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 25px;
  top: -10px;
  right: -10px;
  font-size: 20px;
  cursor: pointer;
}

.address-available {
  width: 100%;
  border: 2px solid #dfe6e9;
  margin: 30px 0;
  padding: 20px;
  border-radius: 20px;
  user-select: none;
  cursor: pointer;
  display: none;
}

.address-available h3 {
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.address-available p span {
  font-weight: 600;
  opacity: .7;
}

@media screen and (min-width:768px) and (max-width:1024px) {
  * {
    cursor: auto !important;
  }

  .main-left {
    width: 90%;
  }

  form input {
    height: 35px;
    padding-left: 10px;
    font-size: 14px;
  }

  form input::placeholder {
    font-size: 10px;
  }

  .control {
    grid-template-columns: 50% 50%;
  }

  .method-payment {
    row-gap: 30px;
  }

  .method-payment .btn-pay {
    height: 50px;
  }

  .main-right {
    width: 90%;
    row-gap: 30px;
    margin-bottom: 50px;
  }

  .item-products {
    display: grid;
    grid-template-columns: 20% 60% 10%;
  }

  .item-img {
    width: 70px;
    height: 70px;
  }

  .item-img::after {
    width: 15px;
    height: 15px;
    line-height: 15px;
    font-size: 10px;
  }

  .title-products {
    font-size: 12px;
    line-height: 1.5;
    margin-left: 5px;
  }

  .title-products .color-size {
    font-size: 8px;
  }

  .price {
    font-size: 13px;
  }

  .total {
    width: 90%;
    margin: 0 auto;
    font-size: 20px;
    font-weight: 600;
    border-top: 1px solid #d8d6d6;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .total p:nth-child(1) {
    font-size: 20px;
  }

  .total p:nth-child(1) span {
    display: none;
  }
}

.add-address {
  color: #000;
  text-decoration: none;
  margin-top: 10px;
  display: none;
}

.add-address i {
  font-size: 20px;
  margin-right: 5px;
}

.add-address:hover {
  color: #6c5ce7;
}

@media screen and (min-width:320px) and (max-width:430px) {
  * {
    cursor: auto !important;
  }

  #container {
    display: flex;
    flex-direction: column;
  }

  .card-left {
    order: 2;
    padding-bottom: 50px;
  }

  .main-left {
    width: 90%;
  }

  .main-right {
    width: 90%;
    padding: 0;
  }

  .card-right {
    position: relative;
    order: 1;
    box-shadow: 0 0 2px 0 #dfe6e9;
    transition: 1s;
  }

  .wrapper-right {
    height: 50px;
    overflow: hidden;
    transition: 1s ease-out;
  }

  .logo {
    margin-top: 50px;
  }

  form {
    grid-template-columns: auto auto auto;
    gap: 10px;
  }

  form input {
    width: 100%;
    height: 35px;
    padding-left: 10px;
    font-size: 12px;
  }

  form input::placeholder {
    font-size: 10px;
  }

  .control {
    grid-template-columns: 40% 60%;
  }

  .item-products {
    width: 100%;
    display: grid;
    grid-template-columns: 20% 50% 20%;
  }

  .item-img {
    width: 70px;
    height: 70px;
  }

  .item-img::after {
    width: 15px;
    height: 15px;
    line-height: 15px;
    font-size: 10px;
  }

  .title-products {
    font-size: 12px;
    line-height: 1.5;
    margin-left: 5px;
  }

  .title-products .color-size {
    font-size: 8px;
  }

  .price {
    font-size: 13px;
  }

  .total {
    width: 90%;
    margin: 0 auto;
    font-size: 20px;
    font-weight: 600;
    border-top: 1px solid #d8d6d6;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .total p:nth-child(1) {
    font-size: 20px;
  }

  .total p:nth-child(1) span {
    display: none;
  }

  .show-product {
    position: absolute;
    display: block;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    background-color: #fff;
    box-shadow: 0 0 2px 0 #333333;
    z-index: 99;
  }

  .show-product i {
    transition: .5s ease-in-out;
  }

  .notice-success .notice {
    width: 300px;
    height: 100px;
  }

  .notice-success .notice p {
    font-size: 12px;
  }

  .notice-success .notice .close {
    cursor: none;
  }

  .method-payment .btn-pay {
    background-color: #000;
    color: #fff;
  }

  .method-payment .btn-pay:hover::after {
    width: 0;
  }

  .address-available h3 {
    letter-spacing: 1px;
    font-size: 16px;
  }

}