/* Marketplace catalog visual system.
   Reuses homepage tokens from assets/home.css (body.home-page).
   Footer/header chrome is also reused by body.site-detail-shell. */

html:has(body.marketplace-shell),
html:has(body.site-detail-shell) {
  overflow-x: clip;
}

body.home-page.marketplace-shell,
body.home-page.site-detail-shell {
  --container: 1240px;
}

body.marketplace-shell .header__user,
body.site-detail-shell .header__user {
  color: #fff;
}

body.marketplace-shell .menu-toggle,
body.site-detail-shell .menu-toggle {
  border-color: rgba(255, 255, 255, 0.12);
}

body.marketplace-shell .public-page.marketplace-page {
  min-height: 0;
  padding: 8px 0 6px;
  background:
    radial-gradient(ellipse 42% 48% at 88% 0%, rgba(124, 58, 237, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 28% 34% at 72% 18%, rgba(34, 211, 238, 0.08) 0%, transparent 68%);
}

body.marketplace-shell .breadcrumbs {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--home-muted);
}

body.marketplace-shell .breadcrumbs a {
  color: #c5cbe0;
}

body.marketplace-shell .breadcrumbs a:hover,
body.marketplace-shell .breadcrumbs a:focus-visible {
  color: #fff;
  text-decoration: underline;
  outline: none;
}

body.marketplace-shell .mp-hero {
  max-width: min(52rem, 100%);
  margin: 0 0 8px;
}

body.marketplace-shell .mp-hero__eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-lime);
}

body.marketplace-shell .marketplace-title {
  margin: 0 0 4px;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: #fff;
}

body.marketplace-shell .marketplace-subtitle {
  max-width: 44rem;
  margin: 0;
  font-size: 15px;
  line-height: 1.32;
  color: var(--home-muted);
}

body.marketplace-shell .marketplace-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 8px 12px;
  margin: 0 0 8px;
  padding: 8px 12px;
  background: rgba(18, 19, 28, 0.92);
  border: 1px solid var(--home-line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

body.marketplace-shell .marketplace-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.marketplace-shell .marketplace-filter label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa3b8;
}

body.marketplace-shell .marketplace-filter select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0c0d14;
  color: #f4f6fb;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

body.marketplace-shell .marketplace-filter select:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

body.marketplace-shell .marketplace-filter select:focus,
body.marketplace-shell .marketplace-filter select:focus-visible {
  outline: none;
  border-color: var(--home-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.28);
}

body.marketplace-shell .marketplace-filters__clear {
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: #c5cbe0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}

body.marketplace-shell .marketplace-filters__clear:hover,
body.marketplace-shell .marketplace-filters__clear:focus-visible {
  color: var(--home-lime);
  outline: none;
}

body.marketplace-shell .marketplace-results-count {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--home-muted);
}

@media (min-width: 1100px) and (max-height: 800px) {
  body.marketplace-shell .marketplace-filters {
    margin-bottom: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body.marketplace-shell .marketplace-results-count {
    margin-bottom: 4px;
  }

  body.marketplace-shell .simple-footer .container,
  body.site-detail-shell .simple-footer .container {
    max-width: none;
  }
}

body.marketplace-shell .dashboard-loading,
body.marketplace-shell .dashboard-empty {
  margin: 8px 0 0;
  padding: 28px 20px;
  background: rgba(18, 19, 28, 0.72);
  border: 1px solid var(--home-line);
  border-radius: 14px;
  color: var(--home-muted);
}

body.marketplace-shell .sites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: start;
  gap: 16px;
  margin-top: 0;
}

body.marketplace-shell .site-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  background: #10111a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

body.marketplace-shell .site-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}

body.marketplace-shell .site-card:focus-visible {
  outline: none;
  border-color: var(--home-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.32);
}

body.marketplace-shell .site-card__cover {
  aspect-ratio: 2.7 / 1;
  background:
    radial-gradient(ellipse 70% 80% at 80% 20%, rgba(124, 58, 237, 0.28), transparent 62%),
    #0b0c14;
}

/* Logo / fallback covers: show the full asset. Future website
   screenshots can opt into cover via .site-card__cover-image--screenshot.
   Public catalog has no image-type field today, so contain is the default.
   Explicit width/height are required — img + height:auto uses intrinsic
   pixels and overflow:hidden on the cover would crop again. */
body.marketplace-shell .site-card__cover-image {
  top: 28px;
  right: auto;
  bottom: auto;
  left: 18px;
  width: calc(100% - 36px);
  height: calc(100% - 42px);
  object-fit: contain;
  object-position: center;
}

