/* Marketplace list page styles */
.marketplace-page-shell,
.marketplace-create-shell {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

.marketplace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.marketplace-header--storefront {
  align-items: flex-end;
}

.marketplace-header.narrow {
  max-width: 920px;
  margin: 2rem auto 1.5rem;
}

.marketplace-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #27c5a1;
  font-weight: 700;
}

.marketplace-header h1,
.marketplace-empty-state h2,
.marketplace-card-body h2 {
  margin: 0;
  color: #1f2937;
}

.marketplace-cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.marketplace-toolbar {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e9ecef;
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  margin-bottom: 2rem;
}

.marketplace-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.marketplace-filters label,
.marketplace-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: #495057;
  font-weight: 600;
}

.marketplace-filters select,
.marketplace-filters input,
.marketplace-form input,
.marketplace-form select,
.marketplace-form textarea {
  border: 1px solid #dfe3e8;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.marketplace-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.marketplace-card-link:hover .marketplace-card {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.marketplace-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e7ebee;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}

.marketplace-card-image-wrap {
  position: relative;
  height: 290px;
  background: #f3f6f8;
}

.marketplace-card-image {
  display: block;
  width: 100%;
  height: 100%;
}

.marketplace-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marketplace-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.9rem 0.9rem 0.95rem;
  gap: 0.5rem;
}

.marketplace-card-price-row,
.marketplace-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.marketplace-price,
.marketplace-hero-price {
  color: #1fa866;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.2;
}

.marketplace-card-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.marketplace-card-badge--verified {
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.35rem 0.6rem;
  background: #1d72ff;
  color: #fff;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.marketplace-card-badge--rating {
  top: 2.4rem;
  right: 0.7rem;
  padding: 0.28rem 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.7rem;
}

.marketplace-card-badge--express {
  left: 0.7rem;
  top: 0.8rem;
  width: 0.7rem;
  height: 6.1rem;
  padding: 0.45rem 0.15rem;
  background: linear-gradient(180deg, #1fbf8f 0%, #0f9f6a 100%);
  color: #fff;
  border-radius: 10px;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.marketplace-card-badge--promoted {
  right: 0.8rem;
  bottom: 0.8rem;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #f59e0b;
  font-size: 1rem;
}

.marketplace-card-body h2 {
  margin: 0;
}

.marketplace-listing-title {
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marketplace-listing-title a {
  color: inherit;
  text-decoration: none;
}

.marketplace-spec-summary {
  margin: 0;
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.5;
  min-height: 2.9em;
}

.marketplace-card-location {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.4;
}

.marketplace-card-location svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.marketplace-card-description {
  margin: 0;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.8em;
}

.marketplace-card-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

.marketplace-card-attribute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e6ebef;
  background: #f8fafb;
  color: #475569;
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.38rem 0.52rem;
}

.marketplace-status {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #dffaf3;
  color: #0f766e;
  font-weight: 700;
  text-transform: capitalize;
}

.marketplace-seller-row,
.marketplace-meta,
.marketplace-snippet,
.marketplace-empty-banner,
.marketplace-location-line,
.marketplace-seller-box p,
.marketplace-form-error {
  color: #4b5563;
}

.marketplace-seller-row {
  margin: 0.6rem 0;
  font-size: 0.9rem;
}

.marketplace-snippet {
  margin: 0.5rem 0 1rem;
  line-height: 1.6;
}

.marketplace-view-button,
.marketplace-chat-button,
.marketplace-note-button,
.marketplace-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #dfe3e8;
  background: #fff;
  color: #1f2937;
}

.marketplace-view-button,
.marketplace-chat-button,
.marketplace-price-btn {
  background: linear-gradient(135deg, #27c5a1 0%, #20a889 100%);
  color: #fff;
  border: none;
}

.marketplace-empty-state,
.marketplace-empty-banner,
.marketplace-form-error {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 23px rgba(15, 23, 42, 0.04);
}

.marketplace-empty-state {
  padding: 3rem 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.marketplace-empty-banner {
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.marketplace-pagination {
  margin-top: 2rem;
  justify-content: center;
  padding: 1rem 0;
}

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

@media (max-width: 600px) {
  .marketplace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .marketplace-card-image-wrap {
    height: 225px;
  }

  .marketplace-card-body {
    padding: 0.72rem;
  }

  .marketplace-price,
  .marketplace-hero-price {
    font-size: 1.2rem;
  }

  .marketplace-listing-title {
    font-size: 0.96rem;
  }

  .marketplace-card-description,
  .marketplace-spec-summary {
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .marketplace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.marketplace-card-body h2 a,
.marketplace-secondary-link,
.marketplace-pagination a,
.seller-feedback-row a {
  color: #0b5c8a;
  text-decoration: none;
}

.marketplace-meta,
.marketplace-snippet,
.marketplace-empty-banner,
.marketplace-location-line,
.marketplace-seller-box p,
.marketplace-form-error {
  color: #4b5563;
}

.marketplace-seller-row {
  margin: 0.6rem 0;
  font-size: 0.9rem;
}

.marketplace-snippet {
  margin: 0.5rem 0 1rem;
  line-height: 1.6;
}

.marketplace-view-button,
.marketplace-chat-button,
.marketplace-note-button,
.marketplace-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #dfe3e8;
  background: #fff;
  color: #1f2937;
}

.marketplace-view-button,
.marketplace-chat-button,
.marketplace-price-btn {
  background: linear-gradient(135deg, #27c5a1 0%, #20a889 100%);
  color: #fff;
  border: none;
}

.marketplace-empty-state,
.marketplace-empty-banner,
.marketplace-form-error {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 23px rgba(15, 23, 42, 0.04);
}

.marketplace-empty-state {
  padding: 3rem 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.marketplace-empty-banner {
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.marketplace-pagination {
  margin-top: 2rem;
  justify-content: center;
  padding: 1rem 0;
}

@media (max-width: 760px) {
  .marketplace-filters,
  .marketplace-form-two-col,
  .marketplace-info-row,
  .marketplace-top-layout,
  .marketplace-spec-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-header {
    display: block;
  }

  .marketplace-card {
    margin-bottom: 1rem;
  }

  .marketplace-pagination {
    flex-direction: column;
  }
}
