/* השלוחה — על הטוקנים של arenaisrael.co.il (assets/tokens.css). ⛔ לא להוסיף צבע שאין שם. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--arena-white); color: var(--arena-text); font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.latin { font-family: var(--font-display); }

/* פס ההודעה — כמו באתר: לבן, טקסט כחול מודגש, קו אפור */
.topbar { text-align: center; color: var(--arena-blue); font-weight: 700; font-size: 14px; padding: 8px var(--gutter); border-bottom: 1px solid var(--arena-line); }

/* הכותרת — תפריט וחיפוש מימין, לוגו באמצע, תיק משמאל */
.header { position: sticky; top: 0; z-index: 20; background: var(--arena-white); border-bottom: 1px solid var(--arena-line); }
.header-in { max-width: var(--content-max); margin: 0 auto; height: var(--header-h); padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header-side { display: flex; gap: 6px; align-items: center; }
.header-side.end { justify-content: flex-end; }
.logo img { height: 46px; width: auto; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; text-decoration: none; }
.icon-btn img { width: 24px; height: 24px; }
.badge { position: absolute; top: 4px; left: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--arena-black); color: var(--arena-white); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

.app { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter) 120px; }
.crumbs { text-align: center; color: var(--arena-muted); font-size: 14px; padding: 16px 0 4px; }
.crumbs a { text-decoration: none; color: var(--arena-text); }
.count { text-align: center; font-size: 14px; margin-top: 8px; }
h1.page { text-align: center; font-weight: 700; font-size: var(--fs-h1-mobile); line-height: 1.2; margin: 2px 0 16px; color: var(--arena-black); text-wrap: balance; }

/* לשוניות קטגוריה — צ'יפים של ארנה: רדיוס 4, פעיל = מסגרת 2px שחורה ו-bold */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--arena-border); background: var(--arena-white); border-radius: var(--radius-chip); padding: 7px 12px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { border: 2px solid var(--arena-black); padding: 6px 11px; font-weight: 700; }

/* סנן | מיון — כמו באתר: חצי-חצי, מסגרת שחורה, רדיוס 8 */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tool { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 14px; border: 1.5px solid var(--arena-text); border-radius: var(--radius-field); background: var(--arena-white); cursor: pointer; font-size: 16px; }
.tool img { width: 20px; height: 20px; }
.search { position: relative; margin-bottom: 12px; }
.search input { width: 100%; height: 48px; border: 1px solid var(--arena-border); border-radius: var(--radius-field); padding: 0 14px 0 44px; font-size: 16px; background: var(--arena-white); }
.search input:focus { outline: none; border-color: var(--arena-black); background: var(--arena-blue-tint); }
.search img { position: absolute; left: 12px; top: 12px; width: 24px; opacity: .7; }
.filters { border: 1px solid var(--arena-line); border-radius: var(--radius-field); padding: 12px; margin-bottom: 12px; display: grid; gap: 10px; }
.filters h3 { margin: 0; font-size: 14px; color: var(--arena-muted); font-weight: 400; }
.filters .row { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--arena-blue); }

/* כרטיסי מוצר — שתי עמודות בנייד, רקע תמונה F7F7F7, שם bold */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; } h1.page { font-size: var(--fs-h1); } }
.card { text-decoration: none; display: grid; gap: 6px; min-width: 0; }
.card .img { aspect-ratio: 4 / 5; background: var(--arena-image-bg); display: grid; place-items: center; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: contain; transition: transform var(--motion); }
.card:hover .img img { transform: scale(1.03); }
.name { font-weight: 700; color: var(--arena-black); line-height: 1.3; }
.name .he { display: block; }
.name .en { display: block; overflow-wrap: anywhere; }
.code { font-size: 13px; color: var(--arena-muted); font-variant-numeric: tabular-nums; }
.price { font-variant-numeric: tabular-nums; color: var(--arena-black); }
.price b { font-size: 17px; }
.vat { font-size: 12px; color: var(--arena-muted); margin-inline-start: 4px; }
.avail { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--arena-success); flex: none; }
.dot.italy { background: var(--arena-petrol); }

/* עמוד דגם */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); background: var(--arena-white); scrollbar-width: none; } /* עמוד מוצר באתר — לבן */
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; scroll-snap-align: center; }
.bars { display: flex; gap: 6px; justify-content: center; margin: 10px 0 18px; }
.bars span { width: 40px; height: 3px; background: var(--arena-border); }
.bars span.on { background: var(--arena-black); }
.model-head h1 { margin: 0; font-size: 24px; line-height: 1.25; color: var(--arena-black); }
.model-head h1 .en { font-family: var(--font-display); font-weight: 700; display: block; }
.model-head .meta { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; }
.model-head .price b { font-size: 22px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--arena-muted); margin: 14px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--arena-border); display: inline-block; }
.legend i.stock { background: var(--arena-white); }
.legend i.italy { background: var(--arena-petrol-tint); border-color: var(--arena-petrol); }
.section-title { font-size: 14px; color: var(--arena-muted); margin: 18px 0 6px; }

/* טבלת ההזמנה בסגנון OMS — בלוק לכל צבע */
.color-block { border: 1px solid var(--arena-line); border-radius: var(--radius-field); margin-bottom: 14px; overflow: hidden; }
.color-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; }
.color-head .thumb { width: 64px; height: 80px; background: var(--arena-image-bg); border-radius: 4px; overflow: hidden; }
.color-head .thumb img { width: 100%; height: 100%; object-fit: contain; }
.color-head .cc { font-weight: 700; font-variant-numeric: tabular-nums; }
.color-head .cn { font-size: 14px; color: var(--arena-text); }
.color-head .qty-sum { text-align: center; font-size: 12px; color: var(--arena-muted); }
.color-head .qty-sum b { display: block; font-size: 20px; color: var(--arena-black); font-variant-numeric: tabular-nums; }
.sizes { overflow-x: auto; }
.sizes table { border-collapse: collapse; width: 100%; min-width: max-content; }
.sizes th { background: var(--arena-surface); font-size: 13px; font-weight: 700; padding: 6px 4px; border-top: 1px solid var(--arena-line); border-inline-start: 1px solid var(--arena-line); min-width: 68px; white-space: nowrap; }
.sizes td { text-align: center; padding: 8px 4px 6px; border-top: 1px solid var(--arena-line); border-inline-start: 1px solid var(--arena-line); vertical-align: top; }
.sizes th:first-child, .sizes td:first-child { border-inline-start: 0; }
.sizes input { width: 52px; height: 40px; text-align: center; font-size: 16px; border: 1px solid var(--arena-border); border-radius: var(--radius-field); background: var(--arena-white); -moz-appearance: textfield; }
.sizes input::-webkit-outer-spin-button, .sizes input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sizes input:focus { outline: none; border-color: var(--arena-black); background: var(--arena-blue-tint); }
.sizes input.filled { border-color: var(--arena-black); font-weight: 700; }
.sizes .st { display: block; font-size: 11px; margin: 4px auto 0; line-height: 1.25; max-width: 76px; }
.sizes .st.ok { color: var(--arena-success); }
.sizes td.italy { background: var(--arena-petrol-tint); }
.sizes td.italy .st { color: var(--arena-petrol); }
.sizes td.split .st { color: var(--arena-petrol); }

/* פס תחתון קבוע — שם הדגם, סה"כ, וכפתור הגלולה הכחול */
.buybar { position: fixed; inset: auto 0 0; z-index: 30; background: var(--arena-white); border-top: 1px solid var(--arena-line); box-shadow: 0 -3px 6px rgba(0,0,0,.06); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); }
.buybar-in { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.buybar .sum { font-size: 13px; color: var(--arena-muted); line-height: 1.3; }
.buybar .sum b { color: var(--arena-black); font-size: 16px; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: var(--radius-pill); border: 0; font-weight: 700; font-size: 16px; letter-spacing: .5px; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-object); transition: background var(--motion); }
.btn.primary { background: var(--arena-blue); color: var(--arena-white); }
.btn.primary:hover { background: var(--arena-blue-hover); }
.btn.primary:disabled { background: var(--arena-border); box-shadow: none; cursor: default; }
.btn.done { background: var(--arena-success); color: var(--arena-white); }
.btn.secondary { background: var(--arena-white); color: var(--arena-black); border: 1px solid var(--arena-black); box-shadow: none; }
.btn.block { width: 100%; }

