/* ==========================================================================
   COMPONENTS DESIGN SYSTEM
   ========================================================================== */

/* Desktop Header Navigation */
.desktop-header {
  display: none;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 990;
}

@media (min-width: 992px) {
  .desktop-header {
    display: block;
  }
}

.nav-wrapper {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: #FFFFFF;
}

.btn-accent {
  background-color: var(--accent-color);
  color: #FFFFFF;
}

.btn-outline {
  border-color: var(--border-color);
  background: var(--surface-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-color);
  border-color: var(--text-muted);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 1.05rem;
}

/* Property Cards */
.property-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

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

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--border-light);
}

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

.property-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-jual {
  background: var(--primary-color);
  color: #FFFFFF;
}

.badge-sewa {
  background: #2563EB;
  color: #FFFFFF;
}

.badge-featured {
  background: var(--accent-color);
  color: #FFFFFF;
}

.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  z-index: 2;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.favorite-btn:hover, .favorite-btn.active {
  color: #EF4444;
  background: #FFFFFF;
  transform: scale(1.1);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-specs {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Category Quick Card */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 90px;
  padding: 16px 12px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.2s ease;
}

.category-card:hover, .category-card.active {
  border-color: var(--primary-color);
  background: #F0FDF4;
  transform: translateY(-2px);
}

.category-card .cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

/* City Card */
.city-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 140px;
  height: 100px;
  box-shadow: var(--shadow-sm);
}

.city-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.city-card .city-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 10px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Responsive Table Wrapper for Comparisons & Admin */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-color);
  text-align: left;
}

.table th, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-color);
  font-weight: 700;
}
