.directory-page {
  padding: var(--v2-space-5) var(--v2-space-4) var(--v2-space-8);
}

.directory-page__inner {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.directory-page__hero {
  display: grid;
  gap: var(--v2-space-1);
  margin-bottom: var(--v2-space-5);
}

.directory-page__title {
  margin: 0;
  font-family: var(--v2-font-display);
  font-size: var(--v2-text-xl);
  font-weight: 600;
  color: var(--v2-color-primary);
}

.directory-page__lead {
  margin: 0;
  font-size: var(--v2-text-sm);
  line-height: 1.45;
  color: var(--v2-color-text-muted);
}

.directory-page__all-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: var(--v2-space-1);
  font-size: var(--v2-text-sm);
  font-weight: 600;
  color: var(--v2-color-primary);
  text-decoration: none;
}

.directory-page__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--v2-space-4);
}

.directory-page__related {
  margin-top: var(--v2-space-6);
}

.directory-page__empty {
  display: grid;
  gap: var(--v2-space-2);
  padding: var(--v2-space-5);
  border: 1px solid color-mix(in srgb, var(--v2-color-primary) 12%, var(--v2-color-border));
  border-radius: var(--v2-radius-sm);
  background: var(--v2-color-surface);
  box-shadow: var(--v2-shadow-sm);
}

.directory-page__empty-title {
  margin: 0;
  font-size: var(--v2-text-sm);
  font-weight: 700;
  color: var(--v2-color-text);
}

.directory-page__empty-copy {
  margin: 0;
  font-size: var(--v2-text-sm);
  line-height: 1.5;
  color: var(--v2-color-text-muted);
}

.directory-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--v2-radius-sm);
  background: var(--v2-color-surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
}

.directory-card__media-wrap {
  position: relative;
  aspect-ratio: 1 / 0.78;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--v2-color-primary) 8%, #eef5f6);
}

.directory-card__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-card__media-wrap--brand {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  padding: var(--v2-space-4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.96)),
    color-mix(in srgb, var(--v2-color-primary) 6%, #f6fbfb);
}

.directory-card__media--brand {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.directory-card.is-empty .directory-card__media {
  opacity: 0.22;
  filter: saturate(0.45);
}

.directory-card--brand.is-empty .directory-card__media--brand {
  opacity: 0.18;
  filter: grayscale(1);
}

.directory-card__empty-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 118px;
  padding: var(--v2-space-2) var(--v2-space-4);
  border-radius: 999px;
  background: var(--v2-color-surface);
  backdrop-filter: blur(8px);
  font-size: var(--v2-text-xs);
  white-space: nowrap;
  text-align: center;
  color: var(--v2-color-danger);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.directory-card__body {
  display: grid;
  padding: var(--v2-space-3);
  box-shadow: var(--v2-shadow-sm);
  border-top: 1px solid color-mix(in srgb, var(--v2-color-primary) 12%, transparent);
}

.directory-card__title {
  margin: 0;
  font-size: var(--v2-text-md);
  font-weight: 700;
  color: var(--v2-color-primary);
}

.directory-card__meta {
  font-size: var(--v2-text-sm);
  color: var(--v2-color-text-muted);
}

@media (min-width: 768px) {
  .directory-page {
    padding-inline: var(--v2-space-5);
    padding-bottom: var(--v2-space-9);
  }

  .directory-page__hero {
    gap: var(--v2-space-2);
    margin-bottom: var(--v2-space-6);
  }

  .directory-page__title {
    font-size: var(--v2-text-2xl);
  }

  .directory-page__lead {
    font-size: var(--v2-text-md);
  }

  .directory-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--v2-space-5);
  }

  .directory-page__related {
    margin-top: var(--v2-space-7);
  }

  .directory-card {
    border-radius: var(--v2-radius-sm);
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .directory-card__title{
    font-size: var(--v2-text-lg);
  }

  .directory-card__media-wrap--brand {
    padding: var(--v2-space-5);
  }

  .directory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  }

  .directory-card__body {
    gap: var(--v2-space-2);
    padding: var(--v2-space-4);
  }
}

@media (min-width: 1024px) {
  .directory-page {
    padding-inline: var(--v2-space-6);
  }

  .directory-page__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
