#dishes {
  margin-block: 20px;
  padding-inline: 20px;
  display: grid;
  gap: 25px;

  h1 {
    font-size: 22px;
    font-family: system-ui;
    font-weight: 500;
    color: #fd5c38;
  }

  .dishes-list {
    list-style: none;
    display: grid;
    gap: 20px;
    margin-inline: auto;

    li {
      max-width: 300px;
      position: relative;
      overflow: hidden;

      figure {
        max-width: 300px;
        position: relative;

        img {
          border-top-right-radius: 15px;
          border-top-left-radius: 15px;
          width: 100%;
          height: 100%;
        }

        .increment-decrement {
          position: absolute;
          gap: 6px;
          bottom: 14px;
          right: 7px;
          background: white;
          height: 31px;
          border-radius: 30px;
          width: 80px;
          display: flex;
          align-items: center;
          justify-content: center;

          .btn-increment {
            border: hidden;
            width: 23px;
            height: 23px;
            display: flex;
            border-radius: 30px;
            justify-content: center;
            align-items: center;
            background-color: #8ff196;
            color: #07af0f;
            cursor: pointer;
            transition-duration: 0.6s;

            &:active {
              transform: scale(0.7);
            }

            svg {
              width: 16px;
            }
          }

          .btn-decrement {
            border: hidden;
            width: 23px;
            height: 23px;
            display: flex;
            border-radius: 30px;
            justify-content: center;
            align-items: center;
            background-color: #ffadad;
            color: #e41e1e;
            cursor: pointer;
            transition-duration: 0.6s;

            &:active {
              transform: scale(0.7);
            }

            svg {
              width: 16px;
            }
          }
        }
      }

      .favorite {
        position: absolute;
        top: 8px;
        right: 8px;
        transform: translateX(50px);
        transition-duration: 0.4s;
      }
      .favorite-icons {
        width: 35px;
        height: 35px;
        background-color: #f1f1f1bf;
        border-radius: 50px;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;

        .remove-favorite {
          position: absolute;
          visibility: visible;
          transform: scale(1);
          opacity: 1;
          color: #353535;
          transition-duration: 0.4s;
          &.remove {
            visibility: hidden;
            opacity: 0;
            transform: scale(0);
          }

          svg {
            width: 19px;
            height: 19px;
          }
        }

        .add-favorite {
          visibility: hidden;
          opacity: 0;
          transform: scale(0);
          transition-duration: 0.4s;
          &.add {
            visibility: visible;
            transform: scale(1);
            opacity: 1;
          }

          svg {
            width: 22px;
            fill: red;
            stroke: none;
          }
        }

        .remove-favorite,
        .add-favorite {
          border: hidden;
          background: transparent;
          display: flex;
          cursor: pointer;
        }
      }

      .dishes-info {
        display: grid;
        gap: 9px;
        border-bottom: 1px solid #e6e6e6;
        border-left: 1px solid #e6e6e6;
        border-right: 1px solid #e6e6e6;
        border-bottom-right-radius: 15px;
        border-bottom-left-radius: 15px;
        padding-inline: 15px;
        padding-block: 5px;

        .dishes-title {
          display: flex;
          justify-content: space-between;

          a {
            h3 {
              font-size: 17px;
              font-family: system-ui;
              font-weight: 600;
            }
          }

          img {
            width: 76px;
            height: 20px;
          }
        }

        p {
          font-size: 15px;
          font-family: system-ui;
          color: #434343;
        }

        .card {
          display: grid;
          grid-template-columns: 1fr 1fr;
          margin-top: 12px;
        }

        span {
          font-size: 20px;
          font-family: system-ui;
          font-weight: 600;
          color: #fd5c38;
          margin-left: auto;
        }

        .add-to-cart {
          background-color: #fd5c38;
          color: white;
          border: hidden;
          padding-block: 10px;
          padding-inline: 14px;
          border-radius: 7px;
          cursor: pointer;
          max-width: 146px;
          transition-duration: 0.6s;

          &:active {
            transform: scale(0.7);
          }
        }
      }

        &:hover {
          .favorite {
            transform: translateX(0px);
          }
        }
    }
  }
}

#menu {
    margin-block: 60px;
  padding-inline: 20px;
  display: grid;
  gap: 25px;

  .menu-content {
    h3 {
              font-size: 22px;
          font-family: system-ui;
          font-weight: 500;
          color: #fd5c38;
    }
  
    p {
          font-size: 17px;
      font-family: sans-serif;
      margin-top: 15px;
          line-height: 30px;
    }
  }

  .menu-list { 
        display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: center;
    list-style: none;
    overflow: auto;
        padding-bottom: 18px;


            &::-webkit-scrollbar {
          width: 8px;
          height: 8px;
        }
        &::-webkit-scrollbar-track {
          background-color: transparent;
        }
        &::-webkit-scrollbar-thumb {
          background-color: #fd5c38;
          border-radius: 5px;
        }

    li {
                display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    
      figure {
                        min-width: 100px;
        img {
          width: 100%;
          height: 100%;

          &.active {
                border: 3px solid #fd5c38;
    border-radius: 50%;
    padding: 4px;
          }
        }
      }

    span {
          font-size: 18px;
    font-family: sans-serif;
    margin-top: 9px;
    }
    }
  }
}

@media (min-width: 640px) {
  #dishes {
    .dishes-list {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

@media (min-width: 768px) {
  #dishes,
  #menu {
    padding-inline: 30px;
  }
}

@media (min-width: 992px) {
  #dishes,
  #menu {
    padding-inline: 50px;

    .dishes-list {
      grid-template-columns: repeat(3, 1fr);
    }
  }
}

@media (min-width: 1200px) {
  #dishes,
  #menu {
    padding-inline: 100px;

    .dishes-list {
      grid-template-columns: repeat(4, 1fr);
    }

    .menu-list {
      padding-bottom: 0;
    }
  }

}

@media (min-width: 1400px) {
  #dishes,
  #menu {
    padding-inline: 150px;

    max-width: 1400px;
    margin-inline: auto;
  }
}
