/* Compare page (v2). Shared header/footer/button/chip/card/badge styles live in
   css/ghirs/components.css; colours come from css/ghirs/tokens.css.

   The hero band is deliberately a fixed dark colour in both themes: the lime glow and
   the shop "orbs" only read against a dark ground, so it does not follow --bg/--ink. */

.font-mono { font-family: var(--font-mono); }

.cmp2 {
  --hero-bg: #0B1A16;
  --hero-fg: #F3F0E8;
  --hero-glow: #0E5A4C;
  --ease-pop: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: clamp(32px, 5vw, 64px);
}

/* ===== Hero band ===== */

.cmp2-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-fg);
  padding: clamp(28px, 4vw, 52px) 0 clamp(24px, 3.4vw, 40px);
}

.cmp2-hero__glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.cmp2-hero__glow--lime {
  width: 520px;
  height: 520px;
  right: -90px;
  top: -240px;
  background: var(--accent);
  opacity: 0.38;
  animation: cmp2-drift 14s ease-in-out infinite alternate;
}

.cmp2-hero__glow--green {
  width: 460px;
  height: 460px;
  left: -140px;
  bottom: -220px;
  background: var(--hero-glow);
  opacity: 0.7;
  animation: cmp2-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes cmp2-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-40px, 30px, 0) scale(1.12); }
}

.cmp2-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cmp2-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 32px;
}

.cmp2-hero__copy {
  display: flex;
  flex: 1 1 420px;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  min-width: 0;
}

.cmp2-title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cmp2-title mark {
  padding: 0 0.28em 0.08em;
  border-radius: 0.3em;
  background: var(--accent);
  color: var(--accent-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.cmp2-lead {
  max-width: 600px;
  font-size: 16px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--hero-fg) 72%, transparent);
  text-wrap: pretty;
}

.cmp2-search {
  display: flex;
  flex: 0 1 480px;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 320px);
  padding: 7px 7px 7px 20px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 24px 60px -26px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cmp2-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 26%, transparent), 0 24px 60px -26px rgba(0, 0, 0, 0.8);
}

.cmp2-search__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: var(--accent);
}

.cmp2-search__input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 500 16px var(--font-text);
}

.cmp2-search__go {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font: 700 15px/1 var(--font-text);
  cursor: pointer;
  transition: transform 0.25s var(--ease-pop), filter 0.2s;
}

.cmp2-search__go:hover { transform: translateY(-1px) scale(1.03); }
.cmp2-search__go:hover span:last-child { transform: translateX(3px); }
.cmp2-search__go span { transition: transform 0.25s var(--ease-pop); }

.cmp2-form-error {
  display: flex;
  gap: 8px;
  color: var(--warn);
  font-size: 14px;
  font-weight: 600;
}

/* Quick searches (idle state) */

.cmp2-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cmp2-quick__label {
  font-size: 14px;
  color: color-mix(in srgb, var(--hero-fg) 62%, transparent);
}

.cmp2-chip {
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--hero-fg) 30%, transparent);
  border-radius: 999px;
  font-size: 14px;
  color: var(--hero-fg);
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease-pop);
}

.cmp2-chip:hover {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

/* ===== Shop orbs + progress meter ===== */

.cmp2-progress {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cmp2-orbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-top: 8px;
}

.cmp2-orb {
  position: relative;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 78px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hero-fg);
  font: inherit;
  cursor: pointer;
  animation: cmp2-pop 0.45s var(--ease-pop) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}

.cmp2-orb:disabled { cursor: default; }

.cmp2-orb__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 2px solid color-mix(in srgb, var(--hero-fg) 28%, transparent);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.3s var(--ease-pop), box-shadow 0.3s, border-color 0.3s;
}

.cmp2-orb__ring .cmp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 13px;
}

.cmp2-orb.st-ok .cmp2-orb__ring { border: 3px solid var(--accent); }
.cmp2-orb.st-ok:hover:not(:disabled) .cmp2-orb__ring { transform: scale(1.08); }
.cmp2-orb.is-active .cmp2-orb__ring { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 38%, transparent); }
.cmp2-orb.st-warn .cmp2-orb__ring,
.cmp2-orb.st-failed .cmp2-orb__ring,
.cmp2-orb.st-blocked .cmp2-orb__ring,
.cmp2-orb.st-not-allowed .cmp2-orb__ring { border: 3px solid var(--warn); }
.cmp2-orb.st-none,
.cmp2-orb.st-skipped { opacity: 0.4; }

/* A one-off ripple the moment a shop answers with offers. */
.cmp2-orb.st-ok .cmp2-orb__ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  animation: cmp2-ripple 0.9s ease-out 1 both;
  pointer-events: none;
}

@keyframes cmp2-ripple {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.9); }
}

/* Loading: a lime arc circles the orb. */
.cmp2-orb.st-loading .cmp2-orb__ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: cmp2-spin 0.9s linear infinite;
}

