:root {
  --red: #e30613;
  --red-dark: #b8050f;
  --ink: #16181d;
  --muted: #646b76;
  --line: #e4e6ea;
  --soft: #f4f5f7;
  --mark: #fff1b8;
  --green: #138a3e;
  --orange: #c26a00;
  --radius: 10px;
  --shadow: 0 12px 40px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
button, input, select { font: inherit; color: inherit; }

/* ── Hlavička ───────────────────────────────────────────────────────────── */
.top { background: var(--ink); color: #fff; }
.top__in {
  max-width: 1200px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.logo__brand { font-size: 1.45rem; font-weight: 400; letter-spacing: -.01em; }
.logo__brand b { color: var(--red); font-weight: 800; }
.logo__tag { font-size: .8rem; color: #aab0ba; text-transform: uppercase; letter-spacing: .08em; }
.lang { display: flex; gap: 4px; }
.lang a {
  padding: 4px 10px; border-radius: 6px; font-size: .85rem; font-weight: 600; color: #c9ced6;
  border: 1px solid #3a3f48;
}
.lang a[aria-current] { background: var(--red); border-color: var(--red); color: #fff; }
.lang a:not([aria-current]):hover { border-color: #8a919c; color: #fff; }

/* ── Hledací pole ───────────────────────────────────────────────────────── */
.wrap { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px 16px 48px; }
.search { position: relative; max-width: 820px; margin: 0 auto; z-index: 10; }
.search__box { position: relative; }
.search__icon {
  position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none;
}
#q {
  width: 100%; height: 58px; padding: 0 52px 0 52px;
  border: 2px solid var(--line); border-radius: 29px; background: #fff;
  font-size: 1.1rem; outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
#q::-webkit-search-cancel-button { display: none; }
#q:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 6, 19, .12); }
.search__clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft);
  font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.search__clear:hover { background: var(--line); color: var(--ink); }

/* ── Našeptávač ─────────────────────────────────────────────────────────── */
.ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  overflow: hidden; max-height: min(78vh, 680px); overflow-y: auto;
}
.ac__cols { display: grid; grid-template-columns: 38% 62%; }
.ac__cols--single { grid-template-columns: 1fr; }
.ac__side { background: var(--soft); padding: 8px 0; border-right: 1px solid var(--line); }
.ac__main { padding: 8px 0; min-width: 0; }
.ac__head {
  padding: 10px 16px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.ac__item { display: flex; gap: 12px; padding: 8px 16px; outline: none; }
.ac__item:hover, .ac__item.is-active { background: #fdecee; }
.ac__item--text { flex-direction: column; gap: 0; }
.ac__name { font-weight: 600; }
.ac__sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac__thumb {
  flex: 0 0 56px; height: 56px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ac__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ac__body { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 2px; }
.ac__title {
  font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ac__price { font-weight: 700; font-size: .92rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ac__all {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: #fff;
  font-weight: 700; color: var(--red); cursor: pointer;
}
.ac__all:hover { background: #fdecee; }
.ac__ms { font-weight: 400; font-size: .8rem; color: var(--muted); }
.ac__none { padding: 18px 16px; color: var(--muted); }

.avail { font-size: .78rem; font-weight: 600; color: var(--muted); }
.avail--green { color: var(--green); }
.avail--orange { color: var(--orange); }
.avail--red { color: var(--red-dark); }

/* ── Ukázkové dotazy ────────────────────────────────────────────────────── */
.examples {
  max-width: 820px; margin: 18px auto 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; color: var(--muted); font-size: .9rem;
}
.examples[hidden] { display: none; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font-size: .9rem; color: var(--ink);
}
.chip small { color: var(--muted); font-size: .75rem; }
.chip:hover { border-color: var(--red); color: var(--red); }

/* ── Výsledky ───────────────────────────────────────────────────────────── */
.results { margin-top: 36px; transition: opacity .15s; }
.results.is-loading { opacity: .55; }
.results__bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.results__bar h1 { font-size: 1.35rem; margin: 0; overflow-wrap: anywhere; }
.results__meta { margin: 0; color: var(--muted); font-size: .9rem; flex: 1; }
.sort { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: #cfd3d9; box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
.card__img { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.card__img img { width: 100%; height: 100%; object-fit: contain; }
.badge {
  position: absolute; top: 0; font-size: .72rem; font-weight: 800; color: #fff;
  padding: 2px 7px; border-radius: 4px;
}
.badge--sale { left: 0; background: var(--red); }
.badge--new { right: 0; background: var(--ink); }
.card__title {
  font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.9em;
}
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.card__price { font-weight: 800; font-size: 1.05rem; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.more { text-align: center; margin-top: 24px; }
.more button {
  padding: 12px 28px; border: 2px solid var(--red); border-radius: 999px; background: #fff;
  color: var(--red); font-weight: 700; cursor: pointer;
}
.more button:hover { background: var(--red); color: #fff; }
.more button[hidden] { display: none; }

.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 16px; border-top: 1px solid var(--line); }

/* ── Mobil ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .wrap { padding-top: 20px; }
  #q { height: 50px; font-size: 1rem; }
  .ac { max-height: 70vh; }
  .ac__cols { grid-template-columns: 1fr; }
  .ac__side { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 8px; }
  .logo__tag { display: none; }
}
