/* quick view + bag drawer */
.bg-lock { overflow: hidden; }
.bg-qv, .bg-dr { position: fixed; inset: 0; z-index: 200; font-family: "Archivo", "Arial Narrow", system-ui, sans-serif; }
.bg-qv-back { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.bg-qv-card { position: relative; margin: max(4vh, env(safe-area-inset-top)) auto 0; width: min(920px, calc(100% - 32px)); max-height: 92vh; overflow: auto;
  display: grid; grid-template-columns: 1.1fr 1fr; background: #0e0e0e; color: #fff; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.bg-qv-img { background: #fff; display: flex; align-items: center; justify-content: center; min-height: 320px; }
.bg-qv-img img { width: 100%; height: 100%; max-height: 80vh; object-fit: contain; }
.bg-qv-body { padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.bg-qv-body h3 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.15; padding-right: 2rem; text-wrap: balance; }
.bg-qv-price { margin: 0 0 1rem; font-size: 1.2rem; }
.bg-lbl { margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; color: var(--dm-red); letter-spacing: .04em; text-transform: uppercase; }
.bg-sizes { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.2rem; }
.bg-sizes.bg-shake { animation: bgShake .35s; }
@keyframes bgShake { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.bg-size { font: inherit; font-weight: 700; min-width: 3.2rem; min-height: 44px; padding: 0 .8rem; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.3);
  background: transparent; color: #fff; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.bg-size small { font-size: .62rem; font-weight: 600; opacity: .7; }
.bg-size:hover:not([disabled]) { border-color: #fff; }
.bg-size[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.bg-size[disabled] { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.bg-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.bg-add, .bg-buy, .bg-check { font: inherit; font-weight: 800; min-height: 52px; border-radius: 999px; cursor: pointer; border: 2px solid #fff; transition: background .2s, color .2s, border-color .2s; }
.bg-add { background: transparent; color: #fff; }
.bg-buy, .bg-check { background: var(--dm-red); border-color: var(--dm-red); color: #fff; }
.bg-add:hover { background: #fff; color: #000; }
.bg-buy:hover, .bg-check:hover { background: var(--dm-red-deep); border-color: var(--dm-red-deep); }
.bg-note { margin: .9rem 0 0; font-size: .85rem; color: rgba(255,255,255,.65); line-height: 1.45; }
.bg-more { margin-top: .8rem; color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; border-bottom: 2px solid var(--dm-red); align-self: flex-start; }
.bg-x { position: absolute; top: .6rem; right: .6rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.bg-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #0e0e0e; color: #fff; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) 0; box-shadow: -20px 0 60px rgba(0,0,0,.5); animation: bgIn .3s cubic-bezier(.22,1,.36,1); }
@keyframes bgIn { from { transform: translateX(40px); opacity: 0 } }
.bg-panel header { position: relative; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--dm-line-light); }
.bg-panel h3 { margin: 0; font-size: 1.4rem; }
.bg-list { list-style: none; margin: 0; padding: 0 1.4rem; overflow: auto; flex: 1; }
.bg-list li { display: grid; grid-template-columns: 76px 1fr; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--dm-line-light); }
.bg-list img { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 6px; }
.bg-list b { display: block; font-size: .92rem; line-height: 1.25; }
.bg-list span { font-size: .85rem; color: rgba(255,255,255,.65); }
.bg-qty { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.bg-qty button { font: inherit; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); background: none; color: #fff; cursor: pointer; }
.bg-qty .bg-rm { width: auto; border: 0; border-radius: 0; color: rgba(255,255,255,.6); text-decoration: underline; font-size: .8rem; margin-left: auto; }
.bg-foot { padding: 1.2rem 1.4rem 1.4rem; border-top: 1px solid var(--dm-line-light); }
.bg-foot > p:first-child { display: flex; justify-content: space-between; margin: 0 0 .8rem; font-size: 1.05rem; }
.bg-check { width: 100%; }
.bg-empty { padding: 2rem 1.4rem; color: rgba(255,255,255,.65); }
.sh-new { position: absolute; top: .55rem; left: .55rem; z-index: 1; background: var(--dm-red); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 4px; }
.sh-img { position: relative; }
.dm-bagbtn { position: relative; display: inline-flex; align-items: center; gap: .35rem; }
.dm-bagbtn b { min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--dm-red); color: #fff; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 720px) {
  .bg-qv-card { grid-template-columns: 1fr; margin-top: 0; width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .bg-qv-img { min-height: 0; max-height: 44vh; }
  .bg-qv-img img { max-height: 44vh; }
}
@media (prefers-reduced-motion: reduce) { .bg-panel, .bg-sizes.bg-shake { animation: none; } }
