@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1,
h2 {
  margin: 0;
  padding: 0;
}

body {
  background: #efefef;
  width: 100%;
}
header {
  width: 100%;
}
.section {
  text-align: center;
  width: 100%;
}
.webshop__header {
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 338px;
  height: 100px;
  padding: 0 35px;
}

.webshop__header_right {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.webshop__icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
}

.webshop__logo {
  width: 100px;
  height: 80px;
  object-fit: contain;
  cursor: pointer;
}

@media screen and (min-width: 834px) {
  .webshop__header {
    width: 702px;
  }
}

@media screen and (min-width: 1920px) {
  .webshop__header {
    width: 1231px;
  }
}

.products__grid {
  width: 338px;
  margin: 50px auto;
}

@media screen and (min-width: 834px) {
  .products__grid {
    display: grid;
    width: 702px;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 8px;
  }
}

@media screen and (min-width: 1920px) {
  .products__grid {
    display: grid;
    width: 1231px;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 8px;
  }
}

.products__container {
  position: relative;
  color: white;
  margin: 0 auto;
  width: 400px;
  height: 432px;
  margin-top: 20px;
}

@media screen and (min-width: 834px) {
  .products__container {
    width: 338px;
  }
}

.products__container_small {
  position: relative;
  color: white;
  margin: 0 auto;
  width: 338px;
  height: 210px;
}

.products__container_small:nth-child(2) {
  margin-top: 8px;
}

.products__container_img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.products__container_img_second {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.products__container_text {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-weight: 500;
  font-size: 40px;
}

.sale {
  padding-top: 40px;
  margin: 0 auto;
  width: 338px;
}

@media screen and (min-width: 834px) {
  .sale {
    width: 702px;
  }
}

@media screen and (min-width: 1920px) {
  .sale {
    width: 1231px;
  }
}

.sale__title {
  font-size: 56px;
  margin-bottom: 20px;
  text-align: left;
  text-indent: 25px;
}

.grid__container {
  width: 338px;
  margin: 0 auto;
}

/* Cart */

.cart {
  position: fixed;
  top: 0;
  right: -100%;
  width: 340px;
  min-height: 100vh;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0px 10px 20px rgba(18, 38, 63, 0.0313726);
  transition: 0.3s;
}

.cart.active {
  right: 0;
}

.cart__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
}

.cart__box {
  display: grid;
  grid-template-columns: 32% 50% 18%;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.cart__img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  padding: 10px;
}

.cart__detail_box {
  display: grid;
  row-gap: 0.5rem;
}

