.marketplace-shell {
  gap: 0.72rem;
  padding-top: 0.72rem;
  padding-bottom: 2.4rem;
}

.marketplace-hero-card,
.marketplace-filter-card,
.marketplace-results-panel {
  border-radius: 10px;
  box-shadow: none;
}

.marketplace-hero-card {
  gap: 0.38rem;
  padding: 0.82rem;
}

.marketplace-hero-card h1 {
  font-family: var(--heop-font);
  font-size: clamp(1.55rem, 4.8vw, 2.18rem);
  font-weight: 950;
  line-height: 1.04;
}

.marketplace-hero-card > span {
  max-width: 34rem;
  font-size: 0.82rem;
  font-weight: 720;
}

.marketplace-hero-card .pro-hero-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
  margin-top: 0.28rem;
}

.marketplace-hero-card .pro-hero-actions a {
  min-width: 0;
  min-height: 2.08rem;
  padding: 0 0.42rem;
  color: var(--heop-forest);
  background: rgba(223, 232, 220, 0.72);
  border: 1px solid rgba(223, 212, 195, 0.78);
  border-radius: 10px;
  box-shadow: none;
  font-size: 0.7rem;
  white-space: nowrap;
}

.marketplace-hero-card .pro-hero-actions a.is-active {
  color: #fffdf7;
  background: var(--heop-forest);
  border-color: var(--heop-forest);
  box-shadow: 0 8px 18px rgba(36, 90, 59, 0.16);
}

.marketplace-filter-card {
  display: block;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 253, 247, 0.9));
  border: 1px solid rgba(223, 212, 195, 0.72);
}

.marketplace-filter-card summary {
  display: flex;
  align-items: center;
  gap: 0.46rem;
  min-height: 2.72rem;
  padding: 0 0.72rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.marketplace-filter-card summary::-webkit-details-marker {
  display: none;
}

.marketplace-filter-card summary span {
  color: var(--heop-orange);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
}

.marketplace-filter-card summary strong {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--heop-forest);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-filter-card summary::after {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--heop-forest);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.marketplace-filter-card[open] summary::after {
  transform: rotate(225deg);
}

.marketplace-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0 0.72rem 0.72rem;
}

.marketplace-filter-form .auth-field {
  gap: 0.24rem;
}

.marketplace-filter-form .auth-field:first-child,
.marketplace-filter-form .auth-submit {
  grid-column: 1 / -1;
}

.marketplace-filter-form label {
  color: rgba(27, 29, 24, 0.68);
  font-size: 0.66rem;
  font-weight: 900;
}

.marketplace-filter-form input,
.marketplace-filter-form select {
  min-height: 2.34rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 820;
}

.marketplace-filter-form .auth-submit {
  min-height: 2.28rem;
  border-radius: 10px;
  font-size: 0.78rem;
}

.marketplace-filter-card .marketplace-sort-line {
  padding: 0 0.72rem 0.72rem;
}

.marketplace-results-panel {
  padding: 0.72rem;
}

.marketplace-results-heading {
  align-items: center;
  padding-bottom: 0.52rem;
  border-bottom: 1px solid rgba(95, 102, 93, 0.13);
}

.marketplace-results-heading h2 {
  color: var(--heop-forest);
  font-family: var(--heop-font);
  font-size: 1.14rem;
  font-weight: 950;
  line-height: 1.08;
}

.marketplace-result-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.68rem;
  padding: 0 0.5rem;
  color: #fffdf7;
  background: var(--heop-forest);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
}

.marketplace-result-list {
  gap: 0.5rem;
}

.marketplace-catalog-row,
.marketplace-catalog-row.has-image {
  align-items: start;
  gap: 0.58rem;
  padding: 0.58rem;
  background: rgba(255, 253, 247, 0.82);
  border-radius: 10px;
  box-shadow: none;
}

.marketplace-catalog-row.has-image {
  grid-template-columns: 5.55rem minmax(0, 1fr);
}

.marketplace-result-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--heop-green-soft);
  border: 1px solid rgba(223, 212, 195, 0.74);
  border-radius: 8px;
}

.marketplace-result-copy {
  align-content: start;
  gap: 0.18rem;
}

.marketplace-result-copy .pro-offer-status {
  padding: 0.18rem 0.4rem;
  font-size: 0.6rem;
  line-height: 1;
}

.marketplace-result-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--heop-ink);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.14;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-result-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(27, 29, 24, 0.72);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-result-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(27, 29, 24, 0.62);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 680;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 1.58rem;
  margin-top: 0.14rem;
  padding: 0 0.5rem;
  color: var(--heop-forest);
  background: rgba(223, 232, 220, 0.72);
  border: 1px solid rgba(223, 212, 195, 0.72);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 920;
}

.marketplace-buy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  padding-top: 0.52rem;
}

