@import url("/product-cards-compact.css?v=3&cfv=20261021o");

/* Keep the seller name and review count on one metadata row in listing cards. */
body:has(.market-home) #app .market-product-card .market-product-proof,
body:has(.buyer-main) #app .market-product-card .market-product-proof {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 20px !important;
  height: 20px !important;
  margin: 1px 0 0 !important;
  color: #aeb5bd !important;
  font-size: 11px !important;
  line-height: 20px !important;
}

body:has(.market-home) #app .market-product-card .market-product-seller,
body:has(.buyer-main) #app .market-product-card .market-product-seller {
  grid-column: auto !important;
  grid-row: auto !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #c4c9cf !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body:has(.market-home) #app .market-product-card .market-product-review-count,
body:has(.buyer-main) #app .market-product-card .market-product-review-count {
  flex: 0 0 auto !important;
  color: #9299a2 !important;
  white-space: nowrap !important;
}

/* Keep the storefront layout stable while the viewport changes size. */
html,
body,
#app {
  max-width: 100%;
  overflow-x: clip;
}

body:has(.market-home) .market-header-inner,
body:has(.market-home) .market-nav-inner,
body:has(.market-home) .market-home {
  box-sizing: border-box;
  max-width: 1474px;
  margin-inline: auto;
}

body:has(.market-home) .market-home {
  width: min(1474px, calc(100% - clamp(24px, 5vw, 64px)));
  min-width: 0;
}

body:has(.market-home) .market-header-inner,
body:has(.market-home) .market-nav-inner,
body:has(.market-home) .market-header-search,
body:has(.market-home) .market-header-actions,
body:has(.market-home) .market-home .store-content,
body:has(.market-home) .market-home .grid,
body:has(.market-home) .market-product-card,
body:has(.market-home) .market-product-card .cardbody,
body:has(.market-home) .market-product-card .market-price-row,
body:has(.market-home) .market-product-card .market-price-stack {
  min-width: 0;
}

body:has(.market-home) .market-home .grid > .market-product-card {
  height: auto !important;
  min-height: clamp(242px, 27vw, 286px) !important;
  max-height: none !important;
  align-self: stretch !important;
}

body:has(.market-home) .market-home .grid > .market-product-card > .thumb {
  height: clamp(92px, 10vw, 128px) !important;
  min-height: clamp(92px, 10vw, 128px) !important;
  flex: 0 0 clamp(92px, 10vw, 128px) !important;
}

body:has(.market-home) .market-home .grid > .market-product-card > .cardbody {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden;
}

body:has(.market-home) .market-home .grid > .market-product-card h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

body:has(.market-home) .market-home .grid > .market-product-card .market-price-row {
  flex-wrap: wrap;
  align-items: center;
}

body:has(.market-home) .market-home .grid > .market-product-card .market-price-stack {
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

body:has(.market-home) .market-shortcut,
body:has(.market-home) .market-nav-link,
body:has(.market-home) .market-nav-game {
  min-width: 0;
}

@media (min-width: 761px) and (max-width: 1024px) {
  body:has(.market-home) .market-header-inner {
    width: calc(100% - 40px);
    gap: 8px 12px;
  }

  body:has(.market-home) .market-header-actions {
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:has(.market-home) .market-header-actions::-webkit-scrollbar,
  body:has(.market-home) .market-nav-inner::-webkit-scrollbar {
    display: none;
  }

  body:has(.market-home) .market-header-actions .market-header-action {
    min-width: 52px;
    flex: 0 1 auto;
    font-size: 10px;
  }

  body:has(.market-home) .market-header-actions .auth-actions {
    flex: 0 0 auto;
    margin-left: 4px !important;
    padding-left: 8px;
  }

  body:has(.market-home) .market-nav-inner {
    width: calc(100% - 40px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:has(.market-home) .market-home .store-content .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(10px, 1.5vw, 16px) !important;
  }
}

@media (max-width: 760px) {
  body:has(.market-home) .market-home {
    width: calc(100% - 24px);
    padding-inline: 0;
  }

  body:has(.market-home) .market-home .store-content .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(8px, 2vw, 12px) !important;
  }

  body:has(.market-home) .market-home .grid > .market-product-card {
    min-height: 0 !important;
  }

  body:has(.market-home) .market-home .grid > .market-product-card > .cardbody {
    padding: clamp(8px, 2.5vw, 12px) !important;
  }

  body:has(.market-home) .market-home .grid > .market-product-card h3 {
    font-size: clamp(11px, 3.1vw, 13px) !important;
    line-height: 1.35 !important;
  }

  body:has(.market-home) .market-home .grid > .market-product-card .price {
    font-size: clamp(15px, 4.4vw, 19px) !important;
  }

  body:has(.market-home) .market-home .grid > .market-product-card .buy-green {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    flex: 0 0 36px;
  }

  body:has(.market-home) .market-section-heading,
  body:has(.market-home) .catalog-top {
    min-width: 0;
    flex-wrap: wrap;
    gap: 9px;
  }

  body:has(.market-home) .quick-filters {
    min-width: 0;
    flex-wrap: wrap;
  }

  body:has(.market-home) .market-compact-hero {
    background-size: auto 290px;
    background-position: 60% top;
  }
}

@media (max-width: 360px) {
  body:has(.market-home) .market-home {
    width: calc(100% - 18px);
  }

  body:has(.market-home) .market-home .grid > .market-product-card .market-price-row {
    gap: 5px;
  }

  body:has(.market-home) .market-header-actions .auth-actions button {
    padding-inline: 8px;
  }
}