.cart__product_title {
  font-size: 1rem;
  text-transform: uppercase;
  text-align: left;
}
.cart__price {
  font-weight: 500;
  text-align: left;
}
.cart__quantity {
  border: 1px solid;
  width: 2.4rem;
  text-align: center;
  font-size: 1rem;
}
.cart__trash {
  cursor: pointer;
  font-size: 24px;
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.total {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #343a40;
  margin-top: 1.5rem;
}
.total__title {
  font-size: 1rem;
  font-weight: 600;
}

.total__price {
  margin-left: 0.5rem;
}

.cart__close {
  position: absolute;
  top: 1rem;
  right: 0.8rem;
  cursor: pointer;
}

@media screen and (min-width: 834px) {
  .grid__container {
    display: grid;
    width: 702px;

    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 24px;
  }
}

@media screen and (min-width: 1920px) {
  .grid__container {
    display: grid;
    width: 1231px;
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 35px;
  }
}

.product {
  background: #ffffff;
  box-shadow: 0px 10px 20px rgba(18, 38, 63, 0.0313726);
  border-radius: 4px;
  margin: 0 auto;
  width: 338px;
  height: 432px;
  margin-top: 20px;
}

.product__figure {
  margin: 22px 23px 147px 21px;
  position: absolute;
  width: 294px;
  height: 263px;
}

.product__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product__discount {
  background-color: #556ee6;
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product__discount p {
  color: #ffffff;
}

.product__title {
  height: 24px;
  padding: 317.4px 95px 90.6px 95px;
  position: absolute;
}

h2 {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-size: 16.25px;
  line-height: 24px;
  color: #343a40;
}

.product__prices {
  width: 42px;
  height: 24px;
  display: flex;
  padding: 377.4px 173px 30.6px 123px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.product__prices_newOnly {
  width: 42px;
  height: 24px;
  display: flex;
  padding: 377.4px 133px 30.6px 173px;
  align-items: center;
  justify-content: center;
}

.product__prices-old {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-size: 16.25px;
  line-height: 24px;
  text-decoration-line: line-through;
  color: #74788d;
}

.product__prices-new {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-size: 16.25px;
  line-height: 24px;
  color: #495057;
}

/* Button   */

.button {
  width: 100px;
  height: 36px;
  border-radius: 30px;
  font-weight: 500;
  text-align: center;
  z-index: 100;
  cursor: pointer;
}

.button:hover {
  background: #556ee6;
}

.button_add-cart {
  position: absolute;
  top: 0;
  left: 0;
}

.button_buy {
  display: flex;
  margin: 1.5rem 0 auto 0;
  padding: 12px 20px;
  border: none;
}

/* Form */
.buy__form {
  position: fixed;
  left: -100%;
  margin: 48px auto;
  width: 300px;
  padding: 25px;
  text-align: left;
  font-size: 15px;
  color: #b9b9b9;
  background-color: #e3e3e3;
  border-radius: 4.2px;
  box-shadow: 0px 3px 10px -2px rgba(0, 0, 0, 0.2);
}

.buy__form.animate_content {
  position: initial;
  left: initial;
  animation-duration: 1s;
  animation-name: animate;
}

.form__row {
  margin-bottom: 20px;
  height: 80px;
  display: block;
}

.form__label {
  color: #556ee6;
}

.form__input {
  padding-top: 10px;
}

.buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.textarea {
  height: 100%;
}

.payment {
  height: 160px;
  display: block;
}

.payment_card_details {
  display: flex;
  height: 40px;
}

input,
input[type="radio"] + label,
input[type="checkbox"] + label:before,
select option,
select {
  line-height: 1.4;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  -webkit-transition: 0.35s ease-in-out;
  -moz-transition: 0.35s ease-in-out;
  -o-transition: 0.35s ease-in-out;
  transition: 0.35s ease-in-out;
  transition: all 0.35s ease-in-out;
}

input:focus {
  outline: 0;
  border-color: #556ee6;
}
select {
  /* display: inline-block; */
  width: 50%;
  text-align: center;
  float: left;
  border-radius: 0;
  cursor: pointer;
}

select option {
  background-color: #556ee6;
  color: #fff;
}

input:checked + label:before,
select:focus,
select:active {
  background-color: #556ee6;
  color: #fff;
  border-color: #fff;
}

.textarea:focus {
  outline: none;
  border-color: #556ee6;
  transition: all 0.35s ease-in-out;
}

h4 {
  color: #556ee6;
}

.form__row_terms-and-conditions {
  display: flex;
  flex-direction: row-reverse;
  gap: 10px;
}

select:first-of-type {
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}
select:last-of-type {
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* Animation */

@keyframes animate {
  0% {
    transform: scale(0);
  }
  25% {
    transform: scale(0.2, 0.002);
    opacity: 1;
  }
  50% {
    transform: scale(0.2, 0.002);
    opacity: 0;
  }
  75% {
    transform: scale(1, 0.002);
    opacity: 1;
  }
  100% {
    transform: scale(1, 1);
  }
}

.animate_content {
  animation-name: animate;
}

.hide_top {
  position: absolute;
  top: -100%;
}

.hide_left {
  position: absolute;
  left: -100%;
}

.trending__now {
  background-color: #efefef;
  margin: 50px auto;
  width: 338px;
}

@media screen and (min-width: 834px) {
  .trending__now {
    width: 702px;
  }
}

@media screen and (min-width: 1920px) {
  .trending__now {
    width: 1231px;
  }
}

.hide_bottom {
  position: absolute;
  bottom: 100%;
}

.trending__now_inner {
  overflow: auto;
  white-space: nowrap;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding: 0 25px;
}

.trending__now_product_figure {
  width: 250px;
  height: 200px;
}

.trending__now_product_img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.trending__now_product_title {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-size: 16.25px;
  line-height: 24px;
  color: #343a40;
  margin-top: 10px;
  white-space: break-spaces;
  height: 48px;
}
.trending__now_product_price {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-size: 16.25px;
  line-height: 24px;
  text-decoration-line: none;
  color: #74788d;
  margin-top: 10px;
}

a {
  text-decoration: none;
  border: 1px solid grey;
  padding: 5px;
  &:hover {
    border: 2px solid black;
  }
}

.trending__now_title {
  font-size: 32px;
  text-align: left;
  text-indent: 25px;
}
