*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}

.page {
  min-height: 100vh;
  padding: 20px 24px 32px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header__brand {
  max-width: 640px;
}

.logo {
  display: inline-block;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
}

.page-header__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 0.8rem;
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #0f766e;
  color: #e0f2f1;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.hint {
  color: #6b7280;
  max-width: 240px;
  text-align: right;
}

/* Layout */

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: flex-start;
}

/* Filters */

.filters__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.filters__block {
  margin-bottom: 18px;
}

.filters__block--muted {
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
}

.filters__label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.filters__hint {
  font-size: 0.78rem;
  color: #6b7280;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: #fff;
  cursor: pointer;
}

.pill--active {
  background: #0f766e;
  border-color: #0f766e;
  color: #e0f2f1;
}

.select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  font-size: 0.85rem;
  background: #fff;
}

/* Content */

.content-header__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

.content-header__subtitle {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #4b5563;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.empty-state {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Catalog card */

.catalog-card {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 14px 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog-card__preview {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #e5e7eb;
  aspect-ratio: 16 / 9;
  margin: -4px -4px 6px;
}

.catalog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.catalog-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.catalog-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.catalog-card__title a {
  text-decoration: none;
  color: #1f2933;
}

.catalog-card__title a:hover {
  text-decoration: underline;
}

.catalog-card__badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

.catalog-card__badge[data-price="free"] {
  background: #ecfdf3;
  border-color: #16a34a33;
}

.catalog-card__badge[data-price="cheap"] {
  background: #eff6ff;
  border-color: #3b82f633;
}

.catalog-card__badge[data-price="ok"] {
  background: #fef9c3;
  border-color: #eab30833;
}

.catalog-card__badge[data-price="expensive"] {
  background: #fef2f2;
  border-color: #ef444433;
}

.catalog-card__description {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.catalog-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 12px;
  margin: 0;
  font-size: 0.8rem;
}

.catalog-card__meta dt {
  font-weight: 600;
  color: #64748b;
}

.catalog-card__meta dd {
  margin: 0;
  color: #111827;
}

.catalog-card__footer {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.catalog-card__reputation {
  color: #475569;
}

.catalog-card__btn {
  border-radius: 999px;
  border: none;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  background: #0f766e;
  color: #fff;
}

.catalog-card__btn:hover {
  background: #0d4f4a;
}

/* Aside */

.request-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 16px 18px;
  font-size: 0.85rem;
}

.request-card__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.request-card__text {
  margin: 0 0 12px;
  color: #4b5563;
}

.request-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field span {
  font-size: 0.78rem;
  color: #6b7280;
}

.field input,
.field select,
.field textarea {
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  font-size: 0.82rem;
  background: #f9fafb;
}

.request-form__btn {
  margin-top: 4px;
  border-radius: 999px;
  border: none;
  padding: 8px 12px;
  background: #0f766e;
  color: #f9fafb;
  font-size: 0.85rem;
  cursor: pointer;
}

.request-form__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.request-card__hint {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Responsive */

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout__filters {
    order: 1;
  }

  .layout__content {
    order: 0;
  }

  .layout__aside {
    order: 2;
  }

  .page-header__meta {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 14px 12px 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
