.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: relative;
    z-index: 9999;
}

header.scrolled {
    position: sticky;
    top: 0;
    background-color: rgba(248, 250, 252, 0.8);
    transition: all 0.4s ease-in-out;
    z-index: 2;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 1rem;

    img {
        height: var(--size-6xl);
    }
}

.header__menu {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    gap: 1.5rem;
}

.header__link {
    font-family: var(--font-logo);
    font-size: var(--size-xl);
    text-decoration: none;
    font-weight: 600;
    color: var(--clr-slate);
    letter-spacing: -0.05em;
    padding: 10px 12px;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-out 0s;
}

.header__link:hover {
    color: var(--clr-red);
}

.header__link::before,
.header__link::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--clr-red);
    transition: all 0.5s;
}

.header__link::before {
    top: 0;
    left: 0;
}

.header__link::after {
    bottom: 0;
    right: 0;
}

.header__link:hover::before {
    width: 100%;
    transition: width 0.25s ease-in-out;
}

.header__link:hover::after {
    width: 100%;
    transition: width 0.25s ease-in-out 0.25s;
}

.header__link.active {
    color: var(--clr-red);
}

.header__link.active::before,
.header__link.active::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--clr-red);
}

.header__link.active::before {
    top: 0;
    left: 0;
}

.header__link.active::after {
    bottom: 0;
    right: 0;
}

.header__line {
    padding: 1rem 0;
    border: 1px solid var(--clr-dark);
}

.header__button {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--size-2xl);
    text-decoration: none;
    color: var(--clr-slate);
    transition: all 0.3s ease-out 0s;
}

.header__button:hover {
    color: var(--clr-red);
}

.header__button:last-child {
    padding-right: 0.5rem;
}

.header__button__cart {
    position: relative;
}

.header__button__cart__total {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 18px;
    height: 18px;
    color: var(--clr-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-red);
    font-size: var(--size-xs);
}

.header__bars {
    display: none;
}

.header__user {
    position: relative;
    display: block;

    .header__user__header__button {
        background-color: var(--clr-blue);
        color: var(--clr-light);
        padding: 0.4rem 0.6rem;
        font-size: var(--size-base);
        font-weight: bold;
        border: 2px solid transparent;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.3rem;
    }
    .header__user__header__button:hover {
        color: var(--clr-light);
    }

    .header__user__header__button > i {
        font-size: var(--size-sm);
        display: flex;
    }

    .header__user__header__button > p {
        font-size: var(--size-xs);
        letter-spacing: -0.03rem;
        display: flex;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.header__user ul {
    display: none;
    font-size: 13px;
    position: absolute;
    z-index: 1;
    min-width: 100px;
    background-color: var(--clr-light);
    border: 2px solid var(--clr-blue);
    border-radius: 0px 15px 15px 15px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

.header__user ul li {
    overflow: hidden;
}

.header__user ul li a {
    color: var(--clr-blue);
    padding: 8px 10px;
    text-decoration: none;
    background-color: transparent;
    display: block;
    transition: 0.1s;
}

.header__user ul li a:hover {
    background-color: var(--clr-blue);
    color: var(--clr-light);
}

.header__user ul li a:focus {
    background-color: var(--clr-light);
    color: var(--clr-blue);
}

.header__user ul #top:hover {
    border-radius: 0px 13px 0px 0px;
}

.header__user ul #bottom:hover {
    border-radius: 0px 0px 13px 13px;
}

.header__user:hover .header__user__header__button {
    border-radius: 15px 15px 0px 0px;
}

.header__user:hover ul {
    display: block;
}

.home-cart {
    width: 360px;
    position: fixed;
    height: 100vh;
    top: 0;
    right: -100%;
    border-radius: 30px 0 0 30px;
    background: var(--clr-red);
    color: var(--clr-dark);
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    z-index: 11;
    transition: all 0.5s;

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

.home-cart__overlay {
    cursor: pointer;
    width: 100vw;
    height: 100vh;
    background: black;
    position: fixed;
    left: 0;
    top: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 10;
    &.active {
        opacity: 0.5;
        visibility: visible;
    }
}

.home-cart__header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    background-color: var(--clr-grey);
    p {
        font-size: var(--size-2xl);
        font-family: var(--font-primary);
        font-weight: 500;
        margin-left: 1rem;
    }
}

.home-cart__empty {
    margin-top: 16rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    p {
        font-size: var(--size-2xl);
        font-family: var(--font-logo);
        color: var(--clr-light);
        font-weight: 600;
    }
    a {
        background-color: var(--clr-blue);
    }
    a:hover {
        background-color: #3564e3;
    }
}

.home-cart__list {
    width: 100%;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.home-cart__items {
    display: flex;
    position: relative;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 1rem;
}

.home-cart__items:nth-child(even) {
    background-color: #c52020;
}

.home-cart__items__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--clr-light);
    h2 {
        font-size: var(--size-lg);
    }
    p {
        font-size: var(--size-xs);
    }
}

