/* ==========================================================================
   ProgressIL Store Mirror — עיצוב
   פלטת המותג: שחור עמוק + זהב, זהה ל-progressil-testdrive (NUI במשחק).
   RTL מלא, פונט Heebo.
   ========================================================================== */

:root {
  --bg:        #0d0d10;
  --bg-elev:   #16161c;
  --bg-card:   #1c1c24;
  --bg-hover:  #22222c;
  --gold:      #f4b400;
  --gold-soft: rgba(244, 180, 0, .28);
  --gold-dim:  rgba(244, 180, 0, .10);
  --text:      #f5f6f8;
  --text-dim:  #a3a7b0;
  --text-faint:#6e727c;
  --border:    rgba(255, 255, 255, .07);
  --border-str:rgba(255, 255, 255, .14);
  --danger:    #e5544b;
  --amber:     #ffb020;
  --discord:   #5865f2;
  --r:         14px;
  --shadow:    0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  /* זוהר זהב עדין ברקע, נותן עומק בלי תמונה */
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(244,180,0,.07), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(244,180,0,.04), transparent 55%);
  background-attachment: fixed;
}

.wrap { width: min(1280px, 100% - 40px); margin-inline: auto; }

a { color: inherit; text-decoration: none; }

/* ---------- פס תחזוקה ---------- */
/* ---------- אזור דביק: הודעה + כותרת ----------
   כל מה שבפנים נשאר על המסך בזמן גלילה. הגובה נמדד ב-JS ונשמר
   ב---stick-h כדי ששורת הסינון תדע להיצמד מתחתיו. */
.stickytop {
  position: sticky; top: 0; z-index: 50;
}

.notice {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(90deg, rgba(255,86,86,.22), rgba(255,176,32,.20), rgba(255,86,86,.22));
  border-bottom: 1px solid rgba(255,176,32,.5);
  font-size: 15px;
  text-align: center;
}
.notice i { color: var(--amber); font-size: 19px; flex: 0 0 auto; }
.notice-text { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: baseline; justify-content: center; }
.notice-text strong {
  color: #ffd27a; font-weight: 900;
  font-size: 16px; letter-spacing: -.2px;
}
.notice-text span { color: var(--text-dim); }

/* במסך צר משאירים רק את המשפט הקצר — שלא יבלע חצי מסך */
@media (max-width: 720px) {
  .notice { padding: 10px 14px; font-size: 13px; }
  .notice-text strong { font-size: 14px; }
  .notice-text span { display: none; }
}

