/* —— Vitrin / listings —— */
.vitrin-block,
.recent-block {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
}

.listing-grid.listing-grid--recent {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .listing-grid.listing-grid--recent {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .listing-grid.listing-grid--recent {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.vitrin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-2);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--machine);
}

.vitrin-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.result-count {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chips-tabs {
  display: contents;
}

.chip {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px 4px;
  border-radius: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition:
    border-color 0.12s var(--ease),
    color 0.12s var(--ease);
}

.chip:hover {
  color: var(--ink);
  background: transparent;
}

.chip:active {
  background: transparent;
}

.chip[aria-pressed="true"],
.chip[aria-selected="true"],
.chip[aria-current="page"] {
  background: transparent;
  color: var(--ink);
  border-bottom-color: var(--machine-deep);
}

.chip[aria-pressed="true"]:hover,
.chip[aria-selected="true"]:hover,
.chip[aria-current="page"]:hover {
  background: transparent;
  color: var(--ink);
}

.chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.listing-grid,
.listing-grid-compact {
  display: grid;
  gap: 8px;
}

.listing-grid .listing-card,
.listing-grid .listing-card-link,
.listing-grid .listing-body {
  min-width: 0;
}

.listing-grid .listing-card-link {
  grid-template-columns: 1fr;
}

.listing-grid .listing-media {
  min-height: 0;
}

.listing-grid .listing-media img {
  aspect-ratio: 1 / 1;
}

.listing-grid .badge {
  top: 6px;
  left: 6px;
  padding: 2px 5px;
  font-size: 9px;
}

.listing-grid .listing-body {
  gap: 4px;
  padding: 8px;
}

.listing-grid .listing-body h3 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.3;
}

.listing-grid .listing-meta {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
}

.listing-grid .listing-meta span + span::before {
  content: " · ";
}

.listing-grid .listing-specs {
  flex-wrap: nowrap;
  overflow: hidden;
  font-size: 9px;
}

.listing-grid .listing-specs span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 1px 4px;
}

.listing-grid .listing-foot {
  gap: 4px;
  margin-top: 0;
  min-width: 0;
}

.listing-grid .listing-price {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.listing-grid .listing-price small {
  font-size: 9px;
}

.listing-grid .seller-tag {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 9px;
  text-align: right;
}

.listing-card {
  display: block;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}

@media (prefers-reduced-motion: no-preference) {
  @starting-style {
    .listing-card {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

.listing-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.listing-card-link {
  display: grid;
  grid-template-columns: 128px 1fr;
  color: inherit;
  height: 100%;
}

.listing-card-link:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.listing-media {
  position: relative;
  background: var(--surface-2);
  min-height: 96px;
  overflow: hidden;
}

.listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 0.35s var(--ease);
}

.listing-card:hover .listing-media img {
  transform: scale(1.04);
}

.listing-media .badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 7px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  background: var(--machine);
  color: var(--machine-ink);
}

/* Intent / condition chips (also used inline in list + detail specs) */
.badge.badge-sale {
  background: var(--machine);
  color: var(--machine-ink);
}

.badge.badge-rent {
  background: var(--signal);
  color: #fff;
}

.badge.badge-used {
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink);
}

.badge.badge-new {
  background: color-mix(in srgb, var(--status-ok, #067647) 12%, var(--raised));
  color: var(--status-ok, #067647);
  border: 1px solid color-mix(in srgb, var(--status-ok, #067647) 28%, var(--line));
}

.listing-body {
  display: grid;
  gap: 6px;
  padding: 12px;
  align-content: center;
}

.listing-body h3 {
  font-size: 14px;
  color: var(--link);
  font-weight: 700;
}

.listing-card:hover .listing-body h3 {
  color: var(--link-hover);
  text-decoration: underline;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 12px;
}

.listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.listing-specs span {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px 6px;
}

.listing-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  margin-top: 2px;
}

.listing-price {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.listing-price small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.seller-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.seller-tag.verified {
  color: var(--ok);
}

.text-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  white-space: nowrap;
}

.text-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.text-link:active {
  color: var(--link-hover);
}

/* —— Proof + CTA —— */
.proof-strip {
  display: grid;
  gap: var(--space-1);
}

.proof-item {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  display: flex;
  align-items: center;
  gap: 12px;
}

a.proof-item {
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.proof-item:hover {
  border-color: color-mix(in srgb, var(--machine) 35%, var(--line));
  background: color-mix(in srgb, var(--machine) 5%, var(--raised));
}

a.proof-item:focus-visible {
  outline: 2px solid var(--machine);
  outline-offset: 2px;
}

.proof-item-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.proof-item strong {
  font-family: var(--font-display);
  font-size: 14px;
}

.proof-item span {
  color: var(--muted);
  font-size: 13px;
}

.partner-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding: 14px 16px 14px 15px;
  background:
    linear-gradient(120deg,
      color-mix(in srgb, var(--machine) 8%, var(--raised)),
      var(--raised) 42%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--machine);
  border-radius: var(--radius);
  color: var(--ink);
}

.partner-banner-copy {
  flex: 1 1 240px;
  min-width: 0;
}

.partner-banner-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.partner-banner-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.partner-banner-cta {
  flex: 0 0 auto;
  min-height: 38px;
  padding-inline: 16px;
  font-size: 12px;
  font-weight: 700;
}

.seller-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-4);
  background: linear-gradient(120deg, var(--machine) 0%, var(--machine-hot) 100%);
  border: 1px solid var(--machine-deep);
  border-radius: var(--radius);
}

.seller-cta h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.seller-cta p {
  margin: 0;
  color: rgba(12, 12, 12, 0.72);
  max-width: 42ch;
}
/* —— States —— */
/* —— States —— */
.skeleton-card,
.skeleton-row,
.skeleton-gallery,
.skeleton-line {
  background: linear-gradient(90deg, #ececec 0%, #f7f7f7 50%, #ececec 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: var(--radius);
}

.listing-grid[aria-busy="true"] {
  pointer-events: none;
}

.listing-grid .skeleton-card {
  min-height: 0;
  aspect-ratio: 1 / 1.35;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
}

.listing-grid .skeleton-card::before {
  content: "";
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, #e4e4e4 0%, #f2f2f2 50%, #e4e4e4 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  margin: -8px -8px 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.skeleton-card {
  min-height: 180px;
  border: 1px solid var(--line);
}

.skeleton-row {
  min-height: 128px;
  border: 1px solid var(--line);
}

.detail-loading {
  display: grid;
  gap: var(--space-2);
}

.skeleton-gallery {
  aspect-ratio: 16 / 10;
  width: 100%;
}

.skeleton-stack {
  display: grid;
  gap: 12px;
}

.skeleton-line {
  height: 14px;
  width: 100%;
}

.skeleton-line.w-40 {
  width: 40%;
}

.skeleton-line.w-60 {
  width: 60%;
}

.skeleton-line.w-80 {
  width: 80%;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.empty-state,
.listing-empty {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  align-content: center;
  padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 48px);
  min-height: 240px;
  grid-column: 1 / -1;
  width: 100%;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--raised) 48%, var(--raised) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state p,
.listing-empty p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: balance;
}

.empty-state-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  right: var(--space-3);
  top: var(--space-3);
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  max-width: min(90vw, 360px);
  box-shadow: var(--shadow-md);
}

.toast[hidden] {
  display: none;
}
