/* RUMR — bag drawer, checkout and toast */
.bagx { position: fixed; inset: 0; z-index: 90; }
.bagx-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .35s; }
.bagx-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .5s var(--ease);
}
.bagx.open .bagx-scrim { opacity: 1; }
.bagx.open .bagx-panel { transform: none; }
.bagx-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.bagx-head h2 { flex: 1; font: 600 24px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.bagx-x, .bagx-back { font: 500 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; }
.bagx-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px 22px; }
.bagx-items { list-style: none; }
.bagx-item { display: grid; grid-template-columns: 76px 1fr; gap: 6px 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bagx-item .thumb { grid-row: span 4; width: 76px; height: 76px; border-radius: 10px; }
.bagx-item.na { opacity: .55; }
.bi-name { font: 500 16px/1.2 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.bi-opts { font-size: 13px; color: var(--muted); word-break: break-word; }
.bi-warn { font-size: 12px; color: var(--red-2); }
.bi-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.bi-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; }
.bi-qty button { width: 32px; height: 32px; font-size: 16px; }
.bi-qty button:disabled { opacity: .3; cursor: default; }
.bi-qty output { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.bi-price { margin-left: auto; font-weight: 600; }
.bi-remove { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.bagx-empty { padding: 40px 0; font: 500 20px/1.3 var(--display); text-transform: uppercase; color: var(--muted); }
.bagx-form { display: grid; gap: 16px; padding-top: 16px; }
.bagx-form .field { display: grid; gap: 7px; font: 500 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bagx-form input, .bagx-form select { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--text);
  font: 400 16px/1.3 var(--body); text-transform: none; letter-spacing: 0; transition: border-color .2s; }
.bagx-form select { appearance: none; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23F3EBDA' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.bagx-form select option { background: var(--bg-2); }
.bagx-form input:focus, .bagx-form select:focus { border-color: var(--gold); }
.bagx-form .bad input, .bagx-form .bad select { border-color: var(--red-2); }
.bagx-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.bagx-done { font: 700 40px/1 var(--display); text-transform: uppercase; margin-top: 12px; }
.bagx-note { margin-top: 14px; color: var(--muted); }
.bagx-foot { padding: 16px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.bagx-total { display: flex; justify-content: space-between; align-items: baseline; }
.bagx-total span { font: 500 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bagx-total b { font: 600 26px/1 var(--display); }
.bagx-msg { font-size: 13px; line-height: 1.45; color: #F6B0A8; }
.bagx-msg:empty { display: none; }
.bagx-cta { min-height: 52px; border-radius: 8px; background: var(--red); color: #FFF4E6; font: 500 16px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; transition: background .25s, opacity .25s; }
.bagx-cta:hover:not(:disabled) { background: var(--red-2); }
.bagx-cta:disabled { opacity: .4; cursor: not-allowed; }
.bagx-secure { font-size: 12px; color: var(--muted); text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 96; translate: -50% 0; padding: 13px 20px; border-radius: 10px; max-width: calc(100vw - 32px); text-align: center;
  background: var(--text); color: var(--bg); font: 500 14px/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; transform: translateY(14px); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--red-2); color: #fff; }
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.5); } }
