@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Dancing+Script:wght@400..700&display=swap');

:root{
    --prymaryColor: #FFFFFF;
    --secondaryColor: #000000;
    --tertiaryColor: #cda434;
    --quaternaryColor: #7392B7;
    --bg-color: #EFEFEF;
}

.no-animate {
    animation: none !important;
}

/* |--- -- ------ -- ---| */
/* |--- -- HEADER -- ---| */
/* |--- -- ------ -- ---| */

.header{
    width: 900px;
    max-width: 90%;
    margin: 0 auto;
}

.header__logo{
    display: flex;
    justify-content: center;
    width: 100%;
}

.header__logoSVG{
    width: 80px;
    padding: 15px 0;
}

.header__nav{
    padding-top: 10px;
    border-top: 1px solid #000;
    animation: endAnimation .7s forwards;
    transition: .3s ease-in-out;
}

.header__ul{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-weight: bolder;
    font-size: 14px;
    background: radial-gradient(circle at top right, gray, black, gray);
    height: 35px;
    border-radius: 20px;
    animation: endAnimation2 .7s forwards;
    transition: .3s ease-in-out;
}

.header__li{
    display: flex;
    align-items: center;
    list-style: none;
}

.header__a{
    position: relative;
    color: #fff;
    text-decoration: none;
}

.header_amountCart{
    position: absolute;
    top: -1px;
    left: 0;
    width: 25px;
    text-align: center;
    font-size: 12px;
}

.header__cart{
    padding-top: 4px;
    width: 22px;
}

.carrito,
.perfil{
    display: none;
    position: absolute;
    top: 30px;
    right: -12px;
    width: 300px;
    height: auto;
    background-color: #fff;
    box-shadow: 3px 1px 10px #0000002c;
    border-radius: 10px;
    padding: 20px;
    z-index: 10;
}

.perfil{
    right: unset;
    left: 50%;
    transform: translate(-50%, 0);
    width: 170px;
    padding: 10px 0 5px;
}

.perfil__content{
    position: relative;
    text-align: center;
    text-decoration: none;
    z-index: 1;
}

.perfil__op{
    display: block;
    width: 100%;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
}

.perfil__op:hover{
    background-color: #efefef;
}

.perfil__hr{
    margin: 2px 0 6px;
}

.carrito__wrapper{
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 210px;
    overflow-y: scroll;
    scrollbar-width: thin;
}

.header__a--father:hover .carrito,
.carrito:hover,
.header__a--father:hover .perfil,
.perfil:hover{
    display: block;
}

.carrito::before,
.perfil::before{
    content: "";
    position: absolute;
    top: -7px;
    right: 10px;
    transform: rotate(45deg);
    width: 20px;
    height: 20px;
    background-color: #fff;
}

.perfil::before{
    right: 74px;
}

.carrito::after,
.perfil::after{
    content: "";
    background-color: transparent;
    position: absolute;
    top: -15px;
    right: 0;
    width: 100%;
    height: 20px;
}

.carrito__content{
    display: flex;
    align-items: center;
    text-align: left;
    margin-right: 10px;
}

.carrito__pic{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    min-width: 50px;
    height: 50px;
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.25);
    background-image: url('/public/img/products/bg.webp');
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.carrito__img{
    width: 100%;
}

.carrito__name{
    color: #000;
    font-weight: 500;
    font-style: normal;
    font-size: .85rem;
    padding-left: 10px;
    width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carrito__name--empty{
    width: auto;
    white-space: wrap;
    text-overflow: unset;
    text-align: center;
}

.carrito__precio{
    color: #cda434;
    font-size: .85rem;
    font-weight: bolder;
    padding-left: 10px;
}

.header__li-menu{
    display: none;
    align-items: center;
    list-style: none;
}

.header__nav.active {
    animation: animation .7s forwards;
}

.header__nav.active .header__ul {
    animation: animation2-part1 .4s forwards .2s ease,
                animation2-part2 .5s ease forwards .2s;
}

.header__icon-menu{
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.header__divider{
    display: none;
}

/* |--- -- ------ -- ---| */
/* |--- -- FOOTER -- ---| */
/* |--- -- ------ -- ---| */

.footer{
    background-color: #3d3d3d;
    padding: 40px 30px 20px;
    margin-top: 150px;
}

.footer__top{
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.footer__line{
    width: 40%;
}

.footer__socials{
    display: flex;
    gap: 26px;
    font-size: 17px;
    margin: 0 20px;
}

.footer__icon{
    color: #fff;
    cursor: pointer;
}

.footer__bot{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    color: #fff;
}

.footer__ttl{
    font-family: "Caveat", cursive;
    font-size: 30px;
}

.footer__politice{
    display: flex;
    gap: 15px;
    margin: 20px 0 10px;
    font-size: 13px;
}

.footer__polit{
    text-align: center;
    color: #fff;
}

.footer__contact{
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
}

.footer__copy{
    font-size: 13px;
}

@media screen and (max-width: 600px) {
    .header__logoSVG {
        width: 70px;
    }

    .header__nav{
        width: 120px;
        margin: 0 auto;
    }

    .header__ul{
        height: 32px;
    }

    .header__li{
        display: none;
    }

    .header__nav.active .header__divider{
        position: absolute;
        top: 46px;
        left: 50%;
        transform: translate(-50%, 0);
        width: 0;
        display: block;
        animation: animation6 .7s forwards .8s;
    }

    .header__cart{
        display: none;
    }

    .header__li-menu{
        display: block;
        position: absolute;
        top: 0px;
        left: 50%;
        transform: translate(-50%, 0%);
    }

    .header__nav.active .header__li-menu{
        animation: animation4 .7s forwards .6s;
    }

    .header__nav.active .header__a{
        color: transparent;
        animation: animation5 .7s forwards .2s;
    }

    .header__nav.active .header__cart{
        display: block;
        opacity: 0;
        animation: animation5 .7s forwards .2s;
    }

    .header__nav.active .header__li{
        display: block;
    }

    @keyframes animation {
        0%{
            width: 120px;
        }

        60%{
            width: 80%;
        }

        100%{
            width: 80%;
        }
    }

    @keyframes animation2-part1 {
        0% {
            height: 32px;
        }
    
        50% {
            height: 183px;
        }
    
        100% {
            display: flex;
            justify-content: center;
            flex-direction: column;
            height: auto;
            padding: 60px 20px 30px;
        }
    }

    @keyframes animation2-part2 {
        0% {
            display: none;
        }
    
        100% {
            display: flex;
            height: auto;
        }
    }

    @keyframes animation4 {
        0%{
            top: 0px;
        }

        100%{
            top: 10px;
            transform: translate(-50%, 0%);
        }
    }

    @keyframes animation5 {
        0%{
            opacity: 0;
            color: transparent;
            z-index: 1;
        }

        100%{
            opacity: 1;
            color: #fff;
            z-index: 1;
        }
    }

    @keyframes animation6 {
        0%{
            width: 0;
        }

        100%{
            border-top: 1px solid #FFE;
            width: 50%;
            padding-top: 4px;
            text-align: center;
        }
    }

    /* END ANIMATION */

    @keyframes endAnimation {
        0%{
            width: 80%;
        }

        70%{ 
            width: 80%;
        }

        100%{
            width: 120px;
        }
    }

    @keyframes endAnimation2 {
        0% {
            height: 183px;
        }

        100% {
            height: 32px;
        }
    }
    
    .carrito{
        left: 50%;
        transform: translate(-50%, 0);
    }

    .carrito::before{
        top: 2px;
        left: 50%;
        transform: rotate(45deg) translate(-50%, 0);
    }
}