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

a {
  text-decoration: none;
  color: black;
}

/* webkit scrollbar style */
body {
  &::-webkit-scrollbar {
    width: 5px;
    height: 10px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #fd5c38;
  }

  &::-webkit-scrollbar-track {
    background-color: white;
  }
}

/* header style */
header {
  .header-info {
    display: flex;
    flex-direction: column;
    padding-block: 10px;
    padding-inline: 10px;
    gap: 12px;

    .header-logo {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;

      h1 {
        font-size: 23px;
        font-family: sans-serif;
        color: #fd5c38;
      }

      .cart-icon {
        display: flex;
        align-items: center;
        position: relative;
        gap: 10px;

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

        .total-cart {
          display: flex;
          flex-direction: column;
          gap: 2px;
          font-family: system-ui;
          font-size: 14px;
        }

        .count-cart {
          position: absolute;
          background: #fd5c38;
          width: 20px;
          height: 20px;
          display: flex;
          justify-content: center;
          align-items: center;
          border-radius: 10px;
          color: white;
          right: 51px;
          top: 0px;
        }
      }
    }

    .search-input {
      width: 100%;
      max-width: 344px;
      display: flex;
      margin: auto;

      input[type="text"] {
        width: 261px;
        padding-block: 10px;
        padding-inline: 10px;
        border-top-left-radius: 7px;
        border-bottom-left-radius: 7px;
        border: 2px solid #fd5c38;
      }

      & > button {
        background-color: #fd5c38;
        border: hidden;
        padding-block: 10px;
        padding-inline: 21px;
        border-top-right-radius: 7px;
        border-bottom-right-radius: 7px;
      }
    }
  }

  hr {
    border-color: #d3d3d321;
  }

  .header-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 10px;
    padding-inline: 10px;

    nav {
      position: fixed;
      top: 0;
      left: 0;
      background-color: white;
      width: 100%;
      padding-block: 7px;
      padding-inline: 7px;
      z-index: 1;
      transform: translateY(-100%);
      visibility: hidden;
      opacity: 0;
      transition-duration: 0.7s;

      &.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0%);
      }

      ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        align-items: baseline;
        gap: 12px;

        li {
          font-size: 14px;
          font-family: system-ui;
        }
      }

      .close-navbar {
        width: 17px;
        height: 17px;
        display: flex;
        margin-left: auto;
        background-color: transparent;
        border: hidden;
        color: #f44336;
        cursor: pointer;
      }
    }

    .login {
      button {
        background-color: #fd5c38;
        border: hidden;
        padding-block: 10px;
        padding-inline: 14px;
        border-radius: 7px;
      }
    }

    .open-navbar {
      background: transparent;
      border: hidden;
      cursor: pointer;

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

.section-navbar {
  background-color: #0000006e;
  width: 100%;
  height: 100vh;
  position: fixed;
  z-index: 1;
  visibility: hidden;
  opacity: 0;
  transition-duration: 0.4s;

  &.active {
    visibility: visible;
    opacity: 1;
  }
}

/* section dishes style */
#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;

      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;
            }
          }
        }
      }

      .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);
          }
        }
      }
    }
  }
}

/* media query */

@media (min-width: 640px) {
  header {
    .header-info {
      padding-inline: 20px;

      .header-logo {
        position: relative;
      }
      .search-input {
        max-width: 358px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);

        input[type="text"] {
          width: 274px;
        }
      }
    }

    .header-navbar {
      padding-inline: 20px;

      nav {
        transform: translateY(0%);
        visibility: visible;
        opacity: 1;
        background: transparent;
        display: flex;
        position: static;
        width: auto;

        ul {
          display: flex;
          flex-direction: row;
          gap: 12px;
        }

        .close-navbar {
          display: none;
        }
      }

      .open-navbar {
        display: none;
      }
    }
  }

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

@media (min-width: 768px) {
  header {
    .header-info {
      padding-inline: 30px;

      .search-input {
        max-width: 391px;

        input[type="text"] {
          width: 308px;
        }
      }
    }

    .header-navbar {
      padding-inline: 30px;
    }
  }

  #dishes {
    padding-inline: 30px;
  }
}

@media (min-width: 992px) {
  header {
    .header-info {
      padding-inline: 50px;
    }

    .header-navbar {
      padding-inline: 50px;
    }
  }

  #dishes {
    padding-inline: 50px;

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

@media (min-width: 1200px) {
  header {
    .header-info {
      padding-inline: 100px;
    }

    .header-navbar {
      padding-inline: 100px;
    }
  }

  #dishes {
    padding-inline: 100px;

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

@media (min-width: 1400px) {
  header {
    .header-info {
      padding-inline: 150px;
      max-width: 1400px;
      margin-inline: auto;
    }

    .header-navbar {
      padding-inline: 150px;
      max-width: 1400px;
      margin-inline: auto;
    }
  }

  #dishes {
    padding-inline: 150px;

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