/* ===========================================================
   bottom-nav.css — منوی پایینِ موبایل (bottom tab bar)
   با نوارِ طلاییِ لغزان بالای تبِ فعال + آیکونِ پُرشونده.
   فقط روی موبایل نمایش داده می‌شود؛ در دسکتاپ کاملاً مخفی است.
   =========================================================== */
.mnav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 900;
  display: none;               /* پیش‌فرض: مخفی (فقط موبایل نمایش) */
  align-items: stretch;
  justify-content: space-around;
  gap: 2px;
  padding: 10px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 16, 22, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
  direction: rtl;
}

/* نوارِ طلاییِ لغزان روی لبهٔ بالاییِ منو، بالای تبِ فعال */
.mnav__ind {
  position: absolute;
  top: -1px;
  width: 42px;
  height: 5px;
  background: linear-gradient(90deg, var(--gold, #d9a441), var(--gold-2, #ffcc5c));
  border-radius: 0 0 16px 16px;
  filter: drop-shadow(0 4px 7px rgba(255, 204, 92, 0.75));
  transition: right 0.55s cubic-bezier(.3, 1.2, .4, 1), opacity .3s ease;
  opacity: 0;                  /* تا وقتی تبِ فعالی نباشد پنهان */
  pointer-events: none;
}

.mnav__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: #8b93a3;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  cursor: pointer;
  transition: color .3s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.mnav__item:active { transform: scale(.93); }

.mnav__ic {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}
.mnav__ic svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s ease, fill .3s ease, stroke .3s ease;
}
.mnav__lbl {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* تبِ فعال: طلایی + آیکونِ پُرشده + کمی بزرگ‌تر */
.mnav__item.is-active { color: var(--gold-2, #ffcc5c); }
.mnav__item.is-active .mnav__ic svg {
  stroke: var(--gold-2, #ffcc5c);
  fill: rgba(217, 164, 65, 0.22);
  transform: translateY(-2px);
}

/* نشانِ تعدادِ سبد */
.mnav__badge {
  position: absolute;
  top: -3px;
  inset-inline-end: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--gold, #d9a441);
  color: #16130a;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(14, 16, 22, 0.94);
}

/* نمایش فقط روی موبایل + فضای پایینِ صفحه که محتوا زیرِ نوار نره */
@media (max-width: 768px) {
  .mnav { display: flex; }
  body.has-mnav { padding-bottom: 82px; }
  body.has-mnav .cart-toast.show { bottom: auto; }

  /* هدرِ موبایل: فقط لوگو (چپ) + منوی همبرگری (راست) — بقیهٔ دکمه‌ها حذف */
  .site-header { direction: ltr; }
  .site-header .cart-btn,
  .site-header .header-btn,
  .site-header .user-chip,
  .site-header .user-logout { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mnav__item,
  .mnav__ic svg,
  .mnav__ind { transition: none; }
}
