:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e6e8ec;
  --accent: #2563eb;     /* neutral blue (was LEGO red — trade-dress) */
  --gold: #2563eb;       /* kept var name; no longer LEGO yellow */
  --good: #138a4e;
  --good-bg: #e7f6ee;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.05);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* Legal disclaimer bar — top of every page */
.topbar { background: #16181d; color: #b8bdc7; font-size: 12px; line-height: 1.45;
  text-align: center; padding: 7px 14px; }
.topbar b { color: #e7e9ee; font-weight: 600; }
@media (max-width: 640px) { .topbar { font-size: 11px; padding: 6px 10px; } }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.85);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 12px 18px; display: flex; gap: 16px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .stud { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  position: relative; flex-shrink: 0; }
.brand .stud::after { content: "₺"; position: absolute; inset: 0; display: grid;
  place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 4px; flex-shrink: 0; }
.nav a { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: #eceef1; color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .top-in { flex-wrap: wrap; } .search { order: 3; flex-basis: 100%; max-width: none; } }
@media (max-width: 640px) { .nav a { padding: 6px 9px; font-size: 13px; } }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font-size: 15px; outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(208,16,18,.12); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top .stat { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) { .top .stat { display: none; } .top-in { gap: 10px; } }

/* Layout */
main { max-width: 1180px; margin: 0 auto; padding: 18px; }
.hero { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 2px 14px; }
.hero h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.hero p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: inline-flex; background: #eceef1; border-radius: 10px; padding: 3px; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600;
  font-size: 14px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 14px; cursor: pointer; }
.spacer { flex: 1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 13px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* List view (no images) */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; box-shadow: var(--shadow); transition: border-color .12s ease; }
.row:hover { border-color: var(--accent); }
.row-main { min-width: 0; flex: 1; }
.row-nm { font-weight: 600; font-size: 14.5px; line-height: 1.35; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.row-main .meta { margin-top: 3px; }
.row-price { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.price-line { display: flex; align-items: baseline; gap: 8px; }
@media (max-width: 560px) {
  .row-nm { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .row { padding: 11px 13px; gap: 10px; }
}

/* Detail (no photo) */
.detail-info { max-width: 820px; }

/* Grid + cards (legacy, kept) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
  display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(16,24,40,.12); }
.thumb { aspect-ratio: 1/1; background: #fff; display: grid; place-items: center; padding: 14px; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-b { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .nm { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.theme-tag { color: var(--accent); font-weight: 700; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.was { color: var(--muted); text-decoration: line-through; font-size: 12.5px; }
.sellers { color: var(--muted); font-size: 12px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; width: fit-content; }
.badge.low { background: var(--good-bg); color: var(--good); }
.badge.drop { background: #fff1f1; color: var(--accent); }
.badge.off { background: var(--good-bg); color: var(--good); }
.badge.off i { font-style: normal; font-weight: 600; opacity: .75; }

/* Official-price table on the detail page */
.official { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 4px; box-shadow: var(--shadow); margin-bottom: 22px; }
.official h3 { margin: 10px 14px 6px; font-size: 15px; }
.off-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 11px 14px; border-top: 1px solid var(--line); }
.off-row:first-of-type { border-top: 0; }
.off-row .src { font-weight: 600; }
.off-row .src small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.off-row .rp { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.off-row .dp { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
.off-row .dp.pos { color: var(--good); }
.off-row .dp.neg { color: var(--accent); }
.off-row .dp.na { color: var(--muted); font-weight: 500; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.note { background: #fffbe6; border: 1px solid #ffe9a8; color: #7a5d00; padding: 12px 14px;
  border-radius: 12px; font-size: 13.5px; margin-bottom: 16px; }
.note b { color: #5c4600; }

footer { max-width: 1180px; margin: 30px auto; padding: 18px; color: var(--muted); font-size: 12.5px;
  border-top: 1px solid var(--line); }

/* Detail page */
.detail { display: grid; grid-template-columns: minmax(0,380px) 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
.detail .photo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); }
.detail .photo img { width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.detail h1 { font-size: 23px; margin: 4px 0 6px; letter-spacing: -.02em; }
.kv { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin: 8px 0 18px; }
.kv b { color: var(--ink); }
.bignum { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.bignum .p { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.buy { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
  padding: 11px 18px; border-radius: 11px; font-weight: 700; margin: 6px 0 22px; }
.buy:hover { filter: brightness(.94); }
.stats3 { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px;
  box-shadow: var(--shadow); min-width: 120px; }
.stat-box .l { color: var(--muted); font-size: 12px; }
.stat-box .v { font-size: 18px; font-weight: 700; margin-top: 2px; }
.chart-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); }
.chart-wrap h3 { margin: 0 0 4px; font-size: 15px; }
.chart-wrap .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.back { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 12px; }
.back:hover { color: var(--ink); }
