:root {
    --dark: #0f0f0f;
    --light: #fdfdfd;
    --green: #7eb999;
    --yellow: #f6d636;
    --orange: #fbb54d;
    --violet: #e1b1ed;
    --blue: #b0bafb;
    --blue-search: #e1e4f9;
    --blue-highlight: #5170ff;
    --green-valid: #28a745;
    --red-invalid: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}

@font-face {
    font-family: "afacad";
    src: url('../assets/fonts/afacad.ttf');
}

body {
    font-family: 'afacad';
}

img, a, button {
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
}

/*    HEADER    */

header {
    background-color: var(--light);
    color: var(--dark);
    padding-right: 20px;
    padding-bottom: 10px;
    padding-left: 20px;
    border-bottom: 2px solid var(--dark);
}

.icon {
    width: 50px;
}

.logo {
    width: 200px;
    height: 150px;
}

.logo:hover {
    cursor: pointer;
}

.logo-header {
    display: flex;
    justify-content: space-between;
}

.header-icons {
    display: flex;
    align-items: center;

    img:hover {
        cursor: pointer;
    }
}

.search-bar {

    img {
        width: 40px;
    }
}

.header-menu ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 10px;

    li {
        text-align: center;
    }

    a {
        color: var(--dark);
        font-size: 18px;
    }

    .active {
        color: var(--green);
        text-decoration: underline;
    }

    li:hover {
        cursor: pointer;
        transform: scale(1.1);
    }

    li:active {
        transform: scale(1);
    }
}

/*    SCROLLBAR    */

.scroll-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--light);
    color: var(--dark);
}

.scrollbar {
    display: flex;
    justify-content: space-around;
    width: 100%;

    button {
        background: none;
        border: none;
    }

    .left, .right {
        width: 50px;
    }

    .left:hover, .right:hover {
        cursor: pointer;
    }

    div {
        width: 220px;
        overflow: scroll;
        scrollbar-width: none;
    }

    div::-webkit-scrollbar {
        display: none;
    }

    ul {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
}

.scrollbarItem {
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 3px solid var(--green);
    border-radius: 25px;
    
    img {
        width: 200px;
        border-radius: 25px;
    }

    p {
        text-align: center;
        padding: 10px;
        font-size: 20px;
    }

    &:hover {
        cursor: pointer;
        border-color: var(--dark);
    }

    &:active {
        transform: scale(0.95);
    }
}

/*    FOOTER    */

footer {
    background-color: var(--blue);
    padding: 20px;
}

.links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;

    div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;

        a {
            color: var(--dark);
        }
    }

    h3 {
        font-size: 18px;
    }

    p {
        font-size: 14px;
    }

    p:hover, img:hover {
        cursor: pointer;
    }
}

.legal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding-top: 20px;

    h3 {
        font-size: 18px;
    }
}

.legal ul {
    display: flex;
    justify-content: center;
    gap: 20px;

    li {
        text-align: center;

        p {
            font-size: 14px;
            
            a {
                color: var(--dark);
            }
        }
    }

    li:hover {
        cursor: pointer;
    }
}

.copyright {
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/*    BUY LABEL    */

.buy {
    width: 80px;
    position: absolute;
    top: -30px;
    right: 10px;
    z-index: 10;
}

.buy:hover {
    cursor: pointer;
}

.btnShoppingCart {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--violet);
    border: none;
    border-radius: 100%;

    img {
        width: 30px;
    }

    &:hover {
        cursor: pointer;
    }

    &:active {
        transform: scale(0.95);
    }
}

.btnShoppingCart.with-logout {
  bottom: 110px;
}

.btnLogOut {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--violet);
  border: none;
  border-radius: 100%;
  align-items: center;
  justify-content: center;

  &:hover {
    cursor: pointer;
  }

  &:active {
    transform: scale(0.95);
  }

}

.btnLogOut img {
    width: 30px;
    padding: 0;
  }

#counter {
    background-color: var(--red-invalid);
    color: var(--light);
    border-radius: 100%;
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    right: 0;
    font-size: 16px;
    font-family: 'afacad';
    display: flex;
    align-items: center;
    justify-content: center;
}

/* VALID FIELDS */

input.valid,
select.valid {
  border: 2px solid var(--green-valid) !important;
}

/* INVALID FIELDS */

input.invalid,
select.invalid {
  border: 2px solid var(--red-invalid) !important;
}

/* MESSAGES */

.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -20px);
  opacity: 0;

  padding: 12px 20px;
  border-radius: 10px;
  min-width: 250px;

  text-align: center;
  z-index: 100;

  transition: all 0.3s ease;
}

.message.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.message.success {
  background-color: var(--green-valid);
  color: var(--light);
}

.message.warning {
  background-color: var(--orange);
  color: var(--light);
}

.message.error {
  background-color: var(--red-invalid);
  color: var(--light);
}

@media (min-width: 768px) {

    .logo {
        width: 300px;
        height: 200px;
    }

    .header-menu ul a {
        font-size: 24px;
    }

    .search-bar {
        background-color: var(--blue-search);
        width: 150px;
        display: flex;
        justify-content: flex-end;
        padding: 5px;
        border: 1px solid;
        border-radius: 50px;
    }

    .buy {
        width: 100px;
        top: -37.5px;
        right: 30px;
    }

    #counter {
        font-size: 18px;
        width: 23px;
        height: 23px;
    }

    .links {
        flex-direction: row;
        justify-content: space-around;

        h3 {
            font-size: 24px;
        }

        p {
            font-size: 16px;
        }
    }

    .legal {
        h3 {
            font-size: 24px;
        }

        ul {
            gap: 40px;

            li p {
                font-size: 16px;
            }
        }
    }

    .copyright {
        font-size: 16px;
    }
}


@media (min-width: 992px) {

    .header-menu ul a {
        font-size: 28px;
    }

    .links h3, .legal h3 {
        font-size: 28px;
    }

    .links p, .legal ul li p {
        font-size: 18px;
    }

    .buy {
        right: 50px;
    }

    .btnShoppingCart {
        /* bottom: 110px; */
        right: 40px;
        width: 80px;
        height: 80px;

        img {
            width: 40px;
        }
    }

    .btnShoppingCart.with-logout {
        bottom: 130px;
    }

    .btnLogOut {
        right: 40px;
        width: 80px;
        height: 80px;

        img {
            width: 40px;
        }
    }

    #counter {
        font-size: 20px;
        width: 25px;
        height: 25px;
    }

    .copyright {
        font-size: 18px;
    }
}