/* v490 · Xiaomi / Android cart scroll stability
   One vertical scroller only. No nested momentum, no layout containment glitches. */

body.drawer-open{
  overflow:hidden!important;
  touch-action:auto!important;
}

html body #cartDrawer.drawer{
  contain:none!important;
}

html body #cartDrawer.drawer.show{
  will-change:auto!important;
}

html body #cartDrawer .drawer-body{
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:12px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  overscroll-behavior-x:none!important;
  -webkit-overflow-scrolling:auto!important;
  scroll-behavior:auto!important;
  scroll-snap-type:none!important;
  scrollbar-gutter:auto!important;
  touch-action:pan-y!important;
  overflow-anchor:none!important;
  contain:none!important;
}

html body #cartDrawer #cartItems,
html body #cartDrawer #addonList,
html body #cartDrawer .addon-list,
html body #cartDrawer .cart-addons-pro-list,
html body #cartDrawer .cart-details{
  flex:0 0 auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  -webkit-overflow-scrolling:auto!important;
  scroll-behavior:auto!important;
  scroll-snap-type:none!important;
  touch-action:auto!important;
  contain:none!important;
}

html body #cartDrawer #cartItems{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  width:100%!important;
}

html body #cartDrawer .cart-item{
  flex:0 0 auto!important;
  min-height:0!important;
  height:auto!important;
  contain:none!important;
  content-visibility:visible!important;
  overflow:visible!important;
  transform:none!important;
}

html body #cartDrawer .cart-item-main,
html body #cartDrawer .cart-item-copy,
html body #cartDrawer .cart-item-foot{
  min-height:0!important;
  height:auto!important;
  contain:none!important;
}

html body #cartDrawer .cart-details:empty{
  display:none!important;
}

html body #cartDrawer .cart-details{
  padding:7px 9px!important;
  line-height:1.35!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}

html body #cartDrawer .cart-addons-pro,
html body #cartDrawer .checkout-panel{
  flex:0 0 auto!important;
  min-height:0!important;
  contain:none!important;
}

/* During a real swipe, action buttons temporarily ignore accidental release clicks. */
html body #cartDrawer.tv490-is-scrolling button[data-cart-plus],
html body #cartDrawer.tv490-is-scrolling button[data-cart-minus],
html body #cartDrawer.tv490-is-scrolling button[data-cart-remove],
html body #cartDrawer.tv490-is-scrolling button[data-addon-plus],
html body #cartDrawer.tv490-is-scrolling button[data-addon-minus],
html body #cartDrawer.tv490-is-scrolling button[data-v409-addon-plus],
html body #cartDrawer.tv490-is-scrolling button[data-v409-addon-minus]{
  pointer-events:none!important;
}

/* Performance mode must never virtualize the open cart. */
html.perf-lite body #cartDrawer,
html.perf-lite body #cartDrawer *,
html.tv-v289-lite body #cartDrawer,
html.tv-v289-lite body #cartDrawer *{
  content-visibility:visible!important;
  contain:none!important;
}

@media(max-width:760px){
  html body #cartDrawer.drawer.show{
    transform:none!important;
  }

  html body #cartDrawer .drawer-body{
    padding:10px 12px 14px!important;
  }

  html body #cartDrawer .drawer-foot{
    flex:0 0 auto!important;
  }
}
