/* ==========================================================================
   RECKLESS STORE — GLOBAL CART DRAWER
   Loaded on every page because the drawer is injected by components.js.
   Navbar files are intentionally untouched.
   ========================================================================== */

.rs-cart-backdrop {
    position: fixed; inset: 0; z-index: 600; background: rgba(5,10,7,.62);
    opacity: 0; pointer-events: none;
    transition: opacity .26s var(--rt-ease);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.rs-cart-backdrop.is-open { opacity: 1; pointer-events: auto; }
.rs-cart-drawer {
    position: fixed; inset-block: 0; left: 0; right: auto; z-index: 610;
    width: min(440px, 100%); display: flex; flex-direction: column;
    background: linear-gradient(160deg, rgba(19,37,26,.98), rgba(10,18,13,.99));
    border-right: 1px solid var(--rt-border-primary);
    box-shadow: 18px 0 60px rgba(0,0,0,.42);
    transform: translateX(-105%); transition: transform .3s var(--rt-ease);
}
.rs-cart-drawer.is-open { transform: translateX(0); }
body.cart-open { overflow: hidden; }
.rs-cart-drawer-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: var(--rt-space-4);
    padding: var(--rt-space-6); border-bottom: 1px solid var(--rt-border);
}
.rs-cart-drawer-head .section-label { margin-bottom: 4px; }
.rs-cart-close {
    width: 40px; height: 40px; display: grid; place-items: center; flex: none;
    border-radius: var(--rt-radius-full); border: 1px solid var(--rt-border);
    color: var(--rt-text-soft); background: rgba(216,216,216,.04);
}
.rs-cart-close .icon { width: 17px; height: 17px; }
.rs-cart-drawer-body { flex: 1; overflow-y: auto; padding: var(--rt-space-5); display: grid; gap: var(--rt-space-3); align-content: start; }
.rs-drawer-item {
    display: grid; grid-template-columns: 58px 1fr auto; gap: var(--rt-space-3); align-items: start;
    padding: var(--rt-space-3); border: 1px solid var(--rt-border); border-radius: var(--rt-radius);
    background: rgba(216,216,216,.03);
}
.rs-drawer-item img { width: 58px; height: 58px; object-fit: cover; border-radius: var(--rt-radius-sm); }
.rs-drawer-item-main { min-width: 0; }
.rs-drawer-item-main strong { display: block; font-size: var(--rt-fs-sm); line-height: 1.5; }
.rs-drawer-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rs-drawer-opts .badge { font-size: 10px; padding: 2px 7px; }
.rs-drawer-qty { display: inline-flex; align-items: center; gap: 9px; margin-top: 8px; }
.rs-drawer-qty button {
    width: 24px; height: 24px; border-radius: var(--rt-radius-sm);
    border: 1px solid var(--rt-border); color: var(--rt-text); background: rgba(216,216,216,.05);
}
.rs-drawer-qty span { min-width: 18px; text-align: center; font-size: var(--rt-fs-sm); }
.rs-drawer-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rs-drawer-item-side strong { font-size: var(--rt-fs-sm); white-space: nowrap; }
.rs-drawer-remove { color: var(--rt-danger); }
.rs-drawer-remove .icon { width: 16px; height: 16px; }
.rs-cart-drawer-foot { padding: var(--rt-space-5); border-top: 1px solid var(--rt-border); background: rgba(10,18,13,.7); }
.rs-cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--rt-space-4); }
.rs-cart-total-row strong { font-size: var(--rt-fs-xl); }
.rs-cart-drawer-foot .btn { margin-bottom: var(--rt-space-2); }
.rs-cart-drawer-foot .form-hint { margin-top: var(--rt-space-2); text-align: center; }

@media (max-width: 640px) {
    .rs-cart-drawer { width: 100%; }
}