@keyframes cmp2-spin { to { transform: rotate(360deg); } }

.cmp2-orb__badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 11px/22px var(--font-mono);
  text-align: center;
  animation: cmp2-pop 0.45s var(--ease-pop) both;
}

.cmp2-orb__badge.is-warn { background: var(--warn); }

.cmp2-orb__name {
  max-width: 78px;
  overflow: hidden;
  font: 500 11px/1 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}

.cmp2-meter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 16px;
}

.cmp2-meter__bar {
  position: relative;
  width: min(420px, 100%);
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: color-mix(in srgb, var(--hero-fg) 16%, transparent);
}

.cmp2-meter__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.7s var(--ease-pop);
}

.cmp2-meter__text {
  font: 500 12px/1 var(--font-mono);
  opacity: 0.82;
}

.cmp2-meter__text b { font-weight: 700; color: var(--accent); }

.cmp2-orbs-toggle {
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 12px/1 var(--font-mono);
  color: var(--save);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cmp2-orbs-toggle:hover { color: var(--brand); }

.cmp2-issues {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--warn);
}

.cmp2-issues b { color: var(--hero-fg); }

/* ===== Body: filters + results ===== */

.cmp2-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 56px;
}

.cmp2-filters {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-height: calc(100vh - 104px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.5);
}

.cmp2-fgroup { display: flex; flex-direction: column; gap: 10px; }

.cmp2-fgroup__title {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cmp2-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font: 600 14px var(--font-text);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease-pop);
}

.cmp2-cat:hover { background: var(--ghost); transform: translateX(3px); }

/* Categories are re-rendered via innerHTML as the AI resolves them, so each
   button is a fresh DOM node every time — without this they'd just pop in
   with no transition. A short staggered rise makes the list visibly build
   up as results resolve instead of jumping between states. */
.cmp2-cat { animation: cmp2-cat-in 0.4s var(--ease-pop) backwards; }
.cmp2-cat:nth-of-type(1) { animation-delay: 0ms; }
.cmp2-cat:nth-of-type(2) { animation-delay: 40ms; }
.cmp2-cat:nth-of-type(3) { animation-delay: 80ms; }
.cmp2-cat:nth-of-type(4) { animation-delay: 120ms; }
.cmp2-cat:nth-of-type(5) { animation-delay: 160ms; }
.cmp2-cat:nth-of-type(n+6) { animation-delay: 200ms; }

@keyframes cmp2-cat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

html.is-reduced-motion .cmp2-cat { animation: none; }

.cmp2-cat i {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sunk);
  transition: background 0.2s, transform 0.3s var(--ease-pop);
}

.cmp2-cat span { flex: 1; min-width: 0; }
.cmp2-cat em { font: 500 12px var(--font-mono); font-style: normal; color: var(--muted); }

.cmp2-cat.is-active { background: var(--ink); color: var(--bg); }
.cmp2-cat.is-active i { background: var(--accent); transform: scale(1.3); }
/* Was var(--accent): on the active pill's inverted (light-on-dark-theme)
   background that measured 1.2:1 — lime-on-near-white is effectively
   invisible. The count follows the pill's own inverted text color instead. */
.cmp2-cat.is-active em { color: var(--bg); opacity: 0.65; }

/* The category group while the AI is still naming and sorting: its status, a bar, and placeholders for what is coming. */
.cmp2-catload { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 4px; }

.cmp2-catload__msg {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/1.35 var(--font-text);
  color: var(--ink);
}

.cmp2-catload__ring {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2.5px solid var(--ghost);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cmp2-spin 0.9s linear infinite;
}

.cmp2-catload__bar { height: 4px; border-radius: 4px; background: var(--ghost); overflow: hidden; }
.cmp2-catload__bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.45s var(--ease-settle, ease); }

.cmp2-catload__sk { display: flex; flex-direction: column; gap: 6px; }

.cmp2-catload__sk i {
  position: relative;
  display: block;
  height: 34px;
  border-radius: 14px;
  background: var(--ghost);
  overflow: hidden;
}

.cmp2-catload__sk i:nth-child(2) { width: 88%; }
.cmp2-catload__sk i:nth-child(3) { width: 94%; }
.cmp2-catload__sk i:nth-child(4) { width: 78%; }
.cmp2-catload__sk i:nth-child(5) { width: 84%; }

.cmp2-catload__sk i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink) 8%, transparent) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: cmp2-sweep 1.4s ease-in-out infinite;
}

html.is-reduced-motion .cmp2-catload__ring,
html.is-reduced-motion .cmp2-catload__sk i::after { animation: none; }

.cmp2-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.cmp2-check input { position: absolute; opacity: 0; pointer-events: none; }

.cmp2-check__box {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: transparent;
  font: 800 12px/1 var(--font-mono);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease-pop);
}