.home-cart__img {
    width: 70px;
    height: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--clr-light);
    display: flex;
    justify-content: center;
    align-items: center;
    img {
        width: 100%;
        mix-blend-mode: darken;
    }
}

.home-cart__item__dlt {
    position: absolute;
    bottom: 2rem;
    right: 1rem;
    font-size: var(--size-xl);
    cursor: pointer;
}

.quantity-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--clr-blue);
    border-radius: 5px;
    .value {
        pointer-events: none;
        width: 32px;
        height: 100%;
        border: 0;
        text-align: center;
        &::-webkit-outer-spin-button,
        &::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
    }
    .increment,
    .decrement {
        width: 32px;
        border: 0;
        cursor: pointer;
        background: var(--clr-blue);
        color: #fff;
        height: 25px;
    }
}

.home-cart__bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.home-cart__price {
    text-align: right;
    margin-bottom: 1rem;
    margin-right: 0.5rem;
    p {
        color: var(--clr-light);
        font-size: var(--size-lg);
        font-weight: 600;
    }
}

.home-cart__button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    button {
        width: 100%;
    }
    a {
        width: 100%;
        text-align: center;
        text-decoration: none;
    }
}

.home-cart__button1 {
    padding: 1rem;
    background-color: transparent;
    color: var(--clr-light);
    font-size: var(--size-lg);
    font-weight: 600;
    letter-spacing: 0.05rem;
    transition: all 0.3s;
}

.home-cart__button1:hover {
    background-color: var(--clr-light);
    color: var(--clr-dark);
}

.home-cart__button2 {
    background-color: var(--clr-blue);
    color: var(--clr-light);
}

.home-cart__button2:hover {
    background-color: #4b75e7;
    color: var(--clr-light);
}

/* 2xl */
/* @media (max-width: 1536px) {} */

/* xl */
@media (max-width: 1280px) {
    .header__logo {
        img {
            height: var(--size-5xl);
        }
    }

    .header__link {
        font-size: var(--size-base);
    }

    .header__button {
        font-size: var(--size-lg);
    }

    .header__button__cart__total {
        bottom: 10px;
        left: 10px;
        width: 16px;
        height: 16px;
        font-size: var(--size-xss);
    }
}

/* lg */
@media (max-width: 1024px) {
    .header__menu {
        gap: 1rem;
    }

    .header__logo {
        img {
            height: var(--size-3xl);
        }
    }

    .header__link {
        font-size: var(--size-sm);
    }

    .header__line {
        display: none;
    }

    .header__button {
        font-size: var(--size-base);
    }
}

/* md */
@media (max-width: 768px) {
    .header__menu {
        display: none;
    }

    .header__bars {
        color: var(--clr-dark);
        width: var(--size-2xl);
        height: var(--size-2xl);
        display: block;
    }
}

/* sm */
/* @media (max-width: 640px) {} */

/* xs */
/* @media (max-width: 475px) {} */
