/* =========================================
   DIRECTORY PAGE STYLES
   ========================================= */

.directory-page {
  padding-top: var(--nav-height);
}

/* === PAGE HEADER === */
.page-header {
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: var(--dark-2);
}

.page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.page-header p {
  color: var(--gray-1);
  font-size: 0.925rem;
}

.view-toggle {
  display: flex;
  background: var(--dark-3);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.view-btn {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-1);
  font-size: 1rem;
  transition: all var(--duration-fast) var(--ease);
}

.view-btn.active {
  background: var(--dark);
  color: var(--white);
}

/* === SEARCH BAR === */
.search-bar-wrap {
  padding: var(--space-5) 0;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.search-bar {
  position: relative;
  max-width: 680px;
}

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-1);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 16px 13px 48px;
  background: var(--dark-3);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease);
}

.search-input::placeholder { color: var(--gray-2); }

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,58,0.1);
}

/* === DIRECTORY LAYOUT === */
.directory-layout {
  display: flex;
  gap: 0;
  min-height: 80vh;
}

/* === FILTER SIDEBAR === */
.filter-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-6);
  background: var(--dark-2);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  scrollbar-width: thin;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.filter-header h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
}

.filter-clear {
  font-size: 0.78rem;
  color: var(--gold);
  cursor: pointer;
}

.filter-group {
  margin-bottom: var(--space-6);
}

.filter-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white-70);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-group-label::after {
  content: '▾';
  font-size: 0.7rem;
  transition: transform var(--duration-fast) var(--ease);
}

.filter-group.collapsed .filter-group-label::after {
  transform: rotate(-90deg);
}

.filter-group-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.filter-group.collapsed .filter-group-content {
  display: none;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--white-70);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--duration-fast) var(--ease);
}

.filter-check:hover { color: var(--white); }

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.filter-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--gray-2);
  background: var(--dark-4);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.filter-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.filter-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
}

.filter-select option { background: var(--dark-3); }

.filter-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: var(--space-5) 0;
}

/* Active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-4) 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(201,151,58,0.12);
  border: 1px solid rgba(201,151,58,0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--gold-light);
}

.filter-chip-remove {
  cursor: pointer;
  color: var(--gold);
  font-size: 0.9rem;
  line-height: 1;
}

/* === DIRECTORY MAIN === */
.directory-main {
  flex: 1;
  padding: var(--space-6);
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}

.directory-count {
  font-size: 0.875rem;
  color: var(--gray-1);
}

.directory-count strong {
  color: var(--white);
  font-weight: 700;
}

.sort-select {
  padding: 8px 36px 8px 14px;
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B8B9A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
}

.sort-select option { background: var(--dark-3); }

.artists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.artists-grid.list-view {
  grid-template-columns: 1fr;
}

.artists-grid.list-view .artist-card {
  display: flex;
  flex-direction: row;
}

.artists-grid.list-view .artist-card-photo {
  width: 120px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

/* Mobile filter toggle */
.filter-mobile-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--dark-3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.filter-badge-count {
  background: var(--gold);
  color: var(--dark);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === LOAD MORE === */
.load-more-wrap {
  text-align: center;
  padding: var(--space-8) 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .artists-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .filter-sidebar {
    position: fixed;
    left: -100%;
    top: var(--nav-height);
    width: 85%;
    max-width: 320px;
    height: calc(100vh - var(--nav-height));
    z-index: 900;
    transition: left var(--duration-slow) var(--ease);
    box-shadow: var(--shadow-lg);
  }
  
  .filter-sidebar.open { left: 0; }
  
  .filter-mobile-toggle { display: flex; }
  
  .directory-layout {
    flex-direction: column;
  }
  
  .directory-main { padding: var(--space-4); }
  
  .artists-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  
  .page-header-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .artists-grid { grid-template-columns: 1fr; }
}
