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

body {
  font-family: 'Manrope', sans-serif;
  background: #fff;
  color: #383838;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 120px;
  border-bottom: 1px solid #E2E4E9;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0068F5;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.logo img { height: 28px; width: auto; object-fit: contain; }

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

.btn-list {
  padding: 9px 18px;
  border: 1px solid #E2E4E9;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #383838;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-list:hover { background: #f5f7ff; }

.btn-liked {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid #E2E4E9;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #383838;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-liked:hover { background: #f5f7ff; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f0f4ff;
  border: 1.5px solid #E2E4E9;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.avatar svg { width: 16px; height: 16px; stroke: #525866; stroke-width: 2; fill: none; }

/* ── SEARCH ── */
.search-wrap {
  display: flex;
  flex-direction: column;
  padding: 20px 120px;
  gap: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid #E2E4E9;
  border-radius: 10px;
  padding: 10px 16px;
  gap: 10px;
  background: #fff;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: #0068F5; }
.search-bar input {
  flex: 1; border: none; outline: none;
  font-family: 'Manrope', sans-serif; font-size: 14px; color: #383838;
}
.search-bar input::placeholder { color: #868C98; }

.search-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #868C98;
  white-space: nowrap;
}
.ai-badge svg { width: 14px; height: 14px; stroke: #868C98; fill: none; stroke-width: 2; }

/* Mobile filters button — hidden on desktop */
.btn-filters-mobile { display: none; }
.btn-filters-desktop { display: flex; }

/* ── CATEGORY TABS ── */
.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 120px 16px;
  border-bottom: 1px solid #E2E4E9;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #525866;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab img { width: 32px; height: 32px; object-fit: contain; }
.tab:hover { color: #0068F5; }
.tab.active { color: #0068F5; border-bottom-color: #0068F5; font-weight: 700; }

.btn-filters {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid #E2E4E9;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #383838;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-filters:hover { background: #f5f7ff; }
.btn-filters svg { width: 16px; height: 16px; stroke: #383838; stroke-width: 2; fill: none; }

.filter-count {
  background: #0068F5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}

/* ── RESULTS META ── */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 120px;
}
.results-count { font-size: 14px; font-weight: 500; color: #525866; }

.view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #E2E4E9;
  border-radius: 8px;
  padding: 3px;
}
.view-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.view-btn svg { width: 16px; height: 16px; stroke: #868C98; stroke-width: 2; fill: none; }
.view-btn.active { background: #0068F5; }
.view-btn.active svg { stroke: #fff; }

/* ── GRID ── */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 8px 120px 60px;
}
.spaces-grid.list-view { grid-template-columns: 1fr; }
.spaces-grid.list-view .space-card { display: flex; flex-direction: row; }
.spaces-grid.list-view .card-img-wrap { width: 280px; flex-shrink: 0; border-radius: 14px 0 0 14px; }
.spaces-grid.list-view .card-img-wrap img { border-radius: 14px 0 0 14px; }

/* ── CARD ── */
.space-card {
  border: 1px solid #E2E4E9;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.18s;
}
.space-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.09); transform: translateY(-2px); }

.card-img-wrap { position: relative; width: 100%; height: 200px; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.92); color: #383838;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.avail-badge {
  position: absolute; bottom: 12px; left: 12px;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}
.avail-badge.available { background: #dcfce7; color: #15803d; }
.avail-badge.not-available { background: #fee2e2; color: #b91c1c; }

.like-btn {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%; background: rgba(255,255,255,0.9);
  border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.like-btn:hover { background: #fff; }
.like-btn svg { width: 15px; height: 15px; stroke: #868C98; fill: none; stroke-width: 2; transition: stroke 0.15s, fill 0.15s; }
.like-btn.liked svg { stroke: #e11d48; fill: #e11d48; }

.card-body { padding: 16px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.card-title-row h3 { font-size: 15px; font-weight: 700; color: #383838; }
.rating { font-size: 13px; font-weight: 600; color: #f59e0b; }
.card-location { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #525866; margin-bottom: 10px; }
.card-location svg { width: 13px; height: 13px; stroke: #868C98; fill: none; stroke-width: 2; flex-shrink: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-tags span { background: #f4f5f7; color: #525866; font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 20px; }
.card-price { display: flex; align-items: baseline; gap: 8px; }
.price-main { font-size: 16px; font-weight: 800; color: #383838; }
.price-main small { font-size: 12px; font-weight: 500; color: #868C98; }
.price-day { font-size: 12px; font-weight: 500; color: #868C98; text-decoration: line-through; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .logo { font-size: 16px; }
  .btn-liked { display: none; }

  .search-wrap { padding: 14px 20px; gap: 8px; }

  .search-meta-row { width: 100%; }

  .ai-badge { flex: 1; justify-content: flex-start; font-size: 12px; }

  /* Show mobile filters, hide desktop filters */
  .btn-filters-mobile { display: flex; }
  .btn-filters-desktop { display: none; }

  .filters-row {
    padding: 0 20px 12px;
    border-bottom: 1px solid #E2E4E9;
  }

  .category-tabs { gap: 0; width: 100%; }
  .tab { padding: 8px 10px; font-size: 11px; }
  .tab img { width: 22px; height: 22px; }

  .results-meta { padding: 12px 20px; }
  .results-count { font-size: 13px; }

  .spaces-grid {
    grid-template-columns: 1fr !important;
    padding: 8px 20px 40px;
    gap: 16px;
  }
  .spaces-grid.list-view .space-card { flex-direction: column; }
  .spaces-grid.list-view .card-img-wrap { width: 100%; border-radius: 14px 14px 0 0; }
  .spaces-grid.list-view .card-img-wrap img { border-radius: 14px 14px 0 0; }
}

@media (max-width: 480px) {
  .btn-list { padding: 8px 12px; font-size: 12px; }
}