* {
    margin: 0;
    padding: 0;
  }
  body {
    display: flex;
    padding: 20px;
    font-family: sans-serif;
    background-color: #f8f8f8;
  }
  .left {
    width: 60%;
  }
  .s1 {
    font-size: 22px;
    font-weight: 600;
  }
  .products {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 15px;
  }
  .product {
    width: 270px;
  
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  .product:hover {
    background-color: #9ee493;
  }
  .img1 {
    width: 200px;
  }
  .p1 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
  }
  .p2 {
    font-size: 17px;
    font-weight: 600;
  }
  .add {
    background-color: #218838;
    border: 0;
    color: white;
    padding: 8px 15px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
  }
  .add:hover {
    background-color: #28a745;
  }
  .cart {
    width: 34%;
    text-align: center;
    background-color: #9ee493;
    position: fixed;
    right: 20px;
    top: 20px;
    bottom: 20px;
    border-radius: 10px;
    padding: 20px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  }
  .s2 {
    font-size: 20px;
    font-weight: 600;
  }
  .total {
    background-color: black;
    color: white;
    text-align: end;
    padding: 10px;
    margin: 0px 10px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    margin-top: 10px;
  }
  .cart-p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: 0px 10px;
    border-radius: 5px;
    margin-top: 15px;
  }
  .cart-p > :nth-child(1) {
    width: 50px;
  }
  .cart-p > :nth-child(2) {
    font-weight: 600;
    font-size: 14px;
  }
  .cart-p > :nth-child(3) {
    width: 30px;
    font-weight: 600;
  }
  .cart-p > :nth-child(4) {
    padding: 5px 15px;
    background-color: red;
    border: 0;
    border-radius: 5px;
    font-weight: 600;
    color: white;
  }
  #search {
    width: 95%;
    padding: 10px;
    margin: 20px;
    border: 2px solid black;
    border-radius: 5px;
    font-size: 17px;
    font-weight: 600;
    color: #218838;
  }
  #cart-toggle-btn {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1001;
    font-size: 26px;
    background-color: #218838;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
  }
  .toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #218838;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    border: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5 ease;
    z-index: 1002;
  }
  .toast.show {
    opacity: 1;
    visibility: visible;
  }
  #cart-toggle-btn {
    visibility: hidden;
  }
  @media (max-width: 1024px) {
    body {
      flex-direction: column;
    }
    .left {
      width: 100%;
    }
    .products {
      grid-template-columns: auto auto auto auto;
      justify-content: center;
      margin-left: 25px;
    }
  
    .product {
      width: 160px;
    }
  
    .img1 {
      width: 100px;
    }
    .p1 {
      font-size: 15px;
    }
    .cart {
      width: 100%;
      padding: 0px;
      position: fixed;
      right: 0;
      left: 0;
      top: 70px;
      bottom: 0;
      padding-top: 20px;
      border-radius: 15px 15px 0px 0px;
      transform: translateY(100%);
      transition: transform 0.3s ease;
    }
    .cart.open {
      transform: translateY(0);
    }
    .cart-p > :nth-child(1) {
      width: 70px;
    }
    .cart-p > :nth-child(2) {
      font-size: 17px;
    }
    .cart-p > :nth-child(4) {
      margin-right: 20px;
    }
    #cart-toggle-btn {
      visibility: visible;
    }
  }
  
  @media (max-width: 767px) {
    .products {
      grid-template-columns: auto auto;
    }
    .p1 {
      font-size: 13px;
    }
    .cart-p > :nth-child(1) {
      width: 40px;
    }
    .cart-p > :nth-child(2) {
      font-size: 11px;
    }
    .cart-p > :nth-child(4) {
      margin-right: 0px;
      padding: 5px 13px;
      font-size: 10px;
    }
  }