/* ============================================================
   TourVista - Marketplace CSS
   ============================================================ */

.marketplace-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ─── Filter Sidebar ─────────────────────────────────────────── */
.filter-sidebar {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  padding: 1.75rem;
  position: sticky;
  top: 90px;
  border: 1px solid #e2e8f0;
}
.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.filter-sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  font-family: 'Inter', sans-serif;
}
.filter-clear {
  font-size: 0.8rem;
  color: #0a7c6e;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}
.filter-section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #f1f5f9; }
.filter-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.filter-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #718096;
  margin-bottom: 0.85rem;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0.25rem;
  transition: background 0.2s;
  font-size: 0.9rem;
}
.filter-option:hover { background: #f0faf9; }
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  accent-color: #0a7c6e;
  cursor: pointer;
  width: 14px; height: 14px;
}
.filter-option label { cursor: pointer; color: #2d3748; flex: 1; }
.filter-option .count {
  background: #f1f5f9;
  color: #718096;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
}
.price-range-container { padding: 0.5rem 0; }
.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.price-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #2d3748;
  outline: none;
  transition: border-color 0.2s;
}
.price-input:focus { border-color: #0a7c6e; box-shadow: 0 0 0 3px rgba(10,124,110,0.1); }
.search-input-wrap {
  position: relative;
}
.search-input-wrap input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.2rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-input-wrap input:focus { border-color: #0a7c6e; }
.search-input-wrap .search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #718096;
  font-size: 0.85rem;
}
.filter-submit-btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: #0a7c6e;
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}
.filter-submit-btn:hover { background: #065a50; transform: translateY(-1px); }

/* ─── Listings Grid ─────────────────────────────────────────── */
.listings-area {}
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.listings-count {
  font-size: 0.9rem;
  color: #718096;
}
.listings-count span { color: #1a1a2e; font-weight: 700; }
.sort-select {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #2d3748;
  outline: none;
  cursor: pointer;
  background: white;
}
.sort-select:focus { border-color: #0a7c6e; }

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Enhanced Listing Card */
.listing-card-mp {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.listing-card-mp:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  border-color: rgba(10,124,110,0.2);
}
.listing-card-mp .card-img {
  height: 210px;
  overflow: hidden;
  position: relative;
}
.listing-card-mp .card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.listing-card-mp:hover .card-img img { transform: scale(1.06); }
.card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.badge {
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-land { background: rgba(10,124,110,0.9); color: white; backdrop-filter: blur(4px); }
.badge-vehicle { background: rgba(201,162,39,0.9); color: white; backdrop-filter: blur(4px); }
.badge-featured { background: rgba(255,107,53,0.9); color: white; backdrop-filter: blur(4px); }
.badge-sold { background: rgba(220,38,38,0.85); color: white; backdrop-filter: blur(4px); }
.badge-active { background: rgba(22,163,74,0.85); color: white; backdrop-filter: blur(4px); }
.card-body { padding: 1.25rem; }
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0a7c6e;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}
.card-price .currency { font-size: 0.85rem; font-weight: 600; vertical-align: super; }
.card-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #718096;
  font-size: 0.83rem;
  margin-bottom: 0.6rem;
}
.card-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #718096;
  padding: 0.6rem 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.75rem;
}
.card-spec { display: flex; align-items: center; gap: 0.3rem; }
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-views { font-size: 0.75rem; color: #a0aec0; display: flex; align-items: center; gap: 0.3rem; }
.btn-view {
  padding: 0.45rem 1.1rem;
  background: #0a7c6e;
  color: white;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  /* start hidden until card hover */
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
.listing-card-mp:hover .btn-view {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.btn-view:hover { background: #065a50; color: white; }

/* ─── Category Tabs ─────────────────────────────────────────── */
.cat-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.cat-tab {
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  background: white;
  color: #718096;
  transition: all 0.2s;
  text-decoration: none;
}
.cat-tab:hover, .cat-tab.active {
  background: #0a7c6e;
  border-color: #0a7c6e;
  color: white;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.page-link {
  min-width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #2d3748;
  border: 1.5px solid #e2e8f0;
  background: white;
  transition: all 0.2s;
  text-decoration: none;
  padding: 0 0.5rem;
}
.page-link:hover { border-color: #0a7c6e; color: #0a7c6e; background: #f0faf9; }
.page-link.active { background: #0a7c6e; border-color: #0a7c6e; color: white; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }
.page-link.dots { border: none; color: #718096; background: transparent; }

/* ─── Empty State ─────────────────────────────────────────────── */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
}
.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.empty-state h3 {
  color: #1a1a2e;
  margin-bottom: 0.5rem;
}
.empty-state p { color: #718096; margin-bottom: 1.5rem; }

/* ─── CTA List Banner ────────────────────────────────────────── */
.marketplace-cta {
  background: linear-gradient(135deg, #0a7c6e, #0a3d62);
  color: white;
  border-radius: 16px;
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.marketplace-cta h3 { color: white; font-size: 1.5rem; margin-bottom: 0.5rem; }
.marketplace-cta p { color: rgba(255,255,255,0.8); margin: 0; }
.marketplace-cta .btn { flex-shrink: 0; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .marketplace-layout { grid-template-columns: 240px 1fr; gap: 1.5rem; }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .marketplace-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; display: none; }
  .filter-sidebar.open { display: block; }
  .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: #0a7c6e;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
  }
}
@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr; }
  .marketplace-cta { flex-direction: column; text-align: center; padding: 2rem; }
}