/* ---------- אזהרה בולטת מתחת לכותרת הראשית ---------- */
.hero-warn {
  display: flex; align-items: flex-start; gap: 13px;
  margin: 22px auto 0; max-width: 720px;
  padding: 15px 18px;
  background: rgba(255,86,86,.10);
  border: 1px solid rgba(255,86,86,.42);
  border-radius: 13px;
  text-align: start; font-size: 14.5px; line-height: 1.65;
}
.hero-warn i { color: #ff8a8a; font-size: 20px; margin-top: 2px; flex: 0 0 auto; }
.hero-warn b { color: #ffb0b0; display: block; font-size: 16px; margin-bottom: 3px; }
.hero-warn span { color: var(--text-dim); }
.hero-warn-link {
  /* flex ולא inline-flex — כדי שיישב בשורה משלו מתחת לטקסט */
  display: flex; width: fit-content; align-items: center; gap: 7px;
  margin-top: 11px; padding: 8px 14px;
  background: #5865f2; color: #fff; text-decoration: none;
  border-radius: 9px; font-weight: 700; font-size: 13.5px;
}
.hero-warn-link:hover { background: #4752c4; }

/* ---------- אזהרה בתוך חלון הפרטים ---------- */
.modal-warn {
  display: flex; align-items: flex-start; gap: 11px;
  margin: 16px 0 4px; padding: 13px 15px;
  background: rgba(255,86,86,.11);
  border: 1px solid rgba(255,86,86,.45);
  border-radius: 11px;
  font-size: 13.5px; line-height: 1.6; color: var(--text-dim);
}
.modal-warn i { color: #ff8a8a; font-size: 17px; margin-top: 1px; flex: 0 0 auto; }
.modal-warn b { color: #ffb0b0; display: block; margin-bottom: 2px; font-size: 14.5px; }

/* ---------- תג "לצפייה בלבד" על כל כרטיס ---------- */
.badge-view {
  background: rgba(255,86,86,.9); color: #fff; font-weight: 800;
}

/* ---------- כותרת עליונה ---------- */
.topbar {
  /* הדביקות עברה למיכל .stickytop שעוטף גם את פס ההודעה */
  background: rgba(13, 13, 16, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), #c98f00);
  color: #14140a; font-weight: 900; font-size: 21px;
  box-shadow: 0 4px 14px rgba(244,180,0,.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 800; letter-spacing: .2px; }
.brand-text span { font-size: 12px; color: var(--text-faint); }

.search {
  flex: 1 1 auto; max-width: 460px;
  position: relative; display: flex; align-items: center;
}
.search > i {
  position: absolute; inset-inline-start: 14px;
  color: var(--text-faint); font-size: 14px; pointer-events: none;
}
.search input {
  width: 100%; height: 40px;
  padding-inline: 40px 38px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit; font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-dim); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; inset-inline-end: 8px;
  width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-faint); cursor: pointer;
}
.search-clear:hover { background: var(--bg-hover); color: var(--text); }

.topbar-actions { display: flex; gap: 9px; flex: 0 0 auto; margin-inline-start: auto; }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding-inline: 16px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-elev); color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-str); }
.btn:active { transform: translateY(1px); }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold); }
.btn-discord { background: var(--discord); border-color: transparent; color: #fff; }
.btn-discord:hover { background: #4a56d6; border-color: transparent; }
.btn-disabled {
  background: var(--bg-card); color: var(--text-faint);
  border-color: var(--border); cursor: not-allowed;
}
.btn-disabled:hover { background: var(--bg-card); border-color: var(--border); }
.btn-disabled:active { transform: none; }

/* ---------- גיבור ---------- */
.hero { padding: 54px 0 34px; text-align: center; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px); font-weight: 900; letter-spacing: -.5px;
}
.gold {
  background: linear-gradient(120deg, var(--gold), #ffdd7a 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin: 0 auto; max-width: 620px;
  color: var(--text-dim); font-size: 16px; line-height: 1.65;
}
.hero-stats {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-top: 26px;
}
.stat {
  min-width: 116px; padding: 13px 20px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.stat b { font-size: 21px; font-weight: 800; color: var(--gold); }
.stat span { font-size: 12.5px; color: var(--text-faint); }

/* ---------- סינון ---------- */
.filters {
  /* --stick-h נמדד ב-JS: גובה ההודעה+הכותרת משתנה לפי אורך הטקסט והמסך */
  position: sticky; top: var(--stick-h, 66px); z-index: 30;
  background: rgba(13, 13, 16, .92);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--border);
  margin-bottom: 26px;
}
.filters-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0;
}
.chips {
  display: flex; gap: 8px; flex: 1 1 auto;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding-inline: 14px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-dim);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--border-str); }
.chip.active {
  background: var(--gold); border-color: var(--gold); color: #14140a; font-weight: 700;
}
.chip .n {
  font-size: 11.5px; opacity: .7;
  background: rgba(255,255,255,.08); border-radius: 999px; padding: 1px 6px;
}
.chip.active .n { background: rgba(0,0,0,.16); opacity: .8; }

