/* ============ صفحه‌بندی ============ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 20px;
  direction: rtl;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  border: 2px solid #e2e8f0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

.page-btn:hover:not(.disabled):not(.active):not(.page-dots) {
  border-color: #7c3aed;
  color: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .4);
}

.page-num.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 25px -10px rgba(124, 58, 237, .6);
  cursor: default;
}

.page-nav {
  font-size: 13px;
  padding: 0 16px;
}

.page-nav.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-dots {
  border: 0;
  background: transparent;
  cursor: default;
  color: #94a3b8;
  font-size: 18px;
  min-width: 20px;
  padding: 0;
}

/* موبایل */
@media (max-width: 600px) {
  .page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  .page-nav span {
    display: none;   /* فقط آیکون نمایش داده بشه */
  }

  .page-nav {
    padding: 0 12px;
  }
}

/* ============ کد ملک روی کارت ============ */
.card-code {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, .85);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, .3);
  z-index: 3;
  font-family: inherit;
  letter-spacing: .3px;
  transition: all .3s ease;
}

.card-code i {
  font-size: 10px;
  color: #e9e7e8;
}

.card:hover .card-code {
  background: linear-gradient(135deg, #ff0033, #ff0033);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .5);
}

/* موبایل */
@media (max-width: 600px) {
  .card-code {
    font-size: 11px;
    padding: 5px 10px;
    bottom: 8px;
    right: 8px;
  }
}

/* ============ دکمه اشتراک‌گذاری ============ */
.card {
  position: relative;
}

.share-wrapper {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 6;
}

.share-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}

.share-btn:hover {
  background: #6366f1;
  color: #fff;
  transform: scale(1.1);
}

.share-menu {
  position: absolute;
  top: 46px;
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  direction: rtl;
  z-index: 10;
}

.share-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #374151;
  text-decoration: none;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}

.share-menu a:hover {
  background: #f3f4f6;
}

.share-menu a[data-action="whatsapp"]:hover { background: #dcfce7; color: #16a34a; }
.share-menu a[data-action="telegram"]:hover { background: #dbeafe; color: #0284c7; }
.share-menu a[data-action="copy"]:hover     { background: #ede9fe; color: #7c3aed; }
.share-menu a[data-action="native"]:hover   { background: #fef3c7; color: #d97706; }

/* Toast موفقیت کپی */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #10b981;
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* موبایل - دکمه اشتراک */
@media (max-width: 600px) {
  .share-wrapper {
    top: 8px;
    left: 8px;
  }
  .share-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}