:root{
  --dd-sheet-z:5000;
  --dd-sheet-max-width:720px;
  --dd-sheet-max-height:min(88dvh,760px);
}

.dd-bottom-sheet{
  position:fixed;
  inset:0;
  z-index:var(--dd-sheet-z);
  display:block;
  padding:0;
  align-items:initial;
  justify-content:initial;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  pointer-events:none;
}
.dd-bottom-sheet__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.38);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease,visibility 0s linear .3s;
}
.dd-bottom-sheet__panel{
  position:absolute;
  left:50%;
  bottom:0;
  width:min(100%,var(--dd-sheet-max-width));
  max-width:none;
  max-height:var(--dd-sheet-max-height);
  margin:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:0;
  border-radius:20px 20px 0 0;
  background:#fff;
  box-shadow:0 -18px 50px rgba(15,23,42,.2);
  transform:translate(-50%,calc(100% + 28px));
  opacity:0;
  pointer-events:none;
  transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .2s ease;
}
.dd-bottom-sheet__handle{
  width:36px;
  height:4px;
  flex:0 0 auto;
  margin:8px auto 2px;
  border-radius:999px;
  background:#d7dce5;
}
.dd-bottom-sheet__header{
  min-height:48px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 12px 8px 16px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background:#fff;
}
.dd-bottom-sheet__title{
  min-width:0;
  overflow:hidden;
  color:#0f172a;
  font-size:.98rem;
  font-weight:950;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dd-bottom-sheet__close{
  position:static;
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:10px;
  background:transparent!important;
  color:#475569;
  box-shadow:none;
  cursor:pointer;
}
.dd-bottom-sheet__close svg{width:18px;height:18px;display:block;}
.dd-bottom-sheet__close:active{background:transparent!important;transform:translateY(1px);}
.dd-bottom-sheet__body{
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:14px;
}
.dd-bottom-sheet__footer{
  flex:0 0 auto;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:11px 14px calc(12px + env(safe-area-inset-bottom,0px));
  border-top:1px solid rgba(15,23,42,.08);
  background:#fff;
}
.dd-bottom-sheet.is-open,
.dd-bottom-sheet.open{pointer-events:auto;}
.dd-bottom-sheet.is-open .dd-bottom-sheet__backdrop,
.dd-bottom-sheet.open .dd-bottom-sheet__backdrop{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .22s ease,visibility 0s;
}
.dd-bottom-sheet.is-open .dd-bottom-sheet__panel,
.dd-bottom-sheet.open .dd-bottom-sheet__panel{
  transform:translate(-50%,0);
  opacity:1;
  pointer-events:auto;
}
body.dd-sheet-locked{overflow:hidden!important;}

/* 首页购物车清单是固定在结算栏上方的同一组件。 */
.dd-bottom-sheet--anchored{
  pointer-events:none;
}
.dd-bottom-sheet--anchored .dd-bottom-sheet__backdrop{
  position:fixed;
  inset:0 0 calc(var(--tab-h,56px) + env(safe-area-inset-bottom,0px)) 0;
}
.dd-bottom-sheet--anchored .dd-bottom-sheet__panel{
  left:0;
  bottom:0;
  width:100%;
  max-width:none;
  transform:translateY(calc(100% + 80px));
}
.dd-bottom-sheet--anchored.open .dd-bottom-sheet__panel,
.dd-bottom-sheet--anchored.is-open .dd-bottom-sheet__panel{
  transform:translateY(0);
}

@media(min-width:760px){
  .dd-bottom-sheet__panel{border-radius:20px 20px 0 0;}
}
@media(prefers-reduced-motion:reduce){
  .dd-bottom-sheet__backdrop,.dd-bottom-sheet__panel{transition-duration:.01ms!important;}
}
