:root {
  --ink: #0f0f14;
  --muted: #918b99;
  --line: #e6e5e0;
  --purple: #8735ee;
  --purple-soft: #f2e9ff;
  --panel: #ffffff;
  --soft: #f8f8f9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  height: 110px;
  padding: 0 38px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.brand-mark {
  position: relative;
  width: 27px;
  height: 24px;
  border-radius: 0;
  background: none;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 23px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, #c282ff, #8736ee);
  transform: skewY(-28deg) rotate(0deg);
}

.brand-mark::before {
  top: 1px;
  box-shadow: 5px 6px 0 #a95bf7;
}

.brand-mark::after {
  top: 12px;
  background: linear-gradient(135deg, #a352ef, #7a31d9);
}

.nav {
  display: flex;
  gap: 58px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 650;
}

.contact {
  justify-self: end;
  width: 158px;
  height: 50px;
  border: 2px solid var(--purple);
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-weight: 750;
}

.product-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

/* ============================================================
   Sidebar — Flowbase-style: clean, fresh, modern (brand-aware)
   ============================================================ */
.filter-sidebar {
  border-right: 1px solid var(--line);
  padding: 32px 28px 48px;
  background: #fff;
}

.filter-group {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.filter-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

/* Filter group title — was an <h2>, switched to <div class="filter-group-title">
   so the site editor's "all h2" category doesn't grab the filter labels
   when the user edits real headings. ARIA role/level (set in markup)
   keeps the document outline accessible to screen readers. */
.filter-group-title {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink);
}

/* Collapsible header */
.filter-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: color .15s ease;
}
.filter-group-toggle:hover {
  color: var(--ink);
}
.filter-group-toggle .caret {
  transition: transform .2s ease;
  opacity: 0.5;
  margin-left: 8px;
}
.filter-group[data-collapsible].is-collapsed .filter-group-toggle .caret {
  transform: rotate(-90deg);
}
.filter-group-body {
  overflow: hidden;
  max-height: 800px;
  opacity: 1;
  padding-top: 2px;
  transition: max-height .25s ease, opacity .2s ease, margin-top .2s ease, padding-top .2s ease;
}
.filter-group[data-collapsible].is-collapsed .filter-group-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  margin-top: -4px;
  pointer-events: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Category filter holds 40+ chips — cap its height + scroll so
   the sidebar doesn't grow past the viewport. The thin scrollbar
   matches the lightbox / preview-stage pattern. */
.filter-category-row {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 130, .35) transparent;
}
.filter-category-row::-webkit-scrollbar { width: 6px; }
.filter-category-row::-webkit-scrollbar-thumb { background: rgba(120, 120, 130, .25); border-radius: 6px; }
.filter-category-row::-webkit-scrollbar-thumb:hover { background: rgba(120, 120, 130, .45); }
.filter-category-row::-webkit-scrollbar-track { background: transparent; }

/* Refined filter chip — Flowbase-style: white bg + soft gray border */
.filter-chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}

.filter-chip:hover {
  border-color: var(--purple);
  color: var(--ink);
}

.filter-chip.active {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  font-weight: 600;
}

