:root {
  --ink: #202124;
  --ink-soft: #5f6368;
  --line: #dfe1e5;
  --line-soft: #ebebeb;
  --bg: #ffffff;
  --surface: #ffffff;
  --link: #1558d6;
  --link-visited: #6b3fa0;
  --focus: #1558d6;
  --font-sans: "Roboto", Arial, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Compact results-page header ─────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.brand-sm {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-sm img {
  display: block;
  border-radius: 8px;
}

.search-pill-sm {
  max-width: 560px;
  padding: 0.5rem 1rem;
}

.search-pill-sm input {
  font-size: 0.95rem;
}

/* ── Homepage ─────────────────────────────────────────────────────────── */

main {
  flex: 1;
  width: 100%;
}

.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 9vh 1.25rem 2rem;
  text-align: center;
}

.brand-lg {
  margin-bottom: 1rem;
}

.brand-lg img {
  width: clamp(140px, 28vw, 220px);
  height: auto;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
  padding: 0.7rem 1.2rem;
  transition: box-shadow 0.15s ease;
}

.search-pill:hover,
.search-pill:focus-within {
  box-shadow: 0 1px 10px rgba(32, 33, 36, 0.16);
  border-color: transparent;
}

.search-icon {
  color: var(--ink-soft);
  flex-shrink: 0;
}

.search-pill input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 1.05rem;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-buttons button {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #f8f9fa;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

.hero-buttons button:hover {
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(32, 33, 36, 0.1);
  color: var(--ink);
}

/* ── Results (SERP-style list) ────────────────────────────────────────── */

.results {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.results-meta {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0 0 1.25rem;
}

.results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.result-card:last-child {
  border-bottom: 0;
}

.result-card img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.result-body {
  min-width: 0;
}

.result-breadcrumb {
  font-size: 0.8rem;
  color: #202124;
  margin: 0 0 0.15rem;
}

.result-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  font-weight: 400;
}

.result-card h3 a {
  color: var(--link);
  font-size: 1.15rem;
}

.result-snippet {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-snippet .price {
  color: var(--ink);
  font-weight: 500;
}

.empty {
  padding: 1.5rem 0;
  color: var(--ink-soft);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.legal {
  border-top: 1px solid var(--line-soft);
  background: #f8f9fa;
  padding: 1.5rem;
  text-align: center;
}

.legal-inner {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

.legal-inner p {
  margin: 0.35rem 0;
}

@media (max-width: 640px) {
  .topbar {
    gap: 1rem;
    padding: 0.85rem 1rem;
  }

  .hero {
    padding-top: 6vh;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .result-card img {
    width: 88px;
    height: 88px;
  }
}
