.bag-line > .bag-line-image, .bag-line > .sw-photo-toggle { grid-area: 1 / 1; }
body[data-page="bag"] .bag-line > .sw-photo-toggle {
  align-self: end;
  justify-self: end;
  margin: 5px;
}
.bag-line .bag-quantity { flex-wrap: wrap; }
#bag-summary {
  padding: 0;
  margin: 0;
  background: transparent;
}
body[data-page="bag"] .bag-summary {
  margin: 0;
  border: 1px solid #deddd9;
  padding: clamp(16px, 3vw, 28px);
}
body[data-page="bag"] .bag-summary[hidden] { display: none; }
#bag-summary h2 { margin: 0 0 16px; }
.sw-bag-prices { margin: 0; padding: 0; }
.sw-bag-prices > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 5px;
  line-height: 1.45;
}
.sw-bag-prices dt, .sw-bag-prices dd { margin: 0; }
.sw-bag-prices dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-bag-prices .sw-bag-total {
  border-top: 1px solid #d9d8d4;
  margin-top: 7px;
  padding-top: 12px;
  font-weight: 650;
}
.sw-bag-prices .sw-bag-first { margin-top: 9px; }
#bag-summary .sw-bag-pricing-note, #shop-dialog .sw-bag-pricing-note,
#bag-summary .sw-bag-policy, #shop-dialog .sw-bag-policy {
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 0;
  color: #525252;
}
#bag-summary .sw-bag-policy, #shop-dialog .sw-bag-policy { margin-top: 12px; }
.sw-bag-policy a, #bag-summary .sw-bag-browse {
  text-decoration: underline;
  text-underline-offset: 3px;
}
#bag-summary .sw-bag-browse { display: inline-block; margin-top: 12px; font-size: 13px; }
#shop-dialog .sw-bag-prices { margin-top: 16px; }
.sw-bag-checkout .sw-bag-amount { display: none; }
.sw-bag-checkout .button { width: 100%; justify-content: center; }
@media (max-width: 700px) {
  body.sw-bag-has-items { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  html:has(body.sw-bag-has-items) { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  body[data-page="bag"] .bag-layout { margin-top: 18px; gap: 16px; }
  body[data-page="bag"] .bag-quantity button { min-width: 40px; min-height: 44px; }
  .sw-bag-checkout {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px max(14px, env(safe-area-inset-right, 0px)) calc(9px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    background: #fff;
    border-top: 1px solid #d9d8d4;
  }
  .sw-bag-checkout .sw-bag-amount { display: block; font-size: 12px; line-height: 1.3; }
  .sw-bag-amount strong { display: block; font-size: 15px; }
  body[data-page="bag"] .sw-bag-checkout .button {
    width: auto;
    min-height: 44px;
    padding: 10px 15px;
    margin: 0;
    text-align: center;
  }
  #shop-dialog .sw-shop-shell { max-height: 90vh; max-height: 90dvh; }
  #shop-dialog .sw-shop-body { min-height: 0; overflow-y: auto; }
}