.cmp2-check input:checked + .cmp2-check__box {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  transform: scale(1.08);
}

.cmp2-check input:focus-visible + .cmp2-check__box { outline: 2px solid var(--brand); outline-offset: 2px; }
.cmp2-check .cmp-avatar { width: 24px; height: 24px; border-radius: 50%; }
.cmp2-check__name { flex: 1; min-width: 0; font-weight: 600; }
.cmp2-check em { font: 500 12px var(--font-mono); font-style: normal; color: var(--muted); }
.cmp2-note-sm { font-size: 13px; color: var(--muted); }

/* Dual price slider */

.cmp2-range { position: relative; height: 24px; }

.cmp2-range__track,
.cmp2-range__fill {
  position: absolute;
  top: 9px;
  height: 6px;
  border-radius: 3px;
}

.cmp2-range__track { left: 0; right: 0; background: var(--ghost); }
.cmp2-range__fill { background: var(--brand); }

.cmp2-range input[type='range'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.cmp2-range input[type='range']::-webkit-slider-runnable-track { background: none; height: 24px; }
.cmp2-range input[type='range']::-moz-range-track { background: none; height: 24px; }

.cmp2-range input[type='range']::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.2s var(--ease-pop);
}

.cmp2-range input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  pointer-events: auto;
  cursor: grab;
}

.cmp2-range input[type='range']:active::-webkit-slider-thumb { transform: scale(1.2); cursor: grabbing; }

.cmp2-range__labels {
  display: flex;
  justify-content: space-between;
  font: 600 13px var(--font-mono);
}

/* Switch */

.cmp2-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px var(--font-text);
  cursor: pointer;
}

.cmp2-switch__track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--sunk);
  transition: background 0.25s;
}

.cmp2-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.3s var(--ease-pop), background 0.25s;
}

.cmp2-switch[aria-checked='true'] .cmp2-switch__track { background: var(--brand); }
.cmp2-switch[aria-checked='true'] .cmp2-switch__track::after { transform: translateX(20px); background: var(--accent); }

.cmp2-reset {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 600 14px var(--font-text);
  cursor: pointer;
  transition: background 0.2s;
}

.cmp2-reset:hover { background: var(--ghost); }

/* ===== Main column ===== */

.cmp2-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.cmp2-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}

.cmp2-toolbar__title { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.cmp2-toolbar__title b { font-size: 20px; letter-spacing: -0.01em; }
.cmp2-toolbar__title span { font-size: 13px; color: var(--muted); }

.cmp2-seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.cmp2-seg button {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 600 13px var(--font-text);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.cmp2-seg button:hover { color: var(--ink); }
.cmp2-seg button[aria-pressed='true'] { background: var(--ink); color: var(--bg); }
.cmp2-seg--icons button { width: 38px; padding: 8px 0; font-family: var(--font-mono); }
.cmp2-seg--icons button[aria-pressed='true'] { background: var(--brand); color: var(--brand-ink); }

.cmp2-filters-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 700 13px var(--font-text);
  cursor: pointer;
}

.cmp2-filters-toggle b { font: 700 11px var(--font-mono); color: var(--accent); }

/* Best deal feature */

.cmp2-feature {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 270px;
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 2px solid var(--save);
  border-radius: 32px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s var(--ease-settle), box-shadow 0.35s;
  animation: cmp2-rise 0.6s var(--ease-settle) both;
}

.cmp2-feature:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -34px rgba(0, 0, 0, 0.6); }

.cmp2-feature__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
}

.cmp2-feature__media::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 40%, transparent);
  transition: transform 0.6s var(--ease-settle);
}

.cmp2-feature:hover .cmp2-feature__media::before { transform: scale(1.25) translate(10px, 10px); }
.cmp2-feature__media img { position: relative; width: 74%; height: 74%; object-fit: contain; border-radius: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22); }

/* The photo sits on top of the initials; if it fails to load, onerror removes it and the initials show. */
.cmp2-feature__media > *,
.cmp2-card__media > .cmp2-card__initials,
.cmp2-card__media > img,
.cmp2-drawer__media > .cmp2-feature__initials,
.cmp2-drawer__media > img { grid-area: 1 / 1; }

/* Tall photos must not stretch the auto grid row (it would crop them): pin the row to the box and let the image shrink. */
.cmp2-feature__media,
.cmp2-card__media,
.cmp2-drawer__media { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.cmp2-feature__media img,
.cmp2-card__media img,
.cmp2-drawer__media img { min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; }
.cmp2-feature__initials { position: relative; font: 900 76px/1 var(--font-text); letter-spacing: -0.04em; }

.cmp2-feature__body { display: flex; flex-direction: column; gap: 14px; padding: 28px; min-width: 0; }
.cmp2-feature__badges { display: flex; flex-wrap: wrap; gap: 8px; }

.cmp2-feature__title {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cmp2-feature__buy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  background: var(--ghost);
  text-align: right;
}

.cmp2-feature__from { font: 500 12px var(--font-mono); color: var(--muted); }
.cmp2-feature__price { font: 700 clamp(36px, 4vw, 52px)/1 var(--font-mono); letter-spacing: -0.04em; color: var(--save); }
.cmp2-feature__save { font: 600 12px var(--font-mono); color: var(--save); }

.cmp2-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font: 700 14px/1 var(--font-text);
  transition: transform 0.25s var(--ease-pop);
}

.cmp2-feature:hover .cmp2-cta,
.cmp2-card:hover .cmp2-card__go { transform: translateX(3px); }

/* Price ladder (feature + drawer) */

.cmp2-ladder { display: flex; flex-direction: column; gap: 8px; }

.cmp2-ladder__row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.cmp2-ladder__row .cmp-avatar { width: 26px; height: 26px; border-radius: 50%; }
.cmp2-ladder__shop { flex: none; width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.cmp2-ladder__bar {
  position: relative;
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--ghost);
}

.cmp2-ladder__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 100%);
  border-radius: 5px;
  background: var(--muted);
  transform-origin: left center;
  animation: cmp2-grow 0.9s var(--ease-settle) both;
  animation-delay: calc(var(--i, 0) * 90ms + 200ms);
}

.cmp2-ladder__row.is-best .cmp2-ladder__bar i { background: var(--save); }
.cmp2-ladder__price { flex: none; font: 600 13px var(--font-mono); color: var(--muted); }
.cmp2-ladder__row.is-best .cmp2-ladder__price { color: var(--save); }

@keyframes cmp2-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Product cards */

.cmp2-gridhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmp2-gridhead b { font-size: 18px; letter-spacing: -0.01em; }
.cmp2-gridhead span { font: 500 12px var(--font-mono); color: var(--muted); }

.cmp2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 20px;
}

.cmp2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px -22px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease-settle), box-shadow 0.4s, border-color 0.3s;
  animation: cmp2-rise 0.55s var(--ease-settle) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

.cmp2-card:hover,
.cmp2-card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.55);
}

/* A diagonal shine sweeps across the card on hover. */
.cmp2-card::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, #fff 45%, transparent), transparent);
  transform: skewX(-14deg);
  opacity: 0;
  pointer-events: none;
}

.cmp2-card:hover::after { animation: cmp2-shine 0.9s ease-out 1; }

@keyframes cmp2-shine {
  0% { left: -60%; opacity: 0; }
  20% { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}

.cmp2-card.is-out { opacity: 0.72; }

.cmp2-card__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 148px;
  overflow: hidden;
  background: var(--sunk);
}

.cmp2-card__media::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--ghost);
  transition: transform 0.6s var(--ease-settle);
}

.cmp2-card:hover .cmp2-card__media::before { transform: scale(1.3) translate(12px, 8px); }

.cmp2-card__media img {
  /* Shop photos are plain product shots on their own white background;
     object-fit: contain alone left only a thin 10px sliver of the tile's
     own (dark) background showing, so the photo read as an unstyled white
     box rather than a framed product tile. More padding plus a rounded,
     shadowed edge gives every photo an intentional "plate" instead. */
  position: relative;
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.5s var(--ease-settle);
}

.cmp2-card:hover .cmp2-card__media img { transform: scale(1.06); }

.cmp2-card__initials {
  position: relative;
  font: 900 56px/1 var(--font-text);
  letter-spacing: -0.04em;
  /* Was 45% — measured 2.3:1 (large text needs 3:1). Usually covered by the
     product photo once it loads; only sits alone when a shop has none. */
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}

.cmp2-card__tags {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cmp2-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 11px/1.2 var(--font-mono);
  white-space: nowrap;
}

.cmp2-tag--save { background: var(--accent); color: var(--accent-ink); }
.cmp2-tag--out { background: var(--err-bg); color: var(--err); }

/* Second-hand: an amber tag (used) or a plainer one (refurbished), so it is not mistaken for a sale or for new. */
.cmp2-tag--used { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px currentColor; }
.cmp2-tag--refurbished { background: var(--warn-bg); color: var(--warn); }
.cmp2-badge--used,
.cmp2-badge--refurbished { background: var(--warn-bg); color: var(--warn); }
.cmp2-drawer__cond { margin: 8px 0 0; }
.cmp2-offer__meta .cmp2-tag { padding: 2px 8px; font-size: 10px; }

.cmp2-card__variants {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: 500 11px var(--font-mono);
}

.cmp2-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.cmp2-card__brand { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.cmp2-card__title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 650;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cmp2-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.cmp2-card__from { font: 500 11px var(--font-mono); color: var(--muted); }
.cmp2-card__now { font: 700 26px/1 var(--font-mono); letter-spacing: -0.03em; }
.cmp2-card__was { font: 500 12px var(--font-mono); color: var(--muted); text-decoration: line-through; }

.cmp2-range-bar { display: flex; flex-direction: column; gap: 6px; }

.cmp2-range-bar__track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--ghost);
}

.cmp2-range-bar__track i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--brand);
  left: 0;
  right: 0;
  transform-origin: left center;
  animation: cmp2-grow 0.8s var(--ease-settle) both;
}

.cmp2-range-bar__track b {
  position: absolute;
  top: -3px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
}

.cmp2-range-bar__labels { display: flex; justify-content: space-between; font: 500 11px var(--font-mono); color: var(--muted); }
.cmp2-range-bar__labels span:first-child { color: var(--save); font-weight: 700; }

.cmp2-card__only { font-size: 13px; color: var(--muted); }

.cmp2-card__foot { display: flex; align-items: center; gap: 10px; padding-top: 4px; }

.cmp2-stack { display: flex; }
.cmp2-stack .cmp-avatar { width: 26px; height: 26px; border: 2px solid var(--surface); border-radius: 50%; }
.cmp2-stack .cmp-avatar + .cmp-avatar { margin-left: -8px; }
.cmp2-card__shops { flex: 1; font-size: 13px; color: var(--muted); }

.cmp2-card__go {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 700 15px var(--font-mono);
  transition: transform 0.3s var(--ease-pop);
}

/* List view */

.cmp2-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.cmp2-grid.is-list .cmp2-card { flex-direction: row; }
.cmp2-grid.is-list .cmp2-card__media { width: 132px; height: auto; min-height: 120px; flex: none; }
.cmp2-grid.is-list .cmp2-card__initials { font-size: 38px; }
.cmp2-grid.is-list .cmp2-card__tags { right: auto; }
.cmp2-grid.is-list .cmp2-card__variants { display: none; }
.cmp2-grid.is-list .cmp2-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; row-gap: 6px; }
.cmp2-grid.is-list .cmp2-card__price { margin: 0; grid-row: 1 / span 3; grid-column: 2; justify-content: flex-end; }
.cmp2-grid.is-list .cmp2-range-bar { display: none; }
.cmp2-grid.is-list .cmp2-card__foot { grid-column: 1; }

.cmp2-more { display: flex; justify-content: center; padding-top: 4px; }

.cmp2-more button {
  padding: 13px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 700 14px var(--font-text);
  cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--ease-pop);
}

.cmp2-more button:hover { background: var(--ghost); transform: translateY(-2px); }

/* ===== Skeletons ===== */

.cmp2-skel-wrap { display: flex; flex-direction: column; gap: 20px; padding-top: 40px; padding-bottom: 56px; }

.cmp2-skel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.cmp2-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--ink) 7%, transparent) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: cmp2-sweep 1.4s ease-in-out infinite;
}

@keyframes cmp2-sweep { to { transform: translateX(100%); } }

.cmp2-skel--feature { height: 220px; border-radius: 32px; }
.cmp2-skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 20px; }
.cmp2-skel--card { height: 300px; animation: cmp2-rise 0.5s var(--ease-settle) both; animation-delay: calc(var(--i, 0) * 60ms); }
.cmp2-skel__img { height: 148px; background: var(--sunk); }
.cmp2-skel__line { height: 12px; margin: 16px 18px 0; border-radius: 6px; background: var(--ghost); }
.cmp2-skel__line--short { width: 40%; }

/* ===== Detail drawer / bottom sheet ===== */

.cmp2-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.cmp2-drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.35s;
}

.cmp2-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(540px, 100%);
  padding: 28px 28px 24px;
  overflow-y: auto;
  border-radius: 32px 0 0 32px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, 0.6);
  transform: translateX(105%);
  transition: transform 0.5s var(--ease-settle);
  outline: 0;
}

.cmp2-drawer.is-open .cmp2-drawer__scrim { opacity: 1; }
.cmp2-drawer.is-open .cmp2-drawer__panel { transform: none; }

.cmp2-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cmp2-drawer__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--ghost);
  color: var(--ink);
  font: 700 14px var(--font-mono);
  cursor: pointer;
  transition: transform 0.3s var(--ease-pop), background 0.2s;
}

.cmp2-drawer__close:hover { transform: rotate(90deg); background: var(--sunk); }

.cmp2-drawer__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--accent);
  color: var(--accent-ink);
}

.cmp2-drawer__media::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -50px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}

.cmp2-drawer__media img { position: relative; width: 72%; height: 76%; object-fit: contain; border-radius: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22); }
.cmp2-drawer__media .cmp2-feature__initials { font-size: 72px; }

.cmp2-drawer__title { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }

.cmp2-vchips { display: flex; flex-wrap: wrap; gap: 8px; }

.cmp2-vchip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 12px var(--font-mono);
}

.cmp2-drawer__label { font: 500 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.cmp2-offers { display: flex; flex-direction: column; gap: 10px; }

.cmp2-offer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  animation: cmp2-rise 0.5s var(--ease-pop) both;
  animation-delay: calc(var(--i, 0) * 110ms + 250ms);
}

.cmp2-offer.is-best {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 36px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.cmp2-offer.is-out { opacity: 0.65; }
.cmp2-offer__top { display: flex; align-items: center; gap: 12px; }
.cmp2-offer__top .cmp-avatar { width: 36px; height: 36px; border-radius: 50%; }
.cmp2-offer__id { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.cmp2-offer__id b { font-size: 15px; }
.cmp2-offer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.cmp2-offer__price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cmp2-offer__price b { font: 700 22px/1 var(--font-mono); letter-spacing: -0.03em; }
.cmp2-offer__price small { font: 500 12px var(--font-mono); opacity: 0.75; }
.cmp2-offer__was { font: 500 12px var(--font-mono); text-decoration: line-through; opacity: 0.7; }
.cmp2-offer .cmp2-ladder__bar { flex: none; width: 100%; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.cmp2-offer.is-best .cmp2-ladder__bar { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.cmp2-offer.is-best .cmp2-ladder__bar i { background: var(--accent-ink); }

.cmp2-offer__go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 14px var(--font-text);
  transition: background 0.2s, transform 0.25s var(--ease-pop);
}

.cmp2-offer__go:hover { background: var(--ghost); transform: translateY(-1px); color: var(--ink); }
.cmp2-offer.is-best .cmp2-offer__go { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.cmp2-offer.is-best .cmp2-offer__go:hover { color: var(--brand-ink); }

.cmp2-drawer__foot { font-size: 13px; line-height: 1.5; color: var(--muted); }

body.cmp2-lock { overflow: hidden; }

/* ===== Sources (collapsed list of the shops) ===== */

.cmp-note { font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 760px; }

.cmp-sources {
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.cmp-sources__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(18px, 3vw, 28px);
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}

.cmp-sources__summary::-webkit-details-marker { display: none; }
.cmp-sources__chev { color: var(--muted); transition: transform 0.25s; }
.cmp-sources[open] .cmp-sources__chev { transform: rotate(180deg); }

.cmp-sources__body {
  padding: 0 clamp(18px, 3vw, 28px) clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cmp-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.cmp-shop {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: border-color 0.2s, transform 0.3s var(--ease-settle);
  animation: cmp2-rise 0.5s var(--ease-settle) both;
}

.cmp-shop:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-3px); }

.cmp-shop__icon {
  position: relative;
  overflow: hidden;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sunk);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.cmp-shop__icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.cmp-shop__id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cmp-shop__id b { font-size: 16px; }
.cmp-shop__state { font-size: 12px; color: var(--muted); }
.cmp-shop__state.is-ok { color: var(--save); }
.cmp-shop__state.is-warn { color: var(--warn); font-weight: 600; }
.cmp-shop__why { font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }

/* The shop's own favicon covers the initials; onerror removes it so the initials show. */
.cmp-avatar {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--sunk);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.cmp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }

.cmp-stock { font: 600 12px var(--font-mono); }
.cmp-stock.is-in { color: var(--save); }
.cmp-stock.is-out { color: var(--err); }

/* ===== Empty / error / no-match states ===== */

.cmp2-state:empty { display: none; }

.cmp-edge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin: 40px 0;
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  animation: cmp2-rise 0.5s var(--ease-settle) both;
}

.cmp-edge__chip { font: 600 12px var(--font-mono); letter-spacing: 0.04em; padding: 6px 10px; border-radius: 999px; }
.cmp-edge__chip.is-warn { background: var(--warn-bg); color: var(--warn); }
.cmp-edge__chip.is-err { background: var(--err-bg); color: var(--err); }
.cmp-edge__title { font-size: clamp(24px, 3.4vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; max-width: 720px; text-wrap: balance; overflow-wrap: anywhere; }
.cmp-edge__body { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 620px; text-wrap: pretty; }
.cmp-edge__actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }

/* ===== Motion ===== */

@keyframes cmp2-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes cmp2-pop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: none; }
}

html.is-reduced-motion .cmp2-hero__glow,
html.is-reduced-motion .cmp2-orb,
html.is-reduced-motion .cmp2-orb__badge,
html.is-reduced-motion .cmp2-orb.st-ok .cmp2-orb__ring::before,
html.is-reduced-motion .cmp2-orb.st-loading .cmp2-orb__ring::after,
html.is-reduced-motion .cmp2-feature,
html.is-reduced-motion .cmp2-card,
html.is-reduced-motion .cmp2-offer,
html.is-reduced-motion .cmp2-ladder__bar i,
html.is-reduced-motion .cmp2-range-bar__track i,
html.is-reduced-motion .cmp2-skel::after,
html.is-reduced-motion .cmp2-skel--card,
html.is-reduced-motion .cmp-shop,
html.is-reduced-motion .cmp-edge {
  animation: none;
  opacity: 1;
  transform: none;
}

html.is-reduced-motion .cmp2-orb.st-ok .cmp2-orb__ring::before { display: none; }
html.is-reduced-motion .cmp2-drawer__panel,
html.is-reduced-motion .cmp2-drawer__scrim,
html.is-reduced-motion .cmp2-card,
html.is-reduced-motion .cmp2-feature { transition: none; }
html.is-reduced-motion .cmp2-card:hover,
html.is-reduced-motion .cmp2-feature:hover { transform: none; }
html.is-reduced-motion .cmp2-card:hover::after { animation: none; }

/* ===== Responsive ===== */

@media (max-width: 1080px) {
  .cmp2-body { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .cmp2-filters-toggle { display: inline-flex; }
  .cmp2-filters {
    position: static;
    display: none;
    max-height: none;
  }
  .cmp2-filters.is-open { display: flex; }
  .cmp2-feature { grid-template-columns: 200px minmax(0, 1fr); }
  .cmp2-feature__buy { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; }
}

@media (max-width: 700px) {
  .cmp2-hero__top { align-items: stretch; }
  .cmp2-search { flex: 1 1 100%; }
  .cmp2-orbs { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); padding: 10px clamp(16px, 4vw, 48px) 6px; scrollbar-width: none; }
  .cmp2-orbs::-webkit-scrollbar { display: none; }
  .cmp2-orb { width: 66px; }
  .cmp2-orb__ring { width: 52px; height: 52px; }
  .cmp2-orb__ring .cmp-avatar { width: 38px; height: 38px; }
  .cmp2-feature { grid-template-columns: 1fr; border-radius: 28px; }
  .cmp2-feature__media { min-height: 150px; }
  .cmp2-feature__body, .cmp2-feature__buy { padding: 20px; }
  .cmp2-grid, .cmp2-skel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cmp2-card__media { height: 108px; }
  .cmp2-card__initials { font-size: 40px; }
  .cmp2-card__body { padding: 12px; gap: 8px; }
  .cmp2-card__now { font-size: 20px; }
  .cmp2-card__tags { top: 8px; left: 8px; }
  .cmp2-card__variants { left: 8px; bottom: 8px; }
  .cmp2-grid.is-list { grid-template-columns: 1fr; }
  .cmp2-grid.is-list .cmp2-card__media { width: 96px; }
  .cmp2-grid.is-list .cmp2-card__body { grid-template-columns: 1fr; }
  .cmp2-grid.is-list .cmp2-card__price { grid-row: auto; grid-column: 1; justify-content: flex-start; }
  .cmp2-seg button { padding: 8px 12px; }
  .cmp2-drawer__panel {
    top: auto;
    left: 0;
    width: 100%;
    max-height: 90vh;
    padding: 12px 20px 24px;
    border-radius: 32px 32px 0 0;
    transform: translateY(105%);
  }
  .cmp2-drawer__panel::before {
    content: '';
    flex: none;
    align-self: center;
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: var(--line);
  }
}

/* ===== Motion (v2 extras) ===== */

/* Coin loader above the skeleton while the first shops are still answering. */
.cmp2-asking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 0;
  color: var(--ink);
}

.cmp2-asking b { font: 600 14px var(--font-text); color: var(--muted); }

/* Cards already on screen keep still when the list re-renders; FLIP moves them. */
.cmp2-card.is-settled,
.cmp2-feature.is-settled { animation: none; }

/* Odometer: each digit is a column of 0-9 that slides to its new value, the last digit first. */
.odo { display: inline-flex; vertical-align: top; }
.odo__c { display: inline-block; height: 1em; line-height: 1em; }
.odo__d { display: inline-block; height: 1em; overflow: hidden; line-height: 1em; }

.odo__s {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--n) * -1em));
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--k) * 90ms + 150ms);
}

.odo__s i { display: block; height: 1em; font-style: normal; line-height: 1em; }

/* CHEAPEST stamp: drops onto the photo, tilted, with a ripple. Only the first time a deal appears. */
.cmp2-stamp {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 16px;
  padding: 7px 14px;
  border: 3px solid var(--accent-ink);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 70%, #fff);
  color: var(--accent-ink);
  font: 800 13px/1 var(--font-mono);
  letter-spacing: 0.06em;
  transform: rotate(-9deg);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5);
}

.cmp2-stamp::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 3px solid var(--accent-ink);
  border-radius: 14px;
  opacity: 0;
}

.cmp2-feature.is-fresh .cmp2-stamp { animation: cmp2-stamp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both; }
.cmp2-feature.is-fresh .cmp2-stamp::after { animation: cmp2-stamp-ring 0.8s ease-out 1.4s both; }

@keyframes cmp2-stamp {
  from { opacity: 0; transform: translateY(-70px) rotate(14deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-9deg); }
}

@keyframes cmp2-stamp-ring {
  from { opacity: 0.8; transform: scale(1); }
  to { opacity: 0; transform: scale(1.7); }
}

.cmp2-feature__buy { position: relative; }

/* Drawer price ladder as a short race: every shop's runner heads for the finish line; the cheaper the price the
   further it gets, and the winner arrives first with a crown. */
.cmp2-race {
  position: relative;
  display: block;
  height: 34px;
  margin-right: 14px;
}

.cmp2-race::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 12px);
  opacity: 0.22;
}

.cmp2-race__trail {
  position: absolute;
  left: 0;
  top: 50%;
  height: 8px;
  margin-top: -4px;
  width: calc(var(--p) * 100%);
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.55;
  animation: cmp2-trail 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 120ms + 350ms);
}

.cmp2-offer.is-best .cmp2-race__trail { background: var(--accent-ink); opacity: 0.8; }

.cmp2-race__runner {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -30px;
  animation: cmp2-run 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 120ms + 350ms);
}

.cmp2-race__hop {
  display: block;
  width: 30px;
  height: 30px;
  animation: cmp2-hop 0.34s ease-in-out 4;
  animation-delay: calc(var(--i, 0) * 120ms + 350ms);
}

.cmp2-race__runner .cmp-avatar {
  width: 30px;
  height: 30px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6);
}

.cmp2-race__flag {
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 22px;
  margin-top: -11px;
  border-radius: 2px;
  background: repeating-conic-gradient(var(--accent-ink) 0 25%, #fff 0 50%) 0 0 / 6px 6px;
  opacity: 0.85;
}

.cmp2-race__crown {
  position: absolute;
  left: 50%;
  top: -17px;
  margin-left: -9px;
  font-size: 18px;
  line-height: 1;
  color: var(--accent-ink);
  animation: cmp2-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.7s both;
}

@keyframes cmp2-trail { from { width: 0; } to { width: calc(var(--p) * 100%); } }
@keyframes cmp2-run { from { left: 30px; } to { left: calc(var(--p) * 100%); } }
@keyframes cmp2-hop { 50% { transform: translateY(-7px); } }

/* "Arranging into products": three little cards shuffle while the shops are lined up. */
.cmp2-arrange { display: inline-flex; align-items: center; gap: 10px; }
.cmp2-arrange__deck { position: relative; display: inline-block; width: 34px; height: 20px; }

.cmp2-arrange__deck i {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 16px;
  border: 2px solid var(--surface);
  border-radius: 5px;
  background: var(--brand);
  animation: cmp2-shuffle 1.5s ease-in-out infinite;
}

.cmp2-arrange__deck i:nth-child(2) { background: var(--save); animation-delay: -0.5s; }
.cmp2-arrange__deck i:nth-child(3) { background: var(--accent); animation-delay: -1s; }

@keyframes cmp2-shuffle {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); z-index: 1; }
  33% { transform: translate(12px, 3px) rotate(7deg); z-index: 3; }
  66% { transform: translate(5px, -3px) rotate(-2deg); z-index: 2; }
}

/* Cards that were just merged (sizes folded, same product in several shops) ring once and tag themselves. */
.cmp2-card.is-merged::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 3px solid var(--accent);
  border-radius: 24px;
  pointer-events: none;
  animation: cmp2-merged 1.6s ease-out 1 both;
}

.cmp2-tag--merge { background: var(--ink); color: var(--bg); animation: cmp2-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cmp2-merged {
  0% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  100% { opacity: 0; box-shadow: 0 0 0 18px transparent; }
}

/* The small coin beside the progress meter while shops are still answering. */
.coin--sm { zoom: 0.42; flex: none; margin-right: 6px; }

/* Search morph: the field grows out of a small pill on arrival. */
.cmp2-search.is-morph { animation: cmp2-morph 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cmp2-morph {
  from { clip-path: inset(0 0 0 78% round 999px); opacity: 0.4; }
  to { clip-path: inset(0 0 0 0 round 999px); opacity: 1; }
}

html.is-reduced-motion .cmp2-feature.is-fresh .cmp2-stamp,
html.is-reduced-motion .cmp2-feature.is-fresh .cmp2-stamp::after,
html.is-reduced-motion .cmp2-race__trail,
html.is-reduced-motion .cmp2-race__runner,
html.is-reduced-motion .cmp2-race__hop,
html.is-reduced-motion .cmp2-race__crown,
html.is-reduced-motion .cmp2-arrange__deck i,
html.is-reduced-motion .cmp2-card.is-merged::before,
html.is-reduced-motion .cmp2-search.is-morph { animation: none; }
html.is-reduced-motion .odo__s { transition: none; }
