:root{
    --primaryColor: #ffffff;
    --secondaryColor: #5F17CE;
    --lightPurple: #8263CE;
}
*{
    box-sizing: border-box;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
}
body{
    margin: 0;
    padding: 0;
    background-color: var(--primaryColor);
    padding-bottom: 100px;
}
main{
    width: 70%;
    margin: auto;
}


header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 15%;
    color: white;
    background: linear-gradient(10deg, var(--lightPurple), var(--secondaryColor));
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    align-items: center;
    font-size: 16px;
    z-index: 9999999;
}
header h1{
    margin: 0;
}
header img{
    filter: brightness(100);
}


#cart{
    display: none;
    position: absolute;
    top: 75px;
    width: 400px;
    right: 12.5%;
    background-color: white;
    padding: 40px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    color: var(--lightPurple);
    border-radius: 10px;
}
#cart::before{
    content: '';
    border: 20px solid white;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
    position: absolute;
    top: -30px;
    right: 40px;
}
#cart::after{
    content: '';
    border: 20px solid white;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
    position: absolute;
    top: -30px;
    right: 40px;
}
#cart.visible{
    display: block;
}
#cart-btn{
    margin-left: auto;
    font-size: 26px;
    color: white;
    position: relative;
}
#counter{
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: white;
    color: var(--lightPurple);
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    border-radius: 50px;
}
#cart h2{
    font-size: 26px;
    margin-top: 0;
    color: var(--secondaryColor);
}





.hero{
    padding: 150px 15%;
    width: 100%;
    background: url(../img/banner.jpg);
    background-size: cover;
    background-position: center center;
    margin-bottom: 75px;
    opacity: 0.2;
}
.hero h1{
    font-size: 48px;
    margin: 0;
    margin-bottom: 10px;
    color: white;
    background-color: var(--secondaryColor);
    background: linear-gradient(175deg, #8263CE, var(--secondaryColor));
    display: inline-block;
    background-size: 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent; 
    -moz-text-fill-color: transparent;
}



.filters{
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}
.order-by{
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--secondaryColor);
}
.order-by select{
    padding: 10px 20px;
    border-radius: 5px;
    background-color: white;
    color: var(--lightPurple);
    border: 1px solid var(--lightPurple);
    font-size: 14px;
    font-weight: 600;
}





.boxes{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
}
.box{
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    text-align: left;
    transition: 300ms;
    color: var(--secondaryColor);
    position: relative;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}
.box .cart{
    display: flex;
    gap: 10px;
}
.box .cart > div{
    width: 50%;
    display: flex;
    gap: 0;
    align-items: center;
}
.box .cart > div button{
    cursor: pointer;
}
.item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid lightgray;
    padding: 10px;
}
.item h3{
    margin: 0;
}
.item > div:first-child > span{
    font-size: 14px;
    color: lightgray;
}
.item .stock > *{
    padding: 10px;
    aspect-ratio: 1/1;
}
.item .stock button{
    background-color: #F0F0F0;
    border: none;
    cursor: pointer;
}


.calc{
    margin-top: 20px;
    color: gray;
    font-size: 14px;
}
.calc p{
    margin: 5px 0;
}
.total{
    color: white;
    background-color: var(--secondaryColor);
    border-radius: 5px;
    padding: 10px 20px;
    margin-top: 10px;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}
.total p{
    margin: 0;
}

.box .cart > div *{
    height: 100%;
    aspect-ratio: 1 / 1;
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}
.box h2{
    margin-top: 20px;
    margin-bottom: 5px;
}
.box .author{
    margin-bottom: 20px;
    color: gray;
}
.box::before{
    content: attr(data-price)'€';
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #82c77e;
    padding: 7.5px 15px 7.5px 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primaryColor);
    font-size: 18px;
    font-weight: 800;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.box .imagen img{
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-radius: 10px ;
}
.box .add-to-cart{
    padding: 10px 20px;
    font-size: 16px;
    border: 1px solid var(--secondaryColor);
    color: var(--secondaryColor);
    background-color: transparent;
    border-radius: 5px;
    width: 50%;
    cursor: pointer;
}
.box .add-to-cart.disabled{
    background-color: lightgray;
    color: gray;
    border: 1px solid lightgray;
}
.box .categories{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    margin-bottom: 10px;
}
.box .categories span{
    padding: 5px 10px;
    background-color: lightgray;
    color: black;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0.5;
}



