/* Dense marketplace layout: filters and rankings use the full width, cards get the space. */
.ui-member-page .catalog-page {
  padding: clamp(18px, 2.4vw, 34px) clamp(18px, 3vw, 52px) 48px;
}
.ui-member-page .catalog-head {
  margin-bottom: 16px;
  align-items: center;
}
.ui-member-page .catalog-head h1 {
  margin: 0 0 5px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
}
.ui-member-page .catalog-head .muted {
  max-width: 760px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}
.ui-member-page .catalog-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ui-member-page .catalog-sidebar,
.ui-member-page .catalog-ranking {
  position: static;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border-radius: 13px;
}
.ui-member-page .catalog-sidebar {
  order: 1;
}
.ui-member-page .catalog-main {
  order: 3;
}
.ui-member-page .catalog-ranking {
  order: 2;
}
.ui-member-page .catalog-sidebar h3,
.ui-member-page .catalog-ranking h3 {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.ui-member-page .catalog-sidebar h3 {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-right: 10px;
}
.ui-member-page .catalog-category-list {
  display: inline-flex;
  max-width: calc(100% - 78px);
  vertical-align: middle;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ui-member-page .catalog-category-list::-webkit-scrollbar { display: none; }
.ui-member-page .catalog-category-list button {
  flex: 0 0 auto;
  width: auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
}
.ui-member-page .catalog-category-list button.active {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.ui-member-page .catalog-category-list small { margin-left: 4px; }
.ui-member-page .catalog-ranking .ranking-heading {
  margin-bottom: 8px;
}
.ui-member-page .catalog-ranking .ranking-heading h3 {
  font-size: 12px;
}
.ui-member-page .catalog-ranking .ranking-view-toggle { display: none; }
.ui-member-page .catalog-ranking .ranking-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  width: min(100%, 280px);
  margin: 0 0 0 12px;
  padding: 3px;
  vertical-align: middle;
}
.ui-member-page .catalog-ranking .ranking-tabs button {
  min-height: 27px;
  padding: 5px 8px;
  font-size: 10px;
}
.ui-member-page .catalog-ranking .ranking-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}
.ui-member-page .catalog-ranking .ranking-item {
  min-width: 0;
  grid-template-columns: 21px 30px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 9px;
}
.ui-member-page .catalog-ranking .ranking-item .agent-avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.ui-member-page .catalog-ranking .ranking-item strong { font-size: 11px; }
.ui-member-page .catalog-ranking .ranking-item small { font-size: 9px; }
.ui-member-page .catalog-ranking .ranking-value { padding: 4px 5px; font-size: 8px; }
.ui-member-page .catalog-ranking .ranking-description,
.ui-member-page .catalog-ranking .ranking-stats,
.ui-member-page .catalog-ranking .ranking-tooltip { display: none !important; }
.ui-member-page .catalog-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.ui-member-page .catalog-controls input,
.ui-member-page .catalog-controls select {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 11px;
}
.ui-member-page .catalog-controls select {
  min-width: 116px;
  padding-right: 32px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.ui-member-page .catalog-count { font-size: 11px; }
.ui-member-page .catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ui-member-page .catalog-card {
  gap: 9px;
  padding: 14px;
  border-radius: 13px;
}
.ui-member-page .catalog-card h3 {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ui-member-page .catalog-card p {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ui-member-page .catalog-output-badges { gap: 5px; }
.ui-member-page .catalog-output-badges span {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 9px;
}
.ui-member-page .catalog-meta { min-width: 0; font-size: 9px; }
.ui-member-page .catalog-meta span { min-width: 0; overflow-wrap: anywhere; }
.ui-member-page .catalog-access-status { min-width: 0; overflow-wrap: anywhere; }
.ui-member-page .catalog-prices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  grid-auto-rows: 55px;
}
.ui-member-page .catalog-prices > span,
.ui-member-page .catalog-price-option {
  height: 55px;
  min-height: 0 !important;
  max-height: 55px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 10px;
  box-sizing: border-box;
  overflow: hidden;
}
.ui-member-page .catalog-price-option { grid-template-columns: auto minmax(0, 1fr) 10px; gap: 3px; }
.ui-member-page .catalog-price-option span { font-size: 9px; }
.ui-member-page .catalog-price-option b { font-size: 10px; }
.ui-member-page .catalog-access-status {
  min-height: 15px;
  font-size: 10px;
}
.ui-member-page .catalog-actions-main { gap: 6px; }
.ui-member-page .catalog-actions-main .button {
  min-height: 32px;
  padding: 6px 7px;
  font-size: 10px;
}
@media (max-width: 1100px) {
  .ui-member-page .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ui-member-page .catalog-ranking .ranking-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ui-member-page .catalog-head { display: block; }
  .ui-member-page .catalog-head .muted { margin-top: 8px; }
  .ui-member-page .catalog-sidebar h3 { display: block; margin: 0 0 6px; }
  .ui-member-page .catalog-category-list { display: flex; max-width: 100%; }
  .ui-member-page .catalog-ranking .ranking-heading { display: inline-flex; }
  .ui-member-page .catalog-ranking .ranking-tabs { display: grid; margin: 0 0 0 8px; }
  .ui-member-page .catalog-ranking .ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-member-page .catalog-controls { flex-wrap: wrap; }
  .ui-member-page .catalog-controls input { flex: 1 1 100%; }
  .ui-member-page .catalog-controls select { flex: 1; }
  .ui-member-page .catalog-grid,
  .ui-member-page .catalog-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .ui-member-page .catalog-grid { grid-template-columns: 1fr; }
}

/* Keep summaries compact, but make the full copy available on hover/focus. */
.ui-member-page .catalog-card > p.catalog-description {
  position: relative;
  cursor: help;
  display: block;
  overflow: visible;
}
.ui-member-page .catalog-description-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: inherit;
  overflow-wrap: anywhere;
}
.ui-member-page .catalog-card > p.catalog-description:hover,
.ui-member-page .catalog-card > p.catalog-description:focus {
  z-index: 5;
}
.ui-member-page .catalog-card > p.catalog-description:hover::after,
.ui-member-page .catalog-card > p.catalog-description:focus::after {
  content: attr(title);
  position: absolute;
  z-index: 10;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 48px));
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 30px #17263826;
  font-size: 11px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}
