/* ==== Designs Page Layout ==== */
.designs-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin: 40px auto;
  max-width: 1400px;
  padding: 0 20px;
}

@media (min-width: 1020px) {
  .designs-layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

/* ==== Filter Sidebar ==== */
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 90px;
  height: fit-content;
  transition: all 0.3s ease;
}

/* Disable sticky on mobile for smooth scroll */
@media (max-width: 768px) {
  .filters {
    position: static;
    top: auto;
  }
}

/* ==== Search Bar ==== */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: 0.3s ease;
}

.search:hover,
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.15);
}

.search i {
  color: var(--accent);
  font-size: 1.1rem;
}

.search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text);
}

/* ==== Filter Groups ==== */
.filter-group {
  margin-top: 24px;
}

.filter-group h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.1);
}

/* ==== Tags Styling ==== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags .tag,
.tags button {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.3s ease;
  color: var(--text);
}

.tags .tag:hover,
.tags button:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(78, 84, 200, 0.15);
}

/* ==== Reset Filters Button ==== */
.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-ghost:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 84, 200, 0.25);
}

/* ==== Results Header ==== */
.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  background: var(--card);
}

.sort select,
.filter-group select {
  border: none;
  background: transparent;
  color: var(--text);
}

#sortSelect {
  min-width: 120px;
  border: none;
  background: transparent;
  color: var(--text);
}

/* ==== Card Grid Layout (3 per row) ==== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 20px;
  width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ==== Individual Card Styling ==== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: #f4f4f4;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 16px 16px 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 16px 20px;
}

/* ==== Hover Effects ==== */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: transparent;
}

/* ==== Responsive Images ==== */
@media (max-width: 768px) {
  .card img {
    height: 160px;
  }
}
