/* Preiskorb — design system
   Light warm-paper theme · emerald→lime brand · coral deal accent · 8px grid */

:root {
  --ink: #0F1B14;
  --ink-2: #38473f;
  --muted: #6B7A70;
  --surface: #FBFBF7;
  --surface-2: #F3F4EE;
  --card: #FFFFFF;
  --line: #E9EBE3;
  --line-2: #DEE1D7;

  --brand: #10B981;
  --brand-2: #A3E635;
  --brand-ink: #0B6B4E;
  --coral: #FF5A3C;
  --coral-ink: #C0391F;
  --coral-tint: #FFE9E3;

  --grad: linear-gradient(103deg, #10B981 0%, #34D399 45%, #A3E635 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 20, .05), 0 2px 8px rgba(15, 27, 20, .04);
  --shadow: 0 4px 14px rgba(15, 27, 20, .07), 0 18px 40px -22px rgba(15, 27, 20, .22);
  --shadow-lift: 0 10px 24px rgba(15, 27, 20, .10), 0 30px 60px -30px rgba(15, 27, 20, .30);

  --ff-display: "Bricolage Grotesque", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --num: "Inter", ui-monospace, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 82% -8%, rgba(163, 230, 53, .16), transparent 60%),
    radial-gradient(900px 500px at 5% 2%, rgba(16, 185, 129, .12), transparent 55%),
    var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--ff-display); letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img, svg { display: block; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 251, 247, .82);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--ink); border-radius: 10px; padding: 5px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--ff-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.nav { margin-left: auto; display: flex; gap: 28px; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.nav a { position: relative; padding: 4px 0; transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad); border-radius: 2px; transition: width .2s ease; }
.nav a:hover::after { width: 100%; }
.region-pill { font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line-2); padding: 7px 12px; border-radius: 999px;
  box-shadow: var(--shadow-sm); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #06231a; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(16, 185, 129, .8); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(16, 185, 129, .85); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
  padding: 72px 0 40px; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-ink); margin: 0 0 18px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; }
.lede { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 34ch; margin: 22px 0 30px; }
.lede strong { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stores { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 34px; }
.store-chip { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 6px 11px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); }

/* hero spotlight card */
.hero-visual { position: relative; }
.spot {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.spot-badge { position: absolute; top: -14px; right: 18px; background: var(--coral); color: #fff;
  font-size: 12px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  box-shadow: 0 8px 18px -6px rgba(255, 90, 60, .7); transform: rotate(2deg); }
.spot-top { display: flex; align-items: center; gap: 14px; }
.spot-emoji { font-size: 40px; width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--surface-2); border-radius: 16px; }
.spot-name { font-family: var(--ff-display); font-weight: 700; font-size: 20px; }
.spot-unit { color: var(--muted); font-size: 13px; font-weight: 500; }
.spot-rows { margin-top: 18px; display: grid; gap: 9px; }
.spot-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 12px; }
.spot-store { font-size: 12px; font-weight: 700; }
.spot-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.spot-bar > i { display: block; height: 100%; border-radius: 999px; }
.spot-price { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.spot-row.best .spot-price { color: var(--brand-ink); }
.spot-foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2);
  display: flex; align-items: baseline; justify-content: space-between; }
.spot-foot b { font-family: var(--ff-display); font-size: 22px; color: var(--coral-ink); }
.spot-foot span { font-size: 13px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px auto 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--ff-display); font-weight: 800; font-size: 30px; letter-spacing: -0.03em; }
.stat span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat .grad { display: inline-block; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin-bottom: 30px; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.section-title.center { text-align: center; }
.section-sub { color: var(--ink-2); margin: 10px 0 0; max-width: 56ch; }
.price-date { display: inline-flex; align-items: center; gap: .3em; margin-left: .4em;
  padding: .12em .6em; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2);
  font-family: var(--num); font-size: .82em; font-weight: 600; color: var(--muted); white-space: nowrap; }
.price-date b { color: var(--ink); font-weight: 700; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); cursor: pointer;
  transition: all .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
.card-top { display: flex; align-items: center; gap: 14px; }
.rank { font-family: var(--ff-display); font-weight: 800; font-size: 15px; color: var(--muted);
  width: 30px; }
.p-emoji { font-size: 30px; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--surface-2); border-radius: 14px; flex: none; }
.p-id { min-width: 0; }
.p-name { font-family: var(--ff-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta { font-size: 12.5px; color: var(--muted); }
.p-best { margin-left: auto; text-align: right; flex: none; }
.p-best .amt { font-family: var(--ff-display); font-weight: 800; font-size: 24px;
  font-variant-numeric: tabular-nums; color: var(--brand-ink); }
.p-best .lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }

.p-stores { margin-top: 16px; display: grid; gap: 7px; }
.pr { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; }
.pr .st { font-size: 11.5px; font-weight: 700; }
.pr .bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pr .bar > i { display: block; height: 100%; border-radius: 999px; opacity: .85; }
.pr .val { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pr.best .val { color: var(--brand-ink); font-weight: 700; }
.pr.best .st::after { content: "★"; margin-left: 4px; color: var(--brand); font-size: 11px; }

.p-foot { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2);
  display: flex; align-items: center; gap: 8px; }
.save-badge { font-size: 12.5px; font-weight: 700; color: var(--coral-ink); background: var(--coral-tint);
  padding: 5px 11px; border-radius: 999px; }
.p-foot .cheapest { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.p-foot .cheapest b { color: var(--ink); }

/* ---------- Check tool ---------- */
.check-tabs { display: inline-flex; gap: 4px; background: var(--surface-2); padding: 5px;
  border-radius: 999px; margin-bottom: 22px; }
.tab { border: none; background: transparent; font-weight: 600; font-size: 14.5px; color: var(--ink-2);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.tab.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.pane { display: none; }
.pane.is-active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 48px 24px; border: 2px dashed var(--line-2); border-radius: var(--radius);
  background: var(--card); cursor: pointer; transition: all .18s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: #fff;
  box-shadow: var(--shadow); }
.dropzone:focus-visible { outline: 3px solid rgba(16, 185, 129, .35); outline-offset: 3px; }
.dz-icon { font-size: 40px; }
.dz-title { font-family: var(--ff-display); font-weight: 700; font-size: 18px; }
.dz-hint { font-size: 13px; color: var(--muted); }
.dz-status { margin: 14px 2px 0; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.dz-status.err { color: var(--coral-ink); }

.manual-search { position: relative; max-width: 460px; }
.manual-search input { width: 100%; font-size: 15px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); }
.manual-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; max-height: 280px; overflow-y: auto; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 14px; background: none; border: none; cursor: pointer; font-size: 14.5px; }
.suggest button:hover { background: var(--surface-2); }
.suggest .s-emoji { font-size: 18px; }
.suggest .s-meta { margin-left: auto; font-size: 12px; color: var(--muted); }

.basket { margin: 20px 0; display: grid; gap: 10px; }
.basket-empty { color: var(--muted); font-size: 14.5px; padding: 8px 2px; }
.bitem { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.bitem .b-emoji { font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface-2); border-radius: 11px; }
.bitem .b-name { font-weight: 600; font-size: 14.5px; }
.bitem .b-name small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.b-pay { display: flex; align-items: center; gap: 6px; }
.b-pay label { font-size: 12px; color: var(--muted); }
.b-pay .euro { font-weight: 700; color: var(--muted); }
.b-pay input { width: 82px; font-size: 14.5px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line-2); text-align: right; font-variant-numeric: tabular-nums; }
.b-pay input:focus { outline: none; border-color: var(--brand); }
.b-remove { border: none; background: var(--surface-2); color: var(--muted); width: 30px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; }
.b-remove:hover { background: var(--coral-tint); color: var(--coral-ink); }
.check-run { margin-top: 4px; }

/* ---------- Result ---------- */
.result { margin-top: 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card); box-shadow: var(--shadow); overflow: hidden; animation: fade .3s ease; }
.res-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: 26px 28px; }
.score-ring { --p: 0; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring, var(--brand)) calc(var(--p) * 1%), var(--surface-2) 0);
  flex: none; }
.score-ring > div { width: 82px; height: 82px; border-radius: 50%; background: var(--card);
  display: grid; place-items: center; text-align: center; }
.score-ring b { font-family: var(--ff-display); font-weight: 800; font-size: 26px; line-height: 1; }
.score-ring span { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.res-headline h3 { font-size: 24px; font-weight: 800; }
.res-headline p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.res-headline .big { color: var(--coral-ink); font-weight: 700; }
.res-headline .good { color: var(--brand-ink); font-weight: 700; }

.res-summary { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 28px 6px; }
.res-pill { font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2);
  padding: 8px 13px; border-radius: 999px; }
.res-pill b { color: var(--ink); font-variant-numeric: tabular-nums; }

.res-items { padding: 12px 16px 20px; }
.ri { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px; }
.ri + .ri { border-top: 1px solid var(--line); }
.ri .ri-emoji { font-size: 22px; }
.ri .ri-name { font-weight: 600; font-size: 14.5px; }
.ri .ri-name small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.ri .ri-paid { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.ri .ri-tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.ri-tag.ok { background: #E4F5EC; color: var(--brand-ink); }
.ri-tag.bad { background: var(--coral-tint); color: var(--coral-ink); }
.ri-tag.na { background: var(--surface-2); color: var(--muted); }
.res-note { padding: 14px 28px 24px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- How ---------- */
.how .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); }
.step-no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--ink); color: #fff; font-family: var(--ff-display); font-weight: 800; font-size: 18px;
  margin-bottom: 14px; }
.step h3 { font-size: 20px; font-weight: 700; }
.step p { color: var(--ink-2); margin: 8px 0 0; font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--surface-2); }
.footer-inner { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 40px 0; }
.footer-brand .brand-name { font-size: 22px; }
.footer-brand p { color: var(--ink-2); margin: 6px 0 0; font-size: 14px; }
.disclaimer { color: var(--muted); font-size: 12.5px; line-height: 1.7; max-width: 70ch; align-self: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 44px 0 24px; }
  .hero-visual { max-width: 440px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .how .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .nav { display: none; }
}
@media (max-width: 480px) {
  .wrap { width: min(1160px, 100% - 28px); }
  .stats { grid-template-columns: 1fr 1fr; }
  .region-pill { display: none; }
  .res-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .bitem { grid-template-columns: 40px 1fr; row-gap: 8px; }
  .bitem .b-pay { grid-column: 2 / 3; justify-self: start; }
  .bitem .b-remove { grid-row: 1; grid-column: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
