/* Cart bottom sheet: kept separate from the archived group-order stylesheet. */
body .asw-header-sheet.is-cart.asw-sh-sheet {
  --asw-sh-sheet-width: 560px;
  --asw-sh-sheet-min-height: 0;
  --asw-sh-sheet-max-height: min(88vh, 720px);
  --asw-sh-sheet-max-height-dvh: min(88dvh, 720px);
  --asw-sh-sheet-gap: 0.6rem;
  --asw-sh-sheet-pad-x: 0.85rem;
  --asw-sh-sheet-pad-top: 0.55rem;
  --asw-sh-sheet-pad-bottom: 0.8rem;
}

body .asw-header-sheet.is-cart .asw-header-sheet-panel {
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

body .asw-header-sheet.is-cart .asw-header-sheet-head {
  padding: 0 0 0.65rem;
  padding-inline-start: 2.65rem;
}

body .asw-header-sheet.is-cart .asw-header-sheet-body {
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart {
  display: grid;
  gap: 0.58rem;
  height: auto;
  min-height: 0;
}

body .asw-header-sheet.is-cart .asw-header-cart-simple {
  display: grid;
  gap: 0.48rem;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body .asw-header-sheet.is-cart .asw-header-cart-simple h4 {
  margin: 0;
  color: var(--asw-text, #111827);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.45;
}

body .asw-header-sheet.is-cart .asw-header-cart-simple-list {
  display: grid;
  gap: 0.48rem;
  max-height: min(35vh, 300px);
  min-height: 0;
  padding-inline-end: 1px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  min-height: 88px;
  padding: 0.55rem;
  padding-inline-end: 2.55rem;
  border: 1px solid rgba(17, 24, 39, 0.09);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 70px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 10px;
  background: #fff;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-img img {
  width: 100%;
  height: 100%;
  padding: 0.18rem;
  object-fit: contain;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-copy {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-name {
  display: -webkit-box;
  overflow: hidden;
  color: var(--asw-text, #111827);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.5;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-total {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  color: #6b7280;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.35;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-total strong {
  color: var(--asw-primary, #681ce2);
  font-size: 0.8rem;
  font-weight: 950;
  white-space: nowrap;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-qty {
  display: inline-grid;
  grid-template-columns: 29px minmax(24px, auto) 29px;
  align-items: center;
  gap: 0.12rem;
  flex: 0 0 auto;
  padding: 0.14rem;
  border: 1px solid rgba(104, 28, 226, 0.14);
  border-radius: 10px;
  background: #f7f4ff;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-qty button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  min-width: 29px;
  min-height: 29px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--asw-primary, #681ce2);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-qty button:disabled,
body .asw-header-sheet.is-cart .asw-header-sheet-cart-qty button.is-loading {
  opacity: 0.4;
  pointer-events: none;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-qty > span {
  min-width: 24px;
  color: var(--asw-text, #111827);
  font-size: 0.73rem;
  font-weight: 950;
  text-align: center;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-remove {
  position: absolute;
  top: 0.48rem;
  inset-inline-end: 0.48rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(190, 24, 93, 0.13);
  border-radius: 9px;
  background: #fff5f7;
  color: #be185d;
  box-shadow: none;
  font: inherit;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

body .asw-header-sheet.is-cart .asw-header-sheet-cart-type,
body .asw-header-sheet.is-cart .asw-header-sheet-cart-meta,
body .asw-header-sheet.is-cart .asw-header-sheet-cart-chips,
body .asw-header-sheet.is-cart .asw-header-sheet-cart-side {
  display: none;
}

body .asw-header-sheet.is-cart .asw-header-cart-added-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.52rem 0.65rem;
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: 10px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.4;
}

body .asw-header-sheet.is-cart .asw-header-cart-added-message span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-weight: 950;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon {
  display: grid;
  gap: 0.35rem;
  padding: 0.48rem;
  border: 1px dashed rgba(104, 28, 226, 0.2);
  border-radius: 10px;
  background: #faf8ff;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.38rem;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-form input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 9px;
  background: #fff;
  color: var(--asw-text, #111827);
  box-shadow: none;
  font: inherit;
  font-size: 0.72rem;
  outline: 0;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-form input:focus {
  border-color: rgba(104, 28, 226, 0.48);
  box-shadow: 0 0 0 3px rgba(104, 28, 226, 0.08);
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-form button {
  min-width: 66px;
  min-height: 38px;
  margin: 0;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(104, 28, 226, 0.18);
  border-radius: 9px;
  background: #fff;
  color: var(--asw-primary, #681ce2);
  box-shadow: none;
  font: inherit;
  font-size: 0.71rem;
  font-weight: 900;
  cursor: pointer;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-feedback {
  margin: 0;
  color: #166534;
  font-size: 0.68rem;
  font-weight: 800;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-feedback.is-error {
  color: #b42318;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-active > span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 28px;
  padding: 0.15rem 0.42rem;
  border: 1px solid rgba(22, 101, 52, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #166534;
  font-size: 0.68rem;
}

body .asw-header-sheet.is-cart .asw-header-cart-coupon-active button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 101, 52, 0.1);
  color: inherit;
  font: inherit;
  line-height: 1;
}

body .asw-header-sheet.is-cart .asw-header-sheet-totals {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}

body .asw-header-sheet.is-cart .asw-header-sheet-total {
  min-height: 39px;
  padding: 0.48rem 0.65rem;
  border-radius: 9px;
  background: #f8fafc;
}

body .asw-header-sheet.is-cart .asw-header-sheet-total--grand {
  border: 1px solid rgba(104, 28, 226, 0.12);
  background: #f7f4ff;
  color: var(--asw-text, #111827);
}

body .asw-header-sheet.is-cart .asw-header-sheet-total--grand strong {
  color: var(--asw-primary, #681ce2);
}

body .asw-header-sheet.is-cart .asw-header-sheet-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  margin: 0;
}

body .asw-header-sheet.is-cart .asw-header-sheet-btn {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
}

body .asw-header-sheet.is-cart .asw-header-sheet-btn--primary {
  border-color: var(--asw-primary, #681ce2);
  background: var(--asw-primary, #681ce2);
  color: #fff;
  box-shadow: 0 8px 20px rgba(104, 28, 226, 0.18);
}

body .asw-header-sheet.is-cart .asw-header-sheet-btn--ghost {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #4b5563;
  box-shadow: none;
}

@media (min-width: 520px) {
  body .asw-header-sheet.is-cart .asw-header-sheet-actions {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  }

  body .asw-header-sheet.is-cart .asw-header-sheet-btn--ghost {
    min-height: 44px;
    border: 1px solid rgba(17, 24, 39, 0.09);
    background: #fff;
  }
}

@media (max-width: 380px) {
  body .asw-header-sheet.is-cart.asw-sh-sheet {
    --asw-sh-sheet-pad-x: 0.62rem;
  }

  body .asw-header-sheet.is-cart .asw-header-sheet-cart-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.48rem;
    padding: 0.48rem;
    padding-inline-end: 2.35rem;
  }

  body .asw-header-sheet.is-cart .asw-header-sheet-cart-img {
    width: 56px;
    height: 64px;
  }

  body .asw-header-sheet.is-cart .asw-header-sheet-cart-row-bottom {
    align-items: end;
  }
}
