﻿/* Overlay */
.bagOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9998;
}

/* Drawer */
.bagDrawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 380px;
    max-width: calc(100vw - 36px);
    background: #fff;
    z-index: 9999;
    transform: translateX(105%);
    transition: transform .22s ease;
    display: grid;
    grid-template-rows: auto 1fr auto;
    box-shadow: -18px 0 40px rgba(0,0,0,.22);
}

    .bagDrawer.is-open {
        transform: translateX(0);
    }

.bagTop {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.bagTitle {
    font-weight: 700;
    font-size: 16px;
}

.bagClose {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.bagItems {
    padding: 12px 12px;
    overflow: auto;
}

/* Item row */
.bagItem {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 12px;
}

    .bagItem + .bagItem {
        border-top: 1px solid rgba(0,0,0,.08);
        border-radius: 0;
    }

.bagThumb {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    background: #f2f2f2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .bagThumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.bagMain {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
}

.bagName {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    color: rgba(10,10,12,.90);
}

.bagPrice {
    font-weight: 700;
    font-size: 13px;
    color: rgba(10,10,12,.90);
}

/* Qty control */
.bagQty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bagQtyBtn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.bagQtyVal {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: rgba(10,10,12,.85);
}

.bagRemove {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(233,30,99,.25);
    background: rgba(233,30,99,.08);
    cursor: pointer;
    color: #d81b60;
    font-weight: 900;
}

/* Bottom */
.bagBottom {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.bagSubtotalRow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}

.bagSubtotalLabel {
    font-weight: 700;
    font-size: 13px;
    color: rgba(10,10,12,.75);
}

.bagSubtotalValue {
    font-weight: 800;
    font-size: 14px;
}

.bagSmallNote {
    font-size: 10px;
    color: rgba(10,10,12,.55);
    margin-bottom: 12px;
}

.bagCheckoutBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    border-radius: 999px;
    text-decoration: none;
    background: #111;
    color: #fff;
    font-weight: 800;
}
