﻿/* ==========================================
   AJMAN PROPERTIES - Main Stylesheet
   ========================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* ── Brand Core ────────────────────── */
  --primary:        #0d1820;   /* deep midnight navy */
  --primary-light:  #1a2b3c;   /* lighter navy       */
  --primary-mid:    #243550;   /* mid-tone navy       */
  --primary-hover:  #070f19;   /* darkest navy        */

  /* ── Gold Accent Family ────────────── */
  --accent:          #c8962f;  /* classic gold        */
  --accent-warm:     #daa832;  /* brighter warm gold  */
  --accent-light:    #f0c060;  /* light gold          */
  --accent-deep:     #a87820;  /* deep amber          */
  --accent-gradient: linear-gradient(135deg, #c8962f 0%, #f0c060 100%);
  --accent-gradient-rich: linear-gradient(135deg, #a87820 0%, #c8962f 45%, #f0c060 100%);

  /* ── Status ────────────────────────── */
  --success:       #1da057;    /* rich green          */
  --danger:        #e03535;    /* unified red         */
  --danger-soft:   rgba(224,53,53,0.10);
  --warning:       #e8a020;    /* warm amber-warning  */
  --info:          #1a75c4;    /* clear blue          */

  /* ── Backgrounds ───────────────────── */
  --light:         #f3f5f8;    /* very light warm-grey*/
  --light-warm:    #faf8f4;    /* warm cream          */
  --light-gray:    #e6ecf5;
  --border:        #d6dff0;
  --glass:         rgba(255,255,255,0.06);
  --glass-gold:    rgba(200,150,47,0.13);

  /* ── Text ───────────────────────────── */
  --text:          #13223a;
  --text-secondary:#476280;
  --text-muted:    #7d96b2;
  --white:         #ffffff;

  /* ── Shadows ────────────────────────── */
  --shadow-sm:  0 2px 12px rgba(13,24,32,0.07);
  --shadow:     0 6px 24px  rgba(13,24,32,0.13);
  --shadow-lg:  0 16px 48px rgba(13,24,32,0.18);
  --shadow-gold:0 8px 32px  rgba(200,150,47,0.28);
  --shadow-red: 0 4px 20px  rgba(224,53,53,0.22);

  /* ── Layout ─────────────────────────── */
  --radius:    14px;
  --radius-sm:  9px;
  --radius-lg: 22px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Poppins', sans-serif;
  color: var(--text);
  background-color: var(--light);
  line-height: 1.7;
  min-height: 100vh;
}

body[dir="ltr"] {
  font-family: 'Poppins', 'Cairo', sans-serif;
}

body[dir="rtl"] {
  font-family: 'Cairo', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
}

ul { list-style: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-gray); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 50px 0;
}

.text-center { text-align: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.w-100 { width: 100%; }
.hidden { display: none !important; }

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 44px;
  line-height: 1.7;
}

.page-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #1a1000;
  border-color: var(--accent);
  font-weight: 700;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #b07a20 0%, #d4a840 100%);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-warning {
  background: var(--warning);
  color: var(--white);
  border-color: var(--warning);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 45, 90, 0.1);
}

.form-control::placeholder {
  color: #aab4c0;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23546e8a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 20px;
  padding-left: 40px;
}

body[dir="rtl"] select.form-control {
  background-position: right 12px center;
  padding-right: 40px;
  padding-left: 16px;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 4px;
}

.form-hint {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 4px;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
  padding: 18px 0;
}

.navbar.scrolled {
  background: rgba(15,25,35,0.97);
  padding: 12px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 800;
}

.navbar-brand .logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: rgba(255,255,255,0.9);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* User dropdown */
.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.user-btn:hover { background: rgba(255,255,255,0.25); }

/* Add Property button in navbar */
.nav-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #c8962f, #e0b040);
  color: #0f1923;
  border: none;
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(200,150,47,0.4); }
.nav-add-btn i { font-size: 0.8rem; }

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 100;
}

body[dir="rtl"] .dropdown-menu { right: auto; left: 0; }

.user-dropdown:hover .dropdown-menu,
.user-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover { background: var(--light-gray); color: var(--primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #fef0ee; }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0f1923 0%, #1c2b3a 55%, #0a141e 100%);
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200,150,47,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(200,150,47,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 900"><path fill="rgba(255,255,255,0.025)" d="M0,0 L1440,0 L1440,600 C1200,700 800,500 400,650 C200,720 0,680 0,680 Z"/></svg>') center/cover;
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* diagonal grid lines */
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 38px
  );
}

/* ── Hero brand watermark ── */
.hero-watermark {
  display: none;
}

/* ── Watermark animations ─────────────────────── */

/* Corner elements: gentle float + glow drift */
@keyframes wm-corner-drift {
  0%   { transform: translateY(0)     scale(1);    filter: sepia(1) saturate(5) hue-rotate(5deg) brightness(0.72); }
  30%  { transform: translateY(-14px) scale(1.04); filter: sepia(1) saturate(6) hue-rotate(5deg) brightness(0.85)
         drop-shadow(0 0 28px rgba(200,150,47,0.45)); }
  60%  { transform: translateY(-8px)  scale(1.02); filter: sepia(1) saturate(5) hue-rotate(5deg) brightness(0.78); }
  100% { transform: translateY(0)     scale(1);    filter: sepia(1) saturate(5) hue-rotate(5deg) brightness(0.72); }
}

/* Centered elements: breathe in/out with glow */
@keyframes wm-center-breathe {
  0%,100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.42;
    filter: sepia(1) saturate(5) hue-rotate(5deg) brightness(0.65);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
    opacity: 0.62;
    filter: sepia(1) saturate(6) hue-rotate(5deg) brightness(0.82)
            drop-shadow(0 0 32px rgba(200,150,47,0.5));
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(200,150,47,0.22) 0%, rgba(240,192,96,0.12) 100%);
  border: 1px solid rgba(240,192,96,0.45);
  color: var(--accent-light);
  padding: 9px 22px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(200,150,47,0.15);
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 22px;
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.12rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 44px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

/* Hero Search Box */
.hero-search {
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08);
  max-width: 920px;
  margin: 0 auto 44px;
  backdrop-filter: blur(10px);
}

.hero-search-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-align: start;
}

.hero-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  color: var(--white);
}

.hero-stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* ==========================================
   PROPERTY CARD
   ========================================== */
.property-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  border: 1px solid var(--border);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.property-card-img {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.property-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(15,25,35,0.45) 100%);
  pointer-events: none;
}

.property-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.property-card:hover .property-card-img img {
  transform: scale(1.07);
}

.property-card-img-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

body[dir="rtl"] .property-card-img-count { right: auto; left: 10px; }

.property-card-views {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.58);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
body[dir="rtl"] .property-card-views { left: auto; right: 10px; }

.property-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  z-index: 2;
}

body[dir="rtl"] .property-badge { left: auto; right: 14px; }

.badge-new      { background: var(--success); color: white; box-shadow: 0 2px 8px rgba(34,165,91,0.4); }
.badge-featured { background: var(--accent-gradient); color: #1a1000; box-shadow: 0 2px 10px rgba(200,150,47,0.45); }
.badge-sale     { background: var(--primary); color: white; }
.badge-discount { background: linear-gradient(135deg, var(--danger), #bf2a2a); color: white; box-shadow: var(--shadow-red); animation: pulse-discount 2s infinite; }
.badge-sold     { background: var(--primary-mid); color: rgba(255,255,255,0.88); font-size: 0.85rem; letter-spacing: 1px; }

@keyframes pulse-discount {
  0%,100% { box-shadow: 0 2px 10px rgba(224,53,53,0.45); }
  50%      { box-shadow: 0 4px 18px rgba(224,53,53,0.75); }
}

/* Discounted card — glowing red border */
.property-card.has-discount {
  border: 2px solid rgba(224,53,53,0.40);
  box-shadow: 0 4px 24px rgba(224,53,53,0.15), var(--shadow);
  animation: glow-discount 2.5s ease-in-out infinite;
}
@keyframes glow-discount {
  0%,100% { box-shadow: 0 4px 24px rgba(224,53,53,0.15), var(--shadow); }
  50%      { box-shadow: 0 6px 32px rgba(224,53,53,0.35), var(--shadow); }
}

/* ── Featured card — 4-photo collage grid ──────────────────── */
.property-card-img.is-featured-grid {
  padding: 0;
  overflow: hidden;
}
.featured-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
}
.fig-cell {
  position: relative;
  overflow: hidden;
}
.fig-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.fig-cell:hover img { transform: scale(1.07); }

/* "+N more" overlay on 4th cell */
.fig-cell.fig-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  background: rgba(13,24,32,0.58);
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

/* ── Mini-collage for regular cards ───────────────────────── */
.property-card-img.is-mini-collage { padding: 0; overflow: hidden; }
.card-mini-collage {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
}
.cmc-main { grid-row: 1 / 3; overflow: hidden; }
.cmc-side { overflow: hidden; position: relative; }
.card-mini-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}
.property-card:hover .card-mini-collage img { transform: scale(1.06); }
.cmc-more::after {
  content: attr(data-more);
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10,20,30,0.58);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cairo', sans-serif;
}

/* ── Featured card — golden crown ─────────────────────────── */
.property-card.has-featured {
  border: 2px solid rgba(200,150,47,0.55);
  box-shadow: 0 4px 28px rgba(200,150,47,0.22), var(--shadow);
  animation: glow-featured 3s ease-in-out infinite;
}
@keyframes glow-featured {
  0%,100% { box-shadow: 0 4px 28px rgba(200,150,47,0.22), var(--shadow); }
  50%      { box-shadow: 0 8px 40px rgba(200,150,47,0.45), var(--shadow); }
}

/* Crown icon — floats centered at the top of the image */
.featured-crown {
  position: absolute;
  top: 10px;
  left: 10px;        /* RTL default — top of reading-start side */
  right: auto;
  transform: none;
  z-index: 10;
  width: 42px;
  height: 42px;
  background: linear-gradient(145deg, #f0c060 0%, #c8962f 60%, #a87820 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff8e0;
  font-size: 1.15rem;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4), 0 6px 22px rgba(200,150,47,0.75);
  animation: float-crown 2.8s ease-in-out infinite;
  pointer-events: none;
}
body[dir="ltr"] .featured-crown {
  left: auto;
  right: 10px;       /* LTR — top-right corner */
}

/* Push action buttons below crown on featured cards */
.property-card.has-featured .card-img-actions {
  top: 60px;
}

@keyframes float-crown {
  0%,100% { transform: translateY(0)    scale(1);    }
  40%      { transform: translateY(-7px) scale(1.08); }
  60%      { transform: translateY(-5px) scale(1.05); }
}

/* Discount price display */
.price-original   { text-decoration: line-through; color: var(--text-muted); font-size: 0.82rem; font-weight: 500; }
.price-discounted { color: var(--danger); font-weight: 800; }
.countdown-wrap   { display:flex; align-items:center; gap:5px; font-size:0.72rem; color:var(--danger); font-weight:700; margin-top:2px; }
.countdown-box    { background: var(--danger-soft); border:1px solid rgba(224,53,53,0.22); border-radius:5px; padding:2px 6px; font-variant-numeric:tabular-nums; min-width:26px; text-align:center; }

/* Sold overlay */
.sold-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(30,30,30,0.62);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius) var(--radius) 0 0;
  backdrop-filter: blur(2px);
}
.sold-stamp {
  background: white; color: #2d3748;
  font-size: 1.1rem; font-weight: 800;
  padding: 10px 28px; border-radius: 8px;
  letter-spacing: 2px;
  transform: rotate(-8deg);
  border: 3px solid #4a5568;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* ── Deal Card — 4-photo collage ─────────────────────────── */
.deal-card-photos {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 210px;
  gap: 2px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--light-gray);
}
.deal-photo-cell {
  position: relative;
  overflow: hidden;
}
.deal-photo-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.property-card:hover .deal-photo-cell img { transform: scale(1.04); }

/* "+N more" overlay on last cell */
.deal-photo-cell.has-more::after {
  content: attr(data-more);
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  color: white; font-size: 1.2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Sold section */
.sold-section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.2rem; font-weight: 800; color: var(--text-secondary);
  margin: 48px 0 20px; padding-top: 32px;
  border-top: 2px dashed var(--border);
}
.sold-section-title i { color: #4a5568; }
.property-card.is-sold { opacity: 0.75; cursor: default; }
.property-card.is-sold:hover { transform: none; box-shadow: var(--shadow-sm); }

/* Discount toggle in admin */
.discount-box {
  background: #fff5f5; border: 1.5px solid #fed7d7;
  border-radius: var(--radius-sm); padding: 16px; margin-top: 12px;
}
.discount-box.hidden { display: none; }

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: #ccc;
  font-size: 1rem;
}

body[dir="rtl"] .favorite-btn { right: auto; left: 12px; }

.favorite-btn:hover { color: var(--danger); transform: scale(1.1); }
.favorite-btn.active { color: var(--danger); }

.property-card-body {
  padding: 20px;
}

.property-area-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.property-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.property-price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.property-price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.property-features {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.property-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.property-feature i {
  color: var(--primary-light);
  font-size: 0.9rem;
}

.property-card-footer {
  padding: 12px 20px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.whatsapp-btn:hover { background: #1da855; transform: scale(1.05); }

/* ==========================================
   AREAS SECTION
   ========================================== */
.area-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 180px;
  cursor: pointer;
  transition: var(--transition);
}

.area-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.area-card-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform 0.5s ease;
}

.area-card:hover .area-card-bg { transform: scale(1.05); }

.area-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: white;
}

.area-card-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.area-card-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats-section {
  background: linear-gradient(160deg, #0f1923 0%, #1c2b3a 60%, #0a141e 100%);
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(200,150,47,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Brand watermark centered on stats ── */
.stats-section::after {
  display: none;
}

.stat-item {
  text-align: center;
  color: white;
  position: relative;
}

.stat-num {
  font-size: 3.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  margin-top: 10px;
  letter-spacing: 0.3px;
}

/* ==========================================
   PAGE HEADER (inner pages)
   ========================================== */
.page-header {
  background: linear-gradient(160deg, #0f1923 0%, #1c2b3a 60%, #0a141e 100%);
  padding: 120px 0 64px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% -10%, rgba(200,150,47,0.14) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Brand watermark on page headers ── */
.page-header::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  background: url('../assets/alfares-logo.webp') no-repeat center/contain;
  mix-blend-mode: screen;
  filter: saturate(0.08) brightness(1.2);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: wm-footer-pearl 7s ease-in-out infinite;
}
body[dir="ltr"] .page-header::after { right: auto; left: -30px; }

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #c8962f 0%, #f0c040 50%, #c8962f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { color: rgba(255,255,255,0.8); font-size: 1rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb-sep { color: rgba(255,255,255,0.4); }
.breadcrumb span { color: var(--accent-light); }

/* ==========================================
   FILTERS BAR
   ========================================== */
.filters-bar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

/* ==========================================
   PROPERTY DETAIL PAGE
   ========================================== */
.gallery-main {
  width: 100%;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--light-gray);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.gallery-thumb {
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}

.gallery-thumb.active { border-color: var(--primary); }

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.property-detail-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
}

.property-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}

.spec-item {
  text-align: center;
}

.spec-icon {
  font-size: 1.4rem;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.spec-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.property-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d1f2eb; color: #0a7c50; }
.status-rejected { background: #fdeaea; color: #c0392b; }

/* ==========================================
   CONTACT CARD (sidebar)
   ========================================== */
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.contact-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--light-gray);
  color: var(--primary);
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 12px;
  color: var(--text);
}

.contact-option:hover { border-color: var(--primary); background: var(--light); }

.contact-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-option-text strong { display: block; font-size: 0.9rem; }
.contact-option-text span { font-size: 0.8rem; color: var(--text-secondary); }

/* ==========================================
   LOGIN PAGE
   ========================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #0f1923 0%, #1c2b3a 60%, #0a141e 100%);
  padding: 40px 20px;
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(200,150,47,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 2px solid rgba(200,150,47,0.3);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================
   DASHBOARD PAGE
   ========================================== */
.dashboard-layout {
  min-height: 100vh;
  padding-top: 80px;
  background: var(--light);
}

.dashboard-header {
  background: var(--primary);
  padding: 30px 0;
  color: white;
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  background: var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.dashboard-tab {
  flex: 1;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  text-align: center;
}

.dashboard-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Image Upload */
.upload-zone {
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--light);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(14, 45, 90, 0.05);
}

.upload-zone-icon { font-size: 2.5rem; color: var(--primary-light); margin-bottom: 12px; }
.upload-zone-text { font-size: 0.95rem; color: var(--text-secondary); }
.upload-zone-text strong { color: var(--primary); }

.uploaded-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.uploaded-img-item {
  position: relative;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.uploaded-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-img-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
}

/* ==========================================
   ADMIN PANEL
   ========================================== */
.admin-layout {
  min-height: 100vh;
  display: flex;
  padding-top: 80px;
}

.admin-sidebar {
  width: 260px;
  background: var(--primary);
  padding: 24px 16px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow: hidden;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: start;
  font-family: inherit;
}

.admin-nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.admin-nav-item.active { background: var(--accent-gradient); color: #1a1000; font-weight: 700; }

.admin-nav-section {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 16px 8px;
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--light-gray);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-card[onclick] { cursor: pointer; }
.stat-card[onclick]:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(44,74,124,0.15); border: 1.5px solid rgba(44,74,124,0.15); }

.stat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-blue { background: rgba(41, 128, 185, 0.15); color: var(--info); }
.icon-green { background: rgba(39, 174, 96, 0.15); color: var(--success); }
.icon-orange { background: rgba(243, 156, 18, 0.15); color: var(--warning); }
.icon-red { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.icon-gold { background: rgba(196, 164, 77, 0.15); color: var(--accent); }

.stat-card-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-card-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--light-gray);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  text-align: start;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: var(--light); }

.admin-table tr:last-child td { border-bottom: none; }

/* Property mini card in table */
.table-property {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-property-img {
  width: 56px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--light-gray);
}

.table-property-img img { width: 100%; height: 100%; object-fit: cover; }

.table-property-title { font-weight: 600; color: var(--text); font-size: 0.9rem; }
.table-property-area { font-size: 0.78rem; color: var(--text-secondary); }

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--light-gray);
}

.modal-title { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--light-gray);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover { background: var(--danger); color: white; }

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[dir="rtl"] .toast-container { right: auto; left: 24px; }

.toast {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--primary);
}

body[dir="rtl"] .toast { border-left: none; border-right: 4px solid var(--primary); }

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

.toast-icon { font-size: 1.2rem; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-msg { font-size: 0.9rem; font-weight: 500; }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

body[dir="rtl"] @keyframes slideIn {
  from { transform: translateX(-100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: linear-gradient(180deg, #0d1820 0%, #060d17 100%);
  color: rgba(255,255,255,0.8);
  padding: 64px 0 20px;
  border-top: 1px solid rgba(200,150,47,0.18);
  position: relative;
  overflow: hidden;
}

/* ── Brand watermark in footer — pearl white, left side ── */
.footer::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -60px;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  background: url('../assets/alfares-logo.webp') no-repeat center/contain;
  mix-blend-mode: screen;
  filter: saturate(0.08) brightness(1.2);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: wm-footer-pearl 7s ease-in-out infinite;
}

@keyframes wm-footer-pearl {
  0%,100% {
    transform: translateY(-50%) scale(1);
    opacity: 0.18;
    filter: saturate(0.08) brightness(1.2);
  }
  50% {
    transform: translateY(-50%) scale(1.05);
    opacity: 0.28;
    filter: saturate(0.12) brightness(1.5) drop-shadow(0 0 30px rgba(230,230,255,0.35));
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-brand .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
  font-size: 0.9rem;
}

.social-btn:hover { background: var(--accent-gradient); transform: translateY(-3px); box-shadow: 0 4px 12px rgba(200,150,47,0.3); }

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-link {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.footer-link:hover { color: var(--accent-light); }
.footer-link i { font-size: 0.75rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ==========================================
   WHATSAPP FLOAT
   ========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: var(--transition);
  z-index: 999;
  animation: pulse 2s infinite;
}

body[dir="rtl"] .whatsapp-float { left: auto; right: 28px; }

.whatsapp-float:hover {
  transform: scale(1.1);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8); }
  100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5); }
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px;
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state-text { font-size: 0.9rem; color: var(--text-secondary); }

/* ==========================================
   LIGHTBOX
   ========================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-overlay.open { opacity: 1; visibility: visible; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover { background: var(--danger); }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 2.8rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { width: 220px; }
  .hero-search-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero h1 { font-size: 2rem; }
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .contact-layout { grid-template-columns: 1fr !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-search-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .property-specs { grid-template-columns: repeat(3, 1fr); }
  /* ── Admin panel mobile overrides ── */
  body.admin-page #navbarContainer { display: none; }
  .admin-layout { display: block; padding-top: 0; }
  .admin-sidebar {
    position: fixed !important;
    top: 0; bottom: 0; right: 0; left: auto;
    width: 280px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1200;
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-top: calc(60px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .admin-sidebar.open { transform: translateX(0) !important; }
  .admin-main {
    padding: calc(60px + env(safe-area-inset-top, 0px)) 16px
             calc(32px + env(safe-area-inset-bottom, 0px)) 16px !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .admin-mobile-header { display: flex !important; }
  #adminBackdrop.open { display: block !important; }
  .page-header h1 { font-size: 1.8rem; }
  .gallery-main { height: 280px; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .gallery-thumb { height: 70px; }
  .auth-card { padding: 32px 24px; }
  .section-title { font-size: 1.6rem; }
  .stat-num { font-size: 2.2rem; }
  .filters-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================
   ADMIN MOBILE HEADER + DRAWER BACKDROP
   ========================================== */
.admin-mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(52px + env(safe-area-inset-top, 0px));
  background: var(--primary);
  z-index: 999;
  align-items: flex-end;
  padding: 0 14px calc(8px) 14px;
  padding-top: env(safe-area-inset-top, 0px);
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.admin-mobile-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.12);
  border: none; border-radius: 8px;
  color: white; font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.admin-mobile-btn:active { background: rgba(255,255,255,0.25); }

.admin-mobile-title {
  flex: 1;
  font-size: 0.9rem; font-weight: 700;
  color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

#adminBackdrop {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-stat-num { font-size: 1.5rem; }
  .property-card-img { height: 180px; }
  .filters-grid { grid-template-columns: 1fr; }
  .toast-container { left: 12px; right: 12px; }
  .toast { min-width: auto; }
  .dashboard-tab { font-size: 0.8rem; padding: 8px 10px; }
}

/* ==========================================
   MOBILE NAV OVERLAY
   ========================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body[dir="rtl"] .mobile-nav { transform: translateX(-100%); }

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[dir="rtl"] .mobile-nav-close { right: auto; left: 20px; }

.mobile-nav-link {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  width: 260px;
  text-align: center;
}

.mobile-nav-link:hover { background: rgba(255,255,255,0.1); color: white; }

/* ==========================================
   LIST VIEW — Properties Page
   ========================================== */
#propertiesGrid.list-view {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
}

/* RTL default: image on the RIGHT */
#propertiesGrid.list-view .property-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: 1fr auto;
  min-height: 190px;
}

#propertiesGrid.list-view .property-card-img {
  grid-column: 2;
  grid-row: 1 / 3;
  height: 100%;
  min-height: 190px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

#propertiesGrid.list-view .property-card-body {
  grid-column: 1;
  grid-row: 1;
  padding: 16px 20px 10px;
}

#propertiesGrid.list-view .property-card-footer {
  grid-column: 1;
  grid-row: 2;
}

/* LTR: image on the LEFT */
body[dir="ltr"] #propertiesGrid.list-view .property-card {
  grid-template-columns: 280px 1fr;
}
body[dir="ltr"] #propertiesGrid.list-view .property-card-img {
  grid-column: 1;
  border-radius: var(--radius) 0 0 var(--radius);
}
body[dir="ltr"] #propertiesGrid.list-view .property-card-body {
  grid-column: 2;
}
body[dir="ltr"] #propertiesGrid.list-view .property-card-footer {
  grid-column: 2;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
  #propertiesGrid.list-view .property-card,
  body[dir="ltr"] #propertiesGrid.list-view .property-card {
    grid-template-columns: 1fr;
    grid-template-rows: 200px auto auto;
    min-height: unset;
  }
  #propertiesGrid.list-view .property-card-img,
  body[dir="ltr"] #propertiesGrid.list-view .property-card-img {
    grid-column: 1;
    grid-row: 1;
    min-height: 200px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  #propertiesGrid.list-view .property-card-body,
  body[dir="ltr"] #propertiesGrid.list-view .property-card-body {
    grid-column: 1;
    grid-row: 2;
  }
  #propertiesGrid.list-view .property-card-footer,
  body[dir="ltr"] #propertiesGrid.list-view .property-card-footer {
    grid-column: 1;
    grid-row: 3;
  }
}

/* ==========================================
   PRINT
   ========================================== */
@media print {
  .navbar, .footer, .whatsapp-float, .contact-card { display: none; }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Scroll-reveal base */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero entrance animation */
.hero-animate {
  animation: fadeInUp 0.8s ease both;
}

/* Property card hover lift */
.property-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.property-card-img img {
  transition: transform 0.5s ease;
}
.property-card:hover .property-card-img img {
  transform: scale(1.07);
}

/* Area card animation */
.area-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.area-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

/* Stat counter animation */
.stat-item {
  transition: transform 0.3s ease;
}
.stat-item:hover {
  transform: scale(1.08);
}

/* Why card animation */
.why-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.12);
}

/* Btn pulse on hover */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.btn-primary:hover::after {
  transform: scaleX(1);
}

/* Section title underline animation */
.section-title::after {
  content: '';
  display: block;
  width: 52px;
  height: 3px;
  background: var(--accent-gradient);
  margin: 14px auto 0;
  border-radius: 2px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(200,150,47,0.4);
}
.section-title:hover::after {
  width: 110px;
}

/* Page load fade */
body {
  animation: fadeIn 0.4s ease;
}

/* ==========================================
   TRANSLATE BUTTON
   ========================================== */
.btn-translate {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s, transform 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-translate:hover {
  opacity: 0.88;
  transform: scale(1.04);
}
.btn-translate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================
   FORM FIELD ERROR STATES
   ========================================== */
.form-control.field-error {
  border-color: var(--danger) !important;
  background: #fff5f5 !important;
  animation: fieldShake 0.35s ease;
}
@keyframes fieldShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  60%      { transform: translateX(7px); }
}
.field-error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  animation: fadeInUp 0.2s ease;
}
.field-error-msg i { font-size: 0.75rem; }

/* ==========================================
   SEARCH BAR
   ========================================== */
.search-bar-wrap {
  margin-bottom: 20px;
}
.search-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar-icon {
  position: absolute;
  right: 16px;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
body[dir="ltr"] .search-bar-icon { right: auto; left: 16px; }
.search-bar-input {
  width: 100%;
  padding: 14px 48px 14px 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: white;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.search-bar-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,150,47,0.12);
}
.search-bar-input::placeholder { color: var(--text-secondary); }
.search-bar-clear {
  position: absolute;
  left: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  line-height: 1;
}
body[dir="ltr"] .search-bar-clear { left: auto; right: 14px; }
.search-bar-clear:hover { color: var(--danger); background: #fef0ee; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  border: 1.5px solid var(--border);
  z-index: 500;
  overflow: hidden;
  display: none;
  animation: fadeInUp 0.15s ease;
}
.search-dropdown.open { display: block; }
.search-suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.92rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.search-suggestion:last-child { border-bottom: none; }
.search-suggestion:hover { background: rgba(200,150,47,0.06); }
.suggestion-icon {
  color: var(--primary);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.search-suggestion mark {
  background: rgba(200,150,47,0.22);
  color: #8a6100;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}

/* ==========================================
   CARD IMAGE ACTIONS (Fav + Share)
   ========================================== */
.card-img-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}
body[dir="ltr"] .card-img-actions { left: auto; right: 10px; }

.favorite-btn,
.card-share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.favorite-btn { color: #ccc; position: static; top: auto; right: auto; left: auto; }
.card-share-btn { color: var(--text-secondary); }
.favorite-btn:hover  { color: var(--danger); transform: scale(1.12); }
.card-share-btn:hover { color: var(--primary); transform: scale(1.12); }
.favorite-btn.active { color: var(--danger); }

/* ==========================================
   CARD FOOTER ACTIONS (Compare + WhatsApp)
   ========================================== */
.card-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-btn {
  height: auto;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
}
.compare-btn::before {
  content: '';
  width: 7px; height: 7px;
  background: #c8962f;
  border-radius: 50%;
  position: absolute;
  top: -3px; left: -3px;
  animation: cmp-pulse 1.4s infinite;
}
.compare-btn.active::before { display: none; }
@keyframes cmp-pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.6); opacity: 0.45; }
}
.compare-btn-label {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.compare-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(200,150,47,0.06); }
.compare-btn.active {
  background: linear-gradient(135deg,#c8962f,#f0c040);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(200,150,47,0.35);
}

/* ==========================================
   PHOTO COLLAGE (property detail)
   ========================================== */
.photo-collage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 300px 140px;
  gap: 6px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.collage-main {
  grid-column: 1 / 3;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--light-gray);
}
.collage-side {
  grid-column: 3;
  grid-row: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--light-gray);
}
.collage-strip-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--light-gray);
}
.collage-main img, .collage-side img, .collage-strip-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.collage-main:hover img, .collage-side:hover img, .collage-strip-item:hover img {
  transform: scale(1.05);
}
.collage-view-all {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--primary);
  border: none; border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.2s;
  z-index: 2;
}
.collage-view-all:hover { background: var(--primary); color: white; }
.collage-more::after {
  content: attr(data-more);
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10, 20, 35, 0.62);
  color: white;
  font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cairo', sans-serif;
}
@media (max-width: 768px) {
  .photo-collage { grid-template-rows: 210px 100px; }
}
@media (max-width: 480px) {
  .photo-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 90px;
    gap: 4px;
  }
  .collage-main { grid-column: 1 / 3; }
  .collage-side { display: none; }
  .collage-strip-item:last-child { grid-column: span 1; }
}

/* ==========================================
   SHARE POPUP
   ========================================== */
.share-popup {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  padding: 8px;
  z-index: 9000;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  min-width: 200px;
  flex-direction: column;
}
.share-popup.open { opacity: 1; transform: translateX(-50%) translateY(0); }
.share-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  font-weight: 600;
  width: 100%;
  text-align: right;
}
.share-popup-item:hover { background: var(--light); }

/* ==========================================
   COMPARE FLOATING BAR
   ========================================== */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: white;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.compare-bar-items {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow-x: auto;
}
.compare-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--light);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 200px;
  border: 1.5px solid var(--border);
}
.compare-bar-item img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.compare-bar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.compare-bar-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: color 0.2s;
}
.compare-bar-remove:hover { color: var(--danger); }
.compare-bar-add {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0 8px;
  cursor: default;
}
.compare-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.compare-bar-count {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}
.compare-bar-clear { color: var(--text-secondary) !important; border-color: var(--border) !important; }

/* ==========================================
   COMPARE MODAL
   ========================================== */
.compare-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,0.7);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}
.compare-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}
.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg,#0f1923,#1c2b3a);
  color: white;
}
.compare-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
}
.compare-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.compare-modal-close:hover { background: rgba(255,255,255,0.2); }
.compare-modal-body { overflow-x: auto; padding: 0; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare-table th {
  background: var(--light);
  padding: 16px 14px;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--border);
  color: var(--text-primary);
  min-width: 160px;
}
.compare-table th a {
  color: var(--primary);
  text-decoration: none;
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
}
.compare-table td {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-label {
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--light);
  text-align: right !important;
  white-space: nowrap;
  padding-right: 20px !important;
  min-width: 100px;
}
body[dir="ltr"] .compare-label { text-align: left !important; padding-right: 14px !important; padding-left: 20px !important; }
.compare-table tr:hover td { background: rgba(200,150,47,0.03); }
.compare-winner {
  background: rgba(34,197,94,0.06) !important;
  position: relative;
}
.winner-badge {
  display: block;
  font-size: 0.72rem;
  color: #16a34a;
  font-weight: 700;
  margin-bottom: 4px;
}
@media (max-width: 600px) {
  .compare-bar { flex-direction: column; gap: 8px; padding: 10px 16px; }
  .compare-bar-items { width: 100%; }
  .compare-modal { border-radius: 16px 16px 0 0; margin-top: auto; }
  .compare-overlay { align-items: flex-end; padding: 0; }
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-bottom: 16px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.pag-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pag-btn:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(200,150,47,0.06);
}
.pag-btn.active {
  background: linear-gradient(135deg, #c8962f, #f0c040);
  border-color: transparent;
  color: white;
  box-shadow: 0 3px 10px rgba(200,150,47,0.35);
}
.pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pag-dots {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 2px;
}
.pag-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.pag-info strong { color: var(--primary); }

/* ==========================================
   AGENT PHOTO IN PROPERTY CARD
   ========================================== */
.agent-photo-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.agent-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================
   PROFILE PHOTO UPLOAD (DASHBOARD)
   ========================================== */
.profile-photo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--light-gray) 0%, #f0f4ff 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(44,74,124,0.1);
  margin-bottom: 24px;
}
.profile-photo-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  overflow: hidden;
}
.profile-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Role option selection */
.role-option:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.role-option-selected {
  transform: scale(1.02);
}

/* Nav avatar with photo */
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ==========================================
   INCLUSIONS (ماذا يشمل السعر)
   ========================================== */
.inclusions-section {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.inclusions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  margin-bottom: 12px;
}
.inclusions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.inclusion-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s;
  user-select: none;
}
.inclusion-chip input[type="checkbox"] { display: none; }
.inclusion-chip:hover { border-color: var(--primary); color: var(--primary); }
.inclusion-chip.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.inclusion-icon { font-size: 1rem; }
.inclusion-pts {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.75;
  background: rgba(0,0,0,0.08);
  padding: 1px 5px;
  border-radius: 8px;
  margin-right: 2px;
}
.inclusion-chip.checked .inclusion-pts { background: rgba(255,255,255,0.22); }

.custom-inclusion-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.custom-inclusion-row .form-control { font-size: 0.85rem; }
.custom-inclusion-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #2e7d32;
  margin-top: 6px;
  margin-left: 4px;
}
.custom-inclusion-item button {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
}
.custom-inclusion-item button:hover { color: var(--danger); }

/* ==========================================
   COMPARE TABLE — Inclusions & Score
   ========================================== */
.compare-section-header td {
  background: #f0f4ff;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  padding: 10px 14px !important;
  letter-spacing: 0.02em;
}
.compare-inc-yes {
  color: #2e7d32;
  font-weight: 700;
  font-size: 0.88rem;
}
.compare-inc-no {
  color: #aaa;
  font-size: 0.88rem;
}
.inc-pts {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 8px;
  margin-right: 4px;
  vertical-align: middle;
}
.compare-score-row td {
  background: #fffbf0;
  border-top: 2px solid #c8962f !important;
  padding: 12px 14px !important;
}
.score-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  background: #f1f5f9;
  color: var(--text);
}
.score-badge.score-best {
  background: linear-gradient(135deg, #c8962f, #e8b84b);
  color: #fff;
}

/* ==========================================
   COST BREAKDOWN (property.html)
   ========================================== */
.cost-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.cost-row:last-of-type { border-bottom: none; }
.cost-row-main {
  background: #f8f9ff;
  margin: 0 -20px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border) !important;
}
.cost-row-main .cost-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}
.cost-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}
.cost-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}
.cost-included { background: #e8f5e9; color: #2e7d32; }
.cost-extra    { background: #fff3e0; color: #e65100; }
.cost-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}
.cost-note {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 2px;
}
.cost-disclaimer {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.5;
}