/* MERCURY F.6.20.45.5C.7.9.6.5.5 — Native Bag Drawer Isolation
   [data-bag-drawer] is the full-screen overlay. .dp-commerce-bag-panel is the
   actual right-hand drawer. Keep those responsibilities separate. */

.dp-commerce-bag[data-bag-drawer]{
  position:fixed!important;
  inset:0!important;
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100vw!important;max-width:none!important;
  height:100dvh!important;max-height:none!important;
  margin:0!important;padding:0!important;
  transform:none!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  z-index:10020!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.dp-commerce-bag[data-bag-drawer].is-open{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transform:none!important;
}

/* Dim the page only. Never shrink or relocate this element into the drawer. */
.dp-commerce-bag[data-bag-drawer] > .dp-commerce-backdrop{
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  z-index:1!important;
  margin:0!important;padding:0!important;
  border:0!important;
  background:rgba(0,0,0,.78)!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  cursor:pointer!important;
}

/* The native ASIDE is the actual drawer. */
.dp-commerce-bag[data-bag-drawer] > .dp-commerce-bag-panel{
  position:absolute!important;
  top:0!important;right:0!important;bottom:0!important;left:auto!important;
  z-index:5!important;
  display:flex!important;
  flex-direction:column!important;
  width:min(440px,calc(100vw - 18px))!important;
  max-width:440px!important;
  height:100dvh!important;max-height:100dvh!important;
  min-height:0!important;
  margin:0!important;padding:0!important;
  background:#080808!important;
  border:0!important;border-left:1px solid rgba(255,215,0,.22)!important;
  border-radius:0!important;
  box-shadow:-24px 0 70px rgba(0,0,0,.52)!important;
  overflow:hidden!important;
  transform:translateX(100%)!important;
  transition:transform .22s ease!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.dp-commerce-bag[data-bag-drawer].is-open > .dp-commerce-bag-panel{
  transform:translateX(0)!important;
}

/* 7.9.6.5 created a cleaner retail header. It belongs INSIDE the native panel. */
.dp-commerce-bag-panel > .mercury-bag-heading{
  position:relative!important;
  top:auto!important;
  flex:0 0 auto!important;
  z-index:7!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  width:100%!important;
  padding:20px 22px!important;
  box-sizing:border-box!important;
  background:rgba(8,8,8,.98)!important;
  border-bottom:1px solid #232323!important;
}
.dp-commerce-bag-panel > .mercury-bag-heading>div{display:flex!important;align-items:baseline!important;gap:6px!important}
.dp-commerce-bag-panel > .mercury-bag-heading span{font-size:14px!important;letter-spacing:.14em!important;color:#f3f3f3!important}
.dp-commerce-bag-panel > .mercury-bag-heading strong{font-size:12px!important;font-weight:600!important;letter-spacing:.13em!important;color:#ffd700!important}
.dp-commerce-bag-panel > .mercury-bag-heading .mercury-bag-close{
  position:relative!important;inset:auto!important;
  margin:0!important;padding:0!important;
  min-width:38px!important;width:38px!important;
  min-height:38px!important;height:38px!important;
  border:0!important;background:transparent!important;
  color:#fff!important;font-size:28px!important;font-weight:300!important;line-height:1!important;
  cursor:pointer!important;
}
/* Native header is superseded by the compact retail header after JS safely moves
   only the real X button (never the backdrop). */
.dp-commerce-bag-panel > .mercury-bag-native-header{display:none!important}

.dp-commerce-bag-panel > .dp-commerce-bag-items{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
.dp-commerce-bag-panel > .dp-commerce-bag-empty{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:auto!important;
}
.dp-commerce-bag-panel .dp-commerce-bag-item{
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:start!important;
  padding:18px 22px!important;
  border-bottom:1px solid #202020!important;
}
.dp-commerce-bag-panel .dp-commerce-bag-item-media{
  width:72px!important;height:72px!important;
  background:var(--shop-builder-image-bg,#f2eee7)!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;
}
.dp-commerce-bag-panel .dp-commerce-bag-item-media img{
  width:100%!important;height:100%!important;object-fit:contain!important;
  padding:6px!important;box-sizing:border-box!important;
}
.dp-commerce-bag-panel .dp-commerce-bag-item-copy{min-width:0!important}
.dp-commerce-bag-panel .dp-commerce-bag-item-copy>span{display:block!important;font-size:8px!important;letter-spacing:.14em!important;text-transform:uppercase!important;color:#777!important;margin-bottom:4px!important}
.dp-commerce-bag-panel .dp-commerce-bag-item-copy>strong{display:block!important;font-size:12px!important;line-height:1.25!important;color:#eee!important;font-weight:500!important}
.dp-commerce-bag-panel .dp-commerce-bag-item-copy>small{display:block!important;margin-top:4px!important;color:#777!important;font-size:9px!important}
.dp-commerce-bag-panel .dp-commerce-bag-item-price{font-size:13px!important;color:#eee!important;white-space:nowrap!important;text-align:right!important}
.dp-commerce-bag-panel .dp-commerce-bag-qty{display:inline-grid!important;grid-template-columns:30px 34px 30px!important;margin-top:10px!important;border:1px solid #333!important}
.dp-commerce-bag-panel .dp-commerce-bag-qty button,.dp-commerce-bag-panel .dp-commerce-bag-qty b{height:30px!important;min-height:30px!important;display:grid!important;place-items:center!important;background:#0b0b0b!important;color:#ddd!important;border:0!important;font-size:11px!important}
.dp-commerce-bag-panel .dp-commerce-bag-qty b{border-left:1px solid #333!important;border-right:1px solid #333!important;font-weight:500!important}
.dp-commerce-bag-panel .dp-commerce-bag-remove{display:block!important;margin-top:7px!important;padding:0!important;min-height:0!important;background:transparent!important;border:0!important;color:#777!important;text-decoration:underline!important;text-underline-offset:3px!important;font-size:9px!important;text-transform:none!important;letter-spacing:0!important}

.dp-commerce-bag-panel > [data-bag-footer]{
  position:relative!important;
  bottom:auto!important;
  flex:0 0 auto!important;
  z-index:6!important;
  width:100%!important;
  padding:18px 22px 20px!important;
  box-sizing:border-box!important;
  background:#080808!important;
  border-top:1px solid #2a2a2a!important;
}
.dp-commerce-bag-panel [data-bag-subtotal]{font-size:22px!important;color:#ffd700!important;font-weight:500!important}
.dp-commerce-bag-panel .dp-commerce-checkout{width:100%!important;min-height:50px!important;margin-top:14px!important}
.dp-commerce-bag-panel .dp-commerce-checkout.is-ready,
.dp-commerce-bag-panel .dp-commerce-checkout[data-checkout-state="ready"]{
  background:#ffd700!important;color:#080808!important;border-color:#ffd700!important;cursor:pointer!important
}
.dp-commerce-bag-panel .dp-commerce-checkout.is-disabled,
.dp-commerce-bag-panel .dp-commerce-checkout:disabled{
  opacity:1!important;background:#101010!important;color:#5e5e5e!important;border-color:#303030!important;cursor:not-allowed!important
}
.dp-commerce-bag-panel .mercury-checkout-note{display:block!important;margin-top:9px!important;text-align:center!important;color:#777!important;font-size:9px!important;line-height:1.4!important}

@media(max-width:650px){
  .dp-commerce-bag[data-bag-drawer] > .dp-commerce-bag-panel{
    width:100vw!important;max-width:none!important;
    border-left:0!important;
  }
  .dp-commerce-bag-panel > .mercury-bag-heading{padding:16px!important}
  .dp-commerce-bag-panel .dp-commerce-bag-item{grid-template-columns:64px minmax(0,1fr) auto!important;padding:15px 16px!important}
  .dp-commerce-bag-panel > [data-bag-footer]{padding:16px!important}
}
