/* Hot Movers page — /deals/today
   Extends design-system.css. Page-specific tokens and component styles below. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces — darker palette for contrast UX (mirrors cards.css) */
  --surface-2: #1c2230;
  /* Extended text — maps to design-system tokens */
  --text-muted: #8ca0c8;   /* maps to --text-2 */
  --text-dim:  #4d6382;    /* maps to --text-3 */
  /* Semantic — mirrors cards.css palette */
  --success-dim:  rgba(61,214,140,0.15);
  --success-dim2: rgba(61,214,140,0.08);
  --green:        #3dd68c;
  --green-border: rgba(61,214,140,0.25);
  --danger-dim:   rgba(239,68,68,0.15);
  --danger-dim2:  rgba(239,68,68,0.25);
  --red:          #ef4444;
  --winner-glow:  0 0 0 2px rgba(61,214,140,0.3), 0 4px 24px rgba(61,214,140,0.08);
  --radius:       12px;
  --radius-sm:    8px;
  /* Layout */
  --container-max: 900px;
}

html { scroll-behavior: smooth; }

body.hm-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Stale data banner ── */
.hm-stale-banner {
  background: rgba(251,191,36,0.1);
  border-bottom: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Header ── */
.hm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.hm-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hm-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}
.hm-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hm-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.hm-nav a:hover { color: var(--text); background: var(--surface); }
.hm-nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600;
}
.hm-nav-cta:hover { background: var(--primary-h) !important; }

/* ── Main ── */
.hm-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Page header ── */
.hm-page-header {
  padding: 40px 0 32px;
}
.hm-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hm-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hm-cached-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.hm-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hm-subhead {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 24px;
}
.hm-subhead strong { color: var(--text); }

.hm-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.hm-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 10px;
  font-size: 0.8125rem;
}
.hm-stat-val {
  font-weight: 700;
  color: var(--text);
}
.hm-stat-lbl {
  color: var(--text-muted);
}

/* ── Cards list ── */
.hm-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.hm-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "rank img"
    "rank body";
  gap: 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hm-card:hover {
  border-color: var(--text-dim);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* Rank badge */
.hm-rank {
  grid-area: rank;
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-dim);
  flex-shrink: 0;
  align-self: start;
  margin-top: 2px;
}

/* Card image */
.hm-img-wrap {
  grid-area: img;
  position: relative;
  width: 80px;
  flex-shrink: 0;
}
.hm-img {
  width: 80px;
  height: 112px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: block;
}
.hm-game-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Card body */
.hm-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.hm-card-meta {}
.hm-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}
.hm-card-name-link {
  color: inherit;
  text-decoration: none;
}
.hm-card-name-link:hover {
  text-decoration: underline;
  color: var(--text);
}
.hm-card-set {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Price comparison row */
.hm-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hm-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hm-price-lbl {
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hm-price-prior {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: line-through;
}
.hm-price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--green);
}
.hm-price-arrow {
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

/* Drop pill — red (prices fell) */
.hm-drop-pill {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-left: auto;
}
.hm-drop-pill--red {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid var(--danger-dim2);
}

/* Market reference */
.hm-market-ref {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}
.hm-market-lbl { color: var(--text-dim); }
.hm-market-val {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}
.hm-market-savings {
  color: var(--green);
  font-weight: 600;
}

/* Marketplace comparison */
.hm-mp-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.hm-mp-col {
  border-radius: var(--radius-sm);
  padding: 14px;
  position: relative;
  transition: box-shadow 0.2s;
}
.hm-mp-col--winner {
  background: linear-gradient(160deg, var(--success-dim), var(--success-dim2));
  border: 1.5px solid var(--green-border);
  box-shadow: var(--winner-glow);
}
.hm-mp-col--other {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hm-mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.hm-mp-logo {
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hm-mp-logo--tcg { color: var(--primary); }
.hm-mp-logo--ebay { color: #60a5fa; }

.hm-best-badge {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.hm-mp-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}
.hm-mp-listing {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.hm-mp-total {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
}
.hm-mp-col--winner .hm-mp-total { color: var(--green); }

/* Buy buttons */
.hm-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  border: 2px solid transparent;
}
.hm-buy-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(249,115,22,0.2);
}
.hm-buy-btn--primary:hover {
  background: var(--primary-h);
  border-color: var(--primary-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.3);
}
.hm-buy-btn--secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.hm-buy-btn--secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Empty state ── */
.hm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  gap: 16px;
}
.hm-empty-icon { font-size: 3rem; }
.hm-empty h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.hm-empty p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 360px;
}

/* ── FTC ── */
.hm-ftc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 40px;
  text-align: center;
}
.hm-ftc--top {
  margin-bottom: 28px;
}
.ftc-icon {
  margin-right: 4px;
  font-style: normal;
}

/* ── Email capture section ── */
.hm-alerts-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 40px;
}
.hm-alerts-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hm-alerts-icon { font-size: 2.5rem; flex-shrink: 0; }
.hm-alerts-copy { flex: 1; min-width: 220px; }
.hm-alerts-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.hm-alerts-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.hm-alerts-form-wrap { flex: 1; min-width: 260px; }

.hm-alerts-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hm-form-input {
  flex: 1;
  min-width: 180px;
  min-height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9375rem;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.hm-form-input::placeholder { color: var(--text-dim); }
.hm-form-input:focus { border-color: var(--primary); }

.hm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s;
}
.hm-btn-primary:hover {
  background: var(--primary-h);
  transform: translateY(-1px);
}
.hm-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.hm-form-status {
  font-size: 0.875rem;
  min-height: 1.4em;
  margin-bottom: 6px;
}
.hm-form-status--ok { color: var(--success); }
.hm-form-status--err { color: var(--danger); }
.hm-form-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ── Back link ── */
.hm-back-wrap { margin-bottom: 40px; }
.hm-back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.hm-back-link:hover { color: var(--primary); }

/* ── Footer ── */
.hm-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 20px;
}
.hm-footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.hm-footer-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.hm-footer-nav {
  display: flex;
  gap: 16px;
  flex: 1;
}
.hm-footer-nav a {
  color: var(--text-dim);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s;
}
.hm-footer-nav a:hover { color: var(--text-muted); }
.hm-footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hm-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "rank img"
      "rank body";
    padding: 16px;
    gap: 0 14px;
  }
  .hm-mp-section {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hm-alerts-section { padding: 24px 20px; }
  .hm-alerts-inner { flex-direction: column; align-items: flex-start; }
  .hm-alerts-form-wrap { width: 100%; }
  .hm-footer-nav { display: none; }
}

@media (max-width: 480px) {
  .hm-main { padding: 0 16px 60px; }
  .hm-page-header { padding: 28px 0 24px; }
  .hm-stat-pills { gap: 8px; }

  .hm-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "img"
      "body";
    padding: 16px;
    gap: 14px;
  }
  .hm-rank { display: none; } /* Hide rank on very small screens */
  .hm-img-wrap {
    width: 72px;
    height: 100px;
  }
  .hm-img { width: 72px; height: 100px; }
  .hm-game-badge { bottom: -5px; font-size: 0.5625rem; }

  .hm-mp-section {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hm-mp-col { padding: 12px; }

  .hm-alerts-form { flex-direction: column; }
  .hm-form-input, .hm-btn-primary { width: 100%; }
  .hm-btn-primary { justify-content: center; }
}

/* ── Skeleton Loading ── */
.hm-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}
.hm-skel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 20px;
}
.hm-skel-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.hm-skel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-skel-line {
  border-radius: var(--radius-sm);
}
.hm-skel-line--img { width: 80px; height: 112px; border-radius: var(--radius-sm); }
.hm-skel-line--title { height: 18px; width: 65%; }
.hm-skel-line--meta { height: 14px; width: 40%; }
.hm-skel-line--price { height: 22px; width: 30%; }
.hm-skel-line--badge { height: 28px; width: 80px; border-radius: 20px; margin-left: auto; }

@media (max-width: 480px) {
  .hm-skel-card { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .hm-skel-rank { display: none; }
  .hm-skel-line--img { width: 72px; height: 100px; }
}

/* Track price CTA — per-card link to card detail #set-alert */
.hm-track-cta { margin-top: 12px; }
.hm-track-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8b949e;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #2a3248;
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.hm-track-btn:hover {
  color: #e6edf3;
  border-color: #22c55e;
  background: rgba(34,197,94,0.06);
}
/* ═══════════════════════════════════════════════════════════
   CARD IMAGE — consistent sizing across all list views
   Uses object-fit: contain so full cards are never cropped.
   Background is dark so different-shaped cards look good.
   ═══════════════════════════════════════════════════════════ */
.card-img-wrap {
  flex-shrink: 0;
  background: #131824;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 100%;
  background: transparent;
}

/* Sizes */
.card-img--sm  { width: 80px;  height: 112px; }
.card-img--md  { width: 120px; height: 168px; }
.card-img--lg  { width: 160px; height: 224px; }

/* Fallback — styled placeholder, not a broken image icon */
.card-img-wrap--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  text-align: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1c2230 0%, #131824 100%);
}

.card-fallback__badge {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.25);
  border-radius: 8px;
  padding: 2px 5px;
  margin-bottom: 2px;
}

.card-fallback__name {
  font-size: 0.65rem;
  font-weight: 700;
  color: #c8d0e0;
  line-height: 1.3;
  max-width: 68px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-fallback__set {
  font-size: 0.55rem;
  color: #4d6382;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Small screen fallbacks */
@media (max-width: 480px) {
  .card-img--sm { width: 72px; height: 100px; }
  .card-fallback__name { font-size: 0.6rem; max-width: 60px; }
  .card-fallback__set  { font-size: 0.5rem; max-width: 60px; }
}