body.marketplace-shell .site-card__cover-image--screenshot {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

body.marketplace-shell .site-card__cover-chrome {
  height: 22px;
  background: rgba(7, 8, 13, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

body.marketplace-shell .site-card__dot {
  background: rgba(255, 255, 255, 0.22);
}

body.marketplace-shell .site-card__cover-url {
  color: #9aa3b8;
}

body.marketplace-shell .site-card__monogram {
  font-size: 28px;
  color: rgba(244, 246, 251, 0.72);
}

body.marketplace-shell .site-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  padding: 8px 14px 8px;
}

body.marketplace-shell .site-card__identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.marketplace-shell .site-card__domain {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
  overflow-wrap: anywhere;
}

body.marketplace-shell .site-card__meta-line,
body.marketplace-shell .site-card__category {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--home-muted);
}

body.marketplace-shell .site-card__category {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #c5cbe0;
  background: none;
  border-radius: 0;
}

body.marketplace-shell .site-card__formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

body.marketplace-shell .site-card__badge {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #c5cbe0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

body.marketplace-shell .site-card__inventory {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #c5cbe0;
}

body.marketplace-shell .site-card__price {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 0;
  margin-top: auto;
  padding-top: 2px;
}

body.marketplace-shell .site-card__price-kicker {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 600;
  color: var(--home-muted);
}

body.marketplace-shell .site-card__price-value,
body.marketplace-shell .site-card__price-value .vb-price__canonical {
  display: inline;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

body.marketplace-shell .site-card__price-value .vb-price__approx {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--home-muted);
}

/* Converted-currency line only: reclaim the extra row without changing EUR. */
body.marketplace-shell .site-card:has(.vb-price__approx) .site-card__body {
  gap: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
}

body.marketplace-shell .site-card:has(.vb-price__approx) .site-card__price-note {
  margin-top: 0;
}

body.marketplace-shell .site-card:has(.vb-price__approx) .site-card__cta {
  margin-top: 2px;
}

body.marketplace-shell .site-card__price-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--home-muted);
}

body.marketplace-shell .site-card__price-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #8b93a7;
}

body.marketplace-shell .site-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--home-lime);
  color: #10120a;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(212, 243, 74, 0.16);
}

body.marketplace-shell .site-card:hover .site-card__cta,
body.marketplace-shell .site-card:focus-visible .site-card__cta {
  background: #e2ff6a;
}

body.marketplace-shell .simple-footer,
body.site-detail-shell .simple-footer {
  padding: 6px 0;
}

body.marketplace-shell .simple-footer__inner,
body.site-detail-shell .simple-footer__inner {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 16px;
}

body.marketplace-shell .simple-footer__links,
body.site-detail-shell .simple-footer__links {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  column-gap: 8px;
  row-gap: 2px;
  line-height: 1.25;
}

@media (max-width: 1100px) {
  body.marketplace-shell .sites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.marketplace-shell .public-page.marketplace-page {
    padding: 14px 0 36px;
  }

  body.marketplace-shell .breadcrumbs {
    margin: 0 0 10px;
  }

  body.marketplace-shell .mp-hero {
    margin: 0 0 16px;
  }

  body.marketplace-shell .nav,
  body.site-detail-shell .nav {
    background: #0b0c14;
    border-bottom-color: var(--home-line);
  }

  body.marketplace-shell .nav__link,
  body.site-detail-shell .nav__link {
    border-bottom-color: var(--home-line);
    color: #c5cbe0;
  }

  body.marketplace-shell .marketplace-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 12px;
    padding: 12px;
  }

  body.marketplace-shell .marketplace-filter select,
  body.marketplace-shell .marketplace-filters__clear {
    min-height: 40px;
  }

  body.marketplace-shell .marketplace-filters__clear {
    grid-column: 1 / -1;
    justify-self: start;
  }

  body.marketplace-shell .marketplace-results-count {
    margin: 0 0 12px;
  }

  body.marketplace-shell .site-card__cover {
    aspect-ratio: 2 / 1;
  }

  body.marketplace-shell .simple-footer,
  body.site-detail-shell .simple-footer {
    padding: 18px 0 22px;
  }

  body.marketplace-shell .simple-footer__inner,
  body.site-detail-shell .simple-footer__inner {
    flex-wrap: wrap;
  }

  body.marketplace-shell .simple-footer__links,
  body.site-detail-shell .simple-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body.marketplace-shell .sites-grid {
    grid-template-columns: 1fr;
  }

  body.marketplace-shell .site-card {
    max-width: none;
  }

  body.marketplace-shell .marketplace-filter {
    flex: none;
  }
}

@media (max-width: 560px) {
  body.marketplace-shell .public-page.marketplace-page {
    padding: 16px 0 40px;
  }

  body.marketplace-shell .mp-hero__eyebrow {
    margin: 0 0 6px;
  }

  body.marketplace-shell .marketplace-title {
    margin: 0 0 8px;
  }

  body.marketplace-shell .marketplace-subtitle {
    line-height: 1.5;
  }

  body.marketplace-shell .marketplace-filters {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  body.marketplace-shell .marketplace-filter {
    gap: 6px;
  }

  body.marketplace-shell .marketplace-filter select {
    min-height: 44px;
  }

  body.marketplace-shell .site-card__body {
    gap: 8px;
    padding: 14px 14px 12px;
  }

  body.marketplace-shell .site-card__cta {
    min-height: 44px;
  }

  body.marketplace-shell .site-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  body.marketplace-shell .site-card__price-value,
  body.marketplace-shell .site-card__price-value .vb-price__canonical {
    font-size: 1.45rem;
  }
}

@media (max-width: 430px) {
  body.home-page.marketplace-shell .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}
