:root {
  --bg: #f5f1e8;
  --bg-2: #efe9dc;
  --card: #fbf9f4;
  --ink: #26221c;
  --ink-2: #6b6357;
  --ink-3: #9a917f;
  --line: #e3dccd;
  --accent: #f97316;
  --good: #15803d;
  --bad: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 0 #fff inset, 0 8px 24px -12px rgba(70, 55, 30, .25), 0 2px 6px -2px rgba(70, 55, 30, .12);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; display: flex; flex-direction: column;
  background-image: radial-gradient(rgba(120, 100, 60, .05) 1px, transparent 1px); background-size: 4px 4px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1680px, 100% - 16px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 249, 244, .9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); box-shadow: 0 6px 20px -14px rgba(70, 55, 30, .35); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink-2); }
.brand-mark svg { width: 26px; height: 26px; }
.brand b { display: block; font-size: 18px; letter-spacing: .02em; }
.brand small { display: block; font-size: 12px; color: var(--ink-2); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 7px 13px; border-radius: 999px; font-size: 14px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a.active { background: var(--bg-2); color: var(--ink); box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; width: 220px; }
.search svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 14px; }

/* ---------- home ---------- */
.hero { padding: 44px 0 26px; }
.hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--ink-2); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; padding-bottom: 56px; }
.cat { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); text-decoration: none; transition: transform .15s, box-shadow .15s;
  outline: 1px dashed rgba(160, 140, 100, .28); outline-offset: -8px; }
.cat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(70, 55, 30, .4); }
.cat-top { display: flex; align-items: center; gap: 16px; }
.cat-icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.06), 0 0 0 5px color-mix(in srgb, var(--c) 7%, transparent); }
.cat-icon svg { width: 42px; height: 42px; }
.cat h2 { margin: 0 0 6px; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; }
.pill { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.cat-cta { align-self: center; font-size: 14px; padding: 6px 16px; border-radius: 8px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cat.soon { cursor: default; }
.cat.soon .cat-icon { opacity: .85; }
.cat.soon .cat-cta { color: var(--ink-3); box-shadow: none; background: var(--bg-2); }
.cat:not(.soon) .cat-cta { color: var(--c); font-weight: 600; }

/* ---------- comparator layout ---------- */
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 28px 0 16px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.page-title h1 .cat-icon { width: 46px; height: 46px; }
.page-title h1 .cat-icon svg { width: 26px; height: 26px; }
.page-title p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 12px; align-items: start; padding-bottom: 32px; }
.layout.no-ads { grid-template-columns: 210px minmax(0, 1fr); }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters { padding: 16px; position: sticky; top: 88px; max-height: calc(100vh - 100px); overflow: auto; }
.filters h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 16px 0 8px; }
.filters h3:first-child { margin-top: 0; }
/* group header with a check/uncheck-all box */
.filters h3[data-group] { display: flex; align-items: center; gap: 8px; }
.filters h3 .all { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.filters h3 .all-lbl { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.filters .shop-q { width: 100%; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; margin-bottom: 6px; font-size: 13px; }
.filters .small { font-size: 12px; margin: 4px 0; } .filters .muted { color: var(--ink-3); }
.chk[hidden] { display: none; }
.chk mark { background: #fde68a; color: inherit; border-radius: 2px; padding: 0; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; cursor: pointer; }
#f-country.sub { margin: 4px 0 0 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.chk .n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.range { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.range input, .filters select, .filters input[type=search] { width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; color: var(--ink-2); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }

.results { overflow: hidden; }
.results-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 14px; }
.results-head .count { font-weight: 600; }
.results-head .muted { color: var(--ink-3); font-size: 13px; }
.results-head select { margin-left: auto; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.table-wrap { overflow-x: auto; }
table.offers { width: 100%; border-collapse: collapse; font-size: 14px; }
.offers .title { min-width: 220px; }
.offers th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600;
  padding: 10px 8px; background: var(--bg-2); white-space: nowrap; cursor: pointer; user-select: none; }
.offers th.sorted { color: var(--ink); }
.offers td { padding: 8px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.offers tr:hover td { background: #fffdf8; }
.offers .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.offers .ppt { font-weight: 700; }
.offers .title a { text-decoration: none; font-weight: 500; }
.offers .title a:hover { text-decoration: underline; }
.offers .shop { white-space: nowrap; }
.flag { font-size: 11px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 4px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.tag.cmr { background: #dcfce7; color: #166534; }
.tag.smr { background: #fee2e2; color: #991b1b; }
.tag.refurbished, .tag.used { background: #fef3c7; color: #92400e; }
.oos { color: var(--ink-3); font-size: 12px; }
/* freshness dots */
.fresh { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.f-green { background: #16a34a; } .f-yellow { background: #eab308; } .f-red { background: #dc2626; } .f-black { background: #1c1917; }
.legend { display: inline-flex; gap: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; } .legend .fresh { margin-right: 4px; }
.hist-btn { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 2px; vertical-align: -2px; }
.hist-btn:hover { color: var(--accent); }
/* history dialog */
.hist-dlg { border: 0; border-radius: 16px; padding: 0; width: min(780px, 96vw); background: var(--card); box-shadow: 0 30px 80px rgba(0,0,0,.3); color: var(--ink); }
.hist-dlg::backdrop { background: rgba(30, 25, 15, .45); }
.hist-dlg .dlg-head { display: flex; gap: 12px; align-items: start; justify-content: space-between; padding: 16px 18px 6px; }
.hist-dlg h2 { margin: 0; font-size: 16px; } .hist-dlg .muted { color: var(--ink-3); font-size: 12px; margin: 4px 0 0; }
.hist-stats, .hist-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 18px; font-size: 13px; color: var(--ink-2); }
.hist-legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.hist-chart { padding: 4px 12px; } .hist-chart svg { width: 100%; height: auto; display: block; }
.hist-chart text { font-size: 11px; fill: var(--ink-3); } .hist-chart .grid { stroke: var(--line); stroke-width: 1; }
.empty { padding: 48px; text-align: center; color: var(--ink-2); }
.notice { margin: 12px 16px; padding: 10px 14px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13px; border: 1px solid #fed7aa; }
.disclosure { font-size: 12px; color: var(--ink-3); padding: 12px 16px; border-top: 1px solid var(--line); }

/* ---------- ad slots: visually separate, never inside results ---------- */
.ad-rail { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.ad-slot { border-radius: 12px; min-height: 250px; display: grid; place-items: center; overflow: hidden; }
.ad-slot.tall { min-height: 600px; }
.ad-slot.placeholder { border: 1.5px dashed var(--line); color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; background: rgba(255,255,255,.35); }
.ad-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); text-align: center; margin-bottom: -10px; }
.ad-footer { min-height: 90px; margin-bottom: 24px; }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 0; font-size: 13px; color: var(--ink-3); }
.site-footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

.mobile-filter-toggle { display: none; }

/* ---------- consent banner (bottom) ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 40px rgba(40, 30, 10, .15); padding: 14px 0; font-size: 14px; }
.consent-in { width: min(1280px, 100% - 24px); margin-inline: auto; display: flex; gap: 20px; align-items: center; }
.consent-text { flex: 1; } .consent h2 { font-size: 15px; margin: 0 0 4px; } .consent p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.consent-gpc { margin-top: 6px !important; font-size: 13px; color: var(--ink) !important; }
.consent-cats { display: grid; gap: 8px; margin-top: 10px; } .consent-cats[hidden] { display: none; }
.consent-cat { display: flex; gap: 10px; align-items: flex-start; } .consent-cat input { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }
.consent-cat small { color: var(--ink-3); } .consent-cat .d { color: var(--ink-2); font-size: 13px; }
/* equal weight for reject and accept (EDPB / AEPD / CNIL guidance) */
.consent-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.consent-btns .btn { min-width: 128px; justify-content: center; background: var(--ink); color: #fff; border-color: var(--ink); }
.consent-btns .btn[data-c="settings"], .consent-btns .btn[data-c="save"] { background: #fff; color: var(--ink); }
@media (max-width: 820px) { .consent-in { flex-direction: column; align-items: stretch; } .consent-btns { justify-content: stretch; } .consent-btns .btn { flex: 1; } }
.legal-links a { color: inherit; }
sup.inf { color: var(--ink-3); cursor: help; }
.filters .scroll-list { max-height: 260px; overflow: auto; padding-right: 4px; }
/* admin-only blacklist button + dialog */
/* admin account section */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.acc-grid form { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.acc-grid h3 { margin: 0 0 6px; font-size: 14px; } .acc-grid label { display: block; font-size: 13px; margin: 6px 0; }
.acc-grid input { width: 100%; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line); }
.acc-msg { font-size: 13px; min-height: 18px; margin: 6px 0 0; } .acc-msg.bad { color: #b91c1c; } .acc-msg.good { color: #166534; }
.acc-qr { display: block; width: 180px; height: 180px; margin: 6px auto; background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--line); }
/* maintenance */
.maint-banner { position: sticky; top: 0; z-index: 200; background: #b91c1c; color: #fff; padding: 9px 16px; font-size: 14px; text-align: center; }
.maint-banner a { color: #fff; text-decoration: underline; margin-left: 8px; }
.maint-switch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.maint-switch.on { border: 2px solid #b91c1c; background: #fff1f2; }
.maint-switch input[type=text] { flex: 1; min-width: 220px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); }
/* header language / currency pickers */
.prefs { display: flex; gap: 6px; }
.prefs select { padding: 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; cursor: pointer; max-width: 150px; }
.brand-img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.fx-legend { flex-basis: 100%; font-size: 12px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.5; }
/* admin branding */
.brand-logo-row { display: flex; gap: 16px; align-items: center; }
.brand-logo-preview { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.brand-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.hide-btn { border: 1px solid #fecaca; background: #fff1f2; color: #b91c1c; border-radius: 6px; font-size: 11px; padding: 1px 6px; cursor: pointer; margin-left: 4px; }
.hide-btn:hover { background: #fee2e2; }
.hide-dlg { border: 0; border-radius: 14px; padding: 18px 20px; width: min(460px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.hide-dlg::backdrop { background: rgba(30, 25, 15, .45); }
.hide-dlg h2 { margin: 0 0 4px; font-size: 16px; } .hide-dlg label { display: block; margin: 8px 0; font-size: 14px; }
.hide-dlg input[name=reason] { width: 100%; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); margin-top: 4px; }
.hide-dlg menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 12px 0 0; }
.legal h2 { font-size: 18px; margin-top: 24px; } .legal h2:first-child { margin-top: 0; }
.legal-t { width: 100%; font-size: 13px; border-collapse: collapse; margin: 8px 0; } .legal-t th, .legal-t td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.legal-t th { background: var(--bg-2); font-size: 12px; }
@media (max-width: 1440px) {
  .layout { grid-template-columns: 210px minmax(0, 1fr); }
  .ad-rail { display: none; }
}
@media (max-width: 1200px) {
  .layout, .layout.no-ads { grid-template-columns: 180px minmax(0, 1fr); gap: 10px; }
  .filters { padding: 12px; }
  table.offers { font-size: 13px; }
  .offers th { font-size: 11px; letter-spacing: .02em; padding: 8px 6px; }
  .offers td { padding: 7px 6px; }
  .offers .title { min-width: 180px; }
}
@media (max-width: 820px) {
  .nav, .search { display: none; }
  .layout, .layout.no-ads { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .mobile-filter-toggle { display: inline-flex; }
  .offers .hide-sm { display: none; }
}
