.catalog-page {
  width: min(100%, 800px);
  margin-inline: auto;
  padding: 16px clamp(16px, 5vw, 36px) 36px;
}

.catalog-back,
.catalog-view-all,
.catalog-row-link,
.catalog-share button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.catalog-back {
  margin-bottom: 8px;
  color: #484161;
  font-size: 14px;
  font-weight: 600;
}

.catalog-back svg,
.catalog-view-all svg,
.catalog-row-link svg,
.catalog-share button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.catalog-heading {
  margin-bottom: 24px;
}

.catalog-heading :is(h1, h2) {
  margin: 0;
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.038em;
  overflow-wrap: anywhere;
}

.catalog-heading p {
  margin: 10px 0 0;
  color: #555362;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalog-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: clamp(12px, 4vw, 20px);
  border: 1px solid #e4e3ea;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.catalog-category-icon {
  margin-bottom: 5px;
}

.catalog-tile-title {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
}

.catalog-tile-description {
  color: #555362;
  font-size: 13px;
  line-height: 1.35;
}

.catalog-view-all {
  margin: -4px 0 14px;
  padding: 0 16px;
  border-radius: 22px;
  background: #eeedf4;
  font-size: 15px;
  font-weight: 700;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 24px;
}

.catalog-filters a {
  display: grid;
  min-height: 44px;
  max-width: 100%;
  place-items: center;
  padding: 0 clamp(9px, 3vw, 16px);
  border-radius: 22px;
  color: #484161;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.catalog-filters [aria-current] {
  background: #eeedf4;
  color: #171421;
}

.catalog-list {
  display: grid;
  gap: 22px;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(100px, 39%) minmax(0, 1fr);
  align-items: start;
  gap: clamp(10px, 3vw, 22px);
}

.catalog-row-image {
  --profile-card-radius: 16px;
  display: block;
  min-width: 0;
  text-decoration: none;
}

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

.catalog-row-body {
  min-width: 0;
  position: relative;
  padding-top: 6px;
}

.catalog-row-body:not(:has(h2)) { padding-top: 37px; }

.catalog-row-body :is(h2, p) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-row-body h2 {
  -webkit-line-clamp: 2;
  margin: 0;
  padding-right: 40px;
  font-size: clamp(14px, 4.2vw, 20px);
  font-weight: 750;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.catalog-row-body p {
  -webkit-line-clamp: 4;
  margin: 8px 0 2px;
  color: #555362;
  font-size: 14px;
  line-height: 1.4;
}

.catalog-favorite {
  position: absolute;
  top: -7px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777380;
  cursor: pointer;
}

.catalog-favorite svg {
  width: 21px;
  height: 21px;
}

.catalog-favorite[aria-pressed="true"] { color: var(--accent); }
.catalog-favorite[aria-pressed="true"] svg { fill: currentColor; }
.catalog-favorite[aria-busy="true"] { opacity: .55; cursor: wait; }

.catalog-favorites-status {
  margin: 0;
  color: #555362;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.catalog-favorites-status:not(:empty) { margin-bottom: 12px; }
.catalog-favorites-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.catalog-favorites-actions .catalog-view-all { margin: 0; }
.catalog-favorites-empty .catalog-view-all { margin-top: 14px; }
.catalog-favorites-actions button, [data-favorites-retry] { border: 0; cursor: pointer; }
.catalog-page :is([data-favorites-private], [data-favorites-empty], [data-favorites-retry])[hidden] { display: none; }

.catalog-row-link {
  gap: 4px;
  font-size: clamp(12px, 3.5vw, 15px);
  font-weight: 700;
}

.catalog-row-link svg {
  width: 14px;
  height: 14px;
}

.catalog-empty h2,
.catalog-profile-section h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.catalog-empty p,
.catalog-profile-section p,
.catalog-profile-section ul {
  margin: 0;
  color: #555362;
  line-height: 1.5;
}

.catalog-profile-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.catalog-profile-top {
  position: relative;
  padding-right: 44px;
}

.catalog-profile-top .catalog-favorite {
  top: 0;
}

.catalog-profile-image {
  width: min(100%, 360px);
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #eeedf4;
}

.catalog-place-photo { margin: 0; }
.catalog-place-photo .catalog-profile-image { aspect-ratio: auto; }
.catalog-place-photo figcaption { margin-top: 6px; color: #555362; font-size: 12px; line-height: 1.4; }
.catalog-place-photo figcaption a { text-underline-offset: 2px; }

.catalog-profile-section,
.catalog-profile-details,
.catalog-share {
  margin-top: 24px;
}

.catalog-profile-section { overflow-wrap: anywhere; }

.catalog-profile-section ul {
  padding-inline-start: 21px;
  margin-top: 8px;
}

.catalog-profile-section .catalog-contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.catalog-contact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid #e8e5ef;
  border-radius: 12px;
  background: #f7f6fa;
  color: inherit;
  text-decoration: none;
}

a.catalog-contact:hover { border-color: #bcb5cc; }
.catalog-contact-text { display: grid; min-width: 0; overflow-wrap: anywhere; }
.catalog-contact-text strong { color: var(--ink); font-size: 14px; }
.catalog-contact-text > span { font-size: 15px; }
.catalog-contact svg { flex: 0 0 17px; width: 17px; height: 17px; }
.catalog-contact-list + .catalog-profile-note { margin-top: 10px; }

.catalog-profile-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  gap: 10px;
  margin-top: 10px;
}

.catalog-profile-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  object-fit: cover;
}

.catalog-profile-details {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #f4f3f8;
}

.catalog-profile-details dt {
  font-weight: 700;
}

.catalog-profile-details dd {
  margin: 4px 0 0;
  color: #555362;
}

.catalog-profile-note {
  color: #555362;
  font-size: 13px;
}

.catalog-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.catalog-share button {
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  background: #eeedf4;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.catalog-share [role="status"] {
  color: #555362;
  font-size: 14px;
}

@media (hover: hover) {
  .catalog-tile:hover {
    border-color: #c4c0d2;
    background: #fbfaff;
  }

  .catalog-back:hover,
  .catalog-row-link:hover {
    text-decoration: underline;
  }
}
