/* ==========================================
   CART + WISHLIST DRAWERS
========================================== */

.cart-panel,
.wishlist-panel{
    position:fixed;
    top:0;
    right:0;
    width:420px;
    max-width:100%;
    height:100vh;
    height:100dvh;
    background:var(--surface);
    box-shadow:var(--shadow);
    z-index:2500;
    display:flex;
    flex-direction:column;
    transform:translateX(105%);
    transition:transform .55s var(--ease);
}

.cart-panel.active,
.wishlist-panel.active{
    transform:none;
}

/* ==========================================
   HEADER
========================================== */

.panel-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:22px 24px;
    border-bottom:1px solid var(--line);
}

.panel-header h2{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:1.7rem;
}

.panel-header h2 i{
    font-size:1.1rem;
    color:var(--accent);
}

.panel-header button{
    width:40px;
    height:40px;
    border-radius:50%;
    background:var(--bg-soft);
    color:var(--text);
    display:flex;
    justify-content:center;
    align-items:center;
    transition:transform .4s var(--ease),background .3s,color .3s;
}

.panel-header button:hover{
    background:var(--fill);
    color:var(--on-fill);
    transform:rotate(90deg);
}

/* ==========================================
   ITEMS
========================================== */

.panel-content{
    flex:1;
    overflow-y:auto;
    padding:8px 24px;
}

.panel-content::-webkit-scrollbar{
    width:5px;
}

.cart-item,
.wish-item{
    display:flex;
    gap:16px;
    padding:18px 0;
    border-bottom:1px solid var(--line);
    animation:fadeUp .5s var(--ease) both;
}

.cart-item img,
.wish-item img{
    width:84px;
    height:104px;
    object-fit:cover;
    border-radius:10px;
    background:var(--bg-soft);
    flex:none;
}

.cart-details,
.wish-details{
    flex:1;
    min-width:0;
}

.cart-details h4,
.wish-details h4{
    font-family:var(--font-body);
    font-size:.96rem;
    font-weight:500;
    line-height:1.35;
    margin-bottom:4px;
}

/* The size or colour chosen */

.cart-details .cart-option{
    display:block;
    margin-bottom:4px;
    font-size:.84rem;
    line-height:1.4;
    color:var(--muted);
    overflow-wrap:anywhere;
}

.cart-details p,
.wish-details p{
    color:var(--accent);
    font-weight:600;
    line-height:1.4;
}

.qty-box{
    display:inline-flex;
    align-items:center;
    margin-top:10px;
    border:1px solid var(--line);
    border-radius:40px;
    background:var(--surface);
}

.qty-box span{
    min-width:28px;
    text-align:center;
    font-size:.9rem;
    font-weight:500;
}

.qty-btn{
    width:32px;
    height:32px;
    border-radius:50%;
    color:var(--text);
    transition:background .3s,color .3s;
}

.qty-btn:hover{
    background:var(--fill);
    color:var(--on-fill);
}

.remove-btn,
.remove-wish{
    display:block;
    margin-top:10px;
    color:var(--muted);
    font-size:.74rem;
    letter-spacing:.12em;
    text-transform:uppercase;
    text-decoration:underline;
    text-underline-offset:3px;
    transition:color .3s;
}

.remove-btn:hover,
.remove-wish:hover{
    color:var(--danger);
}

/* ==========================================
   FOOTER
========================================== */

.cart-footer{
    padding:22px 24px 26px;
    border-top:1px solid var(--line);
    background:var(--bg-soft);
}

.cart-total{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    margin-bottom:18px;
}

.cart-total span{
    font-size:.78rem;
    letter-spacing:.18em;
    text-transform:uppercase;
    color:var(--muted);
}

.cart-total strong{
    font-size:1.5rem;
    color:var(--text);
}

.cart-total strong span{
    font-size:inherit;
    letter-spacing:0;
    color:inherit;
}

.checkout-btn{
    position:relative;
    overflow:hidden;
    width:100%;
    padding:16px;
    border-radius:50px;
    background:var(--fill);
    color:var(--on-fill);
    font-size:.82rem;
    font-weight:500;
    letter-spacing:.18em;
    text-transform:uppercase;
    transition:background .3s,transform .4s var(--ease),box-shadow .4s;
}

.checkout-btn:hover{
    background:var(--fill-hover);
    transform:translateY(-2px);
    box-shadow:0 14px 28px rgba(207,164,99,.28);
}

/* ==========================================
   EMPTY
========================================== */

.empty-cart{
    text-align:center;
    margin-top:90px;
}

.empty-cart i{
    width:92px;
    height:92px;
    border-radius:50%;
    display:inline-grid;
    place-items:center;
    font-size:32px;
    color:var(--accent);
    background:var(--bg-soft);
    margin-bottom:22px;
}

.empty-cart h3{
    font-size:1.6rem;
    margin-bottom:6px;
}