/* הסל */
.cart-section { margin-top: 18px; }
.cart-section h2 { font-size: 18px; margin: 0 0 4px; color: var(--arena-black); }
.cart-section.italy h2 { color: var(--arena-petrol); }
.cart-section .note { font-size: 13px; color: var(--arena-petrol); background: var(--arena-petrol-tint); border-radius: var(--radius-chip); padding: 8px 10px; margin: 6px 0 8px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--arena-line); align-items: start; }
.line .thumb { width: 64px; height: 80px; background: var(--arena-image-bg); }
.line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line .t { font-weight: 700; font-size: 15px; line-height: 1.3; }
.line .d { font-size: 13px; color: var(--arena-muted); font-variant-numeric: tabular-nums; }
.line .d bdi { white-space: nowrap; }
.line .q { font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.line .tot { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line .rm { border: 0; background: none; padding: 4px; cursor: pointer; opacity: .6; margin-top: 6px; }
.line .rm img { width: 18px; }
.totals { margin-top: 18px; border: 1px solid var(--arena-line); border-radius: var(--radius-field); padding: 12px 14px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 700; font-size: 18px; border-top: 1px solid var(--arena-line); padding-top: 8px; color: var(--arena-black); }
.asof { font-size: 13px; color: var(--arena-muted); margin: 12px 0 16px; line-height: 1.5; }
.empty { text-align: center; padding: 48px 0; color: var(--arena-muted); }
.actions { display: grid; gap: 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* טבלת מידות — חלון מלמטה (בנייד) */
.link-btn { background: none; border: 0; padding: 0; margin-top: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: var(--arena-black); }
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-in { background: var(--arena-white); width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 768px) { .sheet { align-items: center; } .sheet-in { border-radius: var(--radius-field); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: -8px; background: var(--arena-white); padding: 6px 0; font-size: 18px; }
.how { font-size: 13px; color: var(--arena-muted); margin: 6px 0 10px; }
.chart { overflow-x: auto; }
.chart table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
.chart th { background: var(--arena-surface); font-size: 12px; padding: 8px 6px; text-align: center; }
.chart td { text-align: center; padding: 7px 6px; border-bottom: 1px solid var(--arena-line); }
.chart td.sz { font-weight: 700; }

/* וואטסאפ צף — כמו באתר, מעל הפס התחתון */
.wa { position: fixed; z-index: 40; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 16px; background: #25D366; display: grid; place-items: center; box-shadow: var(--shadow-object); }

/* טפסים — רדיוס 8, פוקוס תכלת, 16px נגד הזום של אייפון (כמו באתר, סניפט 96) */
.form .field, .login .field { display: grid; gap: 6px; margin-bottom: 14px; }
.form label { font-size: 14px; font-weight: 700; }
.form input, .form textarea { border: 1px solid var(--arena-border); border-radius: var(--radius-field); padding: 12px 14px; font-size: 16px; background: var(--arena-white); width: 100%; }
.form input { height: 50px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--arena-black); background: var(--arena-blue-tint); }
.form .totals { margin: 6px 0 0; }
.err { color: var(--arena-error); background: #FDE7E6; border-radius: var(--radius-chip); padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.done-head { text-align: center; padding: 24px 0 8px; }
.done-head img { width: 48px; height: 48px; margin: 0 auto 8px; }
.done-head p { margin: 0; color: var(--arena-text); }

/* בנייד: שורה לכל מידה במקום עמודה (דרור, 19/11/2026 — "לאורך במקום לרוחב, רק בנייד").
   מידה מימין · מצב המלאי באמצע · כמות משמאל. בלי גלילה הצידה. במחשב — טבלת ה-OMS כמו שהיא. */
@media (max-width: 600px) {
  .sizes { overflow: visible; }
  .sizes table, .sizes tbody, .sizes tr { display: block; width: 100%; min-width: 0; }
  .sizes thead { display: none; }
  .sizes td { display: grid; grid-template-columns: 76px 1fr 64px; align-items: center; gap: 10px; padding: 8px 12px; border-inline-start: 0; text-align: start; }
  .sizes td::before { content: attr(data-size); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
  .sizes td .st { grid-column: 2; grid-row: 1; margin: 0; max-width: none; font-size: 13px; }
  .sizes td input { grid-column: 3; grid-row: 1; width: 64px; height: 44px; justify-self: end; }
}

/* בנייד: הצבעים כאקורדיון — סגורים, ולחיצה פותחת את המידות (דרור, 19/11/2026). במחשב הכל פתוח כמו ב-OMS. */
.color-head .avail-sum { font-size: 12px; color: var(--arena-muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.color-head .chev { display: none; }
.only-mobile { display: none; }
@media (max-width: 600px) {
  .only-mobile { display: inline; }
  .color-head { cursor: pointer; -webkit-tap-highlight-color: transparent; scroll-margin-top: calc(var(--header-h) + 8px); }
  .color-head .chev { display: block; width: 18px; height: 18px; margin: 4px auto 0; transition: transform var(--motion); }
  .color-block.open .color-head .chev { transform: rotate(180deg); }
  .color-block:not(.open) .sizes { display: none; }
  .color-block.open { border-color: var(--arena-black); }
}
