/* מחסני הריהוט · אפליקציית מוכרים — טאבלט, RTL, צהוב/שחור כמו אפליקציית הנהגים. */
:root {
  --yellow: #FFD400;
  --yellow-soft: #FFF6C2;
  --black: #111111;
  --ink: #1d1d1f;
  --grey: #6e6e73;
  --line: #e3e3e6;
  --bg: #f4f4f6;
  --white: #ffffff;
  --green: #2fa84f;
  --red: #d93025;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 16px/1.45 Heebo, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  background: var(--black); color: var(--white); padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); }
.brand { font-weight: 800; font-size: 20px; color: var(--yellow); white-space: nowrap; }
.steps { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 760px) {
  .step:not(.on) .lbl { display: none; }       /* רק המספר — הכותרת של השלב הנוכחי בלבד */
  .top { flex-wrap: wrap; row-gap: 8px; }
  .steps { order: 5; flex-basis: 100%; }         /* שורה שנייה — אחרת נמחץ לאפס ליד התגיות */
  .brand { font-size: 16px; } .who { display: none; }
}
.step { white-space: nowrap; padding: 6px 14px; border-radius: 99px; font-size: 14px; color: #bbb; border: 1px solid #333; }
.step.on { background: var(--yellow); color: var(--black); border-color: var(--yellow); font-weight: 700; }
.step.done { color: var(--white); border-color: #555; }
.who { font-size: 14px; color: #ddd; white-space: nowrap; }
.link { background: none; border: 0; color: var(--yellow); text-decoration: underline; padding: 4px; }
.dry { background: #ff9f0a; color: var(--black); font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }

/* ---------- layout ---------- */
.page { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 20px; }
.center { max-width: 520px; margin: 6vh auto 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.sticky { position: sticky; top: 76px; }
h1 { font-size: 30px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 21px; font-weight: 800; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--grey); font-size: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.spacer { height: 16px; }

/* ---------- inputs ---------- */
label.f { display: block; }
label.f > span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
label.f > span i { color: var(--red); font-style: normal; }
.in { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white);
  font-size: 17px; outline: none; transition: border-color .15s; }
.in:focus { border-color: var(--black); }
.in.err { border-color: var(--red); background: #fff5f4; }
.in.big { font-size: 28px; font-weight: 700; letter-spacing: 1px; text-align: center; padding: 18px; }
.ltr { direction: ltr; text-align: right; }
.errtxt { color: var(--red); font-size: 13px; margin-top: 4px; }
textarea.in { min-height: 84px; resize: vertical; }

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 14px; padding: 16px 22px; font-weight: 800; font-size: 17px;
  background: var(--yellow); color: var(--black); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.dark { background: var(--black); color: var(--white); }
.btn.ghost { background: var(--white); border: 1.5px solid var(--line); color: var(--ink); font-weight: 700; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 10px 14px; font-size: 15px; border-radius: 11px; }

/* ---------- chips (options) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--white); border-radius: 99px; padding: 10px 16px;
  font-size: 15px; font-weight: 500; min-height: 44px; }
.chip.on { background: var(--black); color: var(--white); border-color: var(--black); font-weight: 700; }
.chip.on.change { background: var(--yellow); color: var(--black); border-color: var(--black); }
.chip.def::after { content: " · ברירת מחדל"; font-size: 12px; opacity: .65; font-weight: 400; }
.chip.cat { padding: 8px 14px; min-height: 38px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.tag.change { background: var(--yellow); }
.tag.req { background: #ffe3e0; color: var(--red); }
.tag.ok { background: #e4f6e9; color: var(--green); }

/* ---------- catalog ---------- */
.search { position: relative; }
.search .in { padding-inline-start: 46px; font-size: 19px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); opacity: .5; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.prod { background: var(--white); border-radius: 14px; overflow: hidden; border: 1.5px solid transparent; text-align: start;
  padding: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); display: flex; flex-direction: column; }
.prod:active { border-color: var(--black); }
.prod .img { aspect-ratio: 4/3; background: #eee center/cover no-repeat; }
.prod .t { padding: 10px 12px 12px; }
.prod b { display: block; font-size: 16px; }
.prod small { color: var(--grey); }

/* ---------- cart ---------- */
.line { border-bottom: 1px solid var(--line); padding: 12px 0; }
.line:last-child { border-bottom: 0; }
.line .desc { white-space: pre-line; font-size: 13px; color: var(--grey); margin-top: 4px; }
.price { font-weight: 800; white-space: nowrap; }
.total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; padding-top: 12px; border-top: 2px solid var(--black); margin-top: 8px; }
.sum { display: flex; justify-content: space-between; padding: 4px 0; }

/* ---------- sheet (product options) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 50; display: flex; justify-content: center; align-items: flex-end; }
.sheet { background: var(--bg); width: min(980px, 100%); max-height: 94vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; }
.sheet .hd { display: flex; align-items: center; gap: 14px; padding: 18px 22px; background: var(--white); border-radius: 22px 22px 0 0; border-bottom: 1px solid var(--line); }
.sheet .hd img { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; }
.sheet .bd { overflow: auto; padding: 18px 22px; }
.sheet .ft { padding: 14px 22px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.group { background: var(--white); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.group .gh { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.group .gh b { font-size: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--white); }
.stepper button { border: 0; background: none; width: 48px; height: 48px; font-size: 22px; }
.stepper span { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; }
.results { border: 1.5px solid var(--line); border-radius: 12px; margin-top: 8px; max-height: 240px; overflow: auto; background: var(--white); }
.results button { display: flex; justify-content: space-between; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 14px; text-align: start; }
.results button:last-child { border-bottom: 0; }

/* ---------- status banners ---------- */
.banner { border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.banner.contact { background: #e4f6e9; }
.banner.lead { background: var(--yellow-soft); }
.banner.new { background: #eef0f3; }
.banner.warn { background: #fff1e0; }
.orders { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders td { padding: 6px 4px; border-bottom: 1px solid var(--line); }

/* ---------- pay frame ---------- */
.payframe { position: fixed; inset: 0; z-index: 60; background: var(--white); display: flex; flex-direction: column; }
.payframe .bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--black); color: var(--white); }
.payframe iframe { flex: 1; border: 0; width: 100%; }

.toast { position: fixed; bottom: 24px; inset-inline: 0; margin: auto; width: fit-content; max-width: 90vw; background: var(--black); color: var(--white);
  padding: 12px 20px; border-radius: 12px; z-index: 80; box-shadow: var(--shadow); }
.spin { width: 22px; height: 22px; border: 3px solid rgba(0, 0, 0, .15); border-top-color: var(--black); border-radius: 50%; animation: s .8s linear infinite; display: inline-block; }
.btn.dark .spin { border-color: rgba(255, 255, 255, .25); border-top-color: var(--white); }
@keyframes s { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--grey); padding: 30px 10px; }

/* ---------- sketches ---------- */
.sketchbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.sketchitem { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.sketchitem:first-of-type { border-top: 0; }
.sketchitem b { display: block; margin-bottom: 6px; }
.sketchitem svg { max-height: 360px; }

/* ---------- product sheet v2: side menu + primary options (15.9) ---------- */
.sheet.wide { width: min(1240px, 100%); height: 94vh; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-row h2 { margin: 0; }
.hd-group { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 99px; padding: 4px 4px 4px 10px; }
.hd-group .chip { min-height: 36px; padding: 6px 12px; }
.hd-label { font-size: 14px; font-weight: 700; padding-inline-start: 6px; }
.hd-label .req { color: var(--red); font-style: normal; }
.chip.addon { min-height: 40px; font-weight: 700; }
.sheet .bd.split { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; overflow: hidden; flex: 1; min-height: 0; padding: 0; }
.bd.split .side { border-inline-end: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; min-height: 0; padding: 14px 12px; }
.bd.split .main { overflow: auto; padding: 16px 16px 16px 0; min-height: 0; }
.side .search .in { font-size: 15px; padding: 11px 12px; }
.side-list { overflow: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: start; background: none; border: 0;
  border-radius: 10px; padding: 11px 10px; font-size: 15px; }
.side-item:hover, .side-item:active { background: var(--bg); }
.side-item.shown span { font-weight: 700; }
.side-item .val { background: var(--yellow); border-radius: 6px; padding: 1px 6px; font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group .gh .x { margin-inline-start: auto; border: 0; background: none; font-size: 20px; color: var(--grey); width: 32px; height: 32px; border-radius: 50%; }
.group.flash { box-shadow: 0 0 0 3px var(--yellow); transition: box-shadow .3s; }
.dim-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.dim-label { font-weight: 700; width: 96px; flex-shrink: 0; }
/* "אחר" — תיבה קטנה בסוף שורת האפשרויות, בגובה של צ'יפ */
.other input { width: 110px; min-height: 44px; border: 1.5px dashed var(--line); border-radius: 99px; padding: 8px 14px; font-size: 15px;
  background: var(--white); outline: none; transition: width .15s, border-color .15s; }
.other input:focus { border-style: solid; border-color: var(--black); width: 170px; }
.other.wide input, .other.wide input:focus { width: 260px; }
.line.kid { padding: 4px 0 10px; border-bottom: 0; color: var(--grey); font-size: 14px; }
@media (max-width: 820px) {
  .bd.split { grid-template-columns: 1fr; overflow: auto; }
  .bd.split .side { border-inline-end: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .bd.split .main { padding: 12px; overflow: visible; }
}

/* ---------- address combo (data.gov.il) ---------- */
.combo { position: relative; }
.combo-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; background: var(--white); border: 1.5px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.combo-list button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 12px 14px; font-size: 16px; border-bottom: 1px solid var(--line); }
.combo-list button:last-child { border-bottom: 0; }
.combo-list button.hi, .combo-list button:hover { background: var(--yellow-soft); }
.addr { display: flex; flex-direction: column; gap: 14px; }
.addr-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; }