/* Use the native title tooltip for full descriptions; avoid a large overlay
   covering neighboring marketplace cards. */
.ui-member-page .catalog-card > p.catalog-description:hover::after,
.ui-member-page .catalog-card > p.catalog-description:focus::after {
  display: none !important;
}
.ui-member-page .catalog-prices.is-static > span,
.ui-member-page .catalog-price-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  min-width: 0;
}
.ui-member-page .catalog-prices.is-static > span {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0 !important;
}
.ui-member-page .catalog-prices.is-static > span .price-period,
.ui-member-page .catalog-prices.is-static > span .price-value,
.ui-member-page .catalog-prices.is-static > span .price-number,
.ui-member-page .catalog-prices.is-static > span .price-unit {
  margin: 0 !important;
  line-height: 1 !important;
}
.ui-member-page .catalog-prices.is-empty {
  min-height: 50px;
  visibility: hidden;
  pointer-events: none;
}
.ui-member-page .catalog-prices.is-empty ~ .catalog-actions-main a[href*="trial=1"] {
  display: none;
}
.ui-member-page .catalog-prices.is-static > span .price-period,
.ui-member-page .catalog-price-option > span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.ui-member-page .catalog-prices.is-static > span .price-value,
.ui-member-page .catalog-price-option > b {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ui-member-page .catalog-price-option > b { overflow: visible !important; text-overflow: clip !important; }
.ui-member-page .price-number { display: block; font-size: 10px; font-weight: 800; line-height: 1; white-space: nowrap; }
.ui-member-page .price-unit { display: block; color: var(--muted); font-size: 8px; font-weight: 700; line-height: 1; white-space: nowrap; }
.ui-member-page .catalog-price-option {
  position: relative;
  padding-right: 25px;
}
.ui-member-page .catalog-price-option > i {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}
@media (max-width: 720px) {
  .ui-member-page .catalog-card h3 { font-size: 16px; }
  .ui-member-page .catalog-card p { font-size: 10px; }
  .ui-member-page .catalog-meta { font-size: 9px; }
  .ui-member-page .catalog-access-status { font-size: 9px; }
  .ui-member-page .catalog-prices.is-static > span,
  .ui-member-page .catalog-price-option,
  .ui-member-page .catalog-prices.is-empty { height: 70px; min-height: 0 !important; max-height: 70px; }
  .ui-member-page .price-number { font-size: 12px; }
  .ui-member-page .price-unit { font-size: 9px; }
}

/* Keep the static price cells compact: the value wrapper must not stretch
   between the period, number, and credit unit. */
.ui-member-page .catalog-prices.is-static > span {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 1px !important;
}
.ui-member-page .catalog-prices.is-static > span .price-period,
.ui-member-page .catalog-prices.is-static > span .price-number,
.ui-member-page .catalog-prices.is-static > span .price-unit {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
}
.ui-member-page .catalog-prices.is-static > span .price-value {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}
.ui-member-page .catalog-prices.is-static > span .price-number,
.ui-member-page .catalog-prices.is-static > span .price-unit {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* Button columns follow the buttons that are actually visible. */
.ui-member-page .catalog-actions-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  align-items: stretch;
}
.ui-member-page .catalog-actions-main .button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ui-member-page .catalog-actions-main > * {
  grid-column: auto !important;
}
@media (max-width: 700px) {
  .ui-member-page .catalog-actions-main {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .ui-member-page .catalog-actions-main:has(>:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
