/* RESET */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --primary:#1e3a8a;
    --primary-dark:#172554;
    --secondary:#facc15;
    --background:#f5f7fa;
    --white:#ffffff;
    --text:#1f2937;
    --success:#22c55e;
    --gray:#e5e7eb;
}

body{
    font-family:'Roboto', sans-serif;
    background:var(--background);
    color:var(--text);
    overflow-x:hidden;
}

/* HEADER */

header{
    background:linear-gradient(90deg,#1e3a8a,#2563eb);
    padding:15px 40px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    box-shadow:0 4px 20px rgba(0,0,0,.15);
    position:sticky;
    top:0;
    z-index:1000;
}

header img{
    width: 90px;
    object-fit:contain;
    border-radius:8px;
}

/* SEARCH */

.search_area{
    flex:1;
    display:flex;
    align-items:center;
    max-width:700px;
}

header input{
    width:100%;
    height:50px;
    border:none;
    outline:none;
    padding:0 20px;
    border-radius:999px 0 0 999px;
    background:white;
    font-size:16px;
    box-shadow:0 4px 10px rgba(0,0,0,.1);
}

#search_button{
    height:50px;
    width:130px;
    border:none;
    border-radius:0 999px 999px 0;
    background:var(--secondary);
    color:#111;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 4px 10px rgba(0,0,0,.1);
}

#search_button:hover{
    filter:brightness(.95);
    transform:translateY(-2px);
}

#search_button span{
    color:#111;
    letter-spacing:1px;
}

/* LOGIN */

.login_area{
    background:rgba(255,255,255,.15);
    backdrop-filter:blur(8px);
    padding:10px 18px;
    border-radius:16px;
    transition:.3s;
}

.login_area:hover{
    transform:translateY(-3px);
    background:rgba(255,255,255,.25);
}

.login_area a{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
}

.login_area img{
    width:28px;
}

.login_area h3{
    color:white;
    font-size:14px;
    font-weight:500;
}

/* CART */

.cart-icon{
    position:relative;
    cursor:pointer;
    background:white;
    width:55px;
    height:55px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.3s;
    box-shadow:0 4px 12px rgba(0,0,0,.12);
}

.cart-icon:hover{
    transform:scale(1.08);
}

.cart-count{
    position:absolute;
    top:-5px;
    right:-5px;
    background:var(--danger);
    color:white;
    width:22px;
    height:22px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:bold;
}

/* NAV */

nav{
    background:var(--secondary);
    display:flex;
    justify-content:center;
    align-items:center;
    gap:80px;
    height:65px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

nav a{
    position:relative;
    text-decoration:none;
    color:#111;
    font-weight:700;
    font-size:16px;
    transition:.3s;
}

nav a::after{
    content:'';
    position:absolute;
    left:0;
    bottom:-6px;
    width:0%;
    height:3px;
    background:#111;
    transition:.3s;
}

nav a:hover::after{
    width:100%;
}

/* HERO */

.hero{
    width:100%;
    overflow:hidden;
}

.slider{
    width:100%;
}

.slides{
    display:flex;
    width:600%;
    animation:deslizar 20s infinite;
}

.slide{
    width:16.66%;
    height:500px;
}

.slide img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* CATEGORIES */

.categories{
    padding:60px 40px;
}

.categories h2{
    text-align:center;
    font-size:38px;
    margin-bottom:40px;
    font-weight:700;
}

.cat{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:25px;
}

.cat a{
    background:white;
    border-radius:20px;
    padding:25px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    transition:.3s;
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.cat a:hover{
    transform:translateY(-8px);
    box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.cat img{
    width:120px;
    height:120px;
    object-fit:contain;
    margin-bottom:15px;
}

.cat h3{
    color:#111;
    font-size:18px;
    font-weight:500;
}

/* BEST SELLERS */

.best_sellers{
    padding:20px 40px 60px;
}

.best_sellers h2{
    text-align:center;
    font-size:38px;
    margin-bottom:40px;
}

.best{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
}

.bs_card{
    display:contents;
}

.bs_product{
    background:white;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 4px 15px rgba(0,0,0,.08);
    transition:.3s;
    display:flex;
    flex-direction:column;
    align-items:center;
    padding-bottom:20px;
}

.bs_product:hover{
    transform:translateY(-10px);
    box-shadow:0 12px 30px rgba(0,0,0,.18);
}

.bs_product img{
    width:100%;
    height:240px;
    object-fit:contain;
    padding:20px;
    background:#fff;
}

.bs_product h3{
    font-size:22px;
    margin-top:10px;
    font-weight:500;
}

.bs_product h4{
    color:var(--success);
    font-size:24px;
    margin:15px 0;
    font-weight:700;
}

/* BOTÃO */

.btn-add-card{
    width:85%;
    border:none;
    border-radius:14px;
    padding:14px;
    background:var(--success);
    color:white;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:.3s;
}

.btn-add-card:hover{
    background:#16a34a;
    transform:scale(1.03);
}

/* FOOTER */

footer{
    background:#111827;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
    margin-top:40px;
}

footer h4{
    color:white;
    font-weight:400;
}

/* ANIMAÇÃO SLIDER */

@keyframes deslizar {

    0%, 13%{
        margin-left:0;
    }

    16%, 30%{
        margin-left:-100%;
    }

    33%, 46%{
        margin-left:-200%;
    }

    50%, 63%{
        margin-left:-300%;
    }

    66%, 80%{
        margin-left:-400%;
    }

    83%, 96%{
        margin-left:-500%;
    }

    100%{
        margin-left:0;
    }
}

/* RESPONSIVO */

@media(max-width:768px){

    header{
        flex-direction:column;
        padding:20px;
    }

    .search_area{
        width:100%;
    }

    nav{
        gap:20px;
        flex-wrap:wrap;
        padding:10px;
        height:auto;
    }

    .slide{
        height:250px;
    }

    .categories,
    .best_sellers{
        padding:40px 20px;
    }

    .categories h2,
    .best_sellers h2{
        font-size:28px;
    }

    .bs_product img{
        height:180px;
    }
}