/* Shaylor — Add-to-cart toast notification
   Loaded site-wide. Self-contained tokens so it never depends on page CSS. */

:root {
  --oat-50:  #faf6ef;
  --oat-100: #f3ece0;
  --oat-200: #e8dcc7;
  --oat-300: #d4c2a3;
  --oat-400: #a89378;
  --ink-900: #2a2520;
  --ink-700: #4a4138;
  --ink-500: #6b5d52;
  --green:   #559924;
}

/* ── Toast shell ──────────────────────────────────────────────────────────── */
.shaylor-toast {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 100000;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--oat-200);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(42, 37, 32, 0.16);
  padding: 18px 18px 16px;
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;

  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.shaylor-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.shaylor-toast[hidden] { display: none; }

/* ── Close button ─────────────────────────────────────────────────────────── */
.shaylor-toast .st-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--oat-400);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.shaylor-toast .st-close:hover {
  background: var(--oat-100);
  color: var(--ink-900);
}

/* ── Header row ───────────────────────────────────────────────────────────── */
.shaylor-toast .st-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-right: 24px;
}
.shaylor-toast .st-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.shaylor-toast .st-title {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-700);
}

/* ── Item row ─────────────────────────────────────────────────────────────── */
.shaylor-toast .st-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shaylor-toast .st-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--oat-100);
  flex: 0 0 auto;
}
.shaylor-toast .st-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shaylor-toast .st-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.shaylor-toast .st-name {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.shaylor-toast .st-itemprice {
  font-size: 13px;
  color: var(--ink-500);
}

/* ── Cart meta line ───────────────────────────────────────────────────────── */
.shaylor-toast .st-meta {
  margin: 14px 0;
  padding: 10px 12px;
  background: var(--oat-50);
  border: 1px solid var(--oat-200);
  border-radius: 10px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-700);
  text-align: center;
}
.shaylor-toast .st-meta:empty { display: none; }

/* ── Actions ──────────────────────────────────────────────────────────────── */
.shaylor-toast .st-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shaylor-toast .st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.shaylor-toast .st-btn:active { transform: translateY(1px); }
.shaylor-toast .st-ghost {
  border: 1px solid var(--oat-300);
  color: var(--ink-900);
  background: transparent;
}
.shaylor-toast .st-ghost:hover {
  background: var(--oat-100);
  border-color: var(--ink-900);
}
.shaylor-toast .st-solid {
  background: var(--ink-900);
  color: #fff;
}
.shaylor-toast .st-solid:hover { background: #1d1915; }

/* ── Mobile: slide up from the bottom, full width ─────────────────────────── */
@media (max-width: 767px) {
  .shaylor-toast {
    top: auto;
    bottom: 14px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: translateY(24px);
  }
  .shaylor-toast.is-visible { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .shaylor-toast { transition: opacity 0.2s ease; transform: none; }
  .shaylor-toast.is-visible { transform: none; }
}
