/* =====================================================================
   Sakanat - Main stylesheet (RTL/LTR aware via logical properties)
   ===================================================================== */
:root {
  --primary: #0f766e;
  --primary-600: #0d5f59;
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --accent: #f59e0b;
  --accent-600: #d97706;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #2563eb;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fa;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-head: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
  --container: 1240px;
  --hero-a: #064e48; --hero-b: #0f766e; --hero-c: #14b8a6; --hero-glow: rgba(20,184,166,.45);
  --grad: linear-gradient(135deg, var(--primary), #14b8a6);
}
html[dir="ltr"] { --font: 'Inter', 'Segoe UI', Tahoma, sans-serif; --font-head: 'Inter', 'Segoe UI', sans-serif; }
/* Theme: elegant navy & gold */
html[data-theme="navy"] { --primary: #1e3a8a; --primary-600: #172f70; --primary-50: #eef2ff; --primary-100: #dbe4ff; --accent: #d4a017; --accent-600: #b8860b; --hero-a: #0b1a3f; --hero-b: #1e3a8a; --hero-c: #3b5bdb; --hero-glow: rgba(212,160,23,.35); --grad: linear-gradient(135deg, #1e3a8a, #3b5bdb); --bg: #f5f6fa; }
/* Theme: warm sand & terracotta */
html[data-theme="sand"] { --primary: #b45309; --primary-600: #92400e; --primary-50: #fff7ed; --primary-100: #ffedd5; --accent: #0f766e; --accent-600: #0d5f59; --hero-a: #4a2c0f; --hero-b: #92400e; --hero-c: #d97706; --hero-glow: rgba(217,119,6,.4); --grad: linear-gradient(135deg, #b45309, #f59e0b); --bg: #faf7f2; --line: #ece4d8; }
html[data-theme="sand"] .btn-accent { color: #fff; }
/* Theme: emerald night (dark header) */
html[data-theme="emerald"] { --primary: #047857; --primary-600: #065f46; --primary-50: #ecfdf5; --primary-100: #d1fae5; --accent: #f59e0b; --hero-a: #022c22; --hero-b: #064e3b; --hero-c: #10b981; --hero-glow: rgba(16,185,129,.45); --grad: linear-gradient(135deg, #047857, #10b981); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 15px; }
html, body { max-width: 100%; overflow-x: hidden; }
html[dir="rtl"] { font-size: 16px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-center { text-align: center; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 26px; height: 26px; }
.hidden { display: none !important; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.grow { flex: 1; }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid transparent; font-family: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; transition: .15s;
  background: var(--primary); color: #fff; white-space: nowrap; line-height: 1.3;
}
.btn:hover { background: var(--primary-600); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #1f1300; } .btn-accent:hover { background: var(--accent-600); color: #1f1300; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); } .btn-outline:hover { background: var(--primary-50); color: var(--primary); }
.btn-light { background: #fff; color: var(--ink-2); border-color: var(--line); } .btn-light:hover { background: var(--bg); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); } .btn-ghost:hover { background: rgba(15,23,42,.06); color: var(--ink); }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #b91c1c; }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: #fecaca; } .btn-danger-outline:hover { background: #fef2f2; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 38px; height: 38px; border-radius: 10px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* Badges / chips ----------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.4; background: var(--line); color: var(--ink-2); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-primary { background: var(--primary-100); color: var(--primary-600); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-accent { background: var(--accent); color: #1f1300; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .88rem; color: var(--ink-2); }
.chip.active, .chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* Cards -------------------------------------------------------------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { margin: 0; }
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

/* Header ------------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.brand-mark .icon { width: 22px; height: 22px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .92rem; }
.nav a:hover, .nav a.active { background: var(--primary-50); color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font-family: inherit; font-weight: 600; color: var(--ink); }
html[dir="ltr"] .user-menu > button { padding: 4px 4px 4px 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-100); color: var(--primary-600); display: grid; place-items: center; font-weight: 800; font-size: .9rem; overflow: hidden; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.dropdown { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; display: none; z-index: 60; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); color: var(--ink); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.notif-dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.count-bubble { background: var(--accent); color: #1f1300; border-radius: 999px; font-size: .7rem; padding: 1px 6px; font-weight: 800; }

/* Flash messages ----------------------------------------------------- */
.flash-wrap { position: fixed; top: 80px; inset-inline-end: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash { padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); background: #fff; border-inline-start: 4px solid var(--info); font-weight: 600; animation: slidein .3s; display: flex; justify-content: space-between; gap: 12px; }
.flash-success { border-color: var(--success); } .flash-error { border-color: var(--danger); } .flash-warning { border-color: var(--warning); }
.flash button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1.1rem; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-weight: 600; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* Forms -------------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
label, .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.input, select, textarea, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="date"], input[type="url"], input[type="search"] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; font-size: .95rem; color: var(--ink); transition: .15s; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 34px; padding-inline-start: 14px; }
html[dir="ltr"] select { background-position: right 12px center; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.field-error { color: var(--danger); font-size: .8rem; margin-top: 4px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin-bottom: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 44px; height: 24px; border-radius: 999px; background: #cbd5e1; position: relative; transition: .2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
html[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-20px); }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .addon { display: flex; align-items: center; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-inline-start: 0; border-start-end-radius: 10px; border-end-end-radius: 10px; color: var(--muted); font-weight: 700; }
.segmented { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented label, .segmented a { padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted); margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.segmented input { display: none; }
.segmented input:checked + span, .segmented a.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.segmented input:checked + span { display: inline-flex; padding: 0; }
.segmented label:has(input:checked) { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

/* Hero --------------------------------------------------------------- */
.hero { position: relative; background: radial-gradient(1200px 500px at 80% -10%, var(--hero-glow), transparent), linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 120%); color: #fff; padding: 64px 0 96px; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M0 30h60M30 0v60' stroke='rgba(255,255,255,.05)' stroke-width='1'/%3E%3C/svg%3E"); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero-visual { display: none; }
.hero-visual { position: relative; height: 420px; }
.hero-visual .hv-card { position: absolute; width: 62%; aspect-ratio: 4/3; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.35); border: 4px solid rgba(255,255,255,.75); transform: rotate(var(--r)); transition: transform .5s; animation: floaty 7s ease-in-out infinite; }
.hero-visual .hv-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .hv-card:nth-child(1) { top: 0; inset-inline-end: 0; --r: 4deg; z-index: 1; }
.hero-visual .hv-card:nth-child(2) { top: 26%; inset-inline-start: 0; --r: -5deg; z-index: 2; animation-delay: -2s; }
.hero-visual .hv-card:nth-child(3) { bottom: 0; inset-inline-end: 8%; --r: 2deg; z-index: 3; animation-delay: -4s; }
.hero-visual .hv-card .hv-tag { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(255,255,255,.95); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-size: .78rem; font-weight: 800; box-shadow: var(--shadow); max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-visual .hv-tag b { color: var(--primary); }
.hero-visual .hv-pill { position: absolute; background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: .82rem; box-shadow: var(--shadow-lg); z-index: 4; display: flex; align-items: center; gap: 6px; animation: floaty 6s ease-in-out infinite; }
.hero-visual .hv-pill.p1 { top: 8%; inset-inline-start: -6%; }
.hero-visual .hv-pill.p2 { bottom: 14%; inset-inline-end: -4%; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hero-content { animation: rise .6s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 12px; color: #fff; }
.hero h1 .hl { background: linear-gradient(90deg, var(--accent), #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.1rem; opacity: .9; max-width: 640px; margin-bottom: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-badges span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.search-box { background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 2fr 1.4fr 1fr 1.2fr auto; gap: 10px; align-items: end; color: var(--ink); }
.search-box .form-group { margin: 0; }
.search-box label { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.hero-stats { display: flex; gap: 32px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; }
.hero-stats span { opacity: .85; font-size: .9rem; }

/* Listing cards ------------------------------------------------------ */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.listing-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: .2s; position: relative; }
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.listing-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--line); }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.listing-card:hover .thumb img { transform: scale(1.04); }
.thumb-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.thumb-actions { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); border: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: .15s; }
.icon-btn:hover { background: #fff; color: var(--primary); transform: scale(1.06); }
.icon-btn.active { color: var(--danger); }
.icon-btn.active .icon { fill: currentColor; }
.icon-btn.compare-btn.active { color: var(--primary); }
.photos-count { position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 1; background: rgba(15,23,42,.6); backdrop-filter: blur(4px); color: #fff; padding: 3px 8px; border-radius: 6px; font-size: .75rem; display: flex; align-items: center; gap: 4px; }
.listing-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.listing-card .price { font-size: 1.2rem; font-weight: 800; color: var(--primary); display: flex; align-items: baseline; gap: 4px; }
.listing-card .price small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.listing-card .title { font-weight: 700; font-size: 1rem; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-card .loc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .85rem; }
.specs { display: flex; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: .85rem; }
.specs span { display: inline-flex; align-items: center; gap: 4px; }
.specs .icon { width: 15px; height: 15px; color: var(--muted); }
.distance-line { display: flex; align-items: center; gap: 6px; background: var(--primary-50); color: var(--primary-600); padding: 6px 10px; border-radius: 8px; font-size: .82rem; font-weight: 700; margin-top: auto; }
.distance-line .icon { width: 15px; height: 15px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.adv-mini { display: flex; align-items: center; gap: 6px; }
.adv-mini .avatar { width: 24px; height: 24px; font-size: .7rem; }
.listing-card.list-view { flex-direction: row; }
.listing-card.list-view .thumb { width: 300px; aspect-ratio: auto; min-height: 210px; flex-shrink: 0; }
.listing-card.list-view .body { padding: 18px 20px; }

/* Type / area tiles -------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tile { background: #fff; border-radius: 12px; padding: 18px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; transition: .2s; color: var(--ink); border: 1px solid transparent; position: relative; overflow: hidden; }
.tile:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--ink); }
.tile > * { position: relative; z-index: 1; }
.tile .emoji { font-size: 1.6rem; }
.tile strong { font-size: .95rem; }
.tile span { color: var(--muted); font-size: .8rem; }

/* How it works ------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: relative; }
.step .num { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; }
.cta { background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; border-radius: 20px; padding: 44px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta > * { position: relative; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; opacity: .85; }
.cta-soft { background: linear-gradient(135deg, var(--primary-50), #fff); border: 1px solid var(--primary-100); color: var(--ink); }
.cta-soft h2 { color: var(--ink); }
.cta-soft p { color: var(--muted); }

/* Ads ---------------------------------------------------------------- */
.ad-slot { position: relative; margin: 20px 0; display: flex; justify-content: center; }
.ad-slot .ad-inner { position: relative; max-width: 100%; }
.ad-slot .ad-label { position: absolute; top: 6px; inset-inline-start: 8px; font-size: .65rem; background: rgba(255,255,255,.85); color: var(--muted); padding: 1px 6px; border-radius: 4px; z-index: 2; letter-spacing: .02em; }
.ad-slot a, .ad-slot .ad-html { display: block; }
/* Banners are never cropped: shown whole at their natural size (e.g. 1200x150), scaled down only when the space is narrower. */
.ad-slot img { display: block; max-width: 100%; width: auto; height: auto; border-radius: 12px; }
.ad-slot.ad-card { margin: 0; height: 100%; align-items: center; background: var(--surface-2, #f1f5f9); border-radius: var(--radius); overflow: hidden; }
.ad-slot.ad-card .ad-inner { width: 100%; }
.ad-slot.ad-card img { width: 100%; height: auto; border-radius: var(--radius); }
.ad-slot.ad-sidebar .ad-inner { width: 100%; }
.ad-slot.ad-sidebar img { width: 100%; height: auto; border-radius: 12px; }

/* Search page -------------------------------------------------------- */
.search-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.filters .card-body { padding: 16px 18px; }
.filter-block { border-bottom: 1px solid var(--line); padding: 14px 0; }
.filter-block:last-child { border-bottom: 0; }
.filter-block h4 { margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: .92rem; }
.filter-block h4 .icon { transition: .2s; color: var(--muted); }
.filter-block.collapsed h4 .icon { transform: rotate(-90deg); }
.filter-block.collapsed .filter-content { display: none; }
.check-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.check-list .check { font-size: .9rem; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.results-bar h1 { font-size: 1.25rem; margin: 0; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.active-filters .chip { font-size: .8rem; padding: 4px 10px; }
.mobile-filter-btn { display: none; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .icon { width: 56px; height: 56px; color: var(--line); margin: 0 auto 12px; }
.empty h3 { color: var(--ink); }

/* Pagination --------------------------------------------------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.page-link { padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; }
.page-link.active, .page-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-dots { padding: 8px 4px; color: var(--muted); }

/* Listing page ------------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin: 18px 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); } .breadcrumb a:hover { color: var(--primary); }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 8px; border-radius: 16px; overflow: hidden; }
.gallery a { position: relative; display: block; overflow: hidden; background: var(--line); }
.gallery a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .more { position: absolute; inset: 0; background: rgba(15,23,42,.55); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.gallery.single { grid-template-columns: 1fr; grid-template-rows: 440px; }
.gallery.two { grid-template-columns: 1fr 1fr; grid-template-rows: 400px; }
.gallery.no-photos { grid-template-rows: 320px; }
.gallery.no-photos a { background: #e6f4f2; }
.gallery.no-photos img { object-fit: contain; }
.gallery.no-photos a:hover img { transform: none; }
.gallery.two a:first-child, .gallery.single a:first-child { grid-row: auto; }
.listing-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; margin-top: 24px; align-items: start; }
.listing-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.listing-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.big-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.big-price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.spec { background: var(--bg); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.spec .icon { width: 22px; height: 22px; color: var(--primary); }
.spec div { display: flex; flex-direction: column; line-height: 1.3; }
.spec small { color: var(--muted); font-size: .75rem; }
.spec strong { font-size: .95rem; }
.block { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.block h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.block h2 .icon { color: var(--primary); }
.desc { white-space: pre-line; color: var(--ink-2); line-height: 1.8; }
.amenity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.amenity { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: .9rem; }
.amenity .emoji { font-size: 1.05rem; }
.amenity .st { margin-inline-start: auto; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.incl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.incl h4 { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.incl ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.incl li { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.incl-yes .icon { color: var(--success); } .incl-no .icon { color: var(--danger); }
.rules-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rule { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: .9rem; }
.rule .emoji { font-size: 1.1rem; }
.rule .val { margin-inline-start: auto; font-weight: 700; font-size: .8rem; }
.rule.ok .val { color: var(--success); } .rule.no .val { color: var(--danger); }
.dist-list { display: flex; flex-direction: column; gap: 8px; }
.dist { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--primary-50); }
.dist .icon { color: var(--primary); width: 22px; height: 22px; }
.dist strong { margin-inline-start: auto; color: var(--primary-600); white-space: nowrap; font-size: 1.05rem; }
.dist.other { background: var(--bg); } .dist.other .icon { color: var(--muted); } .dist.other strong { color: var(--ink-2); }
#listing-map, #map-picker { height: 320px; border-radius: 12px; z-index: 1; }
.sidebar-sticky { position: sticky; top: 84px; }
.adv-card { text-align: center; }
.adv-card .avatar-lg { margin: 0 auto 10px; }
.adv-role { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-50); color: var(--primary-600); padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; margin-top: 6px; }
.contact-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.contact-btns .btn { justify-content: center; }
.btn-whatsapp { background: #25d366; color: #fff; } .btn-whatsapp:hover { background: #1ebe5b; color: #fff; }
.trust-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.trust-line .icon { color: var(--success); width: 15px; height: 15px; }
.availability-banner { padding: 10px 14px; border-radius: 10px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.sub-units { display: flex; flex-direction: column; gap: 8px; }
.sub-unit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sub-unit img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.sub-unit .grow { display: flex; flex-direction: column; }
.sub-unit strong { font-size: .92rem; }

/* Share --------------------------------------------------------------- */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-size: .82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--c, var(--ink-2)); font-family: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; transition: .15s; }
.share-btn:hover { background: var(--c, var(--primary)); color: #fff; border-color: var(--c, var(--primary)); }
.share-btn.share-copy, .share-btn.share-native { --c: var(--primary); }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.share-grid .share-label { grid-column: span 2; }
.share-grid .share-btn { justify-content: center; padding: 12px; font-size: .95rem; }
.share-pop { position: fixed; z-index: 120; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.share-pop a, .share-pop button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: start; }
.share-pop a:hover, .share-pop button:hover { background: var(--bg); color: var(--ink); }

/* Modal -------------------------------------------------------------- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.6); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: slidein .2s; }
.modal-box .card-header { position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-box .card-body { padding: 20px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; z-index: 300; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox .lb-main { flex: 1; display: grid; place-items: center; position: relative; padding: 20px; }
.lightbox img { max-height: 80vh; max-width: 95vw; object-fit: contain; border-radius: 8px; }
.lightbox .lb-cap { color: #fff; text-align: center; padding: 10px; font-weight: 600; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; border: 0; cursor: pointer; font-size: 1.5rem; display: grid; place-items: center; }
.lightbox .lb-prev { inset-inline-start: 16px; } .lightbox .lb-next { inset-inline-end: 16px; }
.lightbox .lb-close { position: absolute; top: 16px; inset-inline-end: 16px; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; }
.lightbox .lb-thumbs { display: flex; gap: 6px; padding: 10px; overflow: auto; justify-content: center; }
.lightbox .lb-thumbs img { width: 70px; height: 50px; object-fit: cover; opacity: .5; cursor: pointer; border-radius: 4px; }
.lightbox .lb-thumbs img.active { opacity: 1; outline: 2px solid var(--accent); }

/* Map page ----------------------------------------------------------- */
.map-page { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 68px); }
.map-side { background: #fff; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.map-side .map-filters { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.map-side .map-filters .full { grid-column: span 2; }
.map-results { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.map-result { display: flex; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; transition: .15s; background: #fff; }
.map-result:hover, .map-result.active { border-color: var(--primary); background: var(--primary-50); }
.map-result img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.map-result .t { font-weight: 700; font-size: .88rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.map-result .p { color: var(--primary); font-weight: 800; font-size: .9rem; }
.map-result .d { color: var(--muted); font-size: .75rem; }
#main-map { height: 100%; width: 100%; z-index: 1; }
.map-legend { position: absolute; bottom: 20px; inset-inline-start: 20px; background: #fff; border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow-lg); font-size: .8rem; display: flex; gap: 12px; z-index: 5; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.map-wrap { position: relative; }
.marker-price { background: #fff; border: 2px solid var(--primary); color: var(--primary); border-radius: 999px; padding: 3px 9px; font-weight: 800; font-size: .78rem; white-space: nowrap; box-shadow: var(--shadow); font-family: var(--font); }
.marker-price.reserved { border-color: var(--accent); color: var(--accent-600); }
.marker-price.featured { background: var(--primary); color: #fff; }
.marker-ref { background: #1e293b; color: #fff; border-radius: 8px; padding: 3px 8px; font-size: .72rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); font-family: var(--font); display: flex; align-items: center; gap: 4px; }
.leaflet-popup-content { margin: 0; font-family: var(--font); }
.leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; overflow: hidden; }
.popup-card { width: 240px; }
.popup-card img { width: 100%; height: 130px; object-fit: cover; }
.popup-card .pc-body { padding: 10px 12px; }
.popup-card .pc-title { font-weight: 700; font-size: .88rem; line-height: 1.3; margin-bottom: 4px; }
.popup-card .pc-price { color: var(--primary); font-weight: 800; }
.popup-card .pc-meta { color: var(--muted); font-size: .75rem; margin: 4px 0 8px; }

/* Home map ------------------------------------------------------------- */
.home-map-wrap { position: relative; overflow: hidden; }
#home-map { height: 460px; z-index: 1; }
@media (max-width: 600px) { #home-map { height: 340px; } }

/* Compare ------------------------------------------------------------ */
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; font-size: .9rem; }
.compare-table th:first-child { background: var(--bg); width: 180px; font-weight: 700; color: var(--ink-2); }
.compare-table thead th { background: #fff; vertical-align: bottom; }
.compare-table thead img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.compare-table .yes { color: var(--success); font-weight: 800; } .compare-table .no { color: var(--danger); font-weight: 800; }
.compare-table tr.section-row td { background: var(--primary-50); font-weight: 800; color: var(--primary-600); }
.table-wrap { overflow-x: auto; }

/* Data tables (dashboards) ------------------------------------------- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; font-size: .9rem; vertical-align: middle; }
.table th { background: var(--bg); font-weight: 700; color: var(--ink-2); font-size: .82rem; white-space: nowrap; }
.table tr:hover td { background: #fafcfc; }
.table .thumb-sm { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .actions form { display: inline; }

/* Dashboard layout --------------------------------------------------- */
.dash { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 68px); }
.dash-side { background: #fff; border-inline-end: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; }
.dash-side .who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.dash-side .who strong { display: block; font-size: .95rem; line-height: 1.2; }
.dash-side .who span { font-size: .78rem; color: var(--muted); }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.dash-nav a:hover, .dash-nav a.active { background: var(--primary-50); color: var(--primary); }
.dash-nav .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 12px 6px; font-weight: 700; }
.dash-main { padding: 28px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.stat .ic .icon { width: 22px; height: 22px; }
.stat strong { font-size: 1.4rem; font-weight: 800; display: block; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.accent .ic { background: #fef3c7; color: var(--accent-600); }
.stat.info .ic { background: #dbeafe; color: var(--info); }
.stat.danger .ic { background: #fee2e2; color: var(--danger); }
.stat.success .ic { background: #dcfce7; color: var(--success); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active, .tabs a:hover { color: var(--primary); border-color: var(--primary); }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.bar-chart div { flex: 1; background: var(--primary-100); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; transition: .2s; }
.bar-chart div:hover { background: var(--primary); }
.bar-chart div span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .65rem; background: var(--ink); color: #fff; padding: 2px 5px; border-radius: 4px; white-space: nowrap; display: none; margin-bottom: 4px; }
.bar-chart div:hover span { display: block; }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* Wizard / listing form ---------------------------------------------- */
.form-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.form-section > h2 { padding: 16px 22px; margin: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.form-section > h2 .num { width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.form-section .card-body { padding: 22px; }
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.amenity-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.amenity-row .nm { flex: 1; font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.amenity-row select { width: 150px; padding: 6px 10px; font-size: .82rem; }
.amenity-row input { width: 80px; padding: 6px 8px; font-size: .82rem; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.rule-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.rule-row .nm { flex: 1; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 6px; min-width: 140px; }
.rule-row input[type="text"] { flex-basis: 100%; }
.sticky-actions { align-items: center; flex-wrap: wrap; }
.sticky-actions .muted { margin-inline-end: auto; }
.publish-step { margin-top: 24px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 2px solid var(--primary); }
.publish-step.is-done { border-color: var(--line); }
.publish-step-text { display: flex; flex-direction: column; gap: 4px; }
.publish-step-text strong { font-size: 1.05rem; display: flex; align-items: center; gap: 6px; }
.publish-step .btn[disabled] { opacity: .5; cursor: not-allowed; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 14px 22px; display: flex; gap: 10px; justify-content: flex-end; border-radius: 0 0 var(--radius) var(--radius); z-index: 5; }
.kind-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kind-options label { border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; text-align: center; font-weight: 700; margin: 0; }
.kind-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.kind-options input { display: none; }
.kind-options .emoji { font-size: 1.4rem; display: block; margin-bottom: 4px; }

/* Image manager ------------------------------------------------------ */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 36px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; background: #fff; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.dropzone .icon { width: 40px; height: 40px; margin: 0 auto 10px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.img-item { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; cursor: grab; position: relative; }
.img-item.dragging { opacity: .4; }
.img-item img { width: 100%; height: 140px; object-fit: cover; }
.img-item .im-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.img-item input, .img-item select { padding: 6px 8px; font-size: .8rem; }
.img-item .im-actions { display: flex; gap: 4px; justify-content: space-between; }
.img-item .primary-tag { position: absolute; top: 8px; inset-inline-start: 8px; }
.upload-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 12px; display: none; }
.upload-progress i { display: block; height: 100%; background: var(--primary); width: 0; transition: .2s; }

/* Auth --------------------------------------------------------------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--hero-a), var(--hero-b) 60%, var(--hero-c)); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-side li { display: flex; align-items: center; gap: 10px; font-weight: 600; opacity: .95; }
.auth-side li .icon { color: var(--accent); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-form .card { width: 100%; max-width: 460px; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-options label { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0; }
.role-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.role-options input { display: none; }
.role-options strong { display: block; }
.role-options span { font-size: .8rem; color: var(--muted); font-weight: 500; }

/* Requests ----------------------------------------------------------- */
.request-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; border-inline-start: 4px solid var(--accent); }
.request-card h3 { margin: 0; font-size: 1.05rem; }
.request-card .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .85rem; color: var(--ink-2); }
.request-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.request-card .meta .icon { width: 15px; height: 15px; color: var(--muted); }
.request-card .budget { font-weight: 800; color: var(--primary); font-size: 1.05rem; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; background: #fef3c7; color: #92400e; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }

/* Footer ------------------------------------------------------------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: #cbd5e1; } .site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: #94a3b8; }
.site-footer .brand { color: #fff; }

/* Static pages ------------------------------------------------------- */
.prose { max-width: 820px; background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.9; }
.prose h2 { margin-top: 24px; }

/* Responsive --------------------------------------------------------- */
@media (max-width: 1250px) {
  .nav a { font-size: .85rem; padding: 8px 8px; }
}
@media (max-width: 1100px) {
  .search-box { grid-template-columns: 1fr 1fr; }
  .search-box .btn { grid-column: span 2; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-grid; }
  .search-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 150; max-height: none; border-radius: 0; display: none; overflow: auto; }
  .filters.open { display: block; }
  .mobile-filter-btn { display: inline-flex; }
  .listing-layout { grid-template-columns: 1fr; }
  .sidebar-sticky { position: static; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 120px; }
  .gallery a:first-child { grid-column: span 2; grid-row: auto; }
  .gallery a:nth-child(n+4) { display: none; }
  .map-page { grid-template-columns: 1fr; grid-template-rows: 1fr 45vh; }
  .map-side { order: 2; border-inline-end: 0; border-top: 1px solid var(--line); }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav .group { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .steps { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kind-options { grid-template-columns: repeat(2, 1fr); }
  .incl-grid { grid-template-columns: 1fr; }
  .listing-card.list-view { flex-direction: column; }
  .listing-card.list-view .thumb { width: 100%; aspect-ratio: 4/3; }
  .dash-main { padding: 18px; }
}
@media (max-width: 600px) {
  .hide-sm { display: none !important; }
  .site-header .container { gap: 10px; height: 60px; }
  .brand { font-size: 1.15rem; }
  .nav { top: 60px; }
  .grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .search-box { grid-template-columns: 1fr; }
  .search-box .btn { grid-column: auto; }
  .hero { padding: 40px 0 60px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .cta { padding: 28px; }
  .listing-head h1 { font-size: 1.3rem; }
  .flash-wrap { inset-inline: 12px; max-width: none; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .contact-btns, .thumb-actions { display: none !important; }
}

/* AI assistant ------------------------------------------------------- */
.ai-fab { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--grad); color: #fff; font-family: inherit; font-weight: 800; font-size: 1rem; box-shadow: var(--shadow-lg); cursor: pointer; transition: .2s; }
.ai-fab:hover { transform: translateY(-2px) scale(1.03); }
.ai-panel { position: fixed; bottom: 22px; inset-inline-end: 22px; width: min(420px, calc(100vw - 24px)); height: min(640px, calc(100vh - 100px)); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(15,23,42,.25); z-index: 95; display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.ai-panel.open { display: flex; animation: slidein .2s; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; }
.ai-head strong { display: block; line-height: 1.2; }
.ai-head .btn-ghost { color: #fff; }
.ai-local { font-size: .72rem; opacity: .85; display: flex; align-items: center; gap: 4px; }
.ai-avatar { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.ai-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.ai-msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.6; white-space: pre-line; }
.ai-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-end-end-radius: 4px; }
.ai-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.ai-msg.typing { color: var(--muted); font-style: italic; }
.ai-cards { display: flex; flex-direction: column; gap: 8px; }
.ai-card { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: var(--ink); transition: .15s; }
.ai-card:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--ink); }
.ai-card img { width: 84px; height: 66px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ai-card .t { font-weight: 700; font-size: .85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-card .p { color: var(--primary); font-weight: 800; font-size: .85rem; }
.ai-card .d { color: var(--muted); font-size: .74rem; }
.ai-card .why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ai-card .why span { font-size: .66rem; background: var(--primary-50); color: var(--primary-600); padding: 1px 6px; border-radius: 999px; }
.ai-score { margin-inline-start: auto; align-self: flex-start; background: var(--accent); color: #1f1300; font-weight: 800; font-size: .72rem; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.ai-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: .78rem; border: 1px solid var(--line); }
.ai-table th, .ai-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.ai-table th { background: var(--primary-50); color: var(--primary-600); font-weight: 700; }
.ai-table tr:first-child td { font-weight: 700; background: var(--bg); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips button { border: 1px solid var(--primary); background: #fff; color: var(--primary); border-radius: 999px; padding: 5px 11px; font-size: .78rem; font-family: inherit; cursor: pointer; font-weight: 600; }
.ai-chips button:hover { background: var(--primary-50); }
.ai-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-filters span { font-size: .7rem; background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; color: var(--ink-2); }
.ai-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.ai-input input { flex: 1; }
.ai-page { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.ai-page-side { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; position: sticky; top: 84px; }
.ai-page-main { display: flex; flex-direction: column; overflow: hidden; }
.ai-page-main .ai-body { max-height: 70vh; }
.ai-page-main .ai-msg { max-width: 80%; font-size: 1rem; }
.ai-page-main .ai-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 900px) {
  .ai-page { grid-template-columns: 1fr; }
  .ai-page-side { position: static; }
  .ai-fab span { display: none; }
  .ai-fab { padding: 14px; font-size: 1.3rem; }
  .ai-panel { bottom: 0; inset-inline-end: 0; width: 100vw; height: 100dvh; border-radius: 0; }
}

/* Fluid scaling for very large screens (TV / 4K) ---------------------- */
@media (min-width: 1800px) {
  :root { --container: 1560px; }
  html { font-size: 18px; } html[dir="rtl"] { font-size: 19px; }
}
@media (min-width: 2400px) {
  :root { --container: 2000px; }
  html { font-size: 22px; } html[dir="rtl"] { font-size: 23px; }
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(5, 1fr); }
}
/* Touch targets & small phones ---------------------------------------- */
@media (pointer: coarse) { .btn-sm { padding: 8px 14px; } .icon-btn { width: 40px; height: 40px; } .page-link { padding: 10px 16px; } }
@media (max-width: 400px) { html, html[dir="rtl"] { font-size: 14px; } .container { padding: 0 14px; } .hero-stats { gap: 18px; } .listing-head { flex-direction: column; } .big-price { font-size: 1.5rem; } }

/* Announcement ticker (fixed to the bottom of the viewport, admin managed) --- */
#site-ticker.ticker { position: fixed !important; left: 0; right: 0; bottom: 0; width: 100%; z-index: 2000; background: var(--tk-bg, #0f172a); color: var(--tk-color, #fff); height: 46px; display: flex; align-items: center; box-shadow: 0 -6px 20px rgba(15,23,42,.25); overflow: hidden; }
.ticker .tk-label { flex-shrink: 0; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: rgba(0,0,0,.28); font-weight: 800; font-size: .82rem; white-space: nowrap; z-index: 2; }
.ticker .tk-track { flex: 1 1 auto; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center; }
.ticker .tk-move { display: flex; align-items: center; gap: 70px; white-space: nowrap; flex-shrink: 0; will-change: transform; animation: tk-ltr var(--tk-speed, 30s) linear infinite; }
html[dir="rtl"] .ticker .tk-move { animation-name: tk-rtl; }
.ticker:hover .tk-move { animation-play-state: paused; }
.ticker .tk-move span { font-weight: 600; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.ticker .tk-move span::before { content: '•'; opacity: .6; }
.ticker .tk-move a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ticker .tk-close { flex-shrink: 0; background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 14px; opacity: .8; z-index: 2; }
.ticker .tk-close:hover { opacity: 1; }
@keyframes tk-ltr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tk-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .tk-move { animation: none; } }
body.has-ticker { padding-bottom: 46px; }
body.has-ticker .ai-fab, body.has-ticker .ai-panel { bottom: 66px; }
body.has-ticker .sticky-actions { bottom: 46px; }
@media (max-width: 600px) { #site-ticker.ticker { height: 42px; } .ticker .tk-label span { display: none; } .ticker .tk-move span { font-size: .85rem; } body.has-ticker { padding-bottom: 42px; } }

/* Featured strip on top of search results ---------------------------------- */
.featured-strip { background: linear-gradient(180deg, #fffbeb, transparent); border: 1px solid #fde68a; border-radius: 18px; padding: 14px; margin-bottom: 20px; }
.featured-strip .fs-head { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #92400e; margin-bottom: 12px; }
.featured-strip .fs-head a { margin-inline-start: auto; color: #92400e; }
.featured-strip .grid { gap: 14px; }

/* =====================================================================
   Premium UI (optional) - enabled from the admin panel: الإعدادات > نمط التصميم
   Everything above stays the classic design; these rules only apply when
   <html data-ui="premium">.
   ===================================================================== */
html[data-ui="premium"] h1, html[data-ui="premium"] h2, html[data-ui="premium"] h3, html[data-ui="premium"] h4 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.01em; }
html[data-ui="premium"] .site-header { background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html[data-ui="premium"] .brand-mark { box-shadow: 0 4px 12px rgba(15,23,42,.18); }
html[data-ui="premium"] .btn:hover { box-shadow: 0 6px 18px rgba(15,23,42,.14); }
html[data-ui="premium"] .hero { background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 130%); padding: 72px 0 100px; }
html[data-ui="premium"] .hero::after { background: none; width: 420px; height: 420px; border-radius: 50%; inset: auto auto -200px 10%; background-color: rgba(255,255,255,.12); filter: blur(100px); }
html[data-ui="premium"] .hero::before { content: ''; position: absolute; width: 640px; height: 640px; border-radius: 50%; background: var(--hero-glow); filter: blur(120px); top: -260px; inset-inline-end: -120px; pointer-events: none; }
html[data-ui="premium"] .hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
html[data-ui="premium"] .hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.2; }
html[data-ui="premium"] .hero-visual { display: block; position: relative; height: 420px; }
html[data-ui="premium"] .hero .search-box { grid-template-columns: 1fr 1fr 1fr auto; background: rgba(255,255,255,.96); border-radius: 20px; padding: 16px; box-shadow: 0 24px 50px rgba(0,0,0,.28); }
html[data-ui="premium"] .hero .search-box .form-group:first-child { grid-column: 1 / -1; }
html[data-ui="premium"] .hero-content { animation: rise .6s ease-out both; }
html[data-ui="premium"] .section-head h2 { position: relative; padding-inline-start: 14px; }
html[data-ui="premium"] .section-head h2::before { content: ''; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 4px; background: var(--grad); }
html[data-ui="premium"] .listing-card { border-radius: 18px; transition: .25s cubic-bezier(.2,.8,.2,1); border: 1px solid transparent; }
html[data-ui="premium"] .listing-card:hover { box-shadow: 0 18px 40px rgba(15,23,42,.14); transform: translateY(-5px); border-color: var(--primary-100); }
html[data-ui="premium"] .listing-card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.45), transparent 55%); pointer-events: none; }
html[data-ui="premium"] .listing-card:hover .thumb img { transform: scale(1.06); }
html[data-ui="premium"] .listing-card .price { font-family: var(--font-head); font-size: 1.25rem; }
html[data-ui="premium"] .distance-line { border: 1px solid var(--primary-100); }
html[data-ui="premium"] .tile { border-radius: 16px; padding: 20px 16px; transition: .25s; }
html[data-ui="premium"] .tile::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--primary-50); transition: .3s; z-index: 0; }
html[data-ui="premium"] .tile:hover { border-color: var(--primary-100); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
html[data-ui="premium"] .tile:hover::after { transform: scale(1.6); }
html[data-ui="premium"] .tile .emoji { font-size: 1.8rem; width: 48px; height: 48px; display: grid; place-items: center; background: var(--primary-50); border-radius: 12px; margin-bottom: 4px; }
html[data-ui="premium"] .step .num { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(15,118,110,.25); }
html[data-ui="premium"] .cta { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); border-radius: 24px; padding: 48px; }
html[data-ui="premium"] .cta::before { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: var(--hero-glow); filter: blur(80px); inset-inline-end: -80px; top: -120px; }
html[data-ui="premium"] .site-footer { background: linear-gradient(180deg, #0f172a, #0b1220); padding: 56px 0 24px; border-top: 4px solid; border-image: var(--grad) 1; }
html[data-ui="premium"] .stat { border: 1px solid transparent; transition: .2s; }
html[data-ui="premium"] .stat:hover { border-color: var(--primary-100); transform: translateY(-2px); }
html[data-ui="premium"] .hero-stats strong { font-family: var(--font-head); font-size: 1.7rem; }
@media (max-width: 1100px) { html[data-ui="premium"] .hero .container { grid-template-columns: 1fr; } html[data-ui="premium"] .hero-visual { display: none; } }
@media (max-width: 600px) { html[data-ui="premium"] .hero .search-box { grid-template-columns: 1fr; } }

/* Mobile overflow guard: grid/flex children must be allowed to shrink ------ */
.listing-layout, .search-layout, .dash-grid, .ai-page, .form-row, .stat-grid, .grid, .tiles { min-width: 0; }
.listing-layout > *, .search-layout > *, .dash-grid > *, .ai-page > *, .dash > *, .map-page > *, .form-row > *, .grid > *, .tiles > *, .listing-card .body > *, .listing-head > * { min-width: 0; }
.listing-layout { grid-template-columns: minmax(0, 1fr) 360px; }
.search-layout { grid-template-columns: 300px minmax(0, 1fr); }
.dash { grid-template-columns: 250px minmax(0, 1fr); }
.block, .card, .listing-card { max-width: 100%; overflow-wrap: anywhere; }
.big-price { white-space: normal; }
.share-bar, .spec-grid, .amenity-list, .rules-list, .dist-list, .incl-grid { max-width: 100%; }
.desc, .listing-head h1, .ai-msg, .request-card, .prose { overflow-wrap: anywhere; word-break: break-word; }
.table-wrap { max-width: 100%; }
@media (max-width: 900px) {
  .listing-layout { grid-template-columns: minmax(0, 1fr); }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .listing-head { flex-direction: column; align-items: stretch; }
  .listing-head > div:last-child { text-align: start !important; }
  .listing-head .flex { justify-content: flex-start !important; flex-wrap: wrap; }
  .gallery { border-radius: 12px; }
  .lightbox img { max-width: 100vw; }
}
