/* ───── Cart Toast (shared across pages) ───── */

.cart-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: min(480px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-lg);
  background: var(--colors-surface-card);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cart-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cart-toast img {
  display: block;
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: var(--rounded-sm);
  object-fit: contain;
  object-position: center;
  background: var(--colors-canvas-soft);
}

.cart-toast-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cart-toast-copy span {
  color: var(--colors-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
}

.cart-toast-copy strong {
  overflow: hidden;
  color: var(--colors-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-toast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--colors-muted);
  font-size: 13px;
  line-height: 18px;
}

.cart-toast-meta > span:not(:last-child)::after {
  margin-left: 8px;
  color: var(--colors-hairline-strong);
  content: "/";
}

.cart-toast-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-toast-color::before {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(38, 37, 30, 0.18);
  border-radius: var(--rounded-xs);
  background: var(--toast-color);
  content: "";
}

.toast-action,
.toast-close {
  min-height: 32px;
  border: 1px solid var(--colors-hairline);
  border-radius: var(--rounded-md);
  background: var(--colors-surface-card);
  color: var(--colors-ink);
  box-shadow: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.toast-action {
  display: grid;
  place-items: center;
  width: 32px;
  padding: 0;
  border-radius: var(--rounded-pill);
}

.toast-close {
  display: grid;
  place-items: center;
  width: 32px;
  padding: 0;
  border-radius: var(--rounded-pill);
  line-height: 1;
}

.toast-action [data-lucide] {
  width: 14px;
  height: 14px;
}

@media (max-width: 767px) {
  .cart-toast {
    right: 16px;
    bottom: 16px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .cart-toast img {
    width: 44px;
    height: 44px;
  }

  .toast-close {
    grid-column: 3;
    grid-row: 1;
  }

  .toast-action {
    grid-column: 2 / 4;
    justify-self: start;
  }
}
