:root {
  --saffron: #FF6B00;
  --saffron-light: #FF8C38;
  --saffron-pale: #FFF3E9;
  --deep: #0D1B2A;
  --slate: #1E3448;
  --mid: #4A6278;
  --mist: #8FA3B1;
  --cream: #FAFAF8;
  --white: #FFFFFF;
  --success: #22C55E;
  --rent: #3B82F6;
  --buy: #FF6B00;
  --sell: #8B5CF6;
  --danger: #EF4444;
  --shadow-sm: 0 2px 8px rgba(13,27,42,0.08);
  --shadow-md: 0 8px 32px rgba(13,27,42,0.12);
  --shadow-lg: 0 20px 60px rgba(13,27,42,0.18);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--deep);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(13,27,42,0.06);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  transition: all 0.3s ease;
}

.nav-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--deep);
  text-decoration: none;
}
.nav-logo-img {
  width: 158px;
  height: auto;
  display: block;
}
.nav-logo .logo-icon {
  width: 32px; height: 32px; flex-shrink: 0;
}
.nav-logo .logo-text-real { color: var(--deep); }
.nav-logo .logo-text-move { color: var(--saffron); }
.nav-logo .logo-dot { font-size: 0.5em; color: var(--saffron); vertical-align: middle; margin: 0 1px; }
.nav-logo .logo-suffix { font-weight: 400; font-size: 0.55em; color: var(--mid); letter-spacing: 0.03em; }
footer .nav-logo .logo-text-real { color: #FFFFFF; }
footer .nav-logo .logo-icon .icon-house { fill: #FFFFFF; }
footer .nav-logo .logo-icon .icon-door { fill: var(--saffron); }

.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.nav-links a {
  text-decoration: none; color: var(--mid);
  font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--saffron); }

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

.account-menu-wrap { position: relative; }
.account-menu-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 4px 10px 4px 4px;
  border: 1.5px solid rgba(13,27,42,0.12); border-radius: 100px;
  background: white; color: var(--deep); font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 0.82rem; cursor: pointer;
}
.account-menu-trigger:hover { border-color: var(--saffron); }
.account-menu-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-avatar, .account-menu-avatar {
  border-radius: 50%; background: linear-gradient(135deg, var(--saffron), var(--saffron-light));
  display: flex; align-items: center; justify-content: center; color: white; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.nav-user-avatar { width: 30px; height: 30px; font-size: 0.72rem; }
.account-menu-avatar { width: 42px; height: 42px; font-size: 0.86rem; }
.profile-avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.account-menu {
  display: none; position: absolute; right: 0; top: 46px; width: 240px;
  background: white; border: 1px solid rgba(13,27,42,0.08); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 1200;
}
.account-menu.open { display: block; }
.account-menu-header { display: flex; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid rgba(13,27,42,0.06); }
.account-menu-header strong { display: block; font-size: 0.9rem; color: var(--deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.account-menu-header span { display: block; font-size: 0.76rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.account-menu a, .account-menu button {
  display: block; width: 100%; padding: 11px 14px; background: white; border: none;
  border-bottom: 1px solid rgba(13,27,42,0.04); color: var(--mid); text-align: left;
  font-family: 'DM Sans', sans-serif; font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--saffron-pale); color: var(--saffron); }

.btn {
  padding: 10px 22px; border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.2s ease; text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px;
}
.btn-ghost { background: transparent; color: var(--mid); border: 1.5px solid rgba(13,27,42,0.15); }
.btn-ghost:hover { border-color: var(--saffron); color: var(--saffron); }
.btn-primary { background: var(--saffron); color: white; }
.btn-primary:hover { background: var(--saffron-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,107,0,0.3); }
.btn-outline { background: transparent; color: var(--saffron); border: 1.5px solid var(--saffron); }
.btn-outline:hover { background: var(--saffron-pale); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.input-group { position: relative; margin-bottom: 16px; }
.input-group label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--mid); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.input-group input, .input-group select, .input-group textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid rgba(13,27,42,0.12);
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
  color: var(--deep); background: white; outline: none;
  transition: border-color 0.2s;
}
.input-group textarea { resize: vertical; min-height: 100px; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--saffron); }
.input-group .error { border-color: var(--danger); }
.input-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }

.page-container {
  max-width: 1200px; margin: 0 auto; padding: 100px 5% 60px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700; color: var(--deep); margin-bottom: 8px;
}

.page-sub { color: var(--mid); font-size: 1rem; margin-bottom: 36px; }

