/* tüsea — save-your-bag capture UI. Uses site tokens (tokens.css) with fallbacks
   so it degrades gracefully if loaded before them. BEM to match cart-drawer. */

/* --- drawer CTA (injected under Checkout) — buy-it-now rollover:
   black + neon pink at rest, inverts to pink + black on hover --- */
.cart-drawer__savebag {
  display: block;
  width: 100%;
  margin-top: var(--space-sm, 12px);
  padding: 14px 12px;
  font: inherit;
  font-size: var(--text-label, 11px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FF1493;
  font-weight: 800;
  background: #000;
  border: 1px solid #000;
  cursor: pointer;
  transition: background var(--dur-fast, 0.15s) var(--ease, ease), color var(--dur-fast, 0.15s) var(--ease, ease);
}
.cart-drawer__savebag:hover,
.cart-drawer__savebag:focus-visible {
  background: #FF1493;
  color: #000;
}
.cart-drawer__savebag-hint {
  margin: 8px 2px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted, #8a8578);
}

/* --- sheet (modal) --- */
.savebag-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 22, 0.45);
  z-index: 1000;
  animation: savebag-fade var(--dur-fade, 0.2s) var(--ease, ease);
}
.savebag-sheet {
  position: fixed;
  z-index: 1001;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  background: var(--surface, #fff);
  color: var(--ink, #161616);
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -18px 50px -24px rgba(22, 22, 22, 0.4);
  animation: savebag-rise var(--dur-mid, 0.28s) var(--ease-sheet, cubic-bezier(0.22, 1, 0.36, 1));
}
@media (min-width: 700px) {
  .savebag-sheet {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
  }
}
.savebag-sheet__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted, #8a8578);
  cursor: pointer;
}
.savebag-sheet__title {
  font-family: var(--serif, inherit);
  font-size: var(--text-display, 22px);
  line-height: 1.2;
  margin: 0 0 8px;
}
.savebag-sheet__sub {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #6d685f);
  margin: 0 0 18px;
}
.savebag-sheet__shop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  font: inherit;
  font-size: var(--text-label, 11px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #5a31f4;              /* Shop purple */
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.savebag-sheet__shop[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
/* Sign in with Shop — Shopify's SDK renders its own button into the mount. */
.savebag-sheet__shop-mount { min-height: 44px; }
.savebag-sheet__shop-mount:empty { min-height: 0; }
.savebag-sheet__or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  color: var(--text-muted, #8a8578);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.savebag-sheet__or::before,
.savebag-sheet__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #e3e0da);
}
.savebag-sheet__form { display: block; }
.savebag-sheet__email {
  width: 100%;
  padding: 13px 14px;
  margin-top: 10px;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--line, #e3e0da);
  border-radius: 3px;
  background: var(--surface, #fff);
  color: var(--ink, #161616);
}
.savebag-sheet__email:focus-visible {
  outline: none;
  border-color: var(--ink, #161616);
}
.savebag__consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted, #6d685f);
}
.savebag__consent-box { margin-top: 2px; flex: 0 0 auto; }
.savebag-sheet__save {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font: inherit;
  font-size: var(--text-label, 11px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--surface, #fff);
  background: var(--ink, #161616);
  border: 1px solid var(--ink, #161616);
  cursor: pointer;
}
.savebag-sheet__save[disabled] { opacity: 0.5; cursor: default; }
.savebag-sheet__status { margin: 10px 0 0; font-size: 12px; }
.savebag-sheet__status--err { color: #a33; }
.savebag-sheet__ok {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink, #161616);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 12px;
}
/* Confirmation: primary checkout = buy-it-now rollover (black+pink → pink+black) */
.savebag-sheet__checkout {
  width: 100%;
  margin-top: 6px;
  padding: 15px;
  font: inherit;
  font-size: var(--text-label, 11px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #FF1493;
  font-weight: 800;
  background: #000;
  border: 1px solid #000;
  cursor: pointer;
  transition: background var(--dur-fast, 0.15s) var(--ease, ease), color var(--dur-fast, 0.15s) var(--ease, ease);
}
.savebag-sheet__checkout:hover,
.savebag-sheet__checkout:focus-visible {
  background: #FF1493;
  color: #000;
}
.savebag-sheet__later {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8578);
  background: none;
  border: none;
  cursor: pointer;
}
.savebag-sheet__later:hover { color: var(--ink, #161616); }
/* Code is reassurance, not the mechanism — small, tappable to copy */
.savebag-sheet__code {
  text-align: center;
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8578);
  cursor: pointer;
}
.savebag-sheet__code:hover { color: var(--ink, #161616); }
body.savebag-open { overflow: hidden; }

/* --- cart-drawer upsell ("Pairs well with") — Triangl-style cross-sell --- */
.cart-upsell {
  border-top: 1px solid var(--line, #e3e0da);
  /* Align with the drawer body/footer content (they use --space-lg horizontal) */
  padding: 14px var(--space-lg, 24px) 4px;
}
.cart-upsell__title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8578);
  margin: 0 0 12px;
}
.cart-upsell__row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.cart-upsell__row::-webkit-scrollbar { height: 0; }
.cart-upsell__card {
  flex: 0 0 118px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.cart-upsell__img {
  width: 118px;
  height: 148px;
  object-fit: cover;
  display: block;
  background: var(--surface-alt, #f0ede8);
}
.cart-upsell__name {
  font-size: 11px;
  line-height: 1.35;
  margin: 7px 0 2px;
}
.cart-upsell__price { font-size: 11px; color: var(--text-muted, #6d685f); }
.cart-upsell__add {
  display: inline-block;
  margin-top: 5px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink, #161616);
  border-bottom: 1px solid var(--ink, #161616);
  padding-bottom: 1px;
}

@keyframes savebag-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes savebag-rise { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) {
  .savebag-overlay, .savebag-sheet { animation: none; }
}
