/* ============ חסדי יעקב — מכירת חד פעמי ============ */

:root {
  --bg:        #f4f2ec;
  --panel:     #ffffff;
  --ink:       #1e1c19;
  --ink-soft:  #6b6459;
  --line:      #ded8cc;
  --line-soft: #ece7dd;
  --brand:     #2f4f4a;
  --brand-dk:  #223a36;
  --brand-lt:  #eaf1ef;
  --gold:      #b6893f;
  --ok:        #2e7d4f;
  --ok-bg:     #e8f5ec;
  --warn:      #a9711a;
  --warn-bg:   #fdf3e0;
  --info:      #2a5f8f;
  --info-bg:   #e8f0f8;
  --bad:       #a53232;
  --bad-bg:    #fbeaea;
  --radius:    10px;
  --shadow:    0 1px 2px rgba(30,28,25,.06), 0 6px 20px rgba(30,28,25,.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
}

a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

.wrap { width: 100%; max-width: 1800px; margin: 0 auto; padding: 0 26px; }
.page { padding-top: 22px; padding-bottom: 60px; }

/* ---------------- כותרת עליונה ---------------- */

/* הכותרת של האתר נשארת מוצמדת לראש המסך גם בגלילה.
   --head-h מחושב ב-JS לפי הגובה בפועל, כדי שמה שנדבק מתחתיה יידע היכן לעצור. */
.topbar {
  background: var(--brand); color: #fff;
  position: sticky; top: 0; z-index: 60;
}
.adminbar { position: sticky; top: var(--head-h, 62px); z-index: 55; }
.topbar-in { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand b { display: block; font-size: 17px; }
.brand small { display: block; font-size: 11.5px; opacity: .75; font-weight: normal; }
.brand-mark { width: 38px; height: 38px; display: block; }


/* התפריט: גלולות ברורות, מופרדות ויזואלית מאזור המשתמש */
.mainnav {
  display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap;
  background: rgba(0,0,0,.16); border-radius: 999px; padding: 4px;
}
.mainnav a {
  color: #cddbd8; text-decoration: none; padding: 7px 16px;
  border-radius: 999px; font-size: 14.5px; white-space: nowrap;
  transition: background .12s, color .12s;
}
.mainnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.mainnav a.on {
  background: var(--gold); color: #2b2113; font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.userbox {
  display: flex; align-items: center; gap: 10px;
  padding-inline-start: 16px; margin-inline-start: 4px;
  border-inline-start: 1px solid rgba(255,255,255,.18);
}
.userbox .who {
  display: flex; align-items: center; gap: 9px;
  color: #fff; text-decoration: none;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 4px 14px 4px 5px;
}
.userbox .who:hover { background: rgba(255,255,255,.16); }
.who-av {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--gold); color: #2b2113;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.who-txt { display: flex; flex-direction: column; line-height: 1.15; }
.who-txt small { font-size: 10px; opacity: .6; }
.who-txt b { font-size: 13.5px; font-weight: 600; }

@media (max-width: 860px) {
  .userbox { border-inline-start: 0; padding-inline-start: 0; }
  .who-txt small { display: none; }
}

/* ---------------- סרגל ניהול ---------------- */

.adminbar { background: var(--brand-dk); }
.adminbar-in { display: flex; gap: 2px; flex-wrap: wrap; }
.adminbar a {
  color: #b9cbc7; text-decoration: none; padding: 9px 13px;
  font-size: 13.5px; white-space: nowrap; border-bottom: 3px solid transparent;
}
.adminbar a:hover { color: #fff; }
.adminbar a.on { color: #fff; border-bottom-color: var(--gold); font-weight: 600; }

/* ---------------- כרטיסים ---------------- */

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 18px;
}
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.card-head h1, .card-head h2 { margin: 0; }
.card-tight { padding: 0; overflow: hidden; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------------- הירו ---------------- */

.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dk) 100%);
  color: #fff; border-radius: 14px; padding: 30px 28px; margin-bottom: 20px;
}
.hero h1 { font-size: 28px; margin-bottom: 6px; }
.hero p { margin: 0 0 4px; opacity: .9; }
.hero .hero-dates { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; }
.hero .hero-dates div { font-size: 14px; }
.hero .hero-dates b { display: block; font-size: 17px; }
.hero .hero-dates span { opacity: .75; font-size: 12.5px; }
.hero .actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- כפתורים ---------------- */

.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-size: 14.5px; cursor: pointer;
  text-decoration: none; text-align: center; white-space: nowrap;
  background: #fff; color: var(--ink); border-color: var(--line);
}
.btn:hover { border-color: #c4bcac; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dk); border-color: var(--brand-dk); }
.btn-gold { background: var(--gold); color: #2b2113; border-color: var(--gold); font-weight: 600; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-danger { background: #fff; color: var(--bad); border-color: #e0b4b4; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------------- טפסים ---------------- */

label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand-lt); border-color: var(--brand);
}
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.check label { margin: 0; font-weight: normal; color: var(--ink); }
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.heb-out {
  font-size: 15px; font-weight: 600; color: var(--brand);
  margin-top: 5px; min-height: 1.4em;
}