.card {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(13,27,42,0.06);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

.badge {
  display: inline-block; padding: 5px 12px; border-radius: 100px;
  font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-buy { background: var(--saffron); color: white; }
.badge-rent { background: var(--rent); color: white; }
.badge-sell { background: var(--sell); color: white; }
.badge-new { background: var(--success); color: white; }

.trust-badges { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-verified { background: #DCFCE7; color: #16A34A; }
.badge-rera { background: #DBEAFE; color: #1D4ED8; }

.toast {
  position: fixed; bottom: 30px; right: 30px; z-index: 3000;
  background: var(--deep); color: white; padding: 14px 22px;
  border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 0.9rem; font-weight: 500;
  transform: translateY(100px); opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show { transform: translateY(0); opacity: 1; }

.tab-bar { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 2px solid rgba(13,27,42,0.06); }
.tab-btn {
  padding: 12px 20px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; border: none; background: none;
  color: var(--mist); border-bottom: 3px solid transparent;
  transition: all 0.2s; font-family: 'DM Sans', sans-serif;
  margin-bottom: -2px;
}
.tab-btn.active { color: var(--saffron); border-bottom-color: var(--saffron); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--mid);
}
.empty-state svg { width: 120px; height: 120px; margin-bottom: 20px; opacity: 0.3; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--deep); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 24px; }

.prop-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all 0.3s; cursor: pointer;
  border: 1px solid rgba(13,27,42,0.06);
}
.prop-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.prop-img {
  position: relative; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, #e8f0fe, #d4e0f5);
}
.prop-img .prop-photo {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.prop-card:hover .prop-photo {
  transform: scale(1.06);
}
.prop-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: linear-gradient(135deg, #e8f0fe, #d4e0f5);
}
.prop-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 12px; border-radius: 100px; font-size: 0.76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.prop-save {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: white; border: none; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.prop-save:hover { transform: scale(1.1); }
.prop-body { padding: 20px; }
.prop-price {
  font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700;
  color: var(--deep); margin-bottom: 4px;
}
.prop-price-sub { font-size: 0.78rem; color: var(--mist); font-family: 'DM Sans', sans-serif; font-weight: 400; }
.prop-title { font-weight: 600; font-size: 0.95rem; color: var(--deep); margin: 10px 0 4px; line-height: 1.4; }
.prop-location { display: flex; align-items: center; gap: 5px; color: var(--mid); font-size: 0.83rem; margin-bottom: 14px; }
.prop-features { display: flex; gap: 16px; border-top: 1px solid rgba(13,27,42,0.07); padding-top: 14px; }
.prop-feat { display: flex; align-items: center; gap: 5px; font-size: 0.82rem; color: var(--mid); }
.prop-feat strong { color: var(--deep); font-weight: 600; }
.prop-footer { padding: 14px 20px; border-top: 1px solid rgba(13,27,42,0.06); display: flex; justify-content: space-between; align-items: center; background: rgba(250,250,248,0.6); }
.prop-agent { display: flex; align-items: center; gap: 8px; }
.agent-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--saffron), var(--saffron-light)); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.7rem; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.agent-name { font-size: 0.78rem; color: var(--mid); }

.loading-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer {
  background: var(--deep); color: rgba(255,255,255,0.6);
  padding: 40px 5% 20px; text-align: center; font-size: 0.85rem;
}
footer a { color: var(--saffron); }

.hidden { display: none !important; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .account-menu-name { display: none; }
  .nav-actions { gap: 8px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-container { padding: 90px 4% 40px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: rgba(13,27,42,0.2); border-radius: 3px; }

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-card { min-height: 360px; border-radius: var(--radius); overflow: hidden; background: white; box-shadow: var(--shadow-sm); border: 1px solid rgba(13,27,42,0.06); }
.skeleton-card .skeleton-img { height: 200px; background: linear-gradient(90deg, #e0e7ef 25%, #edf2f7 50%, #e0e7ef 75%); background-size: 200% 100%; animation: skeletonPulse 1.5s ease-in-out infinite; }
.skeleton-card .skeleton-body { padding: 20px; }
.skeleton-card .skeleton-line { height: 14px; margin-bottom: 10px; border-radius: 6px; }
.skeleton-card .skeleton-line.w60 { width: 60%; }
.skeleton-card .skeleton-line.w80 { width: 80%; }
.skeleton-card .skeleton-line.w40 { width: 40%; }
.skeleton-card .skeleton-line.w100 { width: 100%; }
.skeleton-card .skeleton-line.h20 { height: 20px; }
.skeleton-card .skeleton-footer { padding: 14px 20px; border-top: 1px solid rgba(13,27,42,0.06); display: flex; justify-content: space-between; align-items: center; }
.skeleton-card .skeleton-avatar { width: 28px; height: 28px; border-radius: 50%; }
.skeleton-card .skeleton-btn { width: 60px; height: 30px; border-radius: 8px; }

.skeleton-gallery { height: 400px; border-radius: 20px; overflow: hidden; background: linear-gradient(90deg, #e0e7ef 25%, #edf2f7 50%, #e0e7ef 75%); background-size: 200% 100%; animation: skeletonPulse 1.5s ease-in-out infinite; }
.skeleton-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.skeleton-thumb { width: 72px; height: 54px; border-radius: 8px; }

.prop-photo, .launch-card-img img, .detail-gallery img, .gallery-thumb img, .nl-card-img img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.prop-photo.loaded, .launch-card-img img.loaded, .detail-gallery img.loaded, .gallery-thumb img.loaded, .nl-card-img img.loaded {
  opacity: 1;
}