.marketplace-buy-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.6rem;
  align-items: center;
  min-height: 2.1rem;
  padding: 0 0.28rem 0 0.52rem;
  overflow: hidden;
  background: #fffdf7;
  border: 1px solid rgba(223, 212, 195, 0.78);
  border-radius: 8px;
  color: rgba(27, 29, 24, 0.66);
  font-size: 0.66rem;
  font-weight: 850;
}

.marketplace-buy-form label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-buy-form input {
  min-height: 1.66rem;
  padding: 0 0.3rem;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(223, 212, 195, 0.68);
  border-radius: 0;
  text-align: center;
}

.marketplace-buy-form select {
  min-width: 0;
  min-height: 1.66rem;
  width: 100%;
  padding: 0 1.25rem 0 0.42rem;
  color: var(--heop-forest);
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(223, 212, 195, 0.68);
  border-radius: 0;
  font-size: 0.66rem;
  font-weight: 900;
}

.marketplace-buy-form .marketplace-slot-field {
  grid-column: 1 / -1;
  grid-template-columns: minmax(5.2rem, 0.58fr) minmax(0, 1.42fr);
  padding-right: 0.34rem;
}

.marketplace-buy-form button {
  min-height: 2.1rem;
  padding: 0 0.72rem;
  border-radius: 8px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.marketplace-buy-form small {
  grid-column: 1 / -1;
  color: rgba(27, 29, 24, 0.58);
  font-size: 0.65rem;
  line-height: 1.25;
}

.marketplace-product-backdrop {
  position: fixed;
  inset: 0;
  z-index: 91;
  background: rgba(17, 24, 20, 0.44);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.is-product-modal-open .marketplace-product-backdrop {
  opacity: 1;
}

.marketplace-product-modal[hidden],
.marketplace-product-backdrop[hidden] {
  display: none;
}

.marketplace-product-modal {
  position: fixed;
  left: 50%;
  bottom: 0.72rem;
  z-index: 92;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(calc(100% - 1.1rem), 27rem);
  max-height: min(88dvh, 45rem);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.99), rgba(255, 249, 239, 0.98));
  border: 1px solid rgba(223, 212, 195, 0.78);
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(19, 22, 18, 0.34);
  transform: translateX(-50%);
}

.marketplace-product-close {
  position: absolute;
  top: 0.62rem;
  right: 0.62rem;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  color: #fffdf7;
  background: var(--heop-forest);
  border-radius: 999px;
  font-size: 1.32rem;
  line-height: 1;
  box-shadow: 0 12px 26px rgba(20, 35, 27, 0.22);
}

.marketplace-product-media {
  position: relative;
  min-height: 9.5rem;
  background: rgba(223, 232, 220, 0.72);
}

.marketplace-product-media img {
  width: 100%;
  height: 12.8rem;
  object-fit: cover;
}

.marketplace-product-media img[hidden] {
  display: none;
}

