/* Catalog-first marketplace home */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mp-catalog-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 0 24px;
  border-bottom: 1px solid #e6e7f4;
  background:
    radial-gradient(circle at 8% 20%, rgba(99, 80, 255, .12), transparent 25%),
    radial-gradient(circle at 91% 85%, rgba(95, 144, 255, .12), transparent 27%),
    linear-gradient(110deg, #fbfaff 0%, #f2f5ff 57%, #f7f9ff 100%);
}

.mp-catalog-hero::before,
.mp-catalog-hero::after {
  content: '';
  position: absolute;
  width: 118px;
  height: 118px;
  opacity: .42;
  background-image: radial-gradient(#8175ff 1.25px, transparent 1.25px);
  background-size: 10px 10px;
  pointer-events: none;
}

.mp-catalog-hero::before { left: -8px; top: 8px; }
.mp-catalog-hero::after { right: 6px; bottom: -10px; }

.mp-catalog-hero .mp-wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.mp-catalog-hero h1 {
  margin: 0;
  color: var(--mp-ink);
  font-size: clamp(32px, 4.1vw, 48px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.mp-catalog-hero > .mp-wrap > p {
  margin: 8px auto 17px;
  color: #61708a;
  font-size: 15px;
}

.mp-catalog-search {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  width: min(800px, 100%);
  margin: 0 auto;
  padding: 4px;
  border: 1px solid #d7dcec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(34, 45, 90, .07);
}

.mp-search-icon {
  color: #697891;
  font-size: 24px;
  line-height: 1;
  transform: rotate(-18deg);
}

.mp-catalog-search input {
  min-width: 0;
  height: 42px;
  padding: 0 8px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--mp-ink);
  font: inherit;
}

.mp-catalog-search input::placeholder { color: #9aa5ba; }

.mp-catalog-search:focus-within {
  border-color: #6c5cff;
  box-shadow: 0 0 0 3px rgba(92, 70, 245, .12), 0 9px 28px rgba(34, 45, 90, .08);
}

.mp-catalog-search button {
  min-width: 108px;
  height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #6841ff, #5132e5);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 13px rgba(88, 58, 235, .24);
}

.mp-popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
}

.mp-popular-searches > span { color: #66728a; }

.mp-popular-searches a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid #dbe0ec;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #1f2b43;
  font-weight: 750;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.mp-popular-searches a span { color: #694eff; }
.mp-popular-searches a:hover { border-color: #8c7cff; color: #5132e5; transform: translateY(-1px); }

.mp-catalog-section {
  padding: 28px 0 58px;
  background: #fff;
}

.mp-catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.mp-catalog-heading h2 {
  margin: 0;
  color: var(--mp-ink);
  font-size: clamp(24px, 2.4vw, 31px);
  letter-spacing: -.03em;
}

.mp-catalog-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #5d47ec;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mp-catalog-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-catalog-controls > span {
  margin-right: 4px;
  color: #536078;
  font-size: 12px;
  font-weight: 700;
}

.mp-sort-form select,
.mp-filter-button {
  height: 40px;
  border: 1px solid #d8deea;
  border-radius: 8px;
  background: #fff;
  color: #17233b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.mp-sort-form select {
  min-width: 160px;
  padding: 0 36px 0 13px;
  cursor: pointer;
}

.mp-filter-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  cursor: pointer;
}

.mp-filter-button b {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6248ef;
}

.mp-system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mp-system-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 23px rgba(22, 38, 66, .055);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.mp-system-card:hover {
  transform: translateY(-3px);
  border-color: #c7c0fa;
  box-shadow: 0 15px 34px rgba(22, 38, 66, .1);
}

.mp-system-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9.5;
  background: linear-gradient(145deg, #eef0f8, #e4e8f5);
  color: #76829a;
  text-decoration: none;
}

.mp-system-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.mp-system-card:hover .mp-system-image img { transform: scale(1.018); }

.mp-system-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.mp-system-type {
  overflow: hidden;
  color: #654def;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mp-system-card h3 {
  margin: 6px 0 7px;
  font-size: 17px;
  line-height: 1.22;
  letter-spacing: -.015em;
}

.mp-system-card h3 a { color: var(--mp-ink); text-decoration: none; }

.mp-system-card p {
  display: -webkit-box;
  min-height: 54px;
  margin: 0;
  overflow: hidden;
  color: #637087;
  font-size: 12px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.mp-system-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.mp-system-tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid #e0e4ec;
  border-radius: 999px;
  background: #f9fafc;
  color: #3e4a60;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-system-price {
  margin-top: auto;
  padding-top: 13px;
  color: #142139;
  font-size: 15px;
  font-weight: 900;
}

.mp-system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: #09805d;
  font-size: 10px;
  font-weight: 750;
}

.mp-system-status span {
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  background: #def7ec;
  font-size: 9px;
}

.mp-system-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 12px;
  border: 1px solid #765fff;
  border-radius: 7px;
  color: #5435eb;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.mp-system-cta:hover { background: #5c42ee; color: #fff; }

.mp-catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  color: #68758c;
  font-size: 12px;
}

.mp-catalog-pagination a {
  padding: 8px 13px;
  border: 1px solid #d9deea;
  border-radius: 8px;
  color: #5136e7;
  font-weight: 800;
  text-decoration: none;
}

.mp-search-priority {
  margin-bottom: 31px;
  padding-bottom: 27px;
  border-bottom: 1px solid #e6e9f0;
}

.mp-search-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mp-search-links > a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  min-height: 145px;
  padding: 15px;
  border: 1px solid #dfe3ed;
  border-radius: 11px;
  background: linear-gradient(145deg, #fff, #fafaff);
  text-decoration: none;
}

.mp-search-links span,
.mp-related-marketplace a span {
  color: #654def;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mp-search-links strong {
  margin-top: 6px;
  color: var(--mp-ink);
  font-size: 16px;
}

.mp-search-links small {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #657188;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mp-search-links b {
  margin-top: auto;
  padding-top: 10px;
  color: #5435eb;
  font-size: 10px;
}

.mp-related-marketplace {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #e0e4ed;
  border-radius: 12px;
  background: #fafbff;
}

.mp-related-marketplace h3 { margin: 0 0 12px; color: var(--mp-ink); font-size: 17px; }
.mp-related-marketplace > div { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-related-marketplace a { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border: 1px solid #dfe3eb; border-radius: 8px; background: #fff; text-decoration: none; }
.mp-related-marketplace a strong { color: #24314a; font-size: 11px; }

.mp-catalog-empty {
  padding: 38px 24px;
  border: 1px dashed #c8cfea;
  border-radius: 12px;
  background: #fbfbff;
  text-align: center;
}

.mp-catalog-empty strong { color: var(--mp-ink); font-size: 18px; }
.mp-catalog-empty p { color: #657188; }
.mp-catalog-empty div { display: flex; justify-content: center; gap: 9px; }
.mp-catalog-empty a { padding: 9px 13px; border: 1px solid #7057f5; border-radius: 8px; color: #563ce6; font-size: 12px; font-weight: 800; text-decoration: none; }

.mp-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(14, 22, 39, .36);
  backdrop-filter: blur(2px);
}

.mp-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9999;
  width: min(390px, 100%);
  height: 100dvh;
  overflow-y: auto;
  padding: 22px;
  border-left: 1px solid #dfe3eb;
  background: #fff;
  box-shadow: -18px 0 50px rgba(20, 31, 54, .16);
  transform: translateX(105%);
  transition: transform .22s ease;
  box-sizing: border-box;
}

.mp-filter-drawer.is-open { transform: translateX(0); }
.mp-filter-open { overflow: hidden; }

.mp-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mp-filter-head h2 { margin: 0; color: var(--mp-ink); font-size: 22px; }
.mp-filter-head button { width: 36px; height: 36px; border: 1px solid #dce1ea; border-radius: 8px; background: #fff; color: #455168; font-size: 24px; cursor: pointer; }

.mp-filter-drawer form > label,
.mp-filter-drawer legend {
  display: block;
  margin: 18px 0 7px;
  color: #1c2940;
  font-size: 12px;
  font-weight: 850;
}

.mp-filter-drawer select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d8deea;
  border-radius: 8px;
  background: #fff;
  color: #344159;
  font: inherit;
  font-size: 12px;
}

.mp-filter-drawer fieldset { margin: 18px 0 0; padding: 0; border: 0; }
.mp-filter-drawer fieldset legend { margin-top: 0; }
.mp-filter-drawer fieldset label { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #3c485e; font-size: 12px; }
.mp-filter-drawer input[type='radio'] { width: 16px; height: 16px; accent-color: #5c42ee; }

.mp-filter-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e8ef;
}

.mp-filter-actions a { color: #5b43e7; font-size: 11px; font-weight: 800; text-decoration: none; }
.mp-filter-actions button { min-height: 44px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #6841ff, #5132e5); color: #fff; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }

@media (max-width: 1080px) {
  .mp-system-grid,
  .mp-search-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 790px) {
  .mp-catalog-hero { padding-top: 26px; }
  .mp-catalog-heading { align-items: flex-start; flex-direction: column; }
  .mp-catalog-controls { width: 100%; flex-wrap: wrap; }
  .mp-catalog-controls > span { margin-right: auto; }
  .mp-system-grid,
  .mp-search-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .mp-catalog-hero::before,
  .mp-catalog-hero::after { display: none; }
  .mp-catalog-hero h1 { font-size: 32px; }
  .mp-catalog-search { grid-template-columns: 34px minmax(0, 1fr); }
  .mp-catalog-search button { grid-column: 1 / -1; width: 100%; margin-top: 2px; }
  .mp-popular-searches { justify-content: flex-start; }
  .mp-popular-searches > span { width: 100%; text-align: left; }
  .mp-system-grid,
  .mp-search-links { grid-template-columns: 1fr; }
  .mp-sort-form { flex: 1; }
  .mp-sort-form select { width: 100%; min-width: 0; }
  .mp-filter-button { flex: 1; justify-content: center; }
  .mp-catalog-controls > span { width: 100%; }
  .mp-catalog-pagination { justify-content: space-between; }
  .mp-catalog-empty div { align-items: stretch; flex-direction: column; }
  .mp-filter-drawer { padding: 18px; }
}
