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

body {
  background-image: repeating-linear-gradient(
      135deg,
      hsla(35, 0%, 71%, 0.09) 0px,
      hsla(35, 0%, 71%, 0.09) 1px,
      transparent 1px,
      transparent 11px
    ),
    repeating-linear-gradient(
      45deg,
      hsla(35, 0%, 71%, 0.09) 0px,
      hsla(35, 0%, 71%, 0.09) 1px,
      transparent 1px,
      transparent 11px
    ),
    linear-gradient(90deg, hsl(183, 0%, 100%), hsl(183, 0%, 100%));
  overflow-x: hidden;
  font-family: "Montserrat", sans-serif;
}

header {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  background-color: #f8f7f5;
  padding: 10px;
  height: 70px;
}

header h1 {
  cursor: pointer;
  margin: 0;
  color: #2e86de;
  font-weight: 600;
  text-align: center;
}

/* search bar */

.products__search__container {
  margin-top: 70px;
  width: 100%;
  max-width: 570px;
  margin: 100px auto 50px auto;
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.products__search__container::before {
  content: "";
  position: absolute;
  top: calc(50% - 12px);
  left: 15px;
  width: 24px;
  height: 24px;
  background: url(../icon/search.svg) no-repeat center center / contain;
}

#input-field {
  border: 2px solid transparent;
  background-color: #f8f7f5;
  padding: 18px 18px 18px 50px;
  width: calc(100% - 100px);
  font-family: inherit;
  color: #222f3e;
}

#input-field::placeholder {
  color: #989898;
}

#input-field:focus {
  outline: 0;
  border: 2px solid #2e86de;
}

#search-btn {
  background-color: #2e86de;
  border: 0;
  color: #fff;
  padding: 15px 20px;
  width: 100px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}

/* products */

#all-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
  width: 100%;
  margin: auto;
  align-items: center;
  justify-content: center;
}

/* product card */

.card {
  border: 1px solid gray;
  min-height: 450px;
  padding: 20px;
  background-color: #f8f7f5;
  border-radius: 10px;
  box-shadow: 0 7px 10px rgb(0 0 0 / 10%);
  transition: 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}

.card h6 {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 15px;
}

#addToCart-btn {
  padding: 10px 15px;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  background-color: #007bff;
  transition: all 0.5s ease-in-out;
  border: 0;
  outline: 0;
  margin-right: 10px;
}

#details-btn {
  padding: 10px 15px;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  background-color: #343a40;
  border: 0;
  outline: 0;
}

.product-image {
  width: 150px;
  height: 150px;
}

/*  details */

#product-detail {
  width: 60%;
  margin: 0 auto;
  background-color: #f8f7f5;
  padding: 20px;
  margin-bottom: 50px;
}

#product-detail img {
  height: 250px;
  width: 250px;
  margin: 0 auto;
  display: block;
}

.cart {
  width: 350px;
  background-color: #f8f7f5;
  padding: 10px;
  box-shadow: 10px 10px 20px gray;
  border-radius: 5px;
  margin-right: 30px;
  position: fixed;
}

.cart h1 {
  text-align: center;
  color: #2e86de !important;
  font-weight: 700 !important;
}

.cart-main {
  padding-right: 30px;
}

.fill {
  color: #c0c00f;
}

.unFill {
  color: grey;
}

/* confirmation css */

#confirmation {
  height: calc(100vh - 70px);
}

#confirmation img {
  height: 500px;
  width: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

#confirmation h1 {
  color: #28a745;
  font-size: 50px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* media query */

@media only screen and (max-width: 768px) {
  #all-products {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
  .cart {
    width: 300px;
    padding: 10px;
    box-shadow: 10px 10px 20px gray;
    border-radius: 5px;
    margin-right: 30px;
    position: fixed;
  }
  .cart-main {
    padding-right: 10px;
  }
  #confirmation img {
    height: 400px;
    width: 400px;
  }
}

@media only screen and (max-width: 468px) {
  #all-products {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
  #confirmation img {
    height: 50vh;
    width: 90%;
  }
}