/* ---------------- הודעות ---------------- */

.note { border-radius: 9px; padding: 11px 14px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.note-ok   { background: var(--ok-bg);   border-color: #b6ddc4; color: #1d5c39; }
.note-warn { background: var(--warn-bg); border-color: #e8c88a; color: #7a5312; }
.note-bad  { background: var(--bad-bg);  border-color: #e3b6b6; color: #8b2a2a; }
.note-info { background: var(--info-bg); border-color: #b9cfe4; color: #234e75; }
.note ul { margin: 6px 0 0; padding-inline-start: 20px; }
.note b { display: inline; }

.pay-warn {
  background: var(--warn-bg); border: 2px solid #e0a63c; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 18px;
}
.pay-warn h3 { color: #8a5a00; margin-bottom: 4px; }
.pay-warn p { margin: 0; font-size: 14px; color: #6b4c15; }

/* ---------------- טבלאות ---------------- */

.table-scroll { overflow-x: auto; }

/*
 * טבלה ארוכה (בחירת מוצרים, קטלוג): גוללת בתוך תיבה משלה במקום להאריך את
 * העמוד. כך שורת הכותרת נדבקת לראש התיבה — position:sticky נמדד מול מיכל
 * הגלילה הקרוב, ולכן הזזה שלה לפי גובה הסרגלים גרמה לה לרחף באמצע הטבלה.
 */
.table-scroll.tall {
  overflow: auto;
  max-height: calc(100vh - var(--tbl-top, 190px) - 132px);
  min-height: 340px;
  overscroll-behavior: contain;
}
.table-scroll.tall table.products thead th { top: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; }
table.tbl thead th {
  background: #f7f4ee; color: var(--ink-soft); font-size: 12.5px;
  text-transform: none; font-weight: 700; border-bottom: 2px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
table.tbl tbody tr:hover { background: #fbfaf7; }
table.tbl td.num, table.tbl th.num { text-align: center; font-variant-numeric: tabular-nums; }
table.tbl tfoot td { font-weight: bold; background: #f7f4ee; border-top: 2px solid var(--line); }
table.tbl .row-off { opacity: .5; }
.tbl-compact th, .tbl-compact td { padding: 5px 8px; font-size: 13.5px; }

/* ---------------- תגיות סטטוס ---------------- */

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12.5px; font-weight: 600; border: 1px solid;
}
.tag.ok    { background: var(--ok-bg);   color: #1d5c39; border-color: #b6ddc4; }
.tag.warn  { background: var(--warn-bg); color: #7a5312; border-color: #e8c88a; }
.tag.info  { background: var(--info-bg); color: #234e75; border-color: #b9cfe4; }
.tag.muted { background: #f0eee9; color: #6b6459; border-color: var(--line); }

/* ---------------- מדדים ---------------- */

.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--ink-soft); }
.stat.accent { border-inline-start: 4px solid var(--brand); }
.stat.accent-warn { border-inline-start: 4px solid #e0a63c; }
.stat.accent-ok { border-inline-start: 4px solid var(--ok); }

/* ---------------- טופס ההזמנה ---------------- */

.order-toolbar {
  position: sticky; top: var(--bars-h, 62px); z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 11px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.order-toolbar .search { flex: 1 1 240px; min-width: 200px; }
.order-toolbar .live-total { margin-inline-start: auto; text-align: center; }
.order-toolbar .live-total .k { font-size: 12px; color: var(--ink-soft); }
.order-toolbar .live-total .v { font-size: 23px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.order-toolbar .live-total .s { font-size: 11.5px; color: var(--ink-soft); }

table.products { width: 100%; border-collapse: collapse; font-size: 14px; }
table.products thead th {
  background: var(--brand); color: #fff; padding: 9px 10px;
  font-size: 13px; text-align: center;
  position: sticky; top: var(--tbl-top, 124px); z-index: 10;
}
table.products thead th.name-col { text-align: right; }

/* חיצי ההגדלה/הקטנה של שדות מספר גוזלים חצי מהרוחב וחותכים ספרות —
   מסתירים אותם בכל הטפסים, והמספרים נשארים LTR כדי שלא יתהפכו. */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/*
 * מספר הוא תמיד שמאל-לימין, גם בתוך עמוד בעברית. בלי זה הסמן קופץ,
 * וסימן המינוס מצויר בצד הלא נכון של המספר.
 */
input[type=number],
input[inputmode=numeric],
input.qty,
.cart-qty,
.num,
td.num,
th.num,
.pcard-price,
.pm-price,
.oh-sum b,
.cart-sum,
.cart-total b {
  direction: ltr;
  unicode-bidi: isolate;
}
input[type=number], input[inputmode=numeric] { text-align: center; }
td.num, th.num, .cart-sum { text-align: end; }

table.products td { padding: 6px 10px; border-bottom: 1px solid var(--line-soft); }
table.products tbody tr:nth-child(even) { background: #faf9f5; }
table.products tbody tr.has-qty { background: #fff8e6 !important; }
table.products tbody tr:hover { background: #f4f1e9; }
table.products td.c { text-align: center; font-variant-numeric: tabular-nums; }
table.products .pname { font-weight: 600; }
table.products .pnote { display: block; font-size: 12px; color: var(--ink-soft); font-weight: normal; }
table.products .pimg {
  width: 44px; height: 44px; object-fit: contain; background: #fff;
  border: 1px solid var(--line-soft); border-radius: 6px; display: block;
}
table.products .pimg-ph {
  width: 44px; height: 44px; border: 1px dashed var(--line); border-radius: 6px;
  display: grid; place-items: center; color: #cfc7b8; font-size: 16px;
}
table.products input.qty {
  width: 74px; text-align: center; font-weight: 700; font-size: 15px;
  padding: 6px 4px; border-radius: 7px; border: 1px solid var(--line);
}
table.products input.qty:not([value=""]):not([value="0"]) { border-color: var(--gold); background: #fffaf0; }
table.products td.line { font-weight: 600; min-width: 74px; }
table.products tr.mandatory td { background: #f2f6f5 !important; }
.qty-step {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 15px; line-height: 1; color: var(--ink-soft);
}
.qty-step:hover { background: #f2efe8; color: var(--ink); }
.qty-cell { display: flex; align-items: center; justify-content: center; gap: 4px; }

/* פס הסיכום התחתון אינו נדבק: הטבלה שמעליו גוללת בתוך עצמה, ולכן הפס
   נשאר במקומו ואינו מכסה שורות. */
.order-total-bar {
  background: var(--brand); color: #fff; border-radius: var(--radius);
  padding: 14px 20px; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.order-total-bar .amt { font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-total-bar .sub { font-size: 12.5px; opacity: .8; }

/* ---------------- מסך הכניסה ---------------- */

body.is-landing { overflow: hidden; }
body.is-landing .page { padding: 0; }
body.is-landing .footer { display: none; }

.lp {
  position: relative; width: 100vw; margin: 0 calc(50% - 50vw);
  height: calc(100vh - 62px); min-height: 520px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(155deg, #2f4f4a 0%, #1b3531 60%, #21403b 100%);
  color: #fff;
}
.lp-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -12%, rgba(182,137,63,.24), transparent 56%),
    radial-gradient(ellipse at 50% 112%, rgba(255,255,255,.06), transparent 52%);
}
.lp-in {
  position: relative; text-align: center; padding: 0 24px;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
}

.lp-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-brand img { width: 82px; height: 82px; }
.lp-brand h1 {
  margin: 0; font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 700; letter-spacing: -.5px;
}

.lp-sale {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px; padding: 16px 26px; min-width: 300px;
}
.lp-sale-h { font-size: 11.5px; letter-spacing: .22em; opacity: .5; }
.lp-sale-name { font-size: 18px; font-weight: 600; margin-top: 5px; }
.lp-none { font-size: 17px; opacity: .62; margin-top: 6px; }
.lp-dates { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.lp-dates span { display: block; font-size: 11px; opacity: .55; }
.lp-dates b { display: block; font-size: 19px; }
.lp-dates i { display: block; font-size: 11.5px; opacity: .45; font-style: normal;
  font-variant-numeric: tabular-nums; margin-top: 1px; }

.lp-box {
  background: rgba(255,255,255,.97); color: var(--ink);
  border-radius: 14px; padding: 22px 24px; width: 320px;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.lp-form { display: flex; flex-direction: column; gap: 10px; }
.lp-form input { padding: 11px 13px; font-size: 15px; }
.lp-form .btn { margin-top: 2px; }
.lp-err {
  background: var(--bad-bg); border: 1px solid #e3b6b6; color: #8b2a2a;
  border-radius: 8px; padding: 8px 11px; font-size: 13.5px;
}
.lp-reg {
  display: block; margin-top: 14px; font-size: 14px;
  color: var(--brand); text-decoration: none; font-weight: 600;
}
.lp-reg:hover { text-decoration: underline; }
.lp-hi { font-size: 16px; margin-bottom: 14px; }
.lp-btns { display: flex; flex-direction: column; gap: 9px; }

@media (max-height: 640px) {
  .lp { height: auto; padding: 44px 0; }
  body.is-landing { overflow: auto; }
  .lp-brand img { width: 62px; height: 62px; }
}

/* ---------------- חנות: כותרת קבועה ---------------- */

/* כל אזור הכותרת — רצועת המכירה, החיפוש, הסכום והכפתורים — נשאר
   מוצמד לראש המסך בזמן הגלילה, כדי שכפתור השליחה תמיד יהיה בהישג יד. */
.order-head {
  position: sticky; top: var(--head-h, 62px); z-index: 40;
  margin: -22px calc(50% - 50vw) 18px; width: 100vw;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 14px rgba(30,28,25,.07);
}

.sale-strip {
  padding: 6px 26px;
  background: linear-gradient(90deg, #e8622a 0%, #d9457f 42%, #8b5cf6 78%, #6366f1 100%);
  color: #fff; font-size: 13px;
}
.ss-in {
  max-width: 1800px; margin: 0 auto; display: flex; gap: 8px;
  align-items: center; flex-wrap: wrap;
}
.ss-in b { font-size: 14px; }
.ss-sep { opacity: .5; }
.ss-spacer { margin-inline-start: auto; }

.oh-bar {
  max-width: 1800px; margin: 0 auto; padding: 8px 26px;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.oh-bar .search { flex: 1 1 200px; min-width: 150px; max-width: 340px; position: relative; }
.oh-bar .search input {
  height: 34px; padding-block: 0; padding-inline-start: 34px;
  border-radius: 999px; background: #faf9f6; font-size: 13.5px;
}
.oh-bar .search::before {
  content: "⌕"; position: absolute; inset-inline-start: 12px; top: 50%;
  transform: translateY(-50%); color: var(--ink-soft); font-size: 16px; pointer-events: none;
}
.oh-bar .chip { padding: 5px 12px; font-size: 13px; }

/* סיכום ההזמנה וכפתורי הפעולה — טקסט בלבד, בלי קופסה שגוזלת מקום */
.oh-cart { margin-inline-start: auto; display: flex; align-items: center; gap: 9px; }
.oh-sum {
  display: flex; align-items: baseline; gap: 6px; white-space: nowrap;
  font-size: 12.5px; color: var(--ink-soft);
  background: none; border: 1px solid transparent; border-radius: 9px;
  padding: 3px 9px; font-family: inherit; cursor: pointer;
}
.oh-sum:hover { background: #f3f0e9; border-color: var(--line); }
.oh-basket { font-size: 15px; align-self: center; }
.oh-sum b {
  font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums;
}
.oh-cart.empty .oh-sum b { color: #9aa39f; }
.oh-sum .ct-sub { font-size: 11.5px; }

/* סימון אדום כשחסרים פרטים חובה */
.det-warn {
  display: inline-grid; place-items: center; margin-inline-start: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #d64545; color: #fff; font-size: 11px; font-weight: 700;
}

.order-head .cat-bar {
  max-width: 1800px; margin: 0 auto; padding: 0 26px 8px;
  display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap;
}
.order-head .cat-bar .chip { flex: none; padding: 4px 11px; font-size: 12.5px; }

@media (max-width: 860px) {
  .oh-bar { padding: 8px 14px; gap: 7px; }
  .sale-strip { padding: 6px 14px; font-size: 12px; }
  .order-head .cat-bar { padding: 0 14px 8px; }
  .oh-bar .search { flex: 1 1 100%; max-width: none; order: -1; }
}

/* חלון ההודעה של המכירה */
.notice-modal .modal-box { text-align: start; }
.notice-body {
  font-size: 14.5px; line-height: 1.85; white-space: pre-wrap;
  max-height: 46vh; overflow: auto; padding-inline-end: 6px;
}
.notice-where {
  background: #fdf6e9; border: 1px solid #efd9ae; border-radius: 10px;
  padding: 12px 15px; margin: 18px 0; font-size: 13.5px; line-height: 1.75;
  color: #7a5312;
}

/* ---------------- חנות: כרטיסי מוצר ---------------- */

.shop-bar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.shop-bar .search { flex: 1 1 260px; min-width: 190px; position: relative; }
.shop-bar .search input {
  padding-inline-start: 36px; border-radius: 999px; background: #faf9f6;
}
.shop-bar .search::before {
  content: "⌕"; position: absolute; inset-inline-start: 13px; top: 50%;
  transform: translateY(-50%); color: var(--ink-soft); font-size: 17px; pointer-events: none;
}

.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.cat-bar {
  display: flex; gap: 7px; flex-wrap: wrap; margin: -6px 0 16px;
}
.cat-bar .chip { font-size: 13px; padding: 5px 13px; }

.shop-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.pcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.pcard:hover {
  box-shadow: 0 10px 26px rgba(30,28,25,.12); border-color: #cabfa8;
  transform: translateY(-3px);
}
.pcard:hover .pcard-img img { transform: scale(1.06); }
.pcard.picked { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(182,137,63,.2); }

/* קפיצה קצרה ברגע ההוספה */
@keyframes pcard-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.035); }
  100% { transform: scale(1); }
}
.pcard.pop { animation: pcard-pop .32s ease; }

.pcard-img {
  height: 140px; background: #fbfaf7; border-bottom: 1px solid var(--line-soft);
  display: grid; place-items: center; padding: 10px; position: relative;
  width: 100%; border-inline: 0; border-block-start: 0; cursor: zoom-in; font: inherit;
}
/* רמז שאפשר לפתוח את המוצר בגדול */
.pcard-zoom {
  position: absolute; inset-inline: 0; inset-block-end: 0; padding: 4px;
  background: rgba(30,28,25,.72); color: #fff; font-size: 11.5px;
  opacity: 0; transition: opacity .18s ease;
}
.pcard:hover .pcard-zoom { opacity: 1; }
.pcard-img img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transition: transform .25s ease;
}
.pcard-img .ph { font-size: 34px; color: #d8d1c2; }
.pcard-unit {
  position: absolute; inset-block-start: 8px; inset-inline-start: 8px;
  background: rgba(47,79,74,.9); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.pcard-seq {
  position: absolute; inset-block-start: 8px; inset-inline-end: 8px;
  color: #b9b1a2; font-size: 11px; font-weight: 600;
}

.pcard-body { padding: 11px 12px 12px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
/* הכפתור נשאר "שקוף"; הקיצוץ לשתי שורות על ה-span שבתוכו —
   -webkit-line-clamp ישירות על <button> לא מרונדר בכרום. */
.pcard-namebtn {
  display: block; width: 100%; background: none; border: 0; padding: 0;
  font: inherit; color: inherit; text-align: start; cursor: pointer;
}
.pcard-name {
  font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-namebtn:hover .pcard-name { color: var(--brand); text-decoration: underline; }
.pcard-note { font-size: 11.5px; color: var(--ink-soft); margin-top: -3px; }

/* גוש התחתית: מחיר וכפתור ההוספה, צמודים לתחתית הכרטיס עם אוויר מעל */
.variant {
  margin-top: auto; display: flex; flex-direction: column; gap: 9px;
  padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.pcard-price {
  font-size: 25px; font-weight: 800; color: #6d4bd6;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.pcard-price small {
  font-size: 12px; font-weight: 500; color: var(--ink-soft);
  margin-inline-start: 5px;
}

/* כפתור הוספה שנפתח לבורר כמות */
.add-zone { position: relative; }
.add-zone .stepper { display: none; width: 100%; justify-content: space-between; height: 44px; }
.add-zone .stepper button { width: 46px; height: 100%; font-size: 20px; }
.add-zone .stepper input { flex: 1; height: 100%; font-size: 16px; }
.add-zone.open .stepper { display: flex; animation: zone-in .2s ease; }
.add-zone.open .add-btn { display: none; }

@keyframes zone-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.add-btn {
  width: 100%; height: 44px; border: 0; border-radius: 10px;
  background: #1e1c19; color: #fff; font: inherit; font-size: 14.5px;
  font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease, transform .12s ease;
}
.add-btn:hover { background: #000; }
.add-btn:active { transform: scale(.97); }
.add-btn .plus {
  font-size: 19px; line-height: 1; transition: transform .18s ease;
}
.add-btn:hover .plus { transform: rotate(90deg); }

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button {
  width: 30px; height: 32px; border: 0; background: #f7f5f0; color: var(--ink-soft);
  font-size: 17px; line-height: 1; cursor: pointer; font-family: inherit;
}
.stepper button:hover { background: var(--brand); color: #fff; }
.stepper input {
  width: 44px; height: 32px; border: 0; text-align: center; padding: 0;
  font: inherit; font-weight: 700; font-size: 14px; background: #fff;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: #fffaf0; }

.pcard-line {
  font-size: 12.5px; font-weight: 700; color: var(--gold);
  background: #fdf8ee; border-radius: 7px; padding: 4px 9px; text-align: center;
  display: none;
}
.pcard.picked .pcard-line { display: block; }

/* בורר גודל ופרטי מוצר */
.variant-pick {
  width: 100%; padding: 7px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--line); background: #faf9f6;
}
.variant.hidden { display: none; }
.pcard-info {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  font-size: 12px; color: var(--brand); text-decoration: underline;
  text-align: start; align-self: flex-start;
}
.pcard-info:hover { color: var(--gold); }

.empty-hint { text-align: center; padding: 40px 20px; color: var(--ink-soft); grid-column: 1 / -1; }

/* ---------------- סוגים/גדלים של מוצר ---------------- */

.cc-actions { display: flex; gap: 6px; }
.cc-actions .btn { flex: 1; text-align: center; }

.var-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.var-row:last-child { border-bottom: 0; }
.var-img {
  width: 96px; height: 96px; flex: none; display: grid; place-items: center;
  background: #fbfaf7; border: 1px solid var(--line); border-radius: 10px; padding: 6px;
}
.var-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.var-fields { flex: 1; min-width: 0; }
.var-fields .field { margin-bottom: 8px; }
.var-actions {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  align-items: stretch; width: 150px;
}

@media (max-width: 820px) {
  .var-row { flex-wrap: wrap; }
  .var-actions { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
}

/* ---------------- חלון סקירת הסל ---------------- */

.cart-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.cart-thumb {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  background: #fbfaf7; border: 1px solid var(--line-soft); border-radius: 8px;
  font-size: 20px; padding: 3px;
}
.cart-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-mid { flex: 1; min-width: 0; }
.cart-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cart-unitprice { font-size: 11.5px; color: var(--ink-soft); }
.cart-ctl {
  display: flex; align-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
}
.cart-ctl button {
  width: 30px; height: 30px; border: 0; background: #f7f5f0; color: var(--ink-soft);
  font-size: 16px; line-height: 1; cursor: pointer; font-family: inherit;
}
.cart-ctl button:hover { background: var(--brand); color: #fff; }
.cart-qty {
  min-width: 34px; text-align: center; font-weight: 700; font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cart-sum {
  width: 76px; text-align: end; flex: none; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-del {
  width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%;
  background: #f4f2ec; color: var(--ink-soft); cursor: pointer; font-size: 12px;
}
.cart-del:hover { background: #f6d9d9; color: #a12b2b; }
.cart-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 16px; font-size: 14px; color: var(--ink-soft);
}
.cart-total b {
  font-size: 26px; color: var(--brand); font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .cart-row { flex-wrap: wrap; }
  .cart-mid { flex: 1 1 100%; order: -1; }
  .cart-sum { margin-inline-start: auto; }
}

/* ---------------- חלון "פרטי מוצר" ---------------- */

.pm-box { max-width: 860px; padding: 0; overflow: hidden; }
.pm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
}
.pm-title { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.pm-x {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f4f2ec;
  color: var(--ink); font-size: 15px; cursor: pointer; line-height: 1;
}
.pm-x:hover { background: #e8e4da; }

.pm-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 22px;
}

.pm-big {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 12px;
  height: 300px; display: grid; place-items: center; padding: 16px;
}
.pm-big img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-ph { font-size: 62px; color: #ddd7c8; }
.pm-media { background: #fbfaf7; border-radius: 12px; padding: 12px; }
.pm-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pm-thumb {
  width: 62px; height: 62px; padding: 4px; cursor: pointer;
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  display: grid; place-items: center; font-size: 20px;
}
.pm-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-thumb.on { border-color: #e8622a; }

.pm-info { display: flex; flex-direction: column; }
.pm-sku { font-size: 12.5px; color: var(--ink-soft); min-height: 1em; }
.pm-name { font-size: 23px; line-height: 1.35; margin: 8px 0 18px; }
.pm-price {
  font-size: 32px; font-weight: 800; color: #6d4bd6;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.pm-price small {
  font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-inline-start: 7px;
}
.pm-cat { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }
.pm-variants { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pm-vchip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 15px; font: inherit; font-size: 13px; cursor: pointer;
}
.pm-vchip:hover { border-color: #8b5cf6; color: #6d4bd6; }
.pm-vchip.on {
  background: #f1ecff; border-color: #b9a5f5; color: #5a37c4; font-weight: 600;
}
.pm-desc {
  font-size: 13.5px; line-height: 1.8; color: var(--ink-soft);
  margin: 16px 0 0; white-space: pre-wrap;
}
.pm-stock { font-size: 12.5px; color: #a9711a; font-weight: 600; margin-top: 12px; }
.pm-add { margin-top: auto; height: 52px; font-size: 15.5px; }

@media (max-width: 760px) {
  .pm-grid { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .pm-big { height: 210px; }
  .pm-name { font-size: 19px; margin-bottom: 12px; }
  .pm-add { margin-top: 18px; }
}

/* ---------------- קטלוג: כרטיסים וחלון עריכה ---------------- */

.cat-filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.cf-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; }
.cf-row input[type=search] { flex: 1 1 260px; min-width: 200px; }
.cf-row select { max-width: 230px; }

.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.cat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
}
.cat-card:hover { border-color: #cabfa8; box-shadow: var(--shadow); }
.cat-card.off { opacity: .5; }

.cc-img {
  height: 140px; background: #fbfaf7; border-bottom: 1px solid var(--line-soft);
  display: grid; place-items: center; padding: 10px; position: relative;
}
.cc-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cc-no { font-size: 12px; color: #c3bcac; }
.cc-seq {
  position: absolute; top: 7px; inset-inline-end: 9px;
  font-size: 11px; color: #b9b1a2; font-weight: 600;
}

.cc-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-name {
  font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cc-tag {
  background: var(--brand-lt); color: var(--brand); font-size: 11px;
  padding: 2px 9px; border-radius: 999px; font-weight: 600;
}
.cc-unit { font-size: 11.5px; color: var(--ink-soft); }

.cc-prices {
  display: flex; gap: 8px; background: #faf9f5; border-radius: 8px; padding: 7px 10px;
}
.cc-prices > div { flex: 1; }
.cc-prices span { display: block; font-size: 10.5px; color: var(--ink-soft); }
.cc-prices b { font-size: 15px; font-variant-numeric: tabular-nums; }
.cc-prices .hl b { color: var(--brand); }

.cc-foot {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-soft); margin-top: auto;
}
.cc-used { color: var(--brand); font-weight: 600; }
.cc-edit { width: 100%; }

/* חלון עריכה */
.modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(30,28,25,.55); padding: 24px; overflow: auto;
  align-items: flex-start; justify-content: center;
}
.modal-box {
  background: var(--panel); border-radius: 14px; padding: 22px 24px;
  width: 100%; max-width: 780px; margin: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.modal-head h2 { margin: 0; }
.modal-foot {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.em-top { display: flex; gap: 18px; margin-bottom: 4px; flex-wrap: wrap; }
.em-preview {
  width: 150px; height: 150px; flex: none; background: #fbfaf7;
  border: 1px solid var(--line); border-radius: 10px;
  display: grid; place-items: center; padding: 10px;
}
.em-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------------- מסלול ההזמנה ---------------- */

.timeline { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tl-item {
  position: relative; padding: 0 16px 0 16px; border-top: 3px solid var(--line);
  padding-top: 16px;
}
.tl-item::before {
  content: ""; position: absolute; top: -8px; inset-inline-start: 16px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--line);
}
.tl-item.done { border-top-color: var(--ok); }
.tl-item.done::before { background: var(--ok); border-color: var(--ok); }
.tl-item b { display: block; font-size: 14.5px; }
.tl-item span { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.tl-item span.muted { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------- שונות ---------------- */

.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th { text-align: right; color: var(--ink-soft); font-weight: 600; width: 130px; padding: 5px 0; vertical-align: top; }
.kv td { padding: 5px 0; }

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.tal { text-align: left; }
.tac { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.sep { height: 1px; background: var(--line-soft); margin: 16px 0; }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-soft); }
.empty .big { font-size: 34px; opacity: .35; display: block; margin-bottom: 8px; }
.pre { white-space: pre-wrap; font-family: inherit; margin: 0; }
.pay-box {
  background: var(--brand-lt); border-inline-start: 4px solid var(--brand);
  padding: 12px 14px; border-radius: 8px; font-size: 14px; white-space: pre-wrap;
}
.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: s; position: relative; padding-inline-start: 34px;
  margin-bottom: 12px; font-size: 14px;
}
.steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.footer { border-top: 1px solid var(--line); padding: 18px 0; font-size: 13px; color: var(--ink-soft); }
.auth-page { max-width: 470px; margin: 40px auto; }

/* ---------------- הדפסה ---------------- */

@media print {
  .topbar, .adminbar, .footer, .order-toolbar, .btn, .no-print, .order-total-bar { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { border: none; box-shadow: none; padding: 0; }
  .wrap { max-width: none; padding: 0; }
}

@media (max-width: 720px) {
  .topbar-in { min-height: auto; padding: 10px 0; }
  .mainnav { order: 3; width: 100%; margin: 0; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 22px; }
  table.products thead th { position: static; }
  .order-toolbar { position: static; }
}