/* בסיס, כפתורים, סרגל עליון, טוסטים */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-m);
  line-height: 1.5;
  color: var(--ink);
  background: var(--char);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.ic { width: 22px; height: 22px; flex: none; display: block; }

/* פוקוס: על רקע כהה — זהב; בתפריט ובחלונות — טבעת כפולה (לבן + כהה) שנראית על כל רקע */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sheet :focus-visible, .layer :focus-visible, .info :focus-visible, .cartbar :focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* מצב ניגודיות גבוהה של המערכת: חוזרים ל-outline רגיל */
@media (forced-colors: active) { :focus-visible, .sheet :focus-visible, .layer :focus-visible { outline: 3px solid CanvasText; box-shadow: none; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: fixed; top: calc(var(--safe-t) + 8px); right: 8px; z-index: 200;
  background: var(--cream); color: var(--ink); padding: 10px 16px; border-radius: var(--r-s);
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  border: 0; font-weight: 700; font-size: var(--fs-m); text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--action); color: var(--on-action); box-shadow: 0 8px 20px -6px rgba(196, 114, 31, .55); }
.btn--primary:hover { background: var(--action-hover); }
.btn--xl { min-height: 56px; font-size: var(--fs-l); padding: 0 30px; }
.btn--ghost-dark { background: rgba(255, 244, 220, .08); color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(246, 230, 173, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost-dark:hover { background: rgba(255, 244, 220, .16); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--line:hover { background: var(--paper-2); }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--wa { background: #1f7a45; color: #fff; }
.btn--wa:hover { background: #1a6a3b; }
.btn--block { width: 100%; }
/* מושבת: צבעים מלאים ולא שקיפות — נשאר קריא (6.6:1) */
.btn[disabled], .btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-text); box-shadow: none; cursor: not-allowed; }

/* ---------- סרגל עליון ---------- */
.topbar {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  display: flex; align-items: center; gap: var(--s-4);
  height: calc(var(--topbar-h) + var(--safe-t)); padding: var(--safe-t) var(--gutter) 0;
  background: rgba(28, 23, 20, .96); color: var(--text-on-dark);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  box-shadow: 0 1px 0 rgba(244, 237, 226, .08), 0 8px 24px -14px rgba(0, 0, 0, .6);
  transition: background-color .3s, box-shadow .3s, color .3s;
}
.topbar.on-hero { background: linear-gradient(rgba(28, 23, 20, .6), rgba(28, 23, 20, 0)); box-shadow: none; color: var(--text-on-dark); backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand__badge { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(242, 180, 106, .55); }
.brand__text { font-family: var(--f-display); font-size: 1.35rem; line-height: 1; white-space: nowrap; font-weight: 400; }
.brand__of { font-family: var(--f-body); font-size: .8rem; font-weight: 500; opacity: .8; }
.brand__name { color: var(--saffron-glow); }
.topbar.on-hero .brand__text { opacity: 0; transition: opacity .3s; }
.topbar:not(.on-hero) .brand__text { opacity: 1; transition: opacity .3s; }
.topnav { display: none; margin-inline-start: auto; gap: 4px; }
.topnav a { text-decoration: none; font-weight: 500; padding: 10px 14px; border-radius: var(--r-pill); }
.topnav a:hover { background: rgba(244, 237, 226, .1); }
@media (min-width: 760px) { .topnav { display: flex; } }

.cart-btn {
  position: relative; margin-inline-start: auto; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: transparent; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 760px) { .cart-btn { margin-inline-start: 0; } }
.cart-btn:hover { background: rgba(244, 237, 226, .1); }
.cart-btn__icon .ic { width: 26px; height: 26px; }
.cart-btn__count {
  position: absolute; top: 4px; left: 2px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 11px; background: var(--action); color: var(--on-action);
  font-size: var(--fs-2xs); font-weight: 800; display: grid; place-items: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--coal);
}
.cart-btn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-6deg); } 70% { transform: scale(.94); } 100% { transform: none; } }

