/* =========================================
   ASRP Navbar - RTL & Compact
   ========================================= */

.custom-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  background: #0b1120;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.55rem 0;
  direction: rtl;
}

/* اسکرول‌شده (اگر با JS کلاس اضافه می‌کنی) */
.custom-navbar.scrolled {
  background: #020617;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.55);
}

/* ---------- Brand ---------- */

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.navbar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar-brand span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e5e7eb;
}

/* ---------- Menu ---------- */

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5f5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link i {
  font-size: 0.95rem;
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
}

.nav-link.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}

/* ---------- Right Tools (cart + user) ---------- */

.navbar-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* دکمه ابزار (سبد خرید) */
.tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-btn i {
  font-size: 1rem;
}

.tool-btn:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45);
}

/* بج تعداد سبد */
.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #020617;
}

/* ---------- User button (register/profile) ---------- */

.register-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.register-btn i {
  font-size: 0.95rem;
}

.register-btn:hover {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ---------- Dropdown ---------- */

.dropdown-menu {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  min-width: 200px;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  color: #0f172a;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
  background: #2563eb;
  color: #fff;
}

/* ---------- Toggler ---------- */

.navbar-toggler {
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 10px;
  padding: 0.25rem 0.6rem;
  color: #e5e7eb;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #020617;
    border-radius: 16px;
    padding: 0.75rem 0.9rem;
    margin-top: 0.5rem;
  }

  .navbar-nav {
    margin: 0.5rem 0;
    flex-direction: column;
  }

  .navbar-tools {
    justify-content: center;
    margin-top: 0.4rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand span {
    font-size: 0.8rem;
  }

  .navbar-brand img {
    width: 36px;
    height: 36px;
  }

  .register-btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
  }

  .tool-btn {
    width: 36px;
    height: 36px;
  }
}