/* =========================================================
   UR Invited — Catalog redesign (2026)
   Brings /catalog/ onto the unified "Joyful Premium" system:
   the catalog uses its own --c-* token namespace, so we remap
   those to the coral brand, then polish hero / tabs / cards.
   Loaded after catalog.css. Card buttons already use the
   shared .btn system (uv-brand.css), so they inherit coral.
   ========================================================= */
:root {
  --c-bg: #faf7f2;
  --c-surface: #ffffff;
  --c-surface-2: #ffffff;
  --c-offset: #f4eee5;
  --c-border: #e6ddce;
  --c-divider: #efe8dd;
  --c-text: #241f2a;
  --c-text-muted: #6d6675;
  --c-text-faint: #a79fac;
  --c-primary: #ef5b4c;
  --c-primary-hover: #e0473a;
  --c-accent: #e6a636;
  --c-accent-hover: #cc8f22;

  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.4rem;
  --r-2xl: 2rem;

  --shadow-card: 0 1px 2px rgba(46,28,22,0.05), 0 10px 28px -12px rgba(58,38,28,0.16);
  --shadow-lift: 0 26px 56px -24px rgba(70,44,34,0.30);
}

/* ---------- Header ---------- */
.cat-header {
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--c-divider);
}
.cat-logo { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.cat-logo svg { color: var(--c-primary); }
.cat-nav a { color: var(--c-text-muted); font-weight: 500; }
.cat-nav a:hover, .cat-nav a[aria-current="page"] { color: var(--c-primary); }

/* ---------- Hero ---------- */
.cat-hero { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.cat-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -0.02em; line-height: 1.03;
  color: var(--c-text);
}
.cat-hero p { color: var(--c-text-muted); }
.cat-hero__trust strong { color: var(--c-primary); }
.cat-search {
  margin: 1.5rem auto 0; max-width: 460px;
  border: 1.5px solid var(--c-border); border-radius: var(--r-full);
  background: var(--c-surface); box-shadow: var(--shadow-card);
}
.cat-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--brand-100, #fbe3de); }
.cat-search svg { color: var(--c-primary); }

/* ---------- Category tabs ---------- */
.cat-tabs { gap: 0.5rem; }
.cat-tab, .cat-tabs button {
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-weight: 600; font-size: 0.9rem;
  padding: 0.5rem 1rem;
  transition: all 160ms ease;
}
.cat-tab:hover, .cat-tabs button:hover { border-color: var(--c-primary); color: var(--c-primary); }
.cat-tab.is-active, .cat-tabs button.is-active, .cat-tabs [aria-selected="true"] {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
  box-shadow: var(--shadow-brand, 0 14px 30px -12px rgba(224,71,58,0.4));
}
.cat-tab[disabled], .cat-tabs button[disabled] { opacity: 0.55; }

/* ---------- Cards ---------- */
.cat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 240ms var(--ease-out, ease), box-shadow 240ms ease, border-color 240ms ease;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--brand-100, #fbe3de); }
.cat-card__stage { aspect-ratio: 9 / 16; background: var(--c-offset); }
.cat-card__live-badge {
  background: color-mix(in srgb, var(--c-text) 78%, transparent);
  color: #fff; font-weight: 600; letter-spacing: 0.06em;
  border-radius: var(--r-full);
}
.cat-card__body { padding: 1.15rem 1.25rem 1.35rem; }
.cat-card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--c-text); }
.cat-card__tagline { color: var(--c-text-muted); font-size: 0.92rem; }
.cat-card__badges { gap: 0.4rem; }
.cat-card__badge, .cat-card__badges span {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.28em 0.66em; border-radius: var(--r-full);
  background: var(--brand-050, #fdf1ee); color: var(--c-primary-hover); border: 1px solid var(--brand-100, #fbe3de);
}
.cat-card__price-amount { font-family: var(--font-display); font-weight: 700; color: var(--c-text); }
.cat-card__actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.cat-card__actions .btn { flex: 1; padding-inline: 0.75rem; }

/* Scene strip — playful tilt */
.cat-card__strip-frame { border-radius: var(--r-md); border: 1px solid var(--c-border); }

/* Keep the thumbnail visible until the live-preview iframe is actually ready.
   The old rule hid the thumb the moment the iframe was *mounted* (is-previewing),
   so every card flashed blank for the ~1-2s the iframe took to render. Now the
   thumb stays put and only cross-fades once the preview reports is-ready. */
.cat-card.is-previewing .cat-card__thumb { opacity: 1; }
.cat-card:has(.cat-card__preview.is-ready) .cat-card__thumb { opacity: 0; }

/* ---------- Modal ---------- */
.cat-modal__cta { background: var(--c-primary) !important; color: #fff !important; }

/* ---------- Footer ---------- */
.cat-footer { background: var(--c-text); color: #d8d2df; }
.cat-footer a { color: #b9b2c4; }
.cat-footer a:hover { color: #fff; }
