/* israeli.shop – site styles.
   Breakpoints (one set for the whole file): 1400 wide · 900 tablet · 760 small tablet · 480 phone · 340 small phone,
   plus short landscape windows (max-height 520). */

/* ================= tokens ================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #14161f;
  --muted: #5d6475;
  --border: #e3e6ee;
  --brand: #0038b8; /* Israeli flag blue */
  --brand-soft: #e6edfb;
  --accent: #ff4f1f;
  --free: #0f7a3d;
  --free-soft: #e3f5ea;
  --danger: #c62828;
  --bought: #b23c0e;
  --bought-soft: #fff1e8;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.06);
  --radius: 14px;
  --nav-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #181b24;
    --text: #eef0f6;
    --muted: #9aa1b2;
    --border: #2a2f3c;
    --brand: #6f9bff;
    --brand-soft: #1b2645;
    --accent: #ff7a50;
    --free: #4fd18b;
    --free-soft: #15301f;
    --danger: #ff6b6b;
    --bought: #ff9b6e;
    --bought-soft: #3a2015;
    --shadow: none;
  }
}

/* ================= base ================= */
* { box-sizing: border-box; }
/* the hidden attribute always wins over a class's display (the test sign-in form showed on the live site) */
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: 'Heebo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
button { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 2px 4px; font-size: 14px; }
.link.danger { color: var(--danger); }
.primary {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 18px;
  cursor: pointer;
}
.btn-soft {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}
.btn-soft.primary-soft { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.btn-soft.danger { color: var(--danger); }
.skip-link {
  position: absolute;
  top: -60px;
  inset-inline-start: 12px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ================= top bar (sticky): logo · search (after a search) · cart · account ================= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 100%;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo { font-weight: 800; font-size: 22px; color: var(--brand); text-decoration: none; direction: ltr; }
.logo span { color: var(--text); }
.nav-search { flex: 1; min-width: 0; display: flex; justify-content: center; }
.nav-search .search { width: 100%; max-width: 640px; padding: 3px; box-shadow: none; }
.nav-search .search input { font-size: 16px; padding: 6px 14px; }
.nav-search .search button { padding: 7px 20px; }
.nav-end { display: flex; align-items: center; gap: 10px; }

/* cart button: icon + estimated total + number of items */
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.cart-btn:hover { border-color: var(--brand); }
.cart-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cb-icon { font-size: 18px; line-height: 1; }
.cb-text { display: flex; flex-direction: column; line-height: 1.1; }
.cb-text[hidden] { display: none; }
.cb-total { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-count { font-size: 11px; color: var(--muted); }

/* account */
.account { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.account img { width: 30px; height: 30px; border-radius: 50%; }
.account .btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.account .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.menu { position: relative; }
.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary img { width: 26px; height: 26px; }
.menu-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.15);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.menu-list a, .menu-list button {
  text-align: start;
  border: 0;
  background: none;
  color: var(--text);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }

/* ================= hero, search box, controls row ================= */
.hero { padding: 18px 16px 4px; max-width: 1100px; margin: 0 auto; text-align: center; }
.home-logo { display: none; }
h1 { font-size: clamp(24px, 5vw, 38px); margin: 6px 0; line-height: 1.2; }
h1 mark { background: none; color: var(--brand); }
.sub { color: var(--muted); margin: 0 0 8px; }

.searchbar { padding: 4px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.searchbar-inner { max-width: 1100px; margin: 0 auto; }
.search-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.search-row .search { flex: 1; min-width: 0; margin: 0; }
.search {
  display: flex;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  padding: 8px 14px;
  outline: none;
}
.search button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
}

/* one row: purchases · filter · sort · budget · recent · popular. Scrolls sideways when it doesn't fit. */
.controls {
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  padding-bottom: 2px;
}
.controls::-webkit-scrollbar { display: none; }
.controls > * { flex: none; }
.controls > .recent { padding-inline-start: 12px; border-inline-start: 1px solid var(--border); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.no-shipping .chips { display: none; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 700; }
.chip.purchases.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.sort { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.sort select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
.budget { font-size: 13px; color: var(--muted); }
.budget button { border: 0; background: none; color: var(--brand); cursor: pointer; padding: 0 4px; }

/* recent & popular search chips */
.recent { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.recent[hidden] { display: none; }
.recent-label { color: var(--muted); }
.recent-list { display: flex; gap: 6px; }
.recent-item {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}
.recent-item button { border: 0; background: none; color: var(--text); cursor: pointer; padding: 3px 4px 3px 10px; }
.recent-item button.x { color: var(--muted); padding: 3px 10px 3px 6px; }

/* ================= home screen: big centered search (like Google) ================= */
body.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body.home .topnav .logo { visibility: hidden; }
body.home .nav-search { display: none; }
body.home .hero { margin-top: auto; padding-top: 0; }
body.home .home-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  direction: ltr;
  margin-bottom: 14px;
}
body.home .home-logo img { width: 64px; height: 64px; border-radius: 16px; }
body.home .home-logo span { font-size: clamp(40px, 8vw, 64px); font-weight: 800; color: var(--brand); letter-spacing: -1px; }
body.home .home-logo b { color: var(--text); font-weight: 800; }
body.home h1 { font-size: clamp(18px, 3vw, 22px); font-weight: 500; color: var(--muted); }
body.home h1 mark { color: inherit; }
body.home .sub { display: none; }
body.home .searchbar { padding-top: 14px; }
body.home .search { max-width: 640px; }
body.home .search input { font-size: 18px; padding: 10px 16px; }
body.home main { margin-bottom: auto; padding-bottom: 24px; }
body.home main .status:empty { display: none; }
body.home footer { padding-top: 12px; }
body:not(.home) .search-row { display: none; }
body:not(.home) .controls { margin-top: 0; }

/* ================= results ================= */
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.status { text-align: center; color: var(--muted); min-height: 1.5em; margin: 10px 0; }
.status.demo { color: var(--accent); }
.hint {
  max-width: 680px;
  margin: 0 auto 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--text);
  font-size: 14px;
  text-align: center;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

/* product card */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.card .img { display: block; aspect-ratio: 1; background: var(--border); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-actions { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; display: flex; gap: 6px; }
.card-actions button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgb(255 255 255 / 0.92);
  color: #1f2433;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18);
  display: grid;
  place-items: center;
}
.card-actions .fav.on { color: #e0245e; }
.card-actions button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card.gone .img img { filter: grayscale(1); opacity: 0.6; }
.card.gone .buy { pointer-events: none; opacity: 0.5; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.badge.free { background: var(--free-soft); color: var(--free); }
.badge.il { background: var(--brand-soft); color: var(--brand); }
.badge.bought { background: var(--bought-soft); color: var(--bought); }
.badge.unknown { background: var(--bg); color: var(--muted); font-weight: 500; border: 1px solid var(--border); }
.badge.gone-badge { background: var(--bg); color: var(--danger); border: 1px solid var(--border); }
.title {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.title a { color: inherit; text-decoration: none; }
.title a:hover { text-decoration: underline; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price strong { font-size: 19px; }
.price s { color: var(--muted); font-size: 13px; }
.price .off { color: var(--accent); font-size: 13px; font-weight: 700; }
.price-change { font-size: 12px; font-weight: 700; }
.price-change.down { color: var(--free); }
.price-change.up { color: var(--danger); }
.meta { color: var(--muted); font-size: 12px; }
/* "👍 92.7% מהקונים מרוצים" – opens the reviews on AliExpress */
.rating { display: inline-flex; align-items: center; gap: 4px; width: fit-content; font-size: 13px; color: var(--text); text-decoration: none; }
.rating b { color: #1a8f3c; }
.rating:hover { text-decoration: underline; }
.rating:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.buy {
  margin-top: auto;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 8px;
  border-radius: 10px;
}
.buy-row { display: flex; gap: 6px; margin-top: auto; }
.buy-row .buy { flex: 1; margin-top: 0; }
.add-cart {
  flex: none;
  width: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
}
.add-cart:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.remove-item { align-self: flex-start; font-size: 13px; padding: 0; }

/* loading placeholders */
.skeleton { box-shadow: none; pointer-events: none; }
.skeleton .img, .skeleton span {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%) 0 0 / 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton span { display: block; height: 12px; border-radius: 6px; }
.skeleton span.short { width: 45%; height: 18px; }
@keyframes shimmer { to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton .img, .skeleton span { animation: none; } }

.more-wrap { text-align: center; margin-top: 20px; }
.more {
  font-weight: 700;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 10px 28px;
  border-radius: 999px;
  cursor: pointer;
}
.more:disabled { opacity: 0.5; cursor: wait; }

/* ================= views: favorites, lists, a shared list ================= */
.view-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 14px 0 6px; }
.view-head[hidden] { display: none; }
.view-title h2 { margin: 0; font-size: 24px; }
.view-title p { margin: 2px 0 0; font-size: 14px; }
.view-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.list-tile .img.empty-cover { display: grid; place-items: center; font-size: 48px; text-decoration: none; }
.list-tile .title { font-weight: 700; }
.tile-actions { display: flex; gap: 6px; margin-top: auto; }

/* ================= cart page ================= */
.cart { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 10px; }
.cart-empty { color: var(--muted); text-align: center; padding: 30px 0; grid-column: 1 / -1; }
.cart-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}
.cart-row.is-bought { opacity: 0.7; }
.cart-row.gone .cart-img img { filter: grayscale(1); opacity: 0.6; }
.cart-img img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; background: var(--border); }
.cart-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cart-title {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-title:hover { text-decoration: underline; }
.cart-price { font-weight: 700; }
.cart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cart-controls .buy { margin: 0; padding: 7px 14px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.stepper button { width: 34px; height: 32px; border: 0; background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; }
.stepper button:disabled { color: var(--border); cursor: default; }
.stepper span { min-width: 28px; text-align: center; font-weight: 700; }
.cart-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--brand-soft); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.cart-ask[hidden] { display: none; }
.cart-summary {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.cart-summary h3 { margin: 0 0 8px; font-size: 18px; }
.cart-summary p { margin: 6px 0 0; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; }
.cart-total strong { font-size: 26px; }
.cart-bought { grid-column: 1 / -1; }
.cart-bought summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
.cart-bought .cart-row { margin-bottom: 8px; }

/* ================= dialogs (sign-in, preferences, add to list) ================= */
.modal {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.25);
}
.modal::backdrop { background: rgb(10 14 30 / 0.45); }
.modal h2 { margin: 0 0 6px; font-size: 22px; }
.modal-close { position: absolute; top: 10px; left: 10px; margin: 0; }
.modal-close button { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.google-btn { display: flex; justify-content: center; margin: 16px 0 6px; min-height: 44px; }
/* why sign up (sign-in dialog) */
.login-benefits { list-style: none; padding: 0; margin: 14px 0 4px; display: grid; gap: 10px; }
.login-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.login-benefits li > span:first-child { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); font-size: 15px; }
.dev-login { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.dev-login p { width: 100%; margin: 0; }
.dev-login button { border: 0; background: var(--brand); color: #fff; font-weight: 700; border-radius: 10px; padding: 8px 18px; cursor: pointer; }
.dev-login input, .prefs input[type='number'], .list-new input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}
.prefs fieldset { border: 0; padding: 0; margin: 14px 0 0; }
.prefs legend { font-weight: 700; margin-bottom: 6px; }
.prefs label { display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 12px; font-size: 15px; }
.prefs label.inline input { width: 110px; flex: none; }
.prefs .consent { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: 14px; }
.prefs .consent input { margin-top: 4px; }
.cat-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-grid label { margin: 0; }
.cat-grid input { position: absolute; opacity: 0; pointer-events: none; }
.cat-grid span { border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 14px; }
.cat-grid input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 700; }
.cat-grid input:focus-visible + span { outline: 2px solid var(--brand); }
.pick-item { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-lists { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 40vh; overflow-y: auto; }
.pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: start;
  font-size: 15px;
}
.pick:hover { border-color: var(--brand); }
.pick small { color: var(--muted); white-space: nowrap; }

/* share dialog: platform tiles, the link with a copy button, the phone's own share sheet */
.share-what { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin: 14px 0; }
.share-to {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.share-to:hover { background: var(--bg); }
.share-to:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.share-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 800; }
.share-whatsapp .share-icon { background: #25d366; }
.share-whatsapp .share-icon::before { content: '✆'; }
.share-telegram .share-icon { background: #229ed9; }
.share-telegram .share-icon::before { content: '➤'; font-size: 19px; transform: rotate(-30deg); }
.share-facebook .share-icon { background: #1877f2; }
.share-facebook .share-icon::before { content: 'f'; font-family: Arial, sans-serif; font-size: 26px; }
.share-x .share-icon { background: #000; }
.share-x .share-icon::before { content: '𝕏'; font-size: 20px; }
.share-pinterest .share-icon { background: #e60023; }
.share-pinterest .share-icon::before { content: 'P'; font-family: Georgia, serif; }
.share-email .share-icon { background: #6b7280; }
.share-email .share-icon::before { content: '✉'; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font-size: 14px; }
.share-native { display: block; margin: 10px auto 0; }
.list-new { display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }

/* ================= messages: snack and the "נרכש לאחרונה" pop-up ================= */
.snack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: #1f2433;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.snack[hidden] { display: none; }
.bought-toast {
  position: fixed;
  inset-inline-start: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgb(0 0 0 / 0.18);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.bought-toast.show { transform: none; opacity: 1; }
.bought-toast[hidden] { display: none; }
.bt-link { flex: 1; min-width: 0; display: flex; gap: 10px; padding: 10px; color: var(--text); text-decoration: none; }
.bt-link img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: var(--border); }
.bt-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bt-head { font-size: 12px; font-weight: 700; color: var(--accent); }
.bt-title { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt-meta { font-size: 12px; color: var(--muted); }
.bt-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px 10px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .bought-toast { transition: none; } }

/* ================= footer & legal pages ================= */
footer { max-width: 800px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 12px; text-align: center; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 10px; }
.legal-links a { color: var(--muted); }
.legal { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; line-height: 1.75; }
.legal h1 { text-align: start; font-size: 30px; margin: 10px 0 4px; }
.legal h2 { font-size: 20px; margin: 28px 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-top: 0; }
.legal ul { padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--brand); }
mark.todo { background: #fff3b0; color: #6b4e00; padding: 0 4px; border-radius: 4px; }

/* ================= responsive ================= */
@media (min-width: 1400px) {
  .hero, .searchbar-inner, main { max-width: 1320px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
}
@media (max-width: 760px) {
  /* after a search: logo + cart/account on the first line, the search box under them (one sticky block) */
  body:not(.home) .topnav { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  body:not(.home) .nav-search { order: 3; flex-basis: 100%; }
  .cart { grid-template-columns: minmax(0, 1fr); }
  .cart-summary { position: static; order: -1; }
  .cart-row { grid-template-columns: 72px minmax(0, 1fr); }
  .cart-img img { width: 72px; height: 72px; }
}
@media (max-width: 480px) {
  .topnav { padding-inline: 12px; gap: 8px; }
  .logo { font-size: 20px; }
  .wide-only { display: none; }
  .cart-btn { padding: 0 10px 0 8px; gap: 6px; }
  .account .btn { padding: 5px 12px; font-size: 13px; }
  .hero { padding-top: 10px; }
  .sub { font-size: 14px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .body { padding: 8px 10px 10px; }
  .price strong { font-size: 17px; }
  .search input { padding: 6px 10px; }
  .search button { padding: 10px 16px; }
  .controls { gap: 6px 10px; }
  .chip { padding: 4px 11px; font-size: 13px; }
  .modal { padding: 18px 16px 14px; }
  .prefs label { margin-inline-end: 8px; }
}
@media (max-width: 340px) {
  .topnav .logo { font-size: 17px; }
  .cb-count, .menu-name { display: none; }
  .grid { gap: 8px; }
  .title { font-size: 13px; }
}
/* phones in landscape / short windows */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 4px 16px 0; }
  h1 { font-size: 22px; margin: 2px 0; }
  .sub { display: none; }
  .searchbar { padding-block: 6px; }
  .search { padding: 4px; }
  .search button { padding: 7px 18px; }
  .controls { margin-top: 6px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .modal { max-height: calc(100vh - 16px); }
  body.home .home-logo { margin-bottom: 4px; }
  body.home .home-logo img { width: 40px; height: 40px; }
  body.home .home-logo span { font-size: 34px; }
}
