/* ─── SEW Startup Cards — BuiltInLA-Inspired Mobile-First ─── */
/* Logo+name header, meta row, chips, full-width stacked on mobile */

/* ── Grid wrapper ── */
/* Force page bg for startups directory */
body.post-type-archive-gd_place,
body.tax-gd_placecategory,
.geodir-category-list-view {
  background: #fff !important;
}

.geodir-category-list-view.row {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0.5rem 0 !important;
  float: none !important;
  margin: 0 !important;
  width: 100% !important;
}
.geodir-category-list-view.row > .col,
.geodir-category-list-view.row > .sew-card-col {
  flex: none !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  display: contents !important; /* let the .sew-card be the direct grid/flex child */
}
@media (min-width: 768px) {
  .geodir-category-list-view.row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    padding: 0 1.5rem !important;
  }
}
@media (min-width: 1024px) {
  .geodir-category-list-view.row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
    padding: 0 2rem !important;
  }
}

/* ── Card ── */
.sew-card {
  display: block;
  background: #fff;
  text-decoration: none !important;
  color: inherit !important;
  padding: 1rem 14px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  margin: 0 8px;
  background: #fff !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sew-card:active { background: #fafafa; }
@media (min-width: 768px) {
  .sew-card {
    margin: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .sew-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
}

/* ── Card Header (logo + name + meta) ── */
.sew-card__header {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 0.75rem;
}

/* Logo */
.sew-card__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
  border: 1px solid rgba(0,0,0,0.06);
}
.sew-card__logo--ph {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: none;
}
.sew-card__logo--ph span {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
  color: #fff;
  font-weight: 900;
  letter-spacing: 1px;
}

/* Header text */
.sew-card__header-text {
  flex: 1;
  min-width: 0;
}

/* Title */
.sew-card__title,
.sew-card__title a,
.sew-card a.sew-card__title,
h3.sew-card__title {
  font-family: 'Inter', sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--sew-dark-600, #1A1A1A) !important;
  margin: 0 0 2px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Meta items (employees, location) */
.sew-card__meta {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
}
.sew-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: #888;
  line-height: 1.3;
  white-space: nowrap;
}
.sew-card__meta-item svg {
  flex-shrink: 0;
  stroke: #aaa;
  width: 13px;
  height: 13px;
}

/* Favorite heart — hide on mobile, show on desktop hover */
.sew-card__fav {
  display: none;
}
@media (min-width: 768px) {
  .sew-card__fav {
    display: flex;
    flex-shrink: 0;
    width: 28px; height: 28px;
    align-items: center; justify-content: center;
    border-radius: 50%;
    background: transparent;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .sew-card:hover .sew-card__fav { opacity: 1; }
}
.sew-card__fav:hover { background: #eee; }
.sew-card__fav .geodir-addtofav-icon { font-size: 0.8rem !important; }
.sew-card__fav .geodir-fav-text { display: none !important; }

/* Chips (category, type, founded) */
.sew-card__chips {
  display: flex;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding-left: calc(56px + 0.75rem);
}
.sew-card__chip {
  display: inline-block;
  background: #f5f5f5;
  color: var(--sew-dark-600, #1A1A1A);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid rgba(0,0,0,0.04);
}

/* Badge row */
.sew-card__badge-row {
  margin-top: 0.4rem;
  padding-left: calc(56px + 0.75rem);
}
.sew-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #2E7D32;
  padding: 0;
}
.sew-card__badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #43A047;
  flex-shrink: 0;
}

/* ── FILTER TRIGGER BUTTON (mobile) ── */
.sew-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: calc(100% - 24px);
  margin: 0.75rem 12px;
  padding: 0.75rem 1rem;
  background: var(--sew-dark-600, #1A1A1A);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
  position: sticky;
  top: 56px;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sew-filter-trigger:active { opacity: 0.85; }
.sew-filter-trigger svg { stroke: #fff; }
@media (min-width: 769px) {
  .sew-filter-trigger { display: none !important; }
}

/* ── FILTER DRAWER (mobile slide-up) ── */
.sew-filter-drawer {
  position: fixed !important;
  bottom: 0; left: 0; right: 0;
  z-index: 1001;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  padding: 1rem 1.25rem 2rem !important;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80vh;
  overflow-y: auto;
}
.sew-filter-drawer.is-open {
  transform: translateY(0);
}
@media (min-width: 769px) {
  .sew-filter-drawer {
    position: relative !important;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-height: none;
  }
}

/* Filter close button */
.sew-filter-close {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sew-primary-500);
  padding: 0.25rem 0 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0.75rem;
}
@media (min-width: 769px) {
  .sew-filter-close { display: none !important; }
}

/* Filter overlay */
.sew-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.sew-filter-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── HIDE MAP ON MOBILE ── */
@media (max-width: 768px) {
  .sew-map-fullbleed,
  .geodir-map-container,
  [class*="geodir_map"],
  .geodir-map-wrap {
    display: none !important;
  }
}

/* ── Hide original GD card internals ── */
.geodir-category-list-view .card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.sew-card-col .card { display: none !important; }

/* ── GD pagination ── */
.geodir-pagination,
.geodir-loop-paging {
  padding: 1.5rem 12px !important;
  display: flex !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}
.geodir-pagination .page-link,
.geodir-loop-paging a,
.geodir-loop-paging span {
  min-width: 42px; min-height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--sew-dark-600); background: #fff;
  border: 1px solid #e8e8e8;
  text-decoration: none;
}
.geodir-pagination .page-link.active,
.geodir-pagination .page-link:hover,
.geodir-loop-paging a:hover,
.geodir-loop-paging span.current {
  background: var(--sew-primary-500); color: #fff;
  border-color: var(--sew-primary-500);
}

/* ── Sort bar ── */
.geodir-loop-actions {
  padding: 0.5rem 12px;
  font-size: 0.8rem;
}
.geodir-loop-actions select {
  border-radius: 8px; border: 1px solid #e0e0e0;
  padding: 0.4rem 0.75rem; font-size: 0.8rem;
  background: #fff;
}

/* ── No listings ── */
.geodir-info-note,
.geodir-search-no-results {
  text-align: center; padding: 2rem;
  color: #999; font-size: 0.9rem;
}
