.bbe-cart-drawer {
  --cart-ink: #121b3b;
  --cart-muted: #566179;
  --cart-border: #dce2ea;
  --cart-pad: 20px;
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 440px);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #fff;
  color: var(--cart-ink);
  box-shadow: -14px 0 36px #0b142234;
  font: 14px/1.45 "Manrope", "Noto Sans HK", "PingFang HK", system-ui, sans-serif;
}
.bbe-cart-drawer:not([open]), .bbe-cart-drawer [hidden] { display: none !important; }
.bbe-cart-drawer[open] { animation: bbe-cart-slide 240ms cubic-bezier(.2,.7,.3,1) both; }
.bbe-cart-drawer::backdrop { background: #121b3b73; animation: bbe-cart-fade 200ms ease-out; }
.bbe-cart-drawer.is-closing { animation: bbe-cart-exit 180ms ease-in both; }
.bbe-cart-drawer.is-closing::backdrop { animation: bbe-cart-fade 180ms ease-in reverse both; }
@keyframes bbe-cart-slide { from { transform: translateX(100%); } }
@keyframes bbe-cart-exit { to { transform: translateX(100%); } }
@keyframes bbe-cart-fade { from { opacity: 0; } to { opacity: 1; } }

.bbe-cart-dialog-open { overflow: hidden; }
.bbe-cart-panel { display: flex; flex-direction: column; height: 100%; }
.bbe-cart-drawer svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.bbe-cart-drawer button { cursor: pointer; font: inherit; }
.bbe-cart-drawer a:focus-visible, .bbe-cart-drawer button:focus-visible { outline: 2px solid #356dd0; outline-offset: 3px; }
.bbe-cart-head { display: flex; align-items: center; gap: 8px; box-sizing: border-box; padding: 9px var(--cart-pad); border-bottom: 1px solid var(--cart-border); }
.bbe-cart-head h2 { padding: 0; margin: 0; font: inherit; font-size: 22px; font-weight: 750; color: inherit; }
.bbe-cart-count { padding: 3px 7px; border-radius: 4px; color: #495570; background: #edf1f7; font-size: 12px; font-weight: 650; }
.bbe-cart-close { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 -8px 0 auto; padding: 0; border: 0; border-radius: 5px; background: transparent; color: inherit; }
.bbe-cart-close:hover { background: #edf1f7; }
.bbe-cart-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px var(--cart-pad); }
.bbe-cart-added { display: flex; align-items: center; gap: 7px; margin: 0 0 5px; color: #22634e; font-size: 13px; font-weight: 650; }
.bbe-cart-added svg { width: 16px; height: 16px; }
.bbe-cart-items { margin: 0; padding: 0; list-style: none; }
.bbe-cart-item { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 11px; padding: 11px 0; }
.bbe-cart-item + .bbe-cart-item { border-top: 1px solid var(--cart-border); }
.bbe-cart-item-photo { width: 66px; height: 66px; border: 1px solid #e1e6ed; border-radius: 6px; object-fit: contain; background: #fff; }
.bbe-cart-item-title { padding: 0; margin: 0; color: inherit; font: inherit; font-weight: 720; overflow-wrap: anywhere; }
.bbe-cart-item-detail { margin: 2px 0 0; color: var(--cart-muted); font-size: 12px; overflow-wrap: anywhere; }
.bbe-cart-item-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 8px; margin-top: 4px; font-size: 12px; color: var(--cart-muted); }
.bbe-cart-item-meta strong { color: var(--cart-ink); font-size: 14px; font-weight: 750; white-space: nowrap; }
.bbe-cart-foot {
  display: block;
  position: static;
  flex: none;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border-top: 1px solid var(--cart-border);
  padding: 12px var(--cart-pad) max(8px, env(safe-area-inset-bottom));
  background: #f8f9fc;
}
.bbe-cart-points { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 10px; border-radius: 5px; color: #5e471c; background: #f7efda; font-size: 13px; font-weight: 650; }
.bbe-cart-points svg { width: 16px; height: 16px; }
.bbe-cart-points strong { margin-inline-start: auto; white-space: nowrap; }
.bbe-cart-totals { margin: 9px 0 0; font-variant-numeric: tabular-nums; }
.bbe-cart-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bbe-cart-totals dd { margin: 0; white-space: nowrap; }
.bbe-cart-discount { color: #22634e; padding-block: 3px; font-size: 13px; }
.bbe-cart-total { color: var(--cart-ink); font-size: 16px; font-weight: 750; }
.bbe-cart-discount + .bbe-cart-total { margin-top: 5px; padding-top: 7px; border-top: 1px solid var(--cart-border); }
.bbe-cart-total dd { font-size: 27px; line-height: 1.1; letter-spacing: -.025em; }
.bbe-cart-payments { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 11px 0; }
.bbe-cart-payments img { display: block; height: auto; max-width: 100%; }
.bbe-cart-payments img + img { max-width: calc(100% - 38px); }
.bbe-cart-checkout { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; border-radius: 5px; background: var(--cart-ink); color: #fff !important; font-weight: 750; text-decoration: none !important; }
.bbe-cart-checkout:hover { background: #25365d; }
.bbe-cart-continue { display: block; min-height: 38px; margin: 0 auto; padding: 5px 11px; border: 0; border-radius: 5px; background: transparent; color: #495570; font-weight: 650 !important; text-underline-offset: 3px; }
.bbe-cart-continue:hover { text-decoration: underline; }
@media (max-width: 370px) { .bbe-cart-drawer { --cart-pad: 14px; } }
@media (max-height: 520px) {
  .bbe-cart-head, .bbe-cart-foot { padding-top: 5px; padding-bottom: 5px; }
  .bbe-cart-payments { margin-block: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .bbe-cart-drawer[open], .bbe-cart-drawer::backdrop, .bbe-cart-drawer.is-closing, .bbe-cart-drawer.is-closing::backdrop { animation: none; }
}