.marketplace-product-media span {
  position: absolute;
  left: 0.68rem;
  bottom: 0.68rem;
  padding: 0.28rem 0.5rem;
  color: #fffdf7;
  background: rgba(20, 35, 27, 0.76);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.marketplace-product-content {
  display: grid;
  gap: 0.58rem;
  min-height: 0;
  overflow-y: auto;
  padding: 0.82rem;
}

.marketplace-product-content > p,
.marketplace-product-content > h2,
.marketplace-product-content > strong,
.marketplace-product-content > span {
  margin: 0;
}

.marketplace-product-content > p:first-child {
  color: var(--heop-orange);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
}

.marketplace-product-content h2 {
  color: var(--heop-forest);
  font-family: var(--heop-display);
  font-size: 1.72rem;
  line-height: 1.02;
}

.marketplace-product-content > strong {
  color: var(--heop-ink);
  font-size: 0.98rem;
}

.marketplace-product-content > span {
  color: rgba(27, 29, 24, 0.66);
  font-size: 0.74rem;
  font-weight: 820;
}

.marketplace-product-content > p[data-product-modal-description] {
  color: rgba(27, 29, 24, 0.76);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.36;
}

.marketplace-product-facts {
  display: grid;
  grid-template-columns: minmax(5.2rem, 0.7fr) minmax(0, 1fr);
  gap: 0.34rem 0.58rem;
  margin: 0;
  padding: 0.62rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(223, 212, 195, 0.72);
  border-radius: 10px;
}

.marketplace-product-facts dt {
  color: rgba(27, 29, 24, 0.54);
  font-size: 0.66rem;
  font-weight: 900;
}

.marketplace-product-facts dd {
  margin: 0;
  color: var(--heop-ink);
  font-size: 0.72rem;
  font-weight: 850;
}

.marketplace-product-seller {
  display: grid;
  gap: 0.28rem;
  padding: 0.66rem;
  background: rgba(247, 243, 233, 0.76);
  border: 1px solid rgba(223, 212, 195, 0.72);
  border-radius: 10px;
}

.marketplace-product-seller small {
  color: var(--heop-orange);
  font-size: 0.6rem;
  font-weight: 950;
  text-transform: uppercase;
}

.marketplace-product-seller strong {
  color: var(--heop-forest);
  font-size: 0.92rem;
  line-height: 1.12;
}

.marketplace-product-seller span,
.marketplace-product-seller p {
  margin: 0;
  color: rgba(27, 29, 24, 0.68);
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.3;
}

.marketplace-product-seller a {
  justify-self: start;
  min-height: 1.7rem;
  padding: 0 0.54rem;
  color: var(--heop-forest);
  background: rgba(223, 232, 220, 0.72);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 920;
  text-decoration: none;
}

.marketplace-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.marketplace-product-tags span {
  padding: 0.28rem 0.48rem;
  color: var(--heop-forest);
  background: rgba(223, 232, 220, 0.7);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
}

.marketplace-product-buy {
  position: sticky;
  bottom: -0.82rem;
  margin: 0 -0.82rem -0.82rem;
  padding: 0.7rem 0.82rem max(0.82rem, env(safe-area-inset-bottom));
  background: rgba(255, 253, 247, 0.96);
  border-top: 1px solid rgba(223, 212, 195, 0.76);
}

.marketplace-product-slots {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.28rem;
}

.marketplace-product-slots[hidden] {
  display: none;
}

.marketplace-product-slots small {
  color: rgba(27, 29, 24, 0.58);
  font-size: 0.64rem;
  font-weight: 780;
}

@media (min-width: 760px) {
  .marketplace-filter-form {
    grid-template-columns: minmax(12rem, 1.35fr) minmax(10rem, 0.85fr) minmax(10rem, 0.85fr) auto;
    align-items: end;
  }

  .marketplace-filter-form .auth-field:first-child,
  .marketplace-filter-form .auth-submit {
    grid-column: auto;
  }

  .marketplace-shell-products .marketplace-result-list,
  .marketplace-shell-outings .marketplace-result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .marketplace-page .app-header {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
  }

  .marketplace-page .topbar {
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    gap: 0.42rem;
  }

  .marketplace-page .brand-mark {
    min-height: 2.08rem;
    width: auto;
    justify-self: center;
    justify-items: center;
    justify-content: center;
  }

  .marketplace-page .brand-mark img {
    width: 5.5rem;
  }

  .marketplace-page .header-punchline,
  .marketplace-page .header-search {
    display: none;
  }

  .marketplace-page .top-actions {
    gap: 0.34rem;
  }

  .marketplace-page .profile-button {
    width: 2.28rem;
    height: 2.28rem;
    border-width: 0.16rem;
    font-size: 0.74rem;
  }

  .marketplace-page .icon-button {
    width: 2.08rem;
    height: 2.08rem;
  }

  .marketplace-shell {
    gap: 0.58rem;
    padding-top: 0.3rem;
    padding-bottom: 2rem;
  }

  .marketplace-hero-card {
    gap: 0.28rem;
    padding: 0.62rem;
  }

  .marketplace-hero-card p,
  .marketplace-hero-card > span {
    display: none;
  }

  .marketplace-hero-card h1 {
    font-size: 1.34rem;
    line-height: 1.08;
  }

  .marketplace-hero-card .pro-hero-actions {
    gap: 0.3rem;
    margin-top: 0.18rem;
  }

  .marketplace-hero-card .pro-hero-actions a {
    min-height: 1.96rem;
    padding: 0 0.3rem;
    font-size: 0.64rem;
  }

  .marketplace-filter-card summary {
    min-height: 2.34rem;
    padding-inline: 0.62rem;
  }

  .marketplace-filter-form {
    gap: 0.42rem;
    padding: 0 0.62rem 0.62rem;
  }

  .marketplace-filter-form input,
  .marketplace-filter-form select {
    min-height: 2.16rem;
    font-size: 0.72rem;
  }

  .marketplace-filter-form .auth-submit {
    min-height: 2.12rem;
  }

  .marketplace-results-panel {
    padding: 0.62rem;
  }

  .marketplace-results-heading {
    padding-bottom: 0.44rem;
  }

  .marketplace-catalog-row,
  .marketplace-catalog-row.has-image {
    gap: 0.5rem;
    padding: 0.52rem;
  }

  .marketplace-catalog-row.has-image {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .marketplace-buy-form {
    gap: 0.36rem;
    padding-top: 0.44rem;
  }
}

@media (max-width: 360px) {
  .marketplace-hero-card .pro-hero-actions a {
    font-size: 0.6rem;
  }

  .marketplace-catalog-row.has-image {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .marketplace-buy-form {
    grid-template-columns: 1fr;
  }

  .marketplace-buy-form .marketplace-slot-field {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.42rem 0.52rem;
  }

  .marketplace-buy-form select {
    border-top: 1px solid rgba(223, 212, 195, 0.68);
    border-left: 0;
  }

  .marketplace-buy-form button {
    width: 100%;
  }
}
