/* ==========================================================
   تساند العقارية — صفحة المزادات
   ========================================================== */

/* ---------- Hero الصفحة ---------- */
.page-hero {
  position: relative;
  padding: 160px 0 70px;
  overflow: hidden;
  background: var(--hero-grad);
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 28px;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.breadcrumb a { color: var(--gold-2); transition: color 0.25s var(--ease); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span:not([class]) { color: var(--text-dim); }

.page-title {
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 16px 0 24px;
}
.page-title span { display: block; }

.page-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 50px;
  line-height: 1.8;
}

.page-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 18px 32px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  backdrop-filter: blur(20px);
}
.ps-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  min-width: 130px;
}
.ps-item strong {
  font-size: 32px;
  font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.ps-item span {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
}
.ps-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ---------- قسم المزادات (Overview) ---------- */
.auctions-overview {
  position: relative;
  z-index: 2;
  padding: 50px 0 30px;
  background: var(--bg);
}
.overview-head {
  text-align: center;
  margin-bottom: 30px;
}
.overview-head h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 900;
  margin-bottom: 10px;
}
.overview-head p {
  color: var(--text-2);
  font-size: 15px;
}
.overview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.ov-card {
  position: relative;
  padding: 22px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  text-align: right;
  overflow: hidden;
}
.ov-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.ov-card.active {
  background: linear-gradient(135deg, var(--bg-3), rgba(191, 159, 99, 0.14));
  border-color: var(--gold);
  box-shadow: 0 20px 40px -10px rgba(212, 175, 55, 0.3);
}
.ov-card.active::after {
  content: '✓';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: var(--accent-grad);
  color: #1a1410;
  border-radius: 50%;
  font-weight: 900;
  font-size: 13px;
}
.ov-card.all-card {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}
.ov-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ov-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.ov-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 10px;
}
.ov-status.live { background: rgba(239,68,68,0.15); color:#d23b3b; }
.ov-status.upcoming { background: rgba(45,212,191,0.15); color: var(--emerald-2); }
.ov-status.ended { background: rgba(22,38,63,0.07); color: var(--text-dim); }
.ov-status .live-pulse {
  width: 6px; height: 6px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
  animation: pulse 1.4s ease-in-out infinite;
}
.ov-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ov-stats {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 8px;
}
.ov-stats strong {
  color: var(--gold);
  font-weight: 800;
  margin-left: 4px;
}
.ov-brochure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-d, #a67c3e);
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: all 0.25s var(--ease);
}
.ov-brochure:hover { background: var(--accent-grad); color: #2a2113; border-color: transparent; }

/* ---------- صفحة المزاد المخصّصة (الترويسة) ---------- */
.overview-strip.is-detail { display: block; }
.auction-header {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.ah-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; margin-bottom: 18px;
  font-size: 14px; font-weight: 700; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: all 0.25s var(--ease); cursor: pointer;
}
.ah-back:hover { color: var(--gold-d, #a67c3e); border-color: var(--border-strong); }
.ah-main { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; }
.ah-cover {
  aspect-ratio: 16 / 11; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--gold-soft), rgba(45,212,191,0.08));
}
.ah-cover img { width: 100%; height: 100%; object-fit: cover; }
.ah-cover-icon { display: grid; place-items: center; font-size: 72px; }
.ah-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; margin-bottom: 12px;
}
.ah-status.live { background: rgba(239,68,68,0.14); color: #d23b3b; }
.ah-status.upcoming { background: rgba(45,212,191,0.15); color: var(--emerald-2); }
.ah-status.ended { background: var(--surface); color: var(--text-dim); }
.ah-title { font-size: clamp(24px, 3.5vw, 38px); font-weight: 900; margin-bottom: 10px; color: var(--text); }
.ah-meta { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.ah-desc { font-size: 15px; color: var(--text-2); line-height: 1.9; margin-bottom: 18px; }
.ah-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ah-actions .btn { padding: 11px 20px; font-size: 14.5px; }

@media (max-width: 760px) {
  .ah-main { grid-template-columns: 1fr; gap: 18px; }
  .ah-cover { max-height: 220px; }
}

/* ---------- شريط الفلاتر ---------- */
.filters-section {
  position: sticky;
  top: 70px;
  z-index: 50;
  padding: 9px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(22, 38, 63, 0.05);
}

.filters-bar {
  display: grid;
  grid-template-columns: 1.3fr auto auto 1fr;
  gap: 10px;
  align-items: center;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap svg {
  position: absolute;
  right: 16px;
  color: var(--text-dim);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  padding: 9px 40px 9px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s var(--ease);
}
.search-wrap svg { right: 13px; width: 17px; height: 17px; }
.search-wrap input::placeholder { color: var(--text-dim); }
.search-wrap input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.chip.active {
  background: var(--accent-grad);
  color: #1a1410;
  border-color: transparent;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-pulse {
  width: 8px; height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
  animation: pulse 1.4s ease-in-out infinite;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}
.sort-wrap label {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}
#sortSelect {
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
#sortSelect:focus {
  outline: none;
  border-color: var(--gold);
}
#sortSelect option { background: var(--bg-2); color: var(--text); }

/* ---------- قائمة النتائج ---------- */
.auctions-list {
  padding: 50px 0 100px;
  position: relative;
  z-index: 2;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.results-count {
  font-size: 15px;
  color: var(--text-2);
}
.results-count strong {
  color: var(--gold);
  font-size: 18px;
  margin: 0 4px;
}
.view-toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-2);
  transition: all 0.3s var(--ease);
}
.view-toggle:hover {
  color: var(--gold);
  border-color: var(--border-strong);
}

.auctions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.auctions-grid.list-view {
  grid-template-columns: 1fr;
}
.auctions-grid.list-view .auction-item {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 28px;
  align-items: center;
}
.auctions-grid.list-view .ai-image { height: 200px; }
.auctions-grid.list-view .ai-footer { flex-direction: column; align-items: stretch; }

/* ---------- بطاقة المزاد ---------- */
.auction-item {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s var(--ease);
  display: flex;
  flex-direction: column;
}
.auction-item:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.ai-image {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(45, 212, 191, 0.08));
  display: grid;
  place-items: center;
  font-size: 80px;
  overflow: hidden;
}
.ai-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 14, 26, 0.5));
}
.ai-status {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.ai-status.live {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}
.ai-status.upcoming {
  background: rgba(45, 212, 191, 0.85);
  color: #0a1f1c;
}
.ai-type {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(10, 14, 26, 0.7);
  color: var(--gold);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.ai-id {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.1em;
  z-index: 2;
  font-family: 'Tajawal', monospace;
}

.ai-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.ai-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--text-2);
  font-size: 13.5px;
}
.ai-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ai-timer-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}
.ai-timer-value {
  margin-right: auto;
  font-family: 'Tajawal', monospace;
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.ai-timer.urgent .ai-timer-value {
  color: #d23b3b;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.ai-timer.upcoming-soon .ai-timer-value {
  color: var(--emerald-2);
}

.ai-bid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ai-bid-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-bid-value {
  font-size: 22px;
  font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.01em;
}

.ai-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
}
.ai-bidders {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-cta {
  margin-right: auto;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.ai-cta:hover {
  background: var(--accent-grad);
  color: #1a1410;
  border-color: transparent;
}

/* ---------- لا توجد نتائج ---------- */
.no-results {
  text-align: center;
  padding: 80px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.nr-icon {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.7;
}
.no-results h3 {
  font-size: 22px;
  margin-bottom: 10px;
}
.no-results p {
  color: var(--text-2);
  margin-bottom: 24px;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s var(--ease);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 36px;
  animation: scaleIn 0.35s var(--ease-bounce);
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s var(--ease);
}
.modal-close:hover {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* محتوى داخل modal */
.modal-body .mb-hero {
  height: 220px;
  margin: -36px -36px 24px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(45, 212, 191, 0.1));
  display: grid;
  place-items: center;
  font-size: 96px;
  border-radius: 24px 24px 0 0;
}
.modal-body h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.modal-body .mb-id {
  font-size: 13px;
  color: var(--gold);
  font-family: 'Tajawal', monospace;
  margin-bottom: 20px;
}
.mb-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  background: var(--surface);
  border-radius: 14px;
}
.mb-details div span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.mb-details div strong {
  font-size: 15px;
  color: var(--text);
}
.mb-bid-box {
  padding: 20px;
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  margin-bottom: 22px;
  text-align: center;
}
.mb-bid-box span { font-size: 13px; color: var(--text-2); display: block; margin-bottom: 6px; }
.mb-bid-box strong {
  font-size: 32px;
  font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mb-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.mb-actions .btn { flex: 1; }

/* ---------- صورة البطاقة ---------- */
.ai-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.6s var(--ease);
}
.auction-item:hover .ai-photo { transform: scale(1.06); }
.ai-photo.hide { display: none; }
.ai-emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 80px;
  z-index: 0;
}
.ai-image::after { z-index: 1; }
.ai-imgcount {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
/* ضمان ظهور الشارات فوق الصورة */
.ai-status, .ai-type, .ai-id { z-index: 3; }

/* ---------- معرض الصور في النافذة ---------- */
.mb-gallery {
  margin: -32px -32px 24px;
}
.mbg-main {
  position: relative;
  height: 300px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(45, 212, 191, 0.1));
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: zoom-in;
}
.mbg-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mbg-main img.hide { display: none; }
.mbg-main.img-fallback::before {
  content: attr(data-emoji);
  font-size: 96px;
}
.mbg-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease);
  z-index: 2;
}
.mbg-nav:hover { background: var(--gold); color: #1a1410; }
.mbg-nav.prev { right: 14px; }
.mbg-nav.next { left: 14px; }
.mbg-counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 14, 26, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 2;
  font-family: 'Tajawal', monospace;
}
.mbg-expand {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease);
  z-index: 2;
}
.mbg-expand:hover { background: var(--gold); color: #1a1410; }
.mbg-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 32px 0;
  overflow-x: auto;
}
.mbg-thumb {
  flex: 0 0 auto;
  width: 70px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.25s var(--ease);
  background: var(--surface);
}
.mbg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mbg-thumb.broken { display: none; }
.mbg-thumb:hover { opacity: 0.9; }
.mbg-thumb.active {
  opacity: 1;
  border-color: var(--gold);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 15, 0.94);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.25s var(--ease);
}
.lightbox[hidden] { display: none; }
.lb-img {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: scaleIn 0.3s var(--ease);
}
.lb-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.lb-close:hover { background: #ef4444; transform: rotate(90deg); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.lb-nav:hover { background: var(--gold); color: #1a1410; }
.lb-nav.prev { right: 24px; }
.lb-nav.next { left: 24px; }
.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Tajawal', monospace;
}

