:root {
  --bg: #f4f6fa;
  --card: #fff;
  --ink: #131a2a;
  --muted: #5f6b80;
  --line: #e2e7f0;
  --brand: #1d4ed8;
  --brand-dark: #173ea8;
  --accent: #e8452c;
  --star: #f5a100;
  --ok: #0a7d4b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", "Heebo", "Arial Hebrew", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: #0f1b3d; color: #fff; position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; white-space: nowrap; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; font-size: 19px;
}
.search { flex: 1; display: flex; max-width: 620px; background: #fff; border-radius: 10px; overflow: hidden; }
.search input { flex: 1; min-width: 0; border: 0; padding: 10px 14px; outline: none; color: var(--ink); }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--brand-dark); }
.top-note { font-size: 13px; color: #c5cee6; white-space: nowrap; margin-inline-start: auto; }
.cats { background: #16265a; }
.cats-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cats-row::-webkit-scrollbar { display: none; }
.cats-row button {
  border: 0; background: none; color: #dbe2f5; padding: 9px 12px; cursor: pointer;
  white-space: nowrap; font-size: 14px; border-bottom: 3px solid transparent;
}
.cats-row button:hover { color: #fff; }
.cats-row button.on { color: #fff; border-bottom-color: #7ea2ff; font-weight: 600; }

/* hero */
.hero { background: linear-gradient(135deg, #1d4ed8, #3b2fb8); color: #fff; padding: 28px 0; }
.hero h1 { margin: 0 0 10px; font-size: clamp(20px, 3vw, 30px); }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: #dfe6ff; font-size: 14px; }

/* layout */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; padding-top: 20px; padding-bottom: 40px; align-items: start; }
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: sticky; top: 112px;
}
.filters-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.filters-head h2 { margin: 0; font-size: 17px; flex: 1; }
.link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0; }
.link:hover { text-decoration: underline; }
.close, .apply, .open-filters { display: none; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 12px 0 0; padding: 12px 0 0; }
legend { font-weight: 600; padding: 0; float: inline-start; width: 100%; margin-bottom: 8px; }
.checks { display: grid; gap: 7px; clear: both; }
.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checks .n { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.price { display: flex; align-items: center; gap: 8px; clear: both; color: var(--muted); }
.price input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.price input:focus, .sort select:focus { outline: 2px solid #b9cbff; border-color: var(--brand); }
.stars { color: var(--star); }

/* results */
.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.count { color: var(--muted); flex: 1; }
.sort { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(19, 26, 42, .12); transform: translateY(-2px); }
.pic { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 72px; background: #eef2f9; }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; inset-inline-start: 10px; background: var(--accent); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat { font-size: 12px; color: var(--muted); }
.title {
  font-weight: 600; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.meta b { color: var(--ink); font-weight: 600; }
.prices { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.now { font-size: 21px; font-weight: 700; }
.was { color: var(--muted); text-decoration: line-through; font-size: 13.5px; }
.ship { font-size: 12.5px; color: var(--muted); }
.ship.free { color: var(--ok); font-weight: 600; }
.btn {
  border: 0; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 600;
  padding: 9px 14px; cursor: pointer; text-align: center; display: block;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.card .btn { margin-top: 6px; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty .btn { display: inline-block; }

/* footer */
.foot { background: #0f1b3d; color: #c5cee6; padding: 24px 0; font-size: 13.5px; }
.foot strong { color: #fff; font-size: 16px; }
.foot p { margin: 6px 0 0; max-width: 640px; }
.foot-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.shade { position: fixed; inset: 0; background: rgba(10, 16, 35, .5); z-index: 30; }

@media (max-width: 860px) {
  .top-note { display: none; }
  .top-row { gap: 12px; }
  .logo span:last-child { display: none; }
  .layout { grid-template-columns: 1fr; }
  .open-filters { display: block; }
  .filters {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(320px, 88vw); z-index: 40;
    border-radius: 0; overflow-y: auto; transform: translateX(100%); transition: transform .2s; top: 0;
  }
  .filters.open { transform: none; }
  .close { display: block; border: 0; background: none; font-size: 18px; cursor: pointer; }
  .apply { display: block; width: 100%; margin-top: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pic { font-size: 54px; }
  .now { font-size: 18px; }
  .sort { font-size: 0; }
  .sort select { font-size: 14px; }
}
