/* Bag drawer and lightbox */

/* ------------------------------------------------------------ drawer --- */
.overlay { position: fixed; inset: 0; background: rgba(20, 16, 13, .45); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--bg); z-index: 80; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); }
.drawer-foot .row-between { font-size: 1.1rem; margin-bottom: 6px; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 76px; height: 92px; border-radius: 6px; overflow: hidden; background: var(--soft); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 600; }
.cart-meta .qty { margin-top: 8px; }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }

/* ---------------------------------------------------------- lightbox --- */
.lightbox { position: fixed; inset: 0; background: rgba(15, 12, 10, .9); z-index: 90; display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1100px; }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { color: #eee; text-align: center; margin-top: 12px; }
.lb-count { color: #bbb; font-size: .85rem; margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb-close { position: absolute; top: 16px; right: 16px; color: #fff; z-index: 1; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .15); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; width: 52px; height: 52px; background: rgba(255, 255, 255, .08); z-index: 1; }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-nav .ic { width: 26px; height: 26px; }
@media (max-width: 720px) { .lb-nav { top: auto; bottom: 16px; transform: none; } .lightbox img { max-height: 74vh; } }