.sort { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.sort label { font-size: 13px; color: var(--text-faint); }
.sort select {
  height: 34px; padding-inline: 10px 28px;
  background: var(--bg-elev) ; border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-family: inherit; font-size: 13.5px;
  cursor: pointer; outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%), linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: left 12px center, left 7px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sort select:focus { border-color: var(--gold-soft); }

/* ---------- רשת ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  box-shadow: var(--shadow);
}

.card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #101014;
  overflow: hidden;
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s ease;
}
.card:hover .card-img img { transform: scale(1.05); }
.card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,16,.75), transparent 55%);
  pointer-events: none;
}

.badges {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  display: flex; flex-direction: column; gap: 6px; z-index: 2;
}
.badge {
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.badge-cat  { background: rgba(0,0,0,.62); color: var(--text); border: 1px solid var(--border-str); }
.badge-gold { background: rgba(244,180,0,.92); color: #14140a; }
.badge-crime{ background: rgba(180,34,28,.92); color: #fff; }
.badge-test { background: rgba(88,101,242,.9); color: #fff; }

.card-body {
  padding: 14px 15px 15px;
  display: flex; flex-direction: column; gap: 9px; flex: 1;
}
.card-name {
  font-size: 15.5px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub {
  font-size: 12.5px; color: var(--text-faint); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.card-foot {
  margin-top: auto; padding-top: 11px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.price { font-size: 19px; font-weight: 800; color: var(--gold); letter-spacing: -.3px; }
.price small { font-size: 12px; font-weight: 600; color: var(--text-faint); margin-inline-start: 3px; }
.card-more {
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 5px;
}
.card:hover .card-more { color: var(--gold); }

/* ---------- מצבים ---------- */
.state {
  text-align: center; padding: 70px 20px;
  color: var(--text-faint); font-size: 15px;
}
.state i { margin-inline-end: 8px; color: var(--gold); }
.state.error i { color: var(--danger); }

/* ---------- חלון פרטים ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-bg { position: absolute; inset: 0; background: rgba(6,6,9,.78); backdrop-filter: blur(5px); }
.modal-box {
  position: relative; z-index: 1;
  width: min(660px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border-str);
  border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.65);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-box::-webkit-scrollbar { width: 9px; }
.modal-box::-webkit-scrollbar-thumb { background: #2c2c36; border-radius: 9px; }

.modal-x {
  position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 3;
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 15px; cursor: pointer;
  backdrop-filter: blur(4px);
}
.modal-x:hover { background: rgba(0,0,0,.8); }

.modal-img { aspect-ratio: 16 / 9; background: #101014; border-radius: 18px 18px 0 0; overflow: hidden; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-body { padding: 20px 24px 24px; }
.modal-cat { font-size: 12.5px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.modal-body h2 { margin: 0 0 10px; font-size: 24px; font-weight: 800; line-height: 1.3; }
.modal-price { font-size: 28px; font-weight: 900; color: var(--gold); margin-bottom: 14px; }
.modal-blurb { margin: 0 0 14px; color: var(--text-dim); font-size: 15px; line-height: 1.7; }

.modal-list { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.modal-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; line-height: 1.55; color: var(--text);
}
.modal-list li::before {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  color: var(--gold); font-size: 12px; margin-top: 4px; flex: 0 0 auto;
}

.modal-note {
  padding: 11px 14px; margin-bottom: 18px;
  background: rgba(255,176,32,.08); border: 1px solid rgba(255,176,32,.24);
  border-radius: 10px;
  font-size: 13.5px; line-height: 1.6; color: #ffd98a;
}

.modal-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-cta .btn { flex: 1 1 200px; height: 46px; font-size: 15px; }
.modal-id { margin-top: 14px; font-size: 12px; color: var(--text-faint); }
.modal-id code { background: var(--bg-card); padding: 2px 7px; border-radius: 5px; direction: ltr; display: inline-block; }

/* ---------- כותרת תחתונה ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-elev); margin-top: 20px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 28px 0; flex-wrap: wrap;
}
.footer b { font-size: 15px; }
.footer p { margin: 6px 0 0; max-width: 560px; font-size: 13px; color: var(--text-faint); line-height: 1.65; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-dim); }
.footer-links a:hover { color: var(--gold); }
.footer-links span { color: var(--text-faint); direction: ltr; text-align: start; }

/* ---------- הודעה צפה ---------- */
.toast {
  position: fixed; inset-block-end: 24px; inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 200;
  padding: 12px 20px;
  background: var(--gold); color: #14140a;
  border-radius: 10px; font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: pop .18s ease-out;
}
.toast[hidden] { display: none; }

/* ---------- מסכים קטנים ---------- */
@media (max-width: 860px) {
  .topbar-inner { height: auto; padding: 11px 0; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .filters { top: 0; position: static; }
  .btn .lbl { display: none; }
  .btn { padding-inline: 13px; }
  .filters-inner { flex-direction: column; align-items: stretch; gap: 11px; }
  .sort { justify-content: flex-end; }
  .hero { padding: 36px 0 26px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-img { border-radius: 18px 18px 0 0; }
}