.filter-chip.active:hover {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.filter-chip:active {
  transform: translateY(0.5px);
}

.filter-chip .html-icon,
.html-badge {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  background: #ff5d22;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.figma-icon,
.figma-badge {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 0;
  /* Real multi-colour Figma logo (was a round 3-stripe blob). */
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 57'%3E%3Cpath fill='%231ABCFE' d='M19 28.5a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0z'/%3E%3Cpath fill='%230ACF83' d='M0 47.5A9.5 9.5 0 0 1 9.5 38H19v9.5a9.5 9.5 0 1 1-19 0z'/%3E%3Cpath fill='%23FF7262' d='M19 0v19h9.5a9.5 9.5 0 1 0 0-19H19z'/%3E%3Cpath fill='%23F24E1E' d='M0 9.5A9.5 9.5 0 0 0 9.5 19H19V0H9.5A9.5 9.5 0 0 0 0 9.5z'/%3E%3Cpath fill='%23A259FF' d='M0 28.5A9.5 9.5 0 0 0 9.5 38H19V19H9.5A9.5 9.5 0 0 0 0 28.5z'/%3E%3C/svg%3E");
}

/* New platform icons — Webflow, Framer, React, Next.js */
.platform-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.webflow-icon { background: #4353ff; }
/* Real Framer logo (was a "F" letter on a blue square). The font-size:0
   hides the text glyph so only the SVG shows. */
.framer-icon {
  font-size: 0 !important;
  border-radius: 0;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%230055FF' d='M4 2.5H16V7.5H10L16 12.5H10V17.5L4 12.5V2.5Z'/%3E%3C/svg%3E");
}
.react-icon {
  background: #20232a;
  color: #61dafb;
  font-size: 11px;
}
.nextjs-icon {
  background: #0f1117;
  color: #fff;
}

.product-main {
  padding: 24px 36px 48px;
}

/* Full-width footer top border on the product page */
.page-product .footer {
  border-top: 0 !important;
  position: relative;
}
.page-product .footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--uic-f-line, #e9e5ee);
}

/* ============================================================
   Search bar — softer, modern, Flowbase-style
   ============================================================ */
.search-bar {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--soft);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.search-bar:focus-within {
  background: #fff;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(135, 53, 238, 0.10);
}
.search-bar input,
.search-bar input:focus,
.search-bar input:focus-visible {
  outline: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.search-bar span {
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-bar span svg {
  width: 20px;
  height: 20px;
  display: block;
}
.search-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: -0.005em;
}
.search-bar input::placeholder {
  color: var(--muted);
}

/* ============================================================
   Toolbar (tabs + sort) — refined
   ============================================================ */
.content-toolbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border-radius: 10px;
}

.tab {
  height: 32px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .15s ease, color .15s ease;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 18, 28, 0.06), 0 0 0 1px rgba(20, 18, 28, 0.04);
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   Generic .uic-select — same dropdown style as home page hero
   Re-usable everywhere on the site (sort, filter, admin, etc.)
   ============================================================ */
.uic-select {
  position: relative;
  display: inline-block;
}

.uic-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 140px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  outline: 0;
  text-transform: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.uic-select-trigger:hover {
  border-color: #c8c5cf;
}
.uic-select-trigger:focus-visible,
.uic-select[data-open="true"] .uic-select-trigger {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(135, 53, 238, 0.10);
}

.uic-select-caret {
  opacity: 0.55;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.uic-select[data-open="true"] .uic-select-caret {
  transform: rotate(180deg);
}

.uic-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 100%;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 18, 34, .10), 0 4px 10px rgba(24, 18, 34, .04);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 80;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.uic-select[data-open="true"] .uic-select-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.uic-select-menu button {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.uic-select-menu button:hover {
  background: rgba(135, 53, 238, .08);
  color: var(--purple);
}
.uic-select-menu button[aria-selected="true"] {
  background: rgba(135, 53, 238, .12);
  color: var(--purple);
  font-weight: 600;
}
.uic-select-menu button[aria-selected="true"]::after {
  content: "✓";
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  margin-left: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 31px 22px;
}

/* Wide desktops (1500px+) — show a fourth card per row so the grid
   doesn't feel sparse on big monitors. */
@media (min-width: 1500px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  min-width: 0;
  position: relative; /* positioning context for the ♥ save button */
}

.product-link {
  display: block;
}

.preview {
  aspect-ratio: 1.47 / 1;
  border-radius: 15px;
  background: #f8f8f9;
  overflow: hidden;
  position: relative;
  /* Soft hairline border so the card still has a visible edge when
     an admin uploads a fully-white preview (otherwise the image
     would blend straight into the page background). Very low alpha
     keeps it invisible against dark / colour-heavy images. */
  border: 1px solid rgba(15, 17, 23, .06);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.placeholder-preview {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(135, 53, 238, .08), rgba(0, 210, 163, .08)),
    #f7f7f8;
}

.placeholder-card {
  width: min(78%, 230px);
  aspect-ratio: 1.45 / 1;
  border-radius: 12px;
  border: 1px solid #e5e1ea;
  background:
    linear-gradient(#d9d2e4 0 0) 18px 22px / 42% 7px no-repeat,
    linear-gradient(#ece7f2 0 0) 18px 42px / 65% 7px no-repeat,
    linear-gradient(#ece7f2 0 0) 18px 62px / 48% 7px no-repeat,
    radial-gradient(circle at 78% 37%, rgba(135, 53, 238, .25) 0 16%, transparent 17%),
    linear-gradient(135deg, #fff, #fbf8ff);
  box-shadow: 0 18px 45px rgba(24, 18, 34, .08);
  position: relative;
}

.placeholder-card::after {
  content: attr(data-label);
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #958da0;
  font-size: 13px;
  font-weight: 760;
}

.card-meta {
  padding-top: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-meta h3 {
  margin: 0;
  margin-right: auto;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 780;
  /* Full-strength ink to match the home-page card titles (which render
     black). The listing inherited rgba(0,0,0,.65) from an ancestor —
     a direct colour on the h3 beats that inheritance. */
  color: var(--brand-ink, #0f0f14);
  /* Single-line ellipsis — long titles never push the right-side
     license + CMS badges off the card. `min-width: 0` lets the flex
     item shrink below its content size; without it `text-overflow`
     is a no-op inside a flex parent. */
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* License pill — sits in the card info row (.card-meta), pinned to the
   far right after the title + CMS badges. Soft-purple "Free" / gold "Pro"
   inline pill (no longer overlaid on the preview image). */
.license {
  min-width: 54px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f4e9ff;
  color: #b18ac9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;   /* match the home card "Free" weight (was 740 — looked far heavier than the rest of the site) */
  letter-spacing: 0.005em;
  flex-shrink: 0; /* never compresses when the title is long */
}

.license.pro {
  color: #bc9500;
  background: #fff4c7;
}

.circle-badge {
  width: 32px;
  height: 32px;
  border: 1px solid #eeeaf2;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
}

/* Per-CMS badge row inside .card-meta — sits to the right of the
   license pill. Uses its own 5px gap (tighter than the parent
   .card-meta 10px) so platform icons read as a single grouped
   cluster rather than three separate elements. */
.cms-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Brand-coloured logo container inside a circle-badge — used for
   the official Figma / HTML5 / Webflow / Framer / React / Next.js
   SVGs. The SVG fills 60% of the badge so the white ring around
   it reads as breathing room, not a tight crop. */
.cms-badge-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}
.cms-badge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fallback pill for CMS names we don't have a brand SVG for
   (Shopify, Ghost, custom). Single uppercase letter in a neutral
   dark pill. */
.cms-badge-fallback {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  background: #1f1f25;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* "+N" overflow pill — shown when the product has more CMS options
   than CMS_BADGE_VISIBLE_MAX (3). Same circle shape as the badges
   but holds counter text so it reads as overflow, not as an icon. */
.circle-badge.cms-badge-more {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--uic-muted, #6b6b78);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  cursor: default;
  background: #faf9fb;
  border-color: #e9e5ee;
}
.circle-badge.cms-badge-more:hover {
  color: var(--uic-ink, #0f0f14);
  background: #f3eefa;
  border-color: #d9cfe7;
}

.pagination {
  margin-top: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 20px;
}

.page-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #111;
  font-weight: 550;
}

.page-btn.active {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #000;
  color: #fff;
}

.page-btn.next {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.footer {
  width: min(1140px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 76px;
  border-top: 1px solid var(--line);
}

/* Newsletter styles intentionally NOT defined here — they're owned by
   polish.css's `section.newsletter` rules so every page (home, about,
   blog, pricing, product, etc.) shares one source of truth. Editing
   polish.css now updates the newsletter on every page at once. */

/* Keep the .copyright b:hover lift since other rules use this shared
   selector chain. */
.copyright b:hover {
  background: var(--purple) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(135, 53, 238, .25);
}
.page-btn.active:hover {
  background: var(--purple) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(135, 53, 238, .25);
}

.footer-bottom {
  padding-top: 42px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  font-size: 16px;
  font-weight: 600;
}

.footer-nav div {
  display: grid;
  gap: 25px;
  align-content: start;
}

.legal-links {
  display: flex !important;
  gap: 22px;
  align-items: start;
}

.copyright {
  margin-top: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 650;
}

.copyright em {
  color: #b4aeb9;
  font-style: normal;
  font-weight: 500;
}

.copyright a {
  color: #aaa4af;
}

.copyright b {
  width: 29px;
  height: 29px;
  margin-left: 8px;
  border-radius: 50%;
  background: #29252e;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 650;
}

@media (max-width: 1050px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header,
  .footer-bottom,
  .newsletter {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .site-header {
    height: auto;
    padding: 22px;
  }

  .nav {
    justify-self: start;
    gap: 22px;
  }

  .contact {
    justify-self: start;
  }

  .product-main {
    padding: 20px;
  }

  .content-toolbar {
    height: auto;
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid,
  .newsletter form > div {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Results bar (count + active filter pill + clear-all button)
   ============================================================ */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 19px 0 13.6px;   /* gap below the "N items" text trimmed 15% (16→13.6) */
  margin-bottom: 13.6px;    /* gap above the cards trimmed 15% (16→13.6) */
  /* divider removed per design feedback — was a 1px hairline below
     the count which felt redundant next to the toolbar above. */
}
.results-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.results-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0f1117);
  letter-spacing: -0.005em;
}
.results-of {
  font-size: 13px;
  color: var(--muted, #6b7280);
  font-weight: 500;
}
.results-filters-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--brand-soft, #ede4ff);
  color: var(--brand, #7c3aed);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
/* Individual active-filter pills (replaces the single "N filters active"
   pill). Each pill shows the filter label + an × that removes just
   that filter. Sized to read like a chip in the results bar. */
.results-filter-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 11px;
  background: var(--brand-soft, #ede4ff);
  color: var(--brand, #7c3aed);
  border: 0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color .15s ease;
}
.results-filter-active:hover,
.results-filter-active:focus-visible {
  background: color-mix(in srgb, var(--brand, #7c3aed) 18%, #fff);
  outline: none;
}
.results-filter-active svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.results-filter-active:hover svg,
.results-filter-active:focus-visible svg { opacity: 1; }
.results-bar-left {
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 6px;
}
.results-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line, #e8e6ee);
  color: var(--ink, #0f1117);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.results-clear-btn:hover {
  background: var(--bg-soft, #f6f7f9);
  border-color: var(--ink, #0f1117);
}
.results-clear-btn svg {
  opacity: 0.7;
}

/* ============================================================
   Grid fade transition (smoother filter swaps)
   ============================================================ */
.product-grid {
  transition: opacity .18s ease;
}
.product-grid.is-fading {
  opacity: 0.35;
  pointer-events: none;
}

/* ============================================================
   Loading skeleton — shows before backend data arrives so users
   don't see stale fallback cards flash on first paint.
   ============================================================ */
.product-card-skeleton {
  pointer-events: none;
  cursor: default;
}
.product-card-skeleton .preview {
  background: #f1f0f5;
  border-radius: 14px;
  aspect-ratio: 16 / 11;
}
.product-card-skeleton .card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px 0;
}
.skeleton-line {
  height: 18px;
  border-radius: 6px;
  background: #efeef3;
}
.skeleton-shimmer {
  position: relative;
  overflow: hidden;
}
.skeleton-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 100%
  );
  animation: skeleton-pulse 1.2s ease-in-out infinite;
  transform: translateX(-100%);
}
@keyframes skeleton-pulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================================
   Empty state polish
   ============================================================ */
.empty-state {
  flex-direction: column;
  gap: 14px;
  text-align: center;
  padding: 48px 24px;
  font-weight: 500;
}
.empty-state .empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-soft, #f6f7f9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #6b7280);
}
.empty-state .empty-title {
  font-size: 14.5px;
  color: var(--body, #4b5563);
  font-weight: 500;
  margin: 0;
}
.empty-state .empty-clear-btn {
  padding: 9px 18px;
  background: var(--ink, #0f1117);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.empty-state .empty-clear-btn:hover {
  background: #1f1f23;
}

/* ============================================================
   Pagination — prev button + ellipsis + disabled state
   ============================================================ */
.page-btn.prev {
  border-radius: 999px;
  padding: 0 16px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink, #0f1117);
  border: 1px solid var(--line, #e8e6ee);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.page-btn.prev:hover:not(:disabled) {
  background: var(--bg-soft, #f6f7f9);
  border-color: var(--ink, #0f1117);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis {
  padding: 0 6px;
  color: var(--muted, #6b7280);
  font-weight: 600;
  letter-spacing: 0.05em;
  user-select: none;
}

/* ============================================================
   Wishlist / Save (♥) button — top-right of each product card.
   Outline heart by default; fills with the brand colour when saved.
   ============================================================ */
.uic-save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 10px rgba(15, 17, 23, .12);
  color: #8a8a93;
  cursor: pointer;
  transition: transform .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.uic-save-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  transition: fill .15s ease;
}
.uic-save-btn:hover {
  color: var(--brand, #8735ee);
  box-shadow: 0 5px 14px rgba(15, 17, 23, .16);
}
.uic-save-btn[data-saved] {
  color: var(--brand, #8735ee);
  border-color: rgba(135, 53, 238, .25);
}
.uic-save-btn[data-saved] svg {
  fill: var(--brand, #8735ee);
}
.uic-save-btn.is-bumped {
  animation: uic-heart-bump .32s ease;
}
@keyframes uic-heart-bump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.28); }
}
@media (prefers-reduced-motion: reduce) {
  .uic-save-btn.is-bumped { animation: none; }
}

/* Reveal the ♥ on card hover (desktop pointers only). A SAVED heart stays
   visible so the user always sees what they've hearted; keyboard focus
   reveals it too. Touch devices (hover: none) keep it always visible. */
@media (hover: hover) {
  .uic-save-btn {
    opacity: 0;
    transform: translateY(-4px) scale(.96);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, color .15s ease,
                border-color .15s ease, box-shadow .15s ease;
  }
  .product-card:hover .uic-save-btn,
  .uic-save-btn[data-saved],
  .uic-save-btn:focus-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

/* Results-bar right cluster — "♥ Saved" filter toggle + Clear-all. */
.results-bar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.results-saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line, #e6e5e0);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #0f0f14);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.results-saved-toggle:hover {
  border-color: var(--purple, #8735ee);
  color: var(--purple, #8735ee);
}
.results-saved-toggle.is-active {
  background: var(--purple-soft, #f2e9ff);
  border-color: var(--purple, #8735ee);
  color: var(--purple, #8735ee);
}