/* ---------- פסים משופעים בסגנון הפוסטרים ---------- */
.band {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: var(--fs-xs); letter-spacing: .14em; color: var(--accent);
}
.band::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--action); }

/* ---------- טוסטים ---------- */
.toasts {
  position: fixed; inset-inline: 0; bottom: calc(92px + var(--safe-b)); z-index: 120;
  display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: var(--gutter);
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: min(460px, 100%); width: max-content;
  background: var(--ink); color: var(--cream); padding: 10px 12px 10px 16px; border-radius: var(--r-m);
  box-shadow: var(--sh-float); font-weight: 500; font-size: var(--fs-s);
  animation: toastIn .35s var(--ease);
}
.toast .ic { width: 20px; height: 20px; color: var(--gold); }
.toast button { background: transparent; border: 0; color: var(--gold); font-weight: 800; padding: 8px 10px; border-radius: var(--r-s); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.offline {
  position: fixed; top: calc(var(--topbar-h) + var(--safe-t) + 8px); inset-inline: var(--gutter); z-index: 70;
  margin-inline: auto; max-width: 520px; background: var(--ink); color: var(--cream);
  border-radius: var(--r-m); padding: 10px 14px; display: flex; gap: 10px; align-items: center; font-size: var(--fs-s);
  box-shadow: var(--sh-float);
}
.demo-pill {
  position: fixed; bottom: calc(84px + var(--safe-b)); left: 12px; z-index: 55;
  background: var(--crimson); color: var(--cream); font-size: var(--fs-2xs); font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill);
  pointer-events: none; box-shadow: var(--sh-float);
}
@media (min-width: 1024px) { .demo-pill { bottom: 16px; } }
.noscript { background: var(--cream); padding: 16px; text-align: center; }

/* חתיכת בשר שעפה לסל */
.fly-meat {
  position: fixed; z-index: 130; width: 18px; height: 12px; border-radius: 45% 55% 50% 40%;
  background: radial-gradient(circle at 35% 30%, #e89a4c, #a3521f 55%, #5a2a10); box-shadow: inset 0 -2px 3px rgba(30, 10, 2, .6), 0 2px 4px rgba(0, 0, 0, .25);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 374px) { .brand__of { display: none; } }
/* טקסט מוגדל (עד 200%): כשאין מקום — רק "באבי" ליד הלוגו, וכפתור הסל נשאר גלוי. נמדד ב-em כדי להגיב לגודל הטקסט */
.topbar { container: topbar / inline-size; }
@container topbar (max-width: 22em) { .brand__of { display: none; } }
.topbar.on-hero ~ .demo-pill { display: none; }
/* נתוני הדגמה של ממשק הניהול מוצגים — רק בדפדפן של מי שניסה את הממשק */
html.live-demo body::after {
  content: "הדגמת ניהול · רק בדפדפן הזה"; position: fixed; bottom: calc(88px + var(--safe-b)); left: 10px;
  z-index: 65; background: #6b4210; color: #fff3dc; font-size: var(--fs-2xs); font-weight: 700; padding: 4px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
/* על הפתיחה הסרגל התחתון היה מסתיר את כפתורי הפתיחה — הכמות מוצגת על כפתור הסל למעלה */
.topbar.on-hero ~ .cartbar { display: none; }
/* על הפתיחה הלוגו מופיע בכותרת עצמה — בסרגל הוא נכנס רק אחרי גלילה */
.brand__badge { transition: opacity .3s; }
.topbar.on-hero .brand__badge { opacity: 0; }


/* גרעיניות אבן — בשכבה נפרדת מאחורי התוכן, כדי שכלי בדיקת נגישות יזהו את צבע הרקע האמיתי */
.sheet { isolation: isolate; }
.sheet::before, body.page::before, body.adm::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--grain); border-radius: inherit;
}
body.page::before, body.adm::before { position: fixed; }
