/* SST QO Favorites · ★ on rows + "Favorites" tab/panel. Scoped to .sst-qo; follows the site theme switch. */
.sst-qo .sst-qof-star,
.sst-qo .sst-qof-tab,
.sst-qof-panel {
  --sst-qof-ink: #1a1a1a;
  --sst-qof-muted: #656565;
  --sst-qof-paper: #fff;
  --sst-qof-rule: #ececec;
  --sst-qof-accent: #9e2c5f;
  --sst-qof-accent-hover: #84234e;
  --sst-qof-star: #f5b301;
  --sst-qof-star-ring: rgba(0, 0, 0, .12);
  --sst-qof-ok: #1f7a43;
  --sst-qof-focus: #1d4ed8;
  --sst-qof-font: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  box-sizing: border-box;
}
html[data-sst-theme="dark"] .sst-qo .sst-qof-star,
html[data-sst-theme="dark"] .sst-qo .sst-qof-tab,
html[data-sst-theme="dark"] .sst-qof-panel {
  --sst-qof-ink: var(--sst-ink);
  --sst-qof-muted: var(--sst-muted);
  --sst-qof-paper: var(--sst-paper);
  --sst-qof-rule: var(--sst-line);
  --sst-qof-accent: var(--sst-accent);
  --sst-qof-accent-hover: var(--sst-accent-dark);
  --sst-qof-star: var(--sst-stars, #fbbf24);
  --sst-qof-star-ring: rgba(255, 255, 255, .18);
  --sst-qof-ok: var(--sst-ok-text, #4ade80);
  --sst-qof-focus: var(--sst-focus);
}

/* ---------- ★ on each row (first cell) ---------- */
.sst-qo .sst-qof-cell { position: relative; }
.sst-qo button.sst-qof-star {
  appearance: none;
  position: absolute;
  top: 2px;
  left: 2px; /* card view: over the photo's top-left corner, clear of the badges and the product name on the right */
  z-index: 3;
  width: 32px !important;
  height: 32px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  border: 1px solid var(--sst-qof-star-ring) !important;
  border-radius: 50% !important;
  background: var(--sst-qof-paper) !important;
  color: var(--sst-qof-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  transition: transform 120ms ease, color 120ms ease;
}
.sst-qo button.sst-qof-star svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.sst-qo button.sst-qof-star:hover { color: var(--sst-qof-star); transform: scale(1.06); }
.sst-qo button.sst-qof-star[aria-pressed="true"] { color: var(--sst-qof-star); }
.sst-qo button.sst-qof-star[aria-pressed="true"] svg { fill: currentColor; }
.sst-qo button.sst-qof-star:focus-visible { outline: 2px solid var(--sst-qof-focus); outline-offset: 2px; }
.sst-qo button.sst-qof-star.is-pop { animation: sst-qof-pop 260ms ease; }
@keyframes sst-qof-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
/* list view: the first cell is a horizontal row with a small thumbnail; keep the ★ clear of the name */
.sst-qo.sst-qo--list .sst-qof-cell { padding-right: 40px !important; }
.sst-qo.sst-qo--list button.sst-qof-star { top: 50%; left: auto; right: 4px; transform: translateY(-50%); width: 28px !important; height: 28px !important; }
.sst-qo.sst-qo--list button.sst-qof-star:hover { transform: translateY(-50%) scale(1.06); }
.sst-qo.sst-qo--list button.sst-qof-star svg { width: 16px; height: 16px; }
/* narrow cards (2 per row on phones): smaller ★ */
@media (max-width: 749px) {
  .sst-qo:not(.sst-qo--list) button.sst-qof-star { width: 28px !important; height: 28px !important; }
  .sst-qo:not(.sst-qo--list) button.sst-qof-star svg { width: 16px; height: 16px; }
}
/* the tab is hidden until the visitor has saved something (native [hidden] rule hides .sst-qo__tab) */
.sst-qo button.sst-qof-tab[hidden] { display: none !important; }
.sst-qof-panel .sst-qof-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sst-qof-panel .sst-qof-head .sst-qof-title { margin: 0; }
.sst-qof-panel .sst-qof-back--top { min-height: 32px; }
/* TOP cards share the row markup */
.sst-qo .sst-top-block .sst-qof-cell { position: relative; }
/* row flash after "Show in list" */
.sst-qo tr.sst-qof-flash { outline: 2px solid var(--sst-qof-accent, #9e2c5f); outline-offset: -2px; transition: outline-color 1.2s ease; }

/* ---------- tab ---------- */
.sst-qo button.sst-qof-tab {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px !important;
  padding: 10px 14px;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--sst-qof-muted) !important;
  font-family: var(--sst-qof-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: none !important;
}
.sst-qo button.sst-qof-tab .sst-qof-tab-star { color: var(--sst-qof-star); font-size: 15px; line-height: 1; }
.sst-qo button.sst-qof-tab[aria-pressed="true"] { color: var(--sst-qof-ink) !important; border-bottom-color: var(--sst-qof-accent) !important; }
.sst-qo button.sst-qof-tab .sst-qof-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--sst-qof-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}
.sst-qo button.sst-qof-tab .sst-qof-count[hidden] { display: none !important; }

/* ---------- open state: hide the catalog like the coupon tab does ---------- */
.sst-qof-panel[hidden] { display: none !important; }
.sst-qof--open .sst-qo__group,
.sst-qof--open .sst-top-block,
.sst-qof--open [data-qo-subgroup-tabs],
.sst-qof--open [data-qo-damaged-grade-tabs],
.sst-qof--open .sst-qo__count-top,
.sst-qof--open .sst-qct-panel { display: none !important; }
.sst-qof--open [data-qo-family-tabs] [data-qo-family-tab] { border-bottom-color: transparent !important; transition: none !important; }

/* ---------- panel ---------- */
.sst-qof-panel {
  min-width: 0;
  padding: 20px 0 32px;
  background: var(--sst-qof-paper);
  color: var(--sst-qof-ink);
  font-family: var(--sst-qof-font);
  overflow-wrap: anywhere;
}
.sst-qof-panel .sst-qof-title { margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.sst-qof-panel .sst-qof-hint, .sst-qof-panel .sst-qof-empty { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--sst-qof-muted); }
.sst-qof-panel .sst-qof-empty { font-weight: 600; color: var(--sst-qof-ink); }
.sst-qof-panel .sst-qof-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.sst-qof-panel .sst-qof-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--sst-qof-rule);
  border-radius: 10px;
  background: var(--sst-qof-paper);
}
.sst-qof-panel .sst-qof-item-img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--sst-qof-rule); border-radius: 6px; background: #fafafa; }
html[data-sst-theme="dark"] .sst-qof-panel .sst-qof-item-img { background: var(--sst-surface, #1a1a1c); }
.sst-qof-panel .sst-qof-item-body { min-width: 0; display: grid; gap: 4px; }
.sst-qof-panel .sst-qof-item-name { font-size: 14px; font-weight: 700; color: var(--sst-qof-ink); text-decoration: none; line-height: 1.35; }
.sst-qof-panel .sst-qof-item-name:hover { text-decoration: underline; }
.sst-qof-panel .sst-qof-item-price { margin: 0; font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.sst-qof-panel .sst-qof-item-price strong { font-weight: 800; }
.sst-qof-panel .sst-qof-delta { font-size: 12px; color: var(--sst-qof-muted); }
.sst-qof-panel .sst-qof-delta.is-down { color: var(--sst-qof-ok); font-weight: 700; }
.sst-qof-panel .sst-qof-delta.is-up { color: var(--sst-qof-accent); font-weight: 700; }
.sst-qof-panel .sst-qof-item-stock { margin: 0; font-size: 12px; font-weight: 700; color: var(--sst-qof-muted); }
.sst-qof-panel .sst-qof-item-stock.is-in { color: var(--sst-qof-ok); }
.sst-qof-panel .sst-qof-item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
/* per-offer live price + cart controls (proxy to the row's own −/+ buttons) */
.sst-qof-panel .sst-qof-offers { display: grid; gap: 6px; margin: 4px 0 2px; }
.sst-qof-panel .sst-qof-offer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--sst-qof-rule); border-radius: 8px; background: var(--sst-qof-paper); }
.sst-qof-panel .sst-qof-offer.is-in-cart { border-color: var(--sst-qof-accent); }
.sst-qof-panel .sst-qof-offer--off { opacity: .75; }
.sst-qof-panel .sst-qof-offer-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.sst-qof-panel .sst-qof-offer-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sst-qof-muted); }
.sst-qof-panel .sst-qof-offer-price { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--sst-qof-ink); }
.sst-qof-panel .sst-qof-offer-stock { font-size: 11px; font-weight: 700; color: var(--sst-qof-muted); }
.sst-qof-panel .sst-qof-offer-stock.is-in { color: var(--sst-qof-ok); }
.sst-qof-panel .sst-qof-qty { display: inline-flex; align-items: center; border: 1px solid var(--sst-qof-rule); border-radius: 999px; overflow: hidden; flex: none; }
.sst-qof-panel .sst-qof-qty-btn { appearance: none; width: 36px; height: 34px; border: 0; background: transparent; color: var(--sst-qof-ink); font: inherit; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; }
.sst-qof-panel .sst-qof-qty-btn--plus { background: var(--sst-qof-accent); color: #fff; }
.sst-qof-panel .sst-qof-qty-btn--plus:hover { background: var(--sst-qof-accent-hover); }
.sst-qof-panel .sst-qof-qty-btn.is-pop { animation: sst-qof-pop 220ms ease; }
.sst-qof-panel .sst-qof-qty-btn:focus-visible { outline: 2px solid var(--sst-qof-focus); outline-offset: -2px; }
.sst-qof-panel .sst-qof-qty-count { min-width: 32px; text-align: center; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sst-qof-panel .sst-qof-btn,
.sst-qof-panel .sst-qof-back,
.sst-qof-panel .sst-qof-clear {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sst-qof-accent);
  border-radius: 999px;
  background: var(--sst-qof-accent);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.sst-qof-panel .sst-qof-btn:hover, .sst-qof-panel .sst-qof-back:hover, .sst-qof-panel .sst-qof-clear:hover { background: var(--sst-qof-accent-hover); border-color: var(--sst-qof-accent-hover); }
.sst-qof-panel .sst-qof-btn--quiet, .sst-qof-panel .sst-qof-clear, .sst-qof-panel .sst-qof-back { background: transparent; color: var(--sst-qof-accent); }
.sst-qof-panel .sst-qof-btn--quiet:hover, .sst-qof-panel .sst-qof-clear:hover, .sst-qof-panel .sst-qof-back:hover { background: rgba(158, 44, 95, .08); color: var(--sst-qof-accent); }
.sst-qof-panel .sst-qof-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sst-qof-panel .sst-qof-btn:focus-visible, .sst-qof-panel .sst-qof-back:focus-visible, .sst-qof-panel .sst-qof-clear:focus-visible { outline: 2px solid var(--sst-qof-focus); outline-offset: 2px; }
@media (min-width: 760px) {
  .sst-qof-panel .sst-qof-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .sst-qof-panel .sst-qof-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sst-qo button.sst-qof-star, .sst-qo button.sst-qof-star.is-pop { transition: none; animation: none; }
}
