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

:root {
  --primary:    #e84118;
  --primary-dk: #c23010;
  --accent:     #ff6b35;
  --green:      #27ae60;
  --text:       #2d2d2d;
  --muted:      #6b7280;
  --border:     #e5e7eb;
  --bg:         #f5f6fa;
  --card:       #ffffff;
  --radius:     12px;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

/* ── Header / Navbar ── */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.logo-icon svg { fill: white; }

.logo-text span { color: var(--primary); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dk); }

/* ── Hero Banner ── */
.hero {
  background: linear-gradient(135deg, #c0392b 0%, #e84118 50%, #ff6b35 100%);
  padding: 56px 24px 64px;
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1rem;
  opacity: .88;
  max-width: 520px;
  margin: 0 auto 32px;
}

/* ── Filter Bar ── */
.filter-bar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}

.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--primary); }

.filter-bar .btn-primary { padding: 10px 24px; }

/* ── Stats Strip ── */
.stats-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-count {
  font-size: .875rem;
  color: var(--muted);
}

.stats-count strong { color: var(--text); }

.sort-select {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .8rem;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

/* ── Property Grid ── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.section-label {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ── Property Card ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
}

/* Image area */
.card-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #e9ecef;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.card:hover .card-image img { transform: scale(1.04); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f2f5 0%, #dde0e7 100%);
  color: #9ca3af;
  gap: 10px;
}

.card-image-placeholder svg { opacity: .45; }
.card-image-placeholder span { font-size: .8rem; font-weight: 500; }

.status-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.badge-dijual { background: var(--primary); color: #fff; }
.badge-disewa { background: #2980b9; color: #fff; }

.image-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Card body */
.card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-type {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.card-price .nego {
  font-size: .75rem;
  font-weight: 600;
  color: var(--green);
  background: #eafaf1;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.card-specs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
}

.spec-item svg { flex-shrink: 0; color: var(--primary); }

.card-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 10px;
  background: #fff5f3;
  color: var(--primary);
  border: 1px solid #ffd4cc;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
}

.tag.green { background: #eafaf1; color: var(--green); border-color: #a9dfbf; }
.tag.blue  { background: #ebf5fb; color: #2980b9; border-color: #aed6f1; }

/* Card footer */
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  color: #fff;
  flex-shrink: 0;
}

.agent-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}

.agent-role {
  font-size: .72rem;
  color: var(--muted);
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: #25d366;
  color: #fff;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background .18s, transform .12s;
  white-space: nowrap;
}

.btn-wa:hover { background: #1ebe5c; transform: scale(1.03); }
.btn-wa svg { flex-shrink: 0; }

/* ── Footer ── */
.footer {
  background: #1a1a2e;
  color: #9ca3af;
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.footer-logo span { color: var(--primary); }

.footer p { font-size: .85rem; margin-top: 6px; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: .82rem;
  color: #9ca3af;
  transition: color .15s;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #2d2d4e;
  font-size: .78rem;
}

/* ── Floating WA button ── */
.fab-wa {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  z-index: 200;
}

.fab-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.6);
}

.fab-wa svg { fill: #fff; }

.fab-tooltip {
  position: absolute;
  right: 64px;
  background: rgba(0,0,0,.72);
  color: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .78rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.fab-wa:hover .fab-tooltip { opacity: 1; }

/* ── Lightbox ── */
#lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
#lightbox.active { opacity: 1; pointer-events: auto; }

.lb-img-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 60px 80px 12px;
  overflow: hidden;
}

#lbImg {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 6px;
  opacity: 0; transition: opacity .25s;
  user-select: none; -webkit-user-drag: none;
}
#lbImg.lb-loaded { opacity: 1; }

.lb-close {
  position: absolute; top: 16px; right: 20px;
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 1.6rem; line-height: 1; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,.25); }

.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); border: none; color: #fff;
  font-size: 2.2rem; line-height: 1; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s; z-index: 10; user-select: none;
}
.lb-arrow:hover { background: rgba(255,255,255,.28); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-counter {
  color: rgba(255,255,255,.6); font-size: .82rem; font-weight: 600;
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 20px;
}

.lb-title {
  color: rgba(255,255,255,.85); font-size: .875rem; font-weight: 600;
  text-align: center; padding: 8px 20px; max-width: 600px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lb-dots {
  display: flex; gap: 7px; padding: 10px 0 18px;
  align-items: center; justify-content: center;
}
.lb-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer; transition: background .15s, transform .15s;
}
.lb-dot.active { background: #fff; transform: scale(1.25); }
.lb-dot:hover  { background: rgba(255,255,255,.7); }

/* ── Card photo thumbnail strip ── */
.card-photo-strip {
  display: flex; gap: 5px; padding: 6px 10px;
  overflow-x: auto; background: #f8f9fa;
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
}
.card-photo-strip::-webkit-scrollbar { height: 3px; }
.card-photo-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.strip-thumb {
  width: 54px; height: 42px; object-fit: cover;
  border-radius: 5px; cursor: zoom-in; flex-shrink: 0;
  border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.strip-thumb:hover   { transform: scale(1.06); }
.strip-thumb.active  { border-color: var(--primary); }

/* ── Skeleton loader ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton-card {
  height: 480px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #e8eaf0 25%, #f5f6fa 50%, #e8eaf0 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .property-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar select, .filter-bar input { width: 100%; }
  .hero { padding: 36px 16px 48px; }
  .nav-cta { display: none; }
}
