/* The design tokens. Neutral green and grey; system fonts; every colour is a variable. */
:root {
  color-scheme: light dark;
  --bg: #f7f8f7;
  --surface: #fff;
  --fg: #17201d;
  --muted: #5d6a65;
  --line: #dde3df;
  --accent: #0b6b57;
  --accent-fg: #fff;
  --good: #1a7f45;
  --bad: #a33a2b;
  --chip: #e8efeb;
  --shadow: 0 1px 2px rgb(20 30 25 / 6%), 0 4px 14px rgb(20 30 25 / 5%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Georgian", sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --radius: 12px;
  --radius-s: 8px;
  --fs-s: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --fs-m: clamp(0.92rem, 0.9rem + 0.15vw, 1rem);
  --fs-l: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #172019;
    --fg: #e8efeb;
    --muted: #9aa9a2;
    --line: #27342e;
    --accent: #4cc3a4;
    --accent-fg: #06231b;
    --good: #5fd08b;
    --bad: #f08a78;
    --chip: #1f2c26;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: var(--fs-m) / 1.5 var(--font);
  padding-inline: max(var(--space-4), env(safe-area-inset-left, 0px)) max(var(--space-4), env(safe-area-inset-right, 0px));
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--accent);
  color: var(--accent-fg);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip:focus { top: var(--space-2); }

.wrap { max-width: 1120px; margin: 0 auto; }

.top { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; padding-block: var(--space-4) var(--space-3); }
.logo { font-weight: 700; font-size: var(--fs-l); letter-spacing: -0.02em; text-decoration: none; }
.logo span { color: var(--accent); }
.search { flex: 1 1 260px; min-width: 0; display: flex; }
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
}
.tools { display: flex; gap: 6px; }
.lang { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: 5px 12px; font-size: var(--fs-s); text-decoration: none; }
.lang:hover { border-color: var(--accent); }

.catbar { display: flex; gap: 6px; overflow-x: auto; padding: var(--space-1) 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; scrollbar-width: thin; }
.catbar a { white-space: nowrap; text-decoration: none; font-size: 14px; padding: 7px 13px; border-radius: 999px; color: var(--muted); border: 1px solid transparent; }
.catbar a small { color: var(--muted); font-variant-numeric: tabular-nums; margin-inline-start: 2px; }
.catbar a:hover { color: var(--fg); background: var(--chip); }
.catbar a[aria-current] { background: var(--accent); color: var(--accent-fg); }
.catbar a[aria-current] small { color: inherit; }
.catbar a.all { font-weight: 600; color: var(--fg); border-color: var(--line); background: var(--surface); }
.catbar a.all[aria-current] { background: var(--accent); color: var(--accent-fg); }

h1 { font-size: var(--fs-xl); letter-spacing: -0.02em; margin: var(--space-4) 0 var(--space-1); text-wrap: balance; }
h2 { font-size: var(--fs-l); margin: var(--space-5) 0 10px; }
.sub { color: var(--muted); margin: 0 0 var(--space-5); }

.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); border-radius: var(--radius-s); padding: 8px 14px; text-decoration: none; font-weight: 600; }

.foot { display: flex; gap: var(--space-4); color: var(--muted); font-size: var(--fs-s); padding: var(--space-5) 0 var(--space-6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The product page. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.crumbs { font-size: var(--fs-s); color: var(--muted); margin: var(--space-2) 0 var(--space-4); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.prod { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
@media (max-width: 820px) { .prod { grid-template-columns: 1fr; } }
.media img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ph { aspect-ratio: 4 / 3; border-radius: var(--radius-s); background: linear-gradient(135deg, var(--chip), var(--line)); display: grid; place-items: center; color: var(--muted); font-size: var(--fs-s); }
.media .ph { aspect-ratio: 1 / 1; border-radius: var(--radius); }
.brand { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; }
a.brand:hover { text-decoration: underline; }
.desc { margin: 0 0 var(--space-4); }
.empty { color: var(--muted); }
.variants { display: grid; gap: var(--space-2); margin: var(--space-3) 0 18px; }
.vrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.vlabel { min-width: 7em; font-size: 14px; color: var(--muted); }
.variants a { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 12px; text-decoration: none; font-size: 14px; }
.variants a:hover { border-color: var(--accent); }
.variants a[aria-current] { border-color: var(--accent); background: var(--chip); font-weight: 600; }
.scroll { overflow-x: auto; }
.stores { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.stores th, .stores td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 400; }
.stores th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.stores tr:last-child td { border-bottom: 0; }
.stores td.p { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stores td.p strong { font-weight: 700; }
.stores s { color: var(--muted); margin-inline-end: 6px; }
.stores td.upd { color: var(--muted); font-size: var(--fs-s); }
.stores td.store a { text-decoration: none; font-weight: 600; }
.stores td.store a:hover { text-decoration: underline; }
.in { color: var(--good); }
.out { color: var(--bad); }
.go { display: inline-block; background: var(--accent); color: var(--accent-fg); border-radius: var(--radius-s); padding: 6px 12px; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart-dot { fill: var(--accent); }
.chart-label { fill: var(--muted); font-size: 11px; }

/* The category page. */
.cat { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
@media (max-width: 760px) { .cat { grid-template-columns: 1fr; } }
#results[aria-busy="true"] { opacity: 0.6; transition: opacity 0.15s; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.filters fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.filters legend { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; padding: 0; }
.opt { display: flex; justify-content: space-between; gap: var(--space-2); padding: 3px 0; }
.opt label { display: flex; gap: var(--space-2); align-items: center; cursor: pointer; }
.opt small { color: var(--muted); font-variant-numeric: tabular-nums; }
.range { display: flex; gap: var(--space-2); }
.range input, .bar select { min-width: 0; width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: var(--radius-s); padding: 7px 9px; font: inherit; }
.apply { background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 10px; padding: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
.bar select { width: auto; }
.meta { font-size: 13px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); text-decoration: none; box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); }
.card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--radius-s); }
.card b { font-weight: 600; }
.price { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-5); }
.pager a, .pager span { min-width: 36px; text-align: center; padding: 6px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pager span { border-color: transparent; background: none; }
.pager a[aria-current] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* The internal view. */
.internal-banner { background: var(--bad); color: var(--accent-fg); text-align: center; font-weight: 700; padding: var(--space-2) var(--space-3); margin-inline: calc(-1 * max(var(--space-4), env(safe-area-inset-left, 0px))) calc(-1 * max(var(--space-4), env(safe-area-inset-right, 0px))); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 var(--space-2); }
.tag { display: inline-block; border: 1px solid var(--bad); color: var(--bad); border-radius: var(--radius-s); padding: 1px 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.offers h2 { margin-top: var(--space-4); }

/* Home, search, brand, store, about and the bot page. */
.bigsearch { display: flex; gap: var(--space-2); max-width: 36rem; margin: var(--space-3) 0 var(--space-4); }
.bigsearch input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: var(--radius-s); padding: 10px 12px; font: inherit; }
.bigsearch .apply { padding: 10px 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: var(--space-1); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); text-decoration: none; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--accent); }
.tile b { font-size: var(--fs-l); }
.tile span { color: var(--muted); font-size: var(--fs-s); }
.tile .from { color: var(--fg); font-weight: 600; }
.prose { max-width: 40rem; }
.prose li { margin: var(--space-1) 0; }
.contact { color: var(--muted); }
.search { position: relative; }
.suggest { position: absolute; z-index: 5; inset-inline: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); }
.suggest li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 7px 10px; border-radius: var(--radius-s); cursor: pointer; }
.suggest li small { color: var(--muted); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--chip); }