/* ---------- الخريطة التفاعلية ---------- */
.view-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}
.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  background: var(--accent-grad);
  color: #1a1410;
}
#mapWrap {
  height: 560px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
#propMap { width: 100%; height: 100%; background: var(--bg-3); }
.map-hidden { display: none !important; }

/* تخصيص نوافذ Leaflet المنبثقة بالثيم الداكن */
.leaflet-popup-content-wrapper {
  background: var(--bg-3);
  color: var(--text);
  border-radius: 14px;
  border: 1px solid var(--border-strong);
}
.leaflet-popup-tip { background: var(--bg-3); border: 1px solid var(--border-strong); }
.leaflet-popup-content { margin: 14px 16px; font-family: 'Cairo', sans-serif; }
.leaflet-container { font-family: 'Cairo', sans-serif; }
.map-popup { text-align: right; min-width: 200px; }
.map-popup .mp-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--gold-soft);
}
.map-popup h4 { font-size: 15px; margin: 0 0 4px; color: var(--text); }
.map-popup .mp-meta { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.map-popup .mp-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 10px;
}
.map-popup .mp-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 8px;
  background: var(--accent-grad);
  color: #1a1410 !important;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.map-marker-pin {
  background: var(--accent-grad);
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  display: grid;
  place-items: center;
}
.map-marker-pin.live { background: linear-gradient(135deg,#ef4444,#d23b3b); }
.map-marker-pin.upcoming { background: linear-gradient(135deg,#2dd4bf,#5eead4); }
.map-marker-pin span { transform: rotate(45deg); font-size: 14px; }

/* ---------- شريط يمين النتائج (تصدير + عرض) ---------- */
.rb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- أزرار المشاركة ---------- */
.mb-share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.share-btn.wa:hover { border-color: #25d366; color: #25d366; }
.share-btn.pdf { margin-right: auto; }
.share-btn.pdf:hover { border-color: var(--emerald); color: var(--emerald-2); }

.mb-qr {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
}
.qr-card svg { width: 190px; height: 190px; display: block; }
.qr-card span { font-size: 12.5px; color: #555; font-weight: 600; }

/* ---------- Toast الصفحة ---------- */
.page-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 10000;
  padding: 13px 24px;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.4s var(--ease-bounce);
  pointer-events: none;
}
.page-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .sort-wrap { justify-self: stretch; }
  .auctions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .page-hero { padding: 130px 0 50px; }
  .page-stats { padding: 14px 18px; width: 100%; }
  .ps-item { padding: 0 14px; min-width: 0; flex: 1; }
  .ps-item strong { font-size: 24px; }
  .filters-bar { grid-template-columns: 1fr; }
  .filter-chips { overflow-x: auto; padding-bottom: 6px; }
  .auctions-grid { grid-template-columns: 1fr; }
  .auctions-grid.list-view .auction-item {
    grid-template-columns: 1fr;
  }
  .modal-panel { padding: 24px; }
  .modal-body .mb-hero { margin: -24px -24px 18px; height: 180px; font-size: 72px; }
  .mb-details { grid-template-columns: 1fr; }
}
