:root {
  --bg: #0f1117;
  --bg-card: #1a1d26;
  --bg-card2: #222535;
  --accent: #00e5a0;
  --accent-dim: rgba(0,229,160,0.12);
  --accent-border: rgba(0,229,160,0.25);
  --red: #E24B4A;
  --red-dim: rgba(226,75,74,0.12);
  --red-border: rgba(226,75,74,0.25);
  --text: #ffffff;
  --text-muted: #888899;
  --text-dim: #555566;
  --border: rgba(255,255,255,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Consolas, monospace;
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }

/* Header */
.header {
  padding: 24px 0 20px;
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.logo { font-size: 28px; font-weight: 700; letter-spacing: -1px; color: var(--text); }
.logo span { color: var(--accent); }
.logo sup { font-size: 14px; color: var(--text-muted); font-weight: 400; vertical-align: super; }
.header-right { display: flex; gap: 8px; flex-wrap: wrap; }

/* Badges */
.badge { font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.badge-green { color: var(--accent); background: var(--accent-dim); border: 0.5px solid var(--accent-border); }
.badge-gray  { color: var(--text-muted); background: rgba(255,255,255,0.05); border: 0.5px solid var(--border); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin: 20px 0;
}
.stat { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.stat-num   { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filter-btn {
  padding: 6px 16px; border-radius: 20px;
  border: 0.5px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-size: 13px; cursor: pointer;
  text-decoration: none; font-family: inherit;
  transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent);
}

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

/* Card */
.card {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.card:hover { border-color: rgba(255,255,255,0.14); }

.card-img {
  background: var(--bg-card2); height: 160px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.card-emoji  { font-size: 48px; }

.badge-drop {
  position: absolute; top: 10px; left: 10px;
  background: var(--red-dim); color: var(--red);
  border: 0.5px solid var(--red-border);
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.badge-retailer {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.6); color: var(--accent);
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; max-width: 90%;
  overflow: hidden; text-overflow: ellipsis;
}

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-meta  { font-size: 11px; color: var(--text-dim); }
.card-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; flex: 1; }

.price-row  { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 4px; }
.price-now  { font-size: 22px; font-weight: 700; color: var(--text); }
.price-old  { font-size: 13px; color: #aaaaaa; text-decoration: line-through; }
.price-save { font-size: 12px; color: var(--accent); width: 100%; }

.cta-btn {
  display: block; text-align: center;
  padding: 10px; border-radius: 8px;
  background: var(--accent); color: #0a2e20;
  font-weight: 700; font-size: 13px;
  text-decoration: none; margin-top: 10px;
  font-family: inherit; transition: opacity 0.15s;
}
.cta-btn:hover { opacity: 0.85; }

/* Empty */
.empty { text-align: center; color: var(--text-muted); padding: 60px 0; font-size: 14px; }

/* Footer */
.footer {
  margin-top: 48px; padding-top: 20px;
  border-top: 0.5px solid var(--border);
  text-align: center; display: flex; flex-direction: column; gap: 6px;
}
.footer p { font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.footer a  { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--accent); }

@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .logo { font-size: 22px; }
  .card-img { height: 120px; }
}
