@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  box-sizing: border-box;
  font-family: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;

  @media (max-width: 768px) {
    flex-direction: column !important;
  }
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  width: 100%;

  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #383838;
    background: linear-gradient(310deg,
        rgba(56, 56, 56, 1) 0%,
        rgba(39, 43, 41, 1) 30%,
        rgba(0, 0, 0, 1) 100%);
    color: white;

    #container-header {
      height: 9.5vh;
      width: 100%;
      max-width: 1200px;
      display: flex;
      align-items: center;
      justify-content: space-between;

      @media (max-width: 768px) {
        padding: 0 20px;
        height: 20vh;
        justify-content: space-evenly;
      }

      #logo {
        display: flex;
        align-items: center;
        height: 80%;
        gap: 15px;
        flex-direction: row !important;
        padding: 0 0 0 20px;

        @media (max-width: 768px) {
          height: 50%;
          padding: 0;
        }

        img {
          height: 70%;
          cursor: pointer;
        }

        h1 {
          font-size: xx-large;
          margin: 0;

          a {
            text-decoration: none;
            color: white;
          }
        }
      }
    }

    #search {
      display: flex;
      align-items: center;
      height: 80%;
      min-width: 320px;
      flex-direction: row !important;
      padding: 0 20px 0 0;

      @media (max-width: 768px) {
        height: 35%;
        width: 100%;
        padding: 0;
      }

      form {
        display: flex;
        align-items: center;
        height: 100%;
        width: 100%;
        flex-direction: row !important;

        input {
          height: 60%;
          padding: 0 10px 0;
          border-radius: 10px 0 0 10px;
          border: none;
          width: 85%;
          font-size: 16px;

          &:focus {
            outline: none;
          }
        }

        #search-bar {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 1px;
          background-color: white;
          height: 60%;

          #bar-line {
            display: block;
            width: 1px;
            background-color: #a7a7a7;
            height: 70%;
          }
        }

        button {
          background-color: white;
          border: none;
          border-radius: 0 10px 10px 0;
          height: 60%;
          width: 15%;
          cursor: pointer;
          display: flex;
          justify-content: center;
          align-items: center;

          img {
            height: 60%;
            width: 60%;
          }
        }
      }
    }
  }

  main {
    min-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    flex: 1;

    /* LANDING PAGE */

    #intro {
      display: flex;
      flex-direction: row;
      padding: 0 20px;
      width: 100%;

      div {
        min-width: 50%;

        p {
          text-align: justify;
        }
      }

      span {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 50%;

        p {
          font-size: smaller;
          color: #686868;
        }

        img {
          width: 100%;
        }
      }
    }

    .marcas {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;

      ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        flex-direction: row !important;
        list-style: none;
        gap: 15px;
        padding: 0;

        li {
          display: flex;

          height: 125px;
          width: 200px;
          box-shadow: 0px 1px 3px rgb(0 0 0 / 55%);
          padding: 1% 2%;
          cursor: pointer;
          border-radius: 8px;

          &:hover {
            box-shadow: 0px 1px 12px rgb(0 0 0 / 55%);
            transition: 0.5s;
          }

          @media (max-width: 768px) {
            width: 45vw;
          }

          a {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-evenly;
            height: 100%;
            width: 100%;
            text-decoration: none;

            img {
              width: 75px;
              height: 75px;
              object-fit: contain;
            }

            p {
              margin: 0;
              color: black;
              font-size: smaller;
            }
          }
        }
      }
    }

    #carros {
      #marca {
        display: flex;
        align-items: center;
        flex-direction: row !important;
        height: 50px;
        gap: 5px; 

        img {
          height: 30px;
        }
      }

      img {
        width: auto;
      }
    }

    #info {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 0 0 50px 0;

      div {
        display: flex;
        flex-direction: row;
        width: 80vw;

        @media (max-width: 768px) {
          width: 93vw;
        }

        ul {
          display: block;
        }

        div {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: center;
          width: 50%;
          padding: 0 30px;

          @media (max-width: 768px) {
            width: 100%;
            padding: 0;
          }

          hr {
            margin: 5px 0;
            width: 10%;
          }

          div {
            width: 100%;

            h2 {
              margin: 20px 0;
            }

            h3 {
              margin: 5px 0;

              a {
                color: #757575;
              }
            }

            p {
              margin: 10px 0;
              text-align: justify;
            }
          }
        }
      }
    }

    /* CARROS/ */

    #modelo {
      display: flex;
      flex-direction: row;
      align-items: center;
      flex-direction: column;
      width: 100%;
      margin: 20px 0;

      div {
        display: flex;
        align-items: center;

        div {
          display: flex;
          flex-direction: column;
          align-items: center;
          width: 50%;

          @media (max-width: 768px) {
            width: 100%;
          }

          img {
            width: 95%;
          }

          #img-carro {
            width: 70%;
          }

          h1 {
            margin: 0;
          }

          ul {
            column-count: 2;
          }

          #marca {
            display: flex;
            align-items: center;
            flex-direction: row !important;
            height: 50px;

            img {
              height: 30px;
            }

            h1 {
              margin: 0 0 0 10px;
            }
          }
        }
      }

      #compra {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0 5%;
        margin: 20px 0;

        tbody {
          width: 100%;
        }

        a {
          text-decoration: none;
          color: black;
          border: 1px solid black;
          padding: 20px 20px;
          border-radius: 20px;

          h2 {
            margin: 0;
          }
        }
      }
    }
  }

  footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 15vh;
    background: #383838;
    background: linear-gradient(310deg,
        rgba(56, 56, 56, 1) 0%,
        rgba(39, 43, 41, 1) 30%,
        rgba(0, 0, 0, 1) 100%);
    color: white;

    h4 {
      margin: 0;
      text-align: center;
    }

    p {
      margin: 0;
    }
  }
}