/* ==========================================================================
   Emarat Place — Design System
   Primary: Luxury Navy | Secondary: Gold | Ground: White / Light Grey
   Display: Fraunces  |  Body/UI: Manrope
   ========================================================================== */

:root{
  --royal:        #1E3A8A;
  --royal-deep:   #0F172A;
  --royal-mid:    #2548A8;
  --royal-soft:   #E8EDF5;
  --gold:         #D4A017;
  --gold-light:   #E8C55A;
  --gold-soft:    #FDF5E0;
  --ink:          #101827;
  --grey-text:    #5B6472;
  --grey-line:    #E3E6ED;
  --grey-bg:      #F4F5F8;
  --white:        #FFFFFF;
  --success:      #1E7D4F;
  --danger:       #B23A3A;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(16,24,39,.06);
  --shadow-md: 0 12px 32px rgba(15,23,42,.10);
  --shadow-gold: 0 10px 26px rgba(198,154,58,.28);
  --container: 1240px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--white);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
input,select,textarea{ font-family:inherit; font-size:15px; }
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; color:var(--royal-deep); font-weight:600; }
p{ margin:0; }
.container{ max-width:var(--container); margin:0 auto; padding:0 28px; }

:focus-visible{ outline:3px solid var(--gold); outline-offset:2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ---------- Utility ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12.5px; letter-spacing:.14em; text-transform:uppercase;
  font-weight:700; color:var(--gold);
}
.eyebrow::before{ content:""; width:20px; height:2px; background:var(--gold); display:inline-block; }
.section{ padding:88px 0; }
.section-tight{ padding:56px 0; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:40px; flex-wrap:wrap; }
.section-head h2{ font-size:clamp(22px,2.4vw,30px); line-height:1.2; max-width:640px; }
.section-head p{ color:var(--grey-text); max-width:460px; font-size:15.5px; }
.bg-grey{ background:var(--grey-bg); }
.bg-royal{ background:var(--royal-deep); color:#fff; }
.bg-royal h2,.bg-royal h3,.bg-royal h4{ color:#fff; }
.text-center{ text-align:center; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 26px; border-radius:999px; border:1px solid transparent;
  font-weight:700; font-size:14.5px; letter-spacing:.01em; transition:transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-2px); }
.btn-gold{ background:var(--gold); color:var(--royal-deep); box-shadow:var(--shadow-gold); }
.btn-gold:hover{ background:var(--gold-light); }
.btn-royal{ background:var(--royal); color:#fff; }
.btn-royal:hover{ background:var(--royal-mid); }
.btn-outline{ background:transparent; border:2px solid rgba(255,255,255,.8); color:#fff !important; text-shadow:0 1px 4px rgba(0,0,0,.5); font-weight:700; }
.btn-outline:hover{ background:rgba(255,255,255,.15); border-color:#fff; }
.btn-outline-royal{ background:transparent; border-color:var(--royal); color:var(--royal); }
.btn-outline-royal:hover{ background:var(--royal); color:#fff; }
.btn-sm{ padding:9px 16px; font-size:13px; }
.btn-block{ width:100%; }
.btn-ghost{ background:var(--grey-bg); color:var(--royal-deep); }
.btn[disabled]{ opacity:.5; cursor:not-allowed; transform:none; }

.pill{
  display:inline-flex; align-items:center; gap:6px; padding:5px 12px;
  border-radius:999px; font-size:12px; font-weight:700; letter-spacing:.03em;
}
.pill-verified{ background:var(--royal-soft); color:var(--royal); }
.pill-featured{ background:var(--gold-soft); color:#8A6A1D; }
.pill-status-pending{ background:#FDF2DA; color:#8A6A1D; }
.pill-status-approved{ background:#E4F5EC; color:var(--success); }
.pill-status-rejected{ background:#FBEAEA; color:var(--danger); }
.pill-status-expired{ background:var(--grey-bg); color:var(--grey-text); }

/* ---------- Topbar ---------- */
.topbar{
  background:var(--royal-deep); color:#cfd9ef; font-size:13px;
}
.topbar .container{ display:flex; justify-content:space-between; align-items:center; padding:8px 28px; flex-wrap:wrap; gap:6px; }
.topbar a{ color:#cfd9ef; }
.topbar-links{ display:flex; gap:18px; align-items:center; }
.topbar-links span{ opacity:.5; }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:80; background-color:#ffffff !important;
  border-bottom:none !important; box-shadow:none !important;
}
.site-header *{ backdrop-filter:none !important; -webkit-backdrop-filter:none !important; box-shadow:none !important; }
.site-header .container{ display:flex; align-items:center; justify-content:space-between; padding:14px 28px; gap:24px; }
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:44px; height:44px; border-radius:50%; flex:none;
  background:conic-gradient(from 210deg, var(--gold), var(--gold-light), var(--gold));
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-gold);
}
.brand-mark svg{ width:22px; height:22px; }
.brand-mark-lg{
  width:64px; height:64px; border-radius:50%; flex:none;
  background:conic-gradient(from 210deg, var(--gold), var(--gold-light), var(--gold));
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-gold);
  border:3px solid rgba(255,255,255,.55);
}
.brand-mark-lg svg{ width:32px; height:32px; }
.brand-name{ font-family:var(--font-display); font-weight:700; font-size:22px; color:var(--royal-deep); line-height:1.05; text-transform:uppercase; letter-spacing:.02em; }
.brand-name small{ display:block; font-family:var(--font-body); font-weight:800; letter-spacing:.16em; font-size:11px; color:var(--gold); text-transform:uppercase; margin-top:4px; }
.brand-logo{ height:26px; width:auto; display:block; }
.brand-logo-footer{ height:20px; width:auto; }
@media (max-width:480px){ .brand-logo{ height:22px; } }

.nav-main{ display:flex; align-items:center; gap:26px; }
.nav-main a{ font-size:14px; font-weight:600; color:var(--ink); position:relative; padding:6px 0; text-decoration:none; }
.nav-main a:hover{ color:var(--royal); }
.nav-main a.active{ color:var(--royal) !important; font-weight:800; }
.nav-main a.active::after{ content:""; position:absolute; bottom:-4px; left:0; right:0; height:3px; background:var(--gold); border-radius:2px; }
.nav-main .has-dot{ display:inline-flex; align-items:center; gap:5px; }

.header-actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--grey-bg); color:var(--royal-deep); flex:none;
}
.nav-toggle{ display:none; }

@media (max-width: 1080px){
  .nav-main{ display:none; }
  .nav-toggle{ display:flex; }
  .header-actions .btn-outline-royal{ display:none; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav{
  position:fixed; inset:0; background:rgba(15,23,42,.55); z-index:120;
  display:none;
}
.mobile-nav.open{ display:block; }
.mobile-nav-panel{
  position:absolute; right:0; top:0; bottom:0; width:min(320px,86%); background:#fff;
  padding:24px; overflow-y:auto;
}
.mobile-nav-panel a{ display:block; padding:12px 4px; font-weight:600; border-bottom:1px solid var(--grey-line); }
.mobile-nav-close{ float:right; font-size:26px; background:none; border:none; color:var(--royal-deep); }

/* ---------- Hero ---------- */
.hero{
  position:relative; background:var(--royal-deep); overflow:hidden;
  padding:72px 0 190px;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(circle at 82% 12%, rgba(198,154,58,.35), transparent 42%),
    linear-gradient(120deg, rgba(15,23,42,.97) 10%, rgba(30,58,138,.82) 55%, rgba(30,58,138,.55) 100%),
    url('https://images.unsplash.com/photo-1512453979798-5ea266f8880c?q=80&w=1800&auto=format&fit=crop') center/cover;
}
.hero-inner{ position:relative; display:grid; grid-template-columns:1.05fr .95fr; gap:40px; align-items:center; }
.hero-copy .eyebrow{ color:var(--gold-light); }
.hero-copy h1{ color:#fff; font-size:clamp(32px,4vw,46px); line-height:1.12; margin:16px 0 18px; }
.hero-copy h1 em{ font-style:normal; color:var(--gold-light); }
.hero-copy p{ color:#c9d4ea; font-size:17px; max-width:480px; margin-bottom:28px; }
.hero-copy .btn-outline{ border:2px solid var(--gold); color:var(--gold-light) !important; text-shadow:none; font-weight:700; }
.hero-copy .btn-outline:hover{ background:var(--gold); color:var(--royal-deep) !important; border-color:var(--gold); }
.hero-stats{ display:flex; gap:30px; margin-top:34px; flex-wrap:wrap; }
.hero-stats div strong{ display:block; font-family:var(--font-display); font-size:26px; color:#fff; }
.hero-stats div span{ font-size:12.5px; color:#9fb0d4; text-transform:uppercase; letter-spacing:.08em; }
.hero-visual{ position:relative; }
.hero-badge{
  position:absolute; left:-18px; bottom:20px; background:#fff; border-radius:var(--radius-md);
  padding:16px 18px; box-shadow:var(--shadow-md); display:flex; gap:12px; align-items:center; width:230px;
}
.hero-badge .seal{ width:44px; height:44px; flex:none; }
.hero-badge strong{ display:block; font-size:14px; color:var(--royal-deep); }
.hero-badge span{ font-size:12px; color:var(--grey-text); }
.hero-visual img{ border-radius:var(--radius-lg); box-shadow:var(--shadow-md); }

/* Search card overlapping hero */
.search-card{
  position:relative; z-index:20; background:#fff; border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md); margin-top:-140px; padding:8px;
  border-top:4px solid var(--gold);
}
.search-tabs{ display:flex; gap:4px; padding:12px 12px 0; flex-wrap:wrap; }
.search-tabs button{
  border:none; background:transparent; padding:12px 20px; font-weight:700; font-size:14px;
  color:var(--grey-text); border-radius:10px 10px 0 0;
}
.search-tabs button.active{ background:var(--grey-bg); color:var(--royal); }
.search-form{ background:var(--grey-bg); border-radius:16px; padding:22px; display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.search-form .field{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.search-form select,.search-form input{ min-width:0; }
.search-form .field.span-2{ grid-column:span 2; }
.search-form label{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-text); }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.search-form select,.search-form input{
  border:1px solid var(--grey-line); background:#fff; border-radius:10px; padding:11px 12px; font-size:14px; color:var(--ink);
}
.search-form .btn{ align-self:end; }
@media (max-width:900px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-visual{ display:none; }
  .search-form{ grid-template-columns:1fr 1fr; }
  .search-form .field.span-2{ grid-column:span 2; }
}
@media (max-width:560px){
  .search-form{ grid-template-columns:1fr; }
  .search-form .field.span-2{ grid-column:span 1; }
}

/* ---------- Category grid ---------- */
.cat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.cat-card{
  background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-md); padding:20px;
  transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease; text-decoration:none; color:inherit; display:block;
}
.cat-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-4px); border-color:transparent; }
.cat-ic-lg{ border-radius:12px; overflow:hidden; }
.cat-ic-lg img{ width:100%; height:100%; object-fit:cover; display:block; }
.cat-card h4{ font-size:16px; margin-bottom:4px; font-weight:600; }
.cat-card p{ color:var(--grey-text); font-size:13px; margin:0; }
@media (max-width:900px){ .cat-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .cat-grid{ grid-template-columns:1fr; } }

/* ---------- Property cards ---------- */
.prop-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }
.prop-grid.cols-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:1000px){ .prop-grid,.prop-grid.cols-4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .prop-grid,.prop-grid.cols-4{ grid-template-columns:1fr; } }

.prop-card{
  background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-md); overflow:hidden;
  transition:box-shadow .2s ease, transform .2s ease;
}
.prop-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-4px); }
.prop-media{ position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--grey-bg); }
.prop-media img{ width:100%; height:100%; object-fit:cover; }
.prop-badges{ position:absolute; top:12px; left:12px; display:flex; gap:6px; flex-wrap:wrap; }
.prop-fav{
  position:absolute; top:12px; right:12px; width:34px; height:34px; border-radius:50%;
  background:rgba(255,255,255,.9); display:flex; align-items:center; justify-content:center; border:none; color:var(--royal-deep);
}
.prop-purpose{
  position:absolute; bottom:12px; left:12px; background:var(--royal-deep); color:#fff; font-size:11px;
  font-weight:700; padding:4px 10px; border-radius:999px; letter-spacing:.04em;
}
.prop-body{ padding:18px 20px 20px; }
.prop-price{ font-family:var(--font-display); font-size:22px; color:var(--royal-deep); font-weight:700; }
.prop-price span{ font-family:var(--font-body); font-size:12.5px; color:var(--grey-text); font-weight:600; }
.prop-title{ font-size:15.5px; font-weight:700; margin:6px 0 4px; color:var(--ink); }
.prop-loc{ font-size:13px; color:var(--grey-text); display:flex; align-items:center; gap:6px; margin-bottom:14px; }
.prop-specs{ display:flex; gap:14px; padding-top:14px; border-top:1px solid var(--grey-line); font-size:12.5px; color:var(--grey-text); }
.prop-specs span{ display:flex; align-items:center; gap:5px; }
.prop-foot{ display:flex; gap:8px; margin-top:16px; }
.prop-foot .btn{ flex:1; padding:10px 12px; font-size:13px; }
.btn-whatsapp{ background:#25D366; color:#fff; }
.btn-whatsapp:hover{ background:#1fbd5a; }

/* ---------- Trust / seal ---------- */
.trust-strip{ display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.seal{
  width:96px; height:96px; border-radius:50%; flex:none;
  background:radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 60%, #9a781f 100%);
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-gold);
  color:var(--royal-deep); text-align:center; font-family:var(--font-display); font-weight:700; font-size:11px; line-height:1.2;
  border:3px solid rgba(255,255,255,.6);
}

/* ---------- Steps ---------- */
.steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; counter-reset:step; }
.step{ position:relative; padding-top:46px; }
.step::before{
  counter-increment:step; content:counter(step,decimal-leading-zero);
  font-family:var(--font-display); font-size:34px; color:var(--gold); position:absolute; top:0; left:0;
}
.step h4{ font-size:16px; margin-bottom:6px; }
.step p{ font-size:13.5px; color:var(--grey-text); }
@media (max-width:900px){ .steps{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .steps{ grid-template-columns:1fr; } }

/* ---------- Testimonials ---------- */
.testi-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.testi-card{ background:#fff; border-radius:var(--radius-md); padding:26px; border:1px solid var(--grey-line); }
.testi-card p{ font-size:14.5px; color:var(--ink); margin-bottom:18px; }
.testi-person{ display:flex; gap:12px; align-items:center; }
.testi-avatar{ width:42px; height:42px; border-radius:50%; background:var(--royal-soft); color:var(--royal); display:flex; align-items:center; justify-content:center; font-weight:700; font-family:var(--font-display); }
.testi-person strong{ display:block; font-size:13.5px; }
.testi-person span{ font-size:12px; color:var(--grey-text); }
@media (max-width:900px){ .testi-grid{ grid-template-columns:1fr; } }

/* ---------- CTA band ---------- */
.cta-band{
  border-radius:var(--radius-lg); background:linear-gradient(120deg, var(--royal-deep), var(--royal-mid));
  padding:52px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
.cta-band::after{ content:""; position:absolute; right:-40px; top:-60px; width:220px; height:220px; border-radius:50%; background:rgba(198,154,58,.18); }
.cta-band h3{ color:#fff; font-size:clamp(18px,2vw,24px); max-width:480px; }
.cta-band p{ color:#c9d4ea; margin-top:8px; max-width:420px; }
.cta-band .btn-gold{ color:#0F172A; }
.cta-band .btn-outline{ border:2px solid var(--gold); color:var(--gold-light) !important; text-shadow:none; }
.cta-band .btn-outline:hover{ background:var(--gold); color:var(--royal-deep) !important; border-color:var(--gold); }

/* ---------- Footer ---------- */
.site-footer{ background:var(--royal-deep); color:#c9d4ea; padding-top:64px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1.2fr; gap:32px; padding-bottom:44px; border-bottom:1px solid rgba(255,255,255,.12); }
.footer-grid h5{ color:#fff; font-size:13px; text-transform:uppercase; letter-spacing:.08em; margin-bottom:16px; }
.footer-grid a{ display:block; font-size:13.5px; color:#aebbdd; margin-bottom:10px; }
.footer-grid a:hover{ color:var(--gold-light); }
.footer-about p{ font-size:13.5px; color:#aebbdd; margin:14px 0 18px; }
.footer-social{ display:flex; gap:10px; flex-wrap:wrap; }
.footer-social a{ width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; margin:0; color:#fff; transition:background .15s, transform .15s; }
.footer-social a svg{ width:17px; height:17px; }
.footer-social a:hover{ background:var(--gold); color:var(--royal-deep); transform:translateY(-2px); }
.footer-bottom{ display:flex; justify-content:space-between; padding:22px 0; font-size:12.5px; color:#8b98bd; flex-wrap:wrap; gap:10px; }
.footer-bottom a{ color:#8b98bd; }
@media (max-width:1000px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }

/* ---------- Page header (interior pages) ---------- */
.page-head{ background:var(--royal-deep); padding:52px 0; position:relative; overflow:hidden; }
.page-head::before{ content:""; position:absolute; inset:0; background:radial-gradient(circle at 85% 20%, rgba(198,154,58,.28), transparent 45%); }
.page-head .container{ position:relative; }
.breadcrumb{ font-size:13px; color:#9fb0d4; margin-bottom:10px; }
.breadcrumb a{ color:#c9d4ea; }
.page-head h1{ color:#fff; font-size:clamp(24px,2.8vw,32px); }
.page-head p{ color:#c9d4ea; margin-top:8px; max-width:520px; }

/* ---------- Listing layout (buy/rent/commercial) ---------- */
.listing-layout{ display:grid; grid-template-columns:280px 1fr; gap:30px; align-items:start; }
.filters-card{ background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-md); padding:22px; position:sticky; top:96px; }
.filters-card h4{ font-size:15px; margin-bottom:16px; padding-bottom:14px; border-bottom:1px solid var(--grey-line); }
.filter-group{ margin-bottom:20px; }
.filter-group label{ display:block; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--grey-text); margin-bottom:8px; }
.filter-group select,.filter-group input{ width:100%; box-sizing:border-box; border:1px solid var(--grey-line); border-radius:8px; padding:10px 11px; font-size:13.5px; background:var(--grey-bg); }
.range-row{ display:flex; align-items:center; gap:8px; }
.range-row input{ flex:1 1 0; min-width:0; }
.range-row .range-sep{ color:var(--grey-text); flex:none; font-size:13px; }
.check-row{ display:flex; align-items:center; gap:8px; font-size:13.5px; margin-bottom:8px; color:var(--ink); }
.listing-toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:22px; flex-wrap:wrap; gap:12px; }
.listing-toolbar .count{ font-size:14px; color:var(--grey-text); }
.listing-toolbar .sort{ display:flex; align-items:center; gap:8px; font-size:13.5px; }
.listing-toolbar select{ border:1px solid var(--grey-line); border-radius:8px; padding:9px 12px; background:#fff; }
.pagination{ display:flex; gap:8px; justify-content:center; margin-top:40px; }
.pagination a{ width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; border:1px solid var(--grey-line); font-size:13.5px; font-weight:700; }
.pagination a.active{ background:var(--royal); color:#fff; border-color:var(--royal); }
@media (max-width:900px){ .listing-layout{ grid-template-columns:1fr; } .filters-card{ position:static; } }

/* ---------- Forms (auth / list property) ---------- */
.form-card{ background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-lg); padding:40px; box-shadow:var(--shadow-sm); }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-grid .form-field, .form-grid > *{ min-width:0; }
.form-field{ margin-bottom:18px; }
.form-field select, .form-field input, .form-field textarea{ min-width:0; max-width:100%; }
.form-field.full{ grid-column:1/-1; }
.form-field label{ display:block; font-size:13px; font-weight:700; margin-bottom:7px; color:var(--royal-deep); }
.form-field .hint{ font-size:12px; color:var(--grey-text); margin-top:6px; }
.hint{ font-size:12px; color:var(--grey-text); }
.grade-stars .star{ font-size:15px; margin-right:1px; }
.edit-row td{ border-top:none; padding-top:0; }
tbody tr:has(+ .edit-row) td{ border-bottom:none; }
.form-field input,.form-field select,.form-field textarea{
  width:100%; border:1px solid var(--grey-line); border-radius:10px; padding:12px 14px; background:var(--grey-bg); font-size:14px; color:var(--ink);
}
.form-field textarea{ min-height:120px; resize:vertical; }
.form-section-title{ font-size:16px; font-weight:700; color:var(--royal-deep); margin:8px 0 16px; padding-top:20px; border-top:1px solid var(--grey-line); display:flex; align-items:center; gap:8px; }
.form-section-title:first-child{ border-top:none; padding-top:0; }
.checkbox-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:8px; }
.sidebar-sticky-card{ position:sticky; top:20px; }
@media (max-width:900px){
  .sidebar-sticky-card{ position:static; }
  /* Put the Contact Agent / Request Info form above the long description on
     mobile — it's the primary action and shouldn't be buried below the fold. */
  .contact-sidebar-col{ order:-1; margin-bottom:8px; }
}
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea,
input.has-error, select.has-error, textarea.has-error{ border-color:#C0392B !important; background:#FDF2F1; }

/* Amenities — Priority 8 redesign: icon grid, responsive, clear alignment */
.amenities-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:8px; }
.amenity-check{ position:relative; }
.amenity-check input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; z-index:1; }
.amenity-check label{
  display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  padding:16px 10px; border:1.5px solid var(--grey-line); border-radius:12px; font-size:12.5px;
  color:var(--ink); cursor:pointer; transition:all .15s; background:#fff;
}
.amenity-ic{ font-size:22px; line-height:1; }
.amenity-check input:checked + label{ border-color:var(--royal-deep); background:rgba(30,58,138,.05); color:var(--royal-deep); font-weight:600; }
.amenity-check input:focus-visible + label{ outline:2px solid var(--gold); outline-offset:2px; }
@media (max-width:700px){ .amenities-grid{ grid-template-columns:repeat(2,1fr); } }

/* Upload dropzone + photo gallery */
.upload-dropzone{ border:2px dashed var(--grey-line); border-radius:12px; padding:40px 20px; text-align:center; cursor:pointer; transition:all .2s; }
.upload-dropzone.drag-over{ background:rgba(198,154,58,.08); border-color:var(--gold); }
.photo-gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:12px; margin-top:20px; }

/* Admin editor layouts (blog-admin, projects-admin): main editor + side list.
   The inline styles these pages used had NO mobile breakpoint at all — a
   fixed 360-380px second column, which severely overflowed on any phone. */
.admin-editor-layout{ display:grid; grid-template-columns:1fr 380px; gap:32px; align-items:start; }
@media (max-width:900px){ .admin-editor-layout{ grid-template-columns:1fr; } .admin-editor-layout > *{ min-width:0; } }

/* Submit button loading state */
#submit-listing-btn:disabled{ opacity:.7; cursor:not-allowed; }
.btn-spinner{ display:inline-flex; align-items:center; gap:6px; }

@media (max-width:700px){ .form-grid,.checkbox-grid,.amenities-grid{ grid-template-columns:1fr; } .form-card{ padding:24px; } }

/* These grids use inline minmax() column widths (280-320px) that can exceed
   the available content width on narrow phones — minmax() won't shrink below
   its floor, so without this override the grid overflows the viewport. */
@media (max-width:700px){
  #blog-grid, #related-grid, #featured-projects-grid, #projects-grid, #pricing-grid, #similar-grid, #agents-grid{
    grid-template-columns:1fr !important;
  }
  #blog-grid > *, #related-grid > *, #featured-projects-grid > *, #projects-grid > *,
  #pricing-grid > *, #similar-grid > *, #agents-grid > *, #project-floorplans > *{
    min-width:0;
  }
}
.dash-shell{ display:grid; grid-template-columns:250px 1fr; gap:0; min-height:70vh; }
.dash-side{ background:var(--royal-deep); color:#c9d4ea; padding:26px 18px; }
.dash-side .dash-user{ display:flex; gap:10px; align-items:center; margin-bottom:22px; padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,.12); }
.dash-avatar{ width:42px; height:42px; border-radius:50%; background:var(--gold); display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--royal-deep); font-family:var(--font-display); }
.dash-user strong{ display:block; color:#fff; font-size:13.5px; }
.dash-user span{ font-size:11.5px; color:#9fb0d4; }
.dash-nav a{ display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:9px; font-size:13.5px; font-weight:600; margin-bottom:4px; color:#c9d4ea; }
.dash-nav a.active,.dash-nav a:hover{ background:rgba(255,255,255,.08); color:#fff; }
.dash-main{ padding:34px; background:var(--grey-bg); min-width:0; }
.dash-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; flex-wrap:wrap; gap:14px; }
.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:28px; }
.stat-card{ background:#fff; border-radius:var(--radius-md); padding:20px; border:1px solid var(--grey-line); min-width:0; }
.stat-card span{ font-size:12px; color:var(--grey-text); text-transform:uppercase; letter-spacing:.05em; font-weight:700; }
.stat-card strong{ display:block; font-family:var(--font-display); font-size:28px; color:var(--royal-deep); margin-top:6px; }
.stat-card em{ font-style:normal; font-size:12px; color:var(--success); }
.table-card{ background:#fff; border-radius:var(--radius-md); border:1px solid var(--grey-line); overflow:hidden; }
table{ width:100%; border-collapse:collapse; }
th{ text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--grey-text); background:var(--grey-bg); padding:12px 16px; }
td{ padding:14px 16px; font-size:13.5px; border-top:1px solid var(--grey-line); vertical-align:middle; }
.row-actions{ display:flex; gap:8px; }
.row-actions .btn{ padding:7px 12px; font-size:12px; }
@media (max-width:900px){
  .dash-shell{ grid-template-columns:1fr; }
  .stat-grid{ grid-template-columns:1fr 1fr; }

  /* Sidebar becomes a horizontal scrollable tab bar instead of vanishing —
     every section stays reachable, just docked at the top on mobile. */
  .dash-side{ padding:14px 14px 0; min-width:0; }
  .dash-side .dash-user{ display:none; }
  .dash-nav{ display:flex; gap:8px; overflow-x:auto; padding-bottom:14px; margin:0 -14px; padding-left:14px; padding-right:14px; -webkit-overflow-scrolling:touch; min-width:0; }
  .dash-nav a{ flex:none; white-space:nowrap; margin-bottom:0; }
}
@media (max-width:700px){
  .table-card{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  table{ min-width:560px; }
}

/* ---------- Misc content blocks ---------- */
.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; }
@media (max-width:900px){ .two-col{ grid-template-columns:1fr; } }
.badge-check{ display:flex; gap:12px; margin-bottom:16px; align-items:flex-start; }
.badge-check .ic{ width:26px; height:26px; border-radius:50%; background:var(--royal-soft); color:var(--royal); display:flex; align-items:center; justify-content:center; flex:none; margin-top:2px; }
.badge-check strong{ display:block; font-size:14.5px; }
.badge-check span{ font-size:13px; color:var(--grey-text); }

.tag-list{ display:flex; flex-wrap:wrap; gap:8px; }
.project-status{ display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; padding:3px 10px; border-radius:12px; margin-bottom:10px; }
.status-upcoming{ background:#FDF3E1; color:#C69A3A; }
.status-under_construction{ background:#E8EDF5; color:#1E3A8A; }
.status-ready{ background:#E4F5EC; color:#1E7D4F; }
.tag-list span{ background:var(--grey-bg); border:1px solid var(--grey-line); font-size:12.5px; padding:6px 12px; border-radius:999px; color:var(--ink); }

.map-embed{ border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--grey-line); }
.map-embed iframe{ width:100%; height:360px; border:0; display:block; }

.gallery-main{ border-radius:var(--radius-md); overflow:hidden; aspect-ratio:16/9; }
.gallery-thumbs{ display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-top:10px; }
.gallery-thumbs img{ border-radius:8px; aspect-ratio:1/1; object-fit:cover; }

.plan-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.plan-card{ background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-md); padding:28px 24px; text-align:center; }
.plan-card.highlight{ border-color:var(--gold); box-shadow:var(--shadow-gold); position:relative; }
.plan-card .tag{ position:absolute; top:-13px; left:50%; transform:translateX(-50%); background:var(--gold); color:var(--royal-deep); font-size:11px; font-weight:700; padding:5px 14px; border-radius:999px; }
.plan-card h4{ font-size:16px; }
.plan-price{ font-family:var(--font-display); font-size:30px; margin:14px 0; color:var(--royal-deep); }
.plan-price span{ font-size:12.5px; font-family:var(--font-body); color:var(--grey-text); }
.plan-card ul{ text-align:left; margin:18px 0; font-size:13.5px; color:var(--grey-text); }
.plan-card li{ display:flex; gap:8px; padding:6px 0; }
@media (max-width:900px){ .plan-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .plan-grid{ grid-template-columns:1fr; } }

.calc-card{ background:#fff; border:1px solid var(--grey-line); border-radius:var(--radius-md); padding:26px; }
.calc-result{ background:var(--royal-soft); border-radius:10px; padding:16px; margin-top:16px; display:flex; justify-content:space-between; align-items:center; }
.calc-result strong{ font-family:var(--font-display); font-size:22px; color:var(--royal-deep); }

.notice-banner{ background:var(--gold-soft); border:1px solid var(--gold-light); color:#7a5c14; border-radius:10px; padding:14px 18px; font-size:13.5px; display:flex; gap:10px; align-items:flex-start; margin-bottom:24px; }

.toggle-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-top:1px solid var(--grey-line); }
.toggle-row:first-child{ border-top:none; }
.switch{ width:44px; height:24px; border-radius:999px; background:var(--grey-line); position:relative; flex:none; }
.switch.on{ background:var(--success); }
.switch::after{ content:""; width:18px; height:18px; border-radius:50%; background:#fff; position:absolute; top:3px; left:3px; transition:left .15s; }
.switch.on::after{ left:23px; }

.whatsapp-float{
  position:fixed; bottom:24px; right:24px; width:56px; height:56px; border-radius:50%; background:#25D366;
  display:flex; align-items:center; justify-content:center; box-shadow:var(--shadow-md); z-index:60; color:#fff;
}
@media (max-width:480px){ .whatsapp-float{ width:46px; height:46px; bottom:16px; right:16px; } }

/* ---------- Notifications ---------- */
.ws-notification{
  position:fixed; top:24px; right:24px; z-index:200;
  padding:16px 20px; border-radius:var(--radius-md);
  display:flex; align-items:center; gap:12px;
  transform:translateX(120%); transition:transform .3s ease;
  box-shadow:var(--shadow-md); max-width:400px;
}
.ws-notification.show{ transform:translateX(0); }
.ws-notification span{ flex:1; font-size:14px; }
.ws-notification button{
  background:none; border:none; font-size:20px; cursor:pointer;
  color:inherit; opacity:.7; padding:0; line-height:1;
}
.ws-notification button:hover{ opacity:1; }
.ws-notification-success{ background:#E4F5EC; color:var(--success); border:1px solid #1E7D4F; }
.ws-notification-error{ background:#FBEAEA; color:var(--danger); border:1px solid #B23A3A; }
.ws-notification-info{ background:var(--royal-soft); color:var(--royal); border:1px solid var(--royal); }

/* ---------- Loading Spinner ---------- */
.btn-spinner{ display:inline-flex; align-items:center; gap:8px; }
.btn-spinner::before{
  content:""; width:16px; height:16px; border:2px solid currentColor;
  border-top-color:transparent; border-radius:50%; animation:spin .6s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ---------- Form Error States ---------- */
.form-error{ font-size:12px; color:var(--danger); margin-top:4px; }
.form-success{ font-size:12px; color:var(--success); margin-top:4px; }

/* ---------- Active Heart ---------- */
.prop-fav.active{ color:#C69A3A !important; }

/* ---------- Hero Search Tabs ---------- */
.search-tabs button.active{ background:var(--royal); color:#fff; }
