/* =========================================================
   SOUTHWARD — CART DRAWER
========================================================= */

body.sw-cart-drawer-open {
    overflow: hidden;
}

.sw-cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 7000;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    transition: opacity .24s ease;
}

.sw-cart-drawer-overlay.is-open {
    opacity: 1;
}

.sw-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 7100;
    width: min(520px, 100vw);
    height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: #fff;
    color: #111;
    box-shadow: -22px 0 60px rgba(0, 0, 0, .18);
    transform: translateX(102%);
    transition: transform .28s cubic-bezier(.2,.7,.2,1);
}

.sw-cart-drawer.is-open {
    transform: translateX(0);
}

.sw-cart-drawer-head {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 22px;
    border-bottom: 1px solid #e2e2df;
}

.sw-cart-drawer-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.sw-cart-drawer-close {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 29px;
    font-weight: 300;
    cursor: pointer;
}

.sw-cart-drawer-body {
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}

.sw-cart-drawer-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
}

.sw-cart-drawer-image {
    width: 118px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f0f1f1;
}

.sw-cart-drawer-image img {
    width: 100%;
    height: 100%;
    padding: 9px;
    object-fit: contain;
    background: #f0f1f1;
}

.sw-cart-drawer-product {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sw-cart-drawer-category {
    margin: 0 0 6px;
    color: #71716d;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sw-cart-drawer-name {
    color: #111;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.sw-cart-drawer-price {
    margin-top: 7px;
    font-size: 12px;
}

.sw-cart-drawer-qty {
    display: grid;
    grid-template-columns: 36px 42px 36px;
    align-items: center;
    margin-top: 18px;
}

.sw-cart-drawer-qty button,
.sw-cart-drawer-qty span {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-cart-drawer-qty button {
    border: 1px solid #d8d8d4;
    background: #f2f3f3;
    color: #111;
    font-size: 19px;
    cursor: pointer;
}

.sw-cart-drawer-qty span {
    border-top: 1px solid #d8d8d4;
    border-bottom: 1px solid #d8d8d4;
    font-size: 11px;
}

.sw-cart-drawer-remove {
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #777;
    background: transparent;
    color: #666;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .8px;
    cursor: pointer;
}

.sw-cart-drawer-foot {
    padding: 19px 18px 18px;
    border-top: 1px solid #e2e2df;
    background: #fff;
}

.sw-cart-drawer-total {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 17px;
}

.sw-cart-drawer-total > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sw-cart-drawer-total strong {
    font-size: 14px;
}

.sw-cart-drawer-total span {
    color: #6f6f6b;
    font-size: 8px;
}

.sw-cart-drawer-view,
.sw-cart-drawer-checkout {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #151515;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.sw-cart-drawer-view {
    background: #151515;
    color: #fff;
}

.sw-cart-drawer-view:hover {
    background: #fff;
    color: #151515;
}

.sw-cart-drawer-checkout {
    margin-top: 8px;
    background: #fff;
    color: #151515;
}

.sw-cart-drawer-checkout:hover {
    background: #151515;
    color: #fff;
}

.sw-cart-drawer-continue {
    width: 100%;
    margin-top: 13px;
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .7px;
    cursor: pointer;
}

.sw-cart-count-live {
    display: flex !important;
}

@media (max-width: 560px) {
    .sw-cart-drawer { width: 100vw; }
    .sw-cart-drawer-head { min-height: 64px; padding: 0 16px; }
    .sw-cart-drawer-body { padding: 18px 16px; }
    .sw-cart-drawer-item { grid-template-columns: 100px minmax(0, 1fr); }
    .sw-cart-drawer-image { width: 100px; height: 128px; }
}
