/* listing.css - shared for Products / Case Studies / Systems */

.search-section {
  max-width: 900px;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px var(--shadow-color);
}

.search-container {
  align-items: center;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.search-box {
  flex-grow: 1;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 0.75rem;
  color: var(--input-text);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-size: 1rem;
}

.btn {
  display: inline-block;
  background-color: var(--success);
  color: var(--text-inverse);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-top: auto;
}

.btn:hover {
  background-color: var(--success-hover);
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.category-btn {
  background-color: var(--surface-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
  background-color: var(--accent);
  color: var(--text-inverse);
}

/* GRID */
.listing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* CARD */
.listing-card {
  background-color: var(--surface-bg);
  color: var(--text-muted);
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 20px var(--shadow-color);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px var(--shadow-color-strong);
}

/* IMAGE */
.listing-image {
  width: 100%;
  height: 200px;
  background-color: var(--image-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* INFO */
.listing-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.listing-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.listing-category {
  display: inline-block;
  background-color: var(--accent);
  color: var(--text-inverse);
  border-radius: 50px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.hidden {
  display: none;
}

.no-results {
  text-align: center;
  padding: 2rem;
  font-size: 1.2rem;
  color: var(--text-subtle);
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .logo {
    width: 100px;
  }

  .listing {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .search-container {
    flex-direction: column;
  }
}
