/* ── Old rdb-* (kept for backward compat) ───────────────── */
.rdb-header-block { background:#fff; border:1px solid #e4e4e7; border-radius:12px; padding:24px; margin-bottom:16px; }
.rdb-header-top { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; }
.rdb-action-bar { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.rdb-action-btn { flex:1; min-width:120px; justify-content:center; font-size:14px; font-weight:600; padding:11px 16px; border-radius:8px; }
.rdb-action-delete { background:#fff1f2; color:#dc2626; border:1px solid #fecaca; }
.rdb-action-delete:hover { background:#ffe4e6; }
.rdb-plat-tab { padding:6px 14px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; border:1px solid #e4e4e7; background:#fafafa; color:#52525b; transition:all 150ms; }
.rdb-plat-tab.active { background:#2563eb; border-color:#2563eb; color:#fff; }

/* ── rdb2 wrapper ───────────────────────────────────────── */
.rdb2 {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
}

/* ── Header ── */
.rdb2-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.rdb2-item-name { font-size: 18px; font-weight: 700; color: #18181b; line-height: 1.3; }
.rdb2-item-meta { font-size: 12px; color: #71717a; margin-top: 4px; }
.rdb2-back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 12px; height: 32px;
  font-size: 12px; font-weight: 600; color: #52525b;
  background: #fff; border: 1px solid #e4e4e7; border-radius: 8px;
  cursor: pointer; white-space: nowrap;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.rdb2-back-btn:hover { background: #fafafa; border-color: #d4d4d8; color: #18181b; }
.rdb2-back-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ── Generic card ── */
.rdb2-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 150ms;
}
.rdb2-card:hover { border-color: #d4d4d8; }

/* ── Card header row (label + copy btn) ── */
.rdb2-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* ── Price card (flat, not dark) ── */
.rdb2-price-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.rdb2-price-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #71717a;
}
.rdb2-price-big {
  font-size: 40px; font-weight: 700; letter-spacing: -1.5px;
  line-height: 1; color: #18181b;
}
.rdb2-price-sells { font-size: 13px; color: #52525b; }
.rdb2-price-basis {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 4px; padding: 3px 10px;
  background: #f4f4f5; border: 1px solid #e4e4e7;
  border-radius: 999px; font-size: 11px; color: #71717a; font-weight: 500;
}

/* ── Section label ── */
.rdb2-sec-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #71717a; margin-bottom: 12px;
}

/* ── Copy button ── */
.rdb2-copy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; font-size: 13px; font-weight: 500;
  color: #2563eb; background: #fff; border: 1px solid #e4e4e7;
  border-radius: 8px; cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.rdb2-copy-btn:hover { background: #eff6ff; border-color: #bfdbfe; }
.rdb2-copy-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* ── Keywords ── */
.rdb2-keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.rdb2-kw {
  padding: 4px 10px; background: #f4f4f5; border: 1px solid #e4e4e7;
  border-radius: 999px; font-size: 12px; font-weight: 500; color: #52525b;
}

/* ── Description ── */
.rdb2-desc {
  font-size: 14px; color: #52525b; line-height: 1.7;
  white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.rdb2-desc.rdb2-desc-full { display: block; -webkit-line-clamp: unset; overflow: visible; }
.rdb2-show-more {
  display: inline-flex; align-items: center; margin-top: 8px;
  font-size: 12px; font-weight: 600; color: #2563eb;
  background: none; border: none; cursor: pointer; padding: 0;
}
.rdb2-show-more:hover { opacity: 0.7; }

/* ── Price Explorer ── */
.rdb2-explorer-top {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.rdb2-drag-hint { font-size: 11px; color: #a1a1aa; }
.rdb2-explorer-val { font-size: 22px; font-weight: 700; color: #18181b; letter-spacing: -0.5px; }

/* ── Slider ── */
.rdb2-slider-wrap { margin-bottom: 14px; }
.rdb2-slider-track {
  position: relative; height: 6px; background: #e4e4e7;
  border-radius: 999px; margin-bottom: 6px;
}
.rdb2-slider-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: #2563eb; border-radius: 999px; pointer-events: none;
}
.rdb2-slider {
  -webkit-appearance: none; appearance: none;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 100%; height: 22px; background: transparent;
  outline: none; cursor: pointer; margin: 0; padding: 0; z-index: 2;
}
.rdb2-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #2563eb; border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(37,99,235,0.35);
  cursor: grab; margin-top: -5px;
  transition: box-shadow 150ms;
}
.rdb2-slider::-webkit-slider-thumb:hover { box-shadow: 0 2px 12px rgba(37,99,235,0.5); }
.rdb2-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #2563eb; border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(37,99,235,0.35); cursor: grab;
}
.rdb2-slider-bounds {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #a1a1aa; margin-top: 4px;
}

/* ── Explorer stats ── */
.rdb2-exstats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.rdb2-exstat {
  text-align: center; padding: 10px 8px;
  background: #fff; border: 1px solid #e4e4e7; border-radius: 8px;
}
.rdb2-exstat-val { font-size: 16px; font-weight: 700; color: #18181b; line-height: 1; margin-bottom: 4px; }
.rdb2-exstat-lbl { font-size: 10px; color: #71717a; font-weight: 500; }
.rdb2-exstat-sub { font-size: 10px; color: #a1a1aa; margin-top: 3px; font-weight: 400; }

/* ── Legend ── */
.rdb2-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.rdb2-leg-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: #71717a; font-weight: 500;
}
.rdb2-leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Mid grid (2-col) ── */
.rdb2-mid-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
}

/* ── Listing Quality ── */
.rdb2-qual-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; }
.rdb2-qual-row {
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 8px;
}
.rdb2-qual-label { font-size: 12px; color: #52525b; font-weight: 500; }
.rdb2-qual-track {
  height: 5px; background: #e4e4e7; border-radius: 999px; overflow: hidden;
}
.rdb2-qual-fill {
  height: 100%; background: #2563eb; border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.rdb2-qual-rating { font-size: 10px; font-weight: 700; text-align: right; }

/* ── AI Titles ── */
.rdb2-titles-list { display: flex; flex-direction: column; gap: 0; }
.rdb2-title-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid #f4f4f5;
  cursor: pointer; border-radius: 4px; margin: 0 -4px;
  transition: background 150ms;
}
.rdb2-title-row:last-child { border-bottom: none; }
.rdb2-title-row:hover { background: #fafafa; }
.rdb2-title-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: #f4f4f5; border: 1px solid #e4e4e7; color: #71717a;
  font-size: 10px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.rdb2-title-text { flex: 1; font-size: 13px; color: #18181b; font-weight: 500; line-height: 1.4; }
.rdb2-title-copy { color: #a1a1aa; flex-shrink: 0; transition: color 150ms; }
.rdb2-title-row:hover .rdb2-title-copy { color: #2563eb; }

/* ── Photo Checklist ── */
.rdb2-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rdb2-photo-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; background: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px;
}
.rdb2-photo-icon { color: #71717a; flex-shrink: 0; }
.rdb2-photo-name { font-size: 13px; font-weight: 600; color: #18181b; }
.rdb2-photo-desc { font-size: 11px; color: #71717a; margin-top: 2px; }

/* ── Preview alert ── */
.rdb2-preview-alert {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-left: 3px solid #3b82f6;
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
}
.rdb2-preview-alert-text { font-size: 13px; color: #1e40af; line-height: 1.5; }
.rdb2-preview-alert-link {
  font-weight: 700; color: #2563eb; background: none; border: none;
  cursor: pointer; padding: 0; font-size: 13px; text-decoration: underline;
  text-underline-offset: 2px;
}
.rdb2-preview-alert-link:hover { color: #1d4ed8; }

/* ── Premium hero card: horizontal split ── */
.rdb2-hero-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  display: flex;
  flex-direction: row;
  min-height: 220px;
}

/* Left: image column */
.rdb2-hero-img-wrap {
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 50%, #e8eef6 100%);
  border-right: 1px solid #e4e4e7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 14px;
  gap: 10px;
}
.rdb2-hero-img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.12));
}
.rdb2-hero-img-placeholder {
  width: 100%; height: 140px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(148,163,184,0.08);
}
.rdb2-hero-thumbs {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.rdb2-hero-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
  transition: transform 150ms;
}
.rdb2-hero-thumb:hover { transform: scale(1.1); }

/* Right: identity column */
.rdb2-hero-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  gap: 6px;
  min-width: 0;
}
.rdb2-hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rdb2-new-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; height: 28px;
  font-size: 11.5px; font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  white-space: nowrap;
  flex-shrink: 0;
}
.rdb2-new-btn:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }

.rdb2-hero-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  line-height: 1.25;
}
.rdb2-hero-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.rdb2-hero-cat-pill {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

/* Price preview inside hero */
.rdb2-hero-price-preview {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.rdb2-hero-price-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 3px;
}
.rdb2-hero-price-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #0f172a;
  line-height: 1;
}
.rdb2-hero-price-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
}

/* Mobile: stack vertically */
@media (max-width: 500px) {
  .rdb2-hero-card { flex-direction: column; min-height: unset; }
  .rdb2-hero-img-wrap { width: 100%; border-right: none; border-bottom: 1px solid #e4e4e7; padding: 16px; }
  .rdb2-hero-img { max-height: 150px; }
  .rdb2-hero-right { padding: 14px; }
  .rdb2-hero-name { font-size: 16px; }
  .rdb2-hero-price-val { font-size: 22px; }
}

/* ── Item specs ── */
.rdb2-specs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.rdb2-spec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #f4f4f5; gap: 8px;
}
.rdb2-spec-row:nth-child(odd) { padding-right: 16px; }
.rdb2-spec-row:nth-last-child(-n+2) { border-bottom: none; }
.rdb2-spec-label { font-size: 12px; color: #71717a; font-weight: 500; }
.rdb2-spec-val { font-size: 13px; color: #18181b; font-weight: 600; text-align: right; }

/* ── Highlights / flaws ── */
.rdb2-highlights { display: flex; flex-direction: column; gap: 7px; }
.rdb2-highlight-row { display: flex; align-items: flex-start; gap: 8px; }
.rdb2-highlight-ico { flex-shrink: 0; margin-top: 1px; }
.rdb2-highlight-ico--green { color: #16a34a; }
.rdb2-highlight-ico--amber { color: #d97706; }
.rdb2-highlight-text { font-size: 13px; color: #52525b; line-height: 1.5; }

/* ── Condition ── */
.rdb2-condition-grade { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.rdb2-cond-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: #eff6ff;
  border: 1px solid #bfdbfe; color: #1d4ed8;
}
.rdb2-cond-notes { font-size: 12px; color: #52525b; line-height: 1.5; margin: 0; }

/* ── Insight card (icon + text) ── */
.rdb2-insight-card { display: flex; align-items: flex-start; gap: 12px; }
.rdb2-insight-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  color: #2563eb; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.rdb2-insight-line { font-size: 13px; color: #52525b; line-height: 1.6; margin: 0; }

/* ── Price band ── */
.rdb2-price-band {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 12px;
  background: #fafafa; border: 1px solid #e4e4e7; border-radius: 8px;
}
.rdb2-band-item { flex: 1; text-align: center; }
.rdb2-band-item--highlight .rdb2-band-val { color: #2563eb; }
.rdb2-band-val { font-size: 16px; font-weight: 700; color: #18181b; line-height: 1; }
.rdb2-band-lbl { font-size: 11px; font-weight: 600; color: #52525b; margin-top: 3px; }
.rdb2-band-sub { font-size: 10px; color: #a1a1aa; margin-top: 1px; }
.rdb2-band-divider { width: 1px; height: 40px; background: #e4e4e7; flex-shrink: 0; }

/* ── Tip card ── */
.rdb2-tip-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; background: #fafafa; border: 1px solid #e4e4e7; border-radius: 12px;
}
.rdb2-tip-icon { color: #71717a; flex-shrink: 0; margin-top: 1px; }
.rdb2-tip-text { font-size: 13px; color: #52525b; line-height: 1.65; }

/* ── Action buttons ── */
.rdb2-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; height: 40px; font-size: 14px; font-weight: 600;
  color: #52525b; background: #fff; border: 1px solid #e4e4e7; border-radius: 8px;
  cursor: pointer; transition: background 150ms, border-color 150ms, color 150ms;
}
.rdb2-btn-ghost:hover { background: #fafafa; border-color: #d4d4d8; color: #18181b; }
.rdb2-btn-ghost:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.rdb2-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; height: 40px; font-size: 14px; font-weight: 600;
  color: #fff; background: #2563eb; border: 1px solid #2563eb; border-radius: 8px;
  cursor: pointer; transition: background 150ms;
}
.rdb2-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.rdb2-btn-primary:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.rdb2-btn-delete {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; height: 40px; font-size: 13px; font-weight: 600;
  color: #dc2626; background: #fff1f2; border: 1px solid #fecaca; border-radius: 8px;
  cursor: pointer; transition: background 150ms, border-color 150ms;
}
.rdb2-btn-delete:hover { background: #ffe4e6; border-color: #fda4af; }
.rdb2-btn-delete:focus-visible { outline: 2px solid #dc2626; outline-offset: 2px; }

/* ── Scroll hint ── */
@keyframes rdb2-bob { 0%,100% { transform: translateY(0); opacity:.5; } 50% { transform: translateY(5px); opacity:.9; } }
.rdb2-scroll-hint {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 0 14px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95) 40%);
  color: #2563eb; font-size: 11px; font-weight: 500; letter-spacing: .04em; gap: 1px;
  animation: rdb2-bob 2.2s ease-in-out infinite;
  pointer-events: none; user-select: none;
  z-index: 10;
}

/* ── Mobile ── */
@media (max-width: 700px) {
  .rdb2-mid-grid { grid-template-columns: 1fr; }
  .rdb2-photo-grid { grid-template-columns: 1fr 1fr; }
  .rdb2-exstats { grid-template-columns: repeat(3,1fr); }
  .rdb2-price-big { font-size: 34px; }
  .rdb2-qual-row { grid-template-columns: 56px 1fr 60px; }
}

@media (max-width: 640px) {
  .rdb2 { gap: 12px; padding-bottom: 24px; }
  .rdb2-header { gap: 8px; }
  .rdb2-item-name { font-size: 16px; overflow-wrap: break-word; word-break: break-word; }
  .rdb2-price-big { font-size: 32px; }
  .rdb2-mid-grid { grid-template-columns: 1fr; gap: 12px; }
  .rdb2-exstats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .rdb2-exstat { min-height: 56px; }
  .rdb2-exstat-val { font-size: 13px; }
  .rdb2-exstat-lbl { font-size: 9px; }
  .rdb2-exstat-sub { font-size: 9px; }
  .rdb2-photo-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rdb2-photo-item { min-height: 44px; }
  .rdb2-title-row { min-height: 44px; align-items: center; }
  .rdb2-title-copy { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: flex-end; }
  .rdb2-qual-row { grid-template-columns: 60px 1fr 70px; gap: 6px; }
  .rdb2-copy-btn { min-height: 36px; padding: 0 12px; }
  .rdb2-btn-ghost, .rdb2-btn-primary, .rdb2-btn-delete { min-height: 44px; width: 100%; }
  .rdb2-card { padding: 12px 12px; }
  .rdb2-back-btn { min-height: 36px; }
  /* Price Explorer: keep track contained */
  .rdb2-slider-wrap { overflow: hidden; }
  .rdb2-slider-track { overflow: visible; }
  .rdb2-price-card { padding: 14px; }
  .rdb2-price-big { font-size: 30px; }
  .rdb2-specs-grid { grid-template-columns: 1fr; gap: 0; }
  .rdb2-spec-row { padding-right: 0 !important; }
  .rdb2-spec-row:nth-last-child(-n+2) { border-bottom: none; }
  .rdb2-spec-row:last-child { border-bottom: none; }
}