#cart-overlay{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.45);

    opacity:0;
    visibility:hidden;

    transition:.3s;

    z-index:9998;

}

#cart-sidebar{

    position:fixed;

    top:0;
    right:0;

    width:430px;
    max-width:95%;

    height:100vh;

    background:#fff;

    transform:translateX(100%);

    transition:.35s;

    display:flex;

    flex-direction:column;

    z-index:9999;

    box-shadow:-10px 0 30px rgba(0,0,0,.15);

}

#cart-sidebar.active{

    transform:translateX(0);

}

#cart-overlay.active{

    opacity:1;
    visibility:visible;

}

.cart-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:25px;

    border-bottom:1px solid #eee;

}

.cart-header h2{

    margin:0;

}

.cart-header button{

    border:none;

    background:none;

    font-size:22px;

    cursor:pointer;

}

#cart-items{

    flex:1;

    overflow:auto;

    padding:20px;

}

.cart-item{

    display:flex;

    gap:15px;

    margin-bottom:20px;

    border-bottom:1px solid #eee;

    padding-bottom:20px;

}

.cart-item img{

    width:85px;

    height:85px;

    object-fit:cover;

    border-radius:8px;

}

.cart-item-info{

    flex:1;

}

.cart-item-info h4{

    margin:0 0 6px;

    font-size:16px;

}

.cart-item-info small{

    display:block;

    color:#777;

    margin-bottom:5px;

}

.cart-price{

    font-weight:bold;

}

.cart-footer{

    padding:20px;

    border-top:1px solid #eee;

}

.cart-total{

    display:flex;

    justify-content:space-between;

    margin-bottom:15px;

    font-size:18px;

}

.cart-btn{

    width:100%;

    display:block;

    background:#111;

    color:#fff;

    text-align:center;

    text-decoration:none;

    padding:15px;

    border-radius:8px;

    font-weight:600;

}
.cart-page{
    padding:80px 0;
    background:#fafafa;
    min-height:80vh;
}

.cart-title{
    font-size:40px;
    font-weight:700;
    margin-bottom:50px;
    color:#111;
}

.cart-wrapper{
    display:grid;
    grid-template-columns:2fr 420px;
    gap:40px;
    align-items:flex-start;
}

.cart-products{
    background:#fff;
   
    padding:30px;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
}

.cart-summary{
    background:#fff;
 
    padding:30px;
    position:sticky;
    top:120px;
    box-shadow:0 8px 30px rgba(0,0,0,.05);
}

.cart-summary h3{
    margin-bottom:25px;
    font-size:24px;
    font-weight:700;
}

.summary-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:18px 0;
    color:#555;
    font-size:16px;
}

.summary-row.total{
    margin-top:30px;
    font-size:22px;
    font-weight:700;
    color:#111;
}

.checkout-btn{
    width:100%;
    margin-top:30px;
    border:none;
    border-radius:12px;
    padding:18px;
    background:#111;
    color:#fff;
    font-size:17px;
    font-weight:600;
    transition:.25s;
}

.checkout-btn:hover{
    background:#333;
}

.continue-shopping{
    display:block;
    text-align:center;
    margin-top:20px;
    color:#111;
    text-decoration:none;
    font-weight:600;
}

.continue-shopping:hover{
    text-decoration:underline;
}

/* ===========================
   PRODUTOS
=========================== */

.cart-item{
    display:grid;
    grid-template-columns:140px 1fr;
    gap:25px;
    padding:25px 0;
    border-bottom:1px solid #ececec;
}

.cart-item:last-child{
    border-bottom:none;
}

.cart-item img{
    width:140px;
    height:140px;
    object-fit:cover;
    border-radius:12px;
}

.cart-item-info{
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.cart-header img{
    width:40px;
    height:40px;
    object-fit:cover;
}
.cart-item-info h4 {
    margin: 0;
    /* font-size: 24px; */
    font-weight: 700;
    color: #111111;
}

.cart-item-info small{
    display:block;
    color:#666;
font-weight:500;
}

.cart-options{
    display:flex;
    gap:20px;
    margin-top:20px;
    flex-wrap:wrap;
}

.cart-options label{
    display:block;
    font-size:13px;
    font-weight:700;
    margin-bottom:8px;
    text-transform:uppercase;
}

.cart-options select{
    padding:10px 15px;
    border:1px solid #ddd;
    border-radius:8px;
    min-width:130px;
}

.cart-quantity{
    display:flex;
    align-items:center;
    gap:10px;
}

.cart-quantity button{
    width:38px;
    height:38px;
    border:none;
    background:#f1f1f1;
    border-radius:8px;
    font-size:20px;
    cursor:pointer;
    transition:.2s;
}

.cart-quantity button:hover{
    background:#ddd;
}

.cart-quantity input{
    width:55px;
    text-align:center;
    border:1px solid #ddd;
    border-radius:8px;
    height:38px;
    font-weight:600;
}

.cart-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:25px;
}
.cart-price {
    font-size: 16px;
    font-weight: 600;
}

.remove-item{
    border:none;
    background:none;
    color:#6e6e6e;
    cursor:pointer;
    font-weight:600;
}

.remove-item:hover{    color:#a82f2f;
    text-decoration:underline;
}

/* ===========================
   CARRINHO VAZIO
=========================== */

.cart-empty{
    text-align:center;
    padding:100px 20px;
}

.cart-empty img{
    width:140px;
    margin-bottom:30px;
    opacity:.5;
}

.cart-empty h2{
    margin-bottom:10px;
}

.cart-empty p{
    color:#777;
}

.cart-empty a{
    margin-top:25px;
    display:inline-block;
    padding:15px 35px;
    background:#111;
    color:#fff;
    text-decoration:none;
    border-radius:10px;
}

/* ===========================
   RESPONSIVO
=========================== */

@media(max-width:1100px){

    .cart-wrapper{

        grid-template-columns:1fr;

    }

    .cart-summary{

        position:relative;
        top:auto;

    }

}

@media(max-width:768px){

    .cart-title{

        font-size:30px;

    }

    .cart-item{

        grid-template-columns:1fr;

    }

    .cart-item img{

        width:100%;
        height:260px;

    }

    .cart-options{

        flex-direction:column;
        gap:15px;

    }

    .cart-bottom{

        flex-direction:column;
        align-items:flex-start;
        gap:15px;

    }

}