/* Fleisch-Radar – helles, modernes Vergleichsseiten-Design */
:root {
  color-scheme: light;
  --bg: #ffffff; --bg2: #f5f6f8; --bg3: #eef0f3; --card: #ffffff; --line: #e6e8ec; --line2: #d5d9df;
  --text: #15171c; --text2: #424852; --muted: #6b7280; --red: #d7263d; --red-d: #b81d31; --red-l: #fdecee; --green: #0f9d58; --green-l: #e7f6ee;
  --r: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06); --shadow-h: 0 10px 24px -8px rgba(16, 24, 40, 0.18);
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 248 140'%3E%3Cg fill='%23d7263d'%3E%3Ccircle cx='62' cy='84' r='30'/%3E%3Ccircle cx='96' cy='58' r='36'/%3E%3Ccircle cx='142' cy='52' r='40'/%3E%3Ccircle cx='184' cy='74' r='32'/%3E%3Ccircle cx='122' cy='90' r='32'/%3E%3Ccircle cx='40' cy='98' r='18'/%3E%3Ccircle cx='208' cy='98' r='18'/%3E%3C/g%3E%3Cpath d='M70 92a11 11 0 1 1 15-9M118 70a14 14 0 1 1 18-12M168 88a10 10 0 1 1 13-8' fill='none' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- Kopf ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.logo { display: flex; align-items: center; gap: 9px; flex: none; }
.logo i { width: 34px; height: 20px; background: var(--cloud) center / contain no-repeat; }
.logo b { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; }
.logo b span { color: var(--red); margin-left: 1px; }
.search { position: relative; flex: 1; max-width: 520px; margin: 0; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); font-size: 16px; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.search input:focus { outline: none; background: #fff; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-l); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: var(--muted); fill: none; stroke-width: 2; }
.is-home .top .search { visibility: hidden; }
.codes-btn { flex: none; margin-left: auto; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; color: var(--text2); font-size: 0.88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.codes-btn span { background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 0.75rem; line-height: 1.6; }
.codes-btn:hover { border-color: var(--red); color: var(--red); }
.codes-pop { position: absolute; right: max(24px, calc((100vw - 1200px) / 2 + 24px)); top: 62px; width: min(420px, calc(100vw - 32px)); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: 0 20px 40px -12px rgba(16, 24, 40, 0.25); }
.code-row { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; }
.code-row + .code-row { border-top: 1px solid var(--line); }
.code-row b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; color: var(--red); background: var(--red-l); padding: 3px 8px; border-radius: 6px; border: 1px dashed var(--red); }
.code-row span { font-weight: 600; font-size: 0.9rem; }
.code-row small { grid-column: 1 / -1; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.code-row button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 0.8rem; font-weight: 600; }
@media (max-width: 640px) {
  .top .wrap { gap: 12px; height: 60px; }
  .logo b { display: none; }
  .codes-btn { padding: 0 11px; font-size: 0.8rem; }
  .codes-btn em { display: none; }
  .codes-pop { right: 16px; top: 56px; }
}

/* ---------- Startseite ---------- */
.hero { margin: 0 calc(50% - 50vw); padding: 54px calc(50vw - 50% + 24px) 46px; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--bg2) 100%); border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0; font-size: clamp(1.7rem, 4.4vw, 2.6rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 span { color: var(--red); }
.hero p { margin: 12px auto 0; color: var(--muted); max-width: 560px; font-size: 1.02rem; }
.hero-search { position: relative; max-width: 620px; margin: 26px auto 0; }
.hero-search input { width: 100%; height: 56px; padding: 0 20px 0 52px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 17px; box-shadow: 0 6px 20px -8px rgba(16, 24, 40, 0.18); }
.hero-search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 5px var(--red-l); }
.hero-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2; }
.hero .stats { display: flex; justify-content: center; gap: 28px; margin-top: 22px; color: var(--muted); font-size: 0.88rem; flex-wrap: wrap; }
.hero .stats b { color: var(--text); }
@media (max-width: 640px) { .hero { padding: 34px calc(50vw - 50% + 16px) 30px; } .hero .stats { gap: 6px 18px; } }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.section-head .link { margin-left: auto; color: var(--red); font-size: 0.92rem; font-weight: 600; background: none; border: 0; padding: 0; white-space: nowrap; }
.section-head .link:hover { color: var(--red-d); }
@media (max-width: 640px) { .section { margin-top: 34px; } .section-head { flex-wrap: wrap; } .section-head p { order: 3; width: 100%; } }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; text-align: center; }
.tile .ti { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg2); box-shadow: var(--shadow); border: 3px solid #fff; outline: 1px solid var(--line); transition: transform 0.2s, outline-color 0.2s; }
.tile .ti img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:hover .ti { transform: translateY(-3px); outline-color: var(--red); }
.tile b { font-size: 0.92rem; font-weight: 700; line-height: 1.2; }
.tile small { color: var(--muted); font-size: 0.78rem; margin-top: -6px; }
@media (max-width: 520px) { .tile b { font-size: 0.78rem; } .tile small { font-size: 0.7rem; } }
.quick { display: flex; flex-wrap: wrap; gap: 10px; }
.quick button { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 0.9rem; font-weight: 500; color: var(--text2); box-shadow: var(--shadow); }
.quick button:hover { border-color: var(--red); color: var(--red); }
.all-btn { display: block; margin: 44px auto 0; padding: 14px 30px; border-radius: 999px; border: 0; background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 8px 20px -8px rgba(215, 38, 61, 0.6); }
.all-btn:hover { background: var(--red-d); }

/* ---------- Ergebnisseite ---------- */
.res-head { padding: 26px 0 6px; }
.back { color: var(--muted); font-size: 0.88rem; background: none; border: 0; padding: 0; margin-bottom: 8px; }
.back:hover { color: var(--red); }
.res-head h1 { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.res-head h1 small { color: var(--muted); font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.filters { position: sticky; top: 66px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 12px 0; background: #fff; border-bottom: 1px solid var(--line); }
.filters .scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.filters .scroll::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 0.9rem; font-weight: 500; color: var(--text2); white-space: nowrap; }
.fchip:hover { border-color: var(--text2); color: var(--text); }
.fchip.on { border-color: var(--text); background: var(--text); color: #fff; }
.fchip i { font-style: normal; font-size: 0.62rem; opacity: 0.6; }
.fchip .cnt { background: var(--red); color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 0 6px; line-height: 1.6; }
.sortsel { flex: none; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 0.9rem; color: var(--text2); }
.sortsel.m { display: none; }
@media (max-width: 640px) {
  .filters { top: 60px; }
  .sortsel.d { display: none; }
  .sortsel.m { display: block; flex: 1; min-width: 0; }
  .res-head h1 { font-size: 1.4rem; }
}
.active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0 0; }
.active:empty { display: none; }
.active button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; border: 0; background: var(--bg3); font-size: 0.82rem; font-weight: 500; color: var(--text2); }
.active button::after { content: "✕"; font-size: 0.66rem; color: var(--muted); }
.active button:hover { background: var(--line); }
.active .clear { background: none; color: var(--red); font-weight: 600; }
.active .clear::after { content: none; }
.toolbar2 { display: flex; align-items: center; gap: 12px; padding: 18px 0 16px; color: var(--muted); font-size: 0.9rem; }
.toolbar2 .best { margin-right: auto; }
.toolbar2 .best b { color: var(--text); }
.seg { display: inline-flex; padding: 3px; background: var(--bg3); border-radius: 999px; flex: none; }
.seg button { padding: 6px 14px; border: 0; background: none; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: var(--shadow); }
@media (max-width: 640px) { .toolbar2 { flex-wrap: wrap; gap: 10px; } .toolbar2 .best { width: 100%; font-size: 0.84rem; } .seg button { padding: 6px 11px; font-size: 0.8rem; } }

/* ---------- Produktkarten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.grid.home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid, .grid.home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pc { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: box-shadow 0.2s, transform 0.2s; min-width: 0; }
.pc:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.pc .img { position: relative; aspect-ratio: 4 / 3; background: var(--bg2); overflow: hidden; }
.pc .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc .img.noimg { background: var(--bg2) var(--cloud) center / 34% no-repeat; }
.badge { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.8rem; font-weight: 700; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.badge.low { background: var(--green); }
.pc .body { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; flex: 1; }
.pc .shop { color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .name { font-size: 0.95rem; font-weight: 500; line-height: 1.38; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.76em; }
.pc .price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.pc .price b { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pc .price.sale b { color: var(--red); }
.pc .price s { color: var(--muted); font-size: 0.84rem; }
.pc .kg { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; min-height: 1.3em; }
@media (max-width: 640px) { .pc .body { padding: 10px 11px 12px; } .pc .name { font-size: 0.85rem; } .pc .price { padding-top: 8px; } .pc .price b { font-size: 1.05rem; } .pc .kg { font-size: 0.76rem; } }
.more { display: block; margin: 34px auto 10px; padding: 12px 28px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; box-shadow: var(--shadow); }
.more:hover { border-color: var(--red); color: var(--red); }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty button { margin-top: 12px; color: var(--red); background: none; border: 0; font-weight: 600; }

/* ---------- Shop-Vergleich ---------- */
.cmp-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.cmp { display: grid; gap: 10px; }
.cmp-row { display: grid; grid-template-columns: 34px 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 18px 12px 12px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.cmp-row:hover { box-shadow: var(--shadow-h); }
.cmp-row .rk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.cmp-row:first-child { border-color: var(--green); }
.cmp-row:first-child .rk { background: var(--green); color: #fff; }
.cmp-row img, .cmp-row .ph { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--bg2); display: block; }
.cmp-row .t { min-width: 0; } .cmp-row .t b { display: block; font-size: 0.98rem; } .cmp-row .t small { color: var(--muted); font-size: 0.84rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-row .v { text-align: right; } .cmp-row .v b { font-size: 1.15rem; font-weight: 800; display: block; font-variant-numeric: tabular-nums; } .cmp-row .v small { color: var(--muted); font-size: 0.8rem; }
.cmp-row:first-child .v b { color: var(--green); }
@media (max-width: 640px) { .cmp-row { grid-template-columns: 24px 54px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px 10px 10px; } .cmp-row .rk { width: 24px; height: 24px; font-size: 0.78rem; } .cmp-row img, .cmp-row .ph { width: 54px; height: 54px; } .cmp-row .v b { font-size: 1rem; } }

/* ---------- Ausklapp-Menü (Desktop) / Blatt von unten (Handy) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, 0.35); }
@media (min-width: 641px) { .sheet-bg { background: transparent; } }
.sheet { position: fixed; z-index: 61; display: flex; flex-direction: column; width: 330px; max-height: min(500px, 70vh); background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.28); }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; font-weight: 800; }
.sheet header button { border: 0; background: none; color: var(--muted); font-size: 0.86rem; font-weight: 600; }
.sheet header button:hover { color: var(--red); }
.sheet .opts { overflow-y: auto; padding: 2px 10px 10px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; cursor: pointer; font-size: 0.93rem; }
.opt:hover { background: var(--bg2); }
.opt input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; flex: none; }
.opt small { margin-left: auto; color: var(--muted); font-size: 0.8rem; background: var(--bg2); border-radius: 999px; padding: 0 8px; }
.opt.zero { opacity: 0.45; }
.sheet .find { margin: 0 18px 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); font-size: 16px; }
.sheet .range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 6px 18px 12px; }
.sheet .range label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.sheet .range input { width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font-size: 16px; min-width: 0; }
.sheet .range input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-l); }
.sheet .presets { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; }
.sheet .presets button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-size: 0.82rem; font-weight: 500; color: var(--text2); }
.sheet .presets button:hover { border-color: var(--red); color: var(--red); }
.sheet footer { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.sheet footer button { width: 100%; height: 44px; border-radius: 999px; border: 0; background: var(--red); color: #fff; font-weight: 700; }
.sheet footer button:hover { background: var(--red-d); }
@media (max-width: 640px) {
  .sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; max-height: 82vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line2); margin: 10px auto 0; }
}

.loading { padding: 90px 0; text-align: center; color: var(--muted); }
.foot { margin-top: 64px; padding-top: 24px; padding-bottom: 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1.65; }
.foot a { color: var(--text2); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .pc, .tile .ti { transition: none; } }
