.listing-metrics {
  display: flex;
  min-height: 22px;
  margin: 8px 0 2px;
  align-items: center;
  gap: 7px;
  color: #798797;
  font-size: 8px;
  white-space: nowrap;
}

.listing-metrics.real {
  color: var(--teal);
  font-weight: 700;
}

.demo-label {
  display: inline-flex;
  padding: 3px 5px;
  align-items: center;
  border: 1px solid #e4c6a8;
  border-radius: 3px;
  color: #9a5d2f;
  background: #fff7ef;
  font-size: 7px;
  font-weight: 700;
}

.mini-level {
  display: inline-flex !important;
  padding: 2px 4px;
  margin: 0 4px !important;
  border-radius: 3px;
  color: #1d6d5d !important;
  background: #e8f7f2;
  font-size: 7px !important;
  font-weight: 700;
}

.store-identity { min-width: 0; }
.shop-level { display: flex; margin: 4px 0 7px; align-items: center; gap: 7px; }
.shop-level b { font-size: 9px; }
.shop-level em { padding: 2px 5px; border: 1px solid #ffffff44; border-radius: 3px; color: #c9d6e4; font-size: 7px; font-style: normal; }
.level-marks { display: flex !important; gap: 2px; }
.level-marks i { display: block; width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; background: #67ddc0; }
.shop-level.silver-crown .level-marks i { background: #d8e4ef; }
.shop-level.gold-crown .level-marks i { background: #f1be4f; }

.store-demo-note {
  display: flex;
  padding: 9px 25px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f0dfcf;
  color: #8a6545;
  background: #fff8f1;
  font-size: 8px;
}

.store-demo-note b { padding: 3px 6px; border-radius: 3px; color: #fff; background: #a86d3d; font-size: 7px; white-space: nowrap; }
.store-stats { grid-template-columns: repeat(5, 1fr); }

.store-tools {
  display: grid;
  padding: 14px 25px;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 240px) auto auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.store-tools input,
.store-tools select { min-width: 0; padding: 9px; border: 1px solid #d9e2ea; border-radius: 4px; outline-color: var(--blue); color: #526273; background: #fff; font-size: 9px; }
.store-tools button { padding: 9px 14px; border: 0; border-radius: 4px; color: #fff; background: var(--blue); font-size: 9px; font-weight: 700; }
.store-tools small { color: #8794a2; font-size: 8px; white-space: nowrap; }
.store-item-metrics { display: flex; margin-top: 7px; align-items: center; gap: 7px; color: #7c8997; font-size: 7px; }
.store-item-metrics span { padding: 2px 4px; border-radius: 3px; color: #9a5d2f; background: #fff1e4; }
.store-item-metrics b { font-size: 7px; font-weight: 500; }
.store-item-metrics.real b { color: var(--teal); font-weight: 700; }
.store-load-more { display: block; min-width: 180px; padding: 10px 20px; margin: 0 auto 27px; border: 1px solid #cfdbe7; border-radius: 4px; color: var(--blue); background: #fff; font-size: 9px; font-weight: 700; }
.store-load-more:hover { border-color: var(--blue); }

.listing-image { position: relative; height: auto; aspect-ratio: 1 / 1; overflow: hidden; background: #f2f1ed; }
.listing-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; background: #f2f1ed; }
.listing:hover .listing-image img { transform: none; }
.listing h3 { min-height: 34px; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.store-product-grid img { object-fit: contain; background: #fff; }
.store-product-grid h3 { min-height: 25px; overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.listings { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.load-more.auto-load-sentinel { width: 100%; min-width: 0; height: 1px; margin: 20px 0 0; padding: 0; overflow: hidden; border: 0; opacity: 0; pointer-events: none; }

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

@media (max-width: 900px) {
  .store-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .store-tools { grid-template-columns: 1fr 1fr auto; }
  .store-tools small { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .announcement-links { display: none; }
  .announcement-inner { min-height: 30px; justify-content: flex-start; }
  .announcement em { display: none; }
  .listings { grid-template-columns: 1fr; gap: 12px; }
  .listing-main { display: grid; grid-template-columns: 126px minmax(0, 1fr); align-items: start; }
  .listing-image { width: 126px; height: 126px; min-height: 126px; aspect-ratio: 1 / 1; align-self: start; }
  .listing-image img { width: 100%; height: 100%; object-fit: contain; }
  .listing-body { min-width: 0; padding: 11px 10px; }
  .listing h3 { min-height: 0; margin: 6px 0 7px; font-size: 12px; }
  .listing-tags { min-height: 0; margin-top: 6px; flex-wrap: wrap; }
  .listing-metrics { min-height: 0; margin: 6px 0 0; gap: 5px; }
  .listing-foot { margin-top: 8px; padding-top: 8px; }
  .listing-foot strong { font-size: 15px; }
  .listing-metrics { flex-wrap: wrap; white-space: normal; }
  .store-demo-note { padding: 9px 15px; align-items: flex-start; }
  .store-stats { grid-template-columns: 1fr 1fr; }
  .store-tools { padding: 12px 15px; grid-template-columns: 1fr; }
  .store-tools small { grid-column: auto; }
  .store-product-grid { grid-template-columns: 1fr; }
  .store-product-grid img { height: 140px; }
}

/* Mobile marketplace list follows the reference feed: a large thumbnail with
   the product details aligned in a compact right-hand column. */
@media (max-width: 620px) {
  .market .listings {
    display: flex;
    margin-right: -12px;
    margin-left: -12px;
    flex-direction: column;
    gap: 0;
  }
  .market .listing {
    display: grid;
    min-height: 188px;
    grid-template-columns: 34% minmax(0, 1fr);
    border-width: 0 0 1px;
    border-radius: 0;
    background: #fff;
  }
  .market .listing-main {
    display: contents;
  }
  .market .listing-image {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
    align-self: start;
  }
  .market .listing-body {
    min-width: 0;
    padding: 9px 12px 10px;
  }
  .market .listing-game {
    font-size: 13px;
  }
  .market .listing h3 {
    min-height: 0;
    margin: 3px 0 7px;
    font-size: 17px;
    line-height: 1.3;
    white-space: normal;
  }
  .market .listing-meta {
    min-height: 0;
    gap: 5px;
    color: #89929c;
    font-size: 11px;
    line-height: 1.45;
  }
  .market .listing-tags {
    min-height: 0;
    margin-top: 6px;
    gap: 4px;
  }
  .market .listing-tags span {
    padding: 2px 4px;
    font-size: 10px;
  }
  .market .listing-foot {
    margin-top: 10px;
    padding-top: 8px;
  }
  .market .listing-foot strong {
    font-size: 23px;
  }
  .market .listing-foot strong small,
  .market .listing-foot > span {
    font-size: 11px;
  }
  .market .listing-badge {
    top: 8px;
    left: 8px;
    padding: 4px 6px;
    font-size: 10px;
  }
  .market .save {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 17px;
  }
}
.market .listing-image img { object-fit: cover; }
.market .listing-foot { display: none !important; }
.market .listing-metrics { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.market .listing-inline-price { display: inline-flex; margin-left: 2px; align-items: baseline; color: var(--coral); font-family: "Space Grotesk", sans-serif; font-size: 18px; line-height: 1; white-space: nowrap; }
.market .listing-inline-price small { margin-right: 2px; font-family: "DM Sans", sans-serif; font-size: 9px; }
@media (max-width: 620px) {
  .market .listing-image img { object-fit: cover; }
  .market .listing-inline-price { font-size: 21px; }
  .market .listing-inline-price small { font-size: 10px; }
}
