/* Shared Marketplace Card Styles
   Used by: /index.html (Vitrin) and /market.html (Marketplace list)
*/

/* Grid + Card (home ile aynı) */
.kp-market-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px){
  .kp-market-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 980px){
  .kp-market-grid{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Card standard */
.kp-market-card{
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-card);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 230px;
  cursor:pointer;
}
.kp-market-cover{
  width:100%;
  height: 120px;
  background: rgba(2, 6, 23, 0.8);
  display:flex;
  align-items:center;
  justify-content:center;
}
.kp-market-cover img{ width:100%; height:100%; object-fit:cover; display:block; }

.kp-market-body{
  padding: 0.6rem 0.7rem 0.7rem;
  flex: 1;
  display:flex;
  flex-direction:column;
  gap: 0.55rem;
  min-width: 0;
}

/* Üst blok: başlık + meta + satıcı (birbirine daha yakın) */
.kp-market-top{
  display:flex;
  flex-direction:column;
  gap: 0.25rem;
  min-width: 0;
}

/* Alt blok: puan/işlem + fiyat/buton (birbirine daha yakın) */
.kp-market-bottom{
  margin-top: auto;
  display:flex;
  flex-direction:column;
  gap: 0.35rem;
  min-width: 0;
}

.kp-market-title{
  font-weight:800;
  font-size:0.82rem;
  line-height:1.25;
  color: var(--text-main);
  margin-bottom: 0;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 2.5em; /* 2 satır */
}

.kp-market-meta{
  font-size:0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  min-height: 0.95em;
}

/* Placeholder satırlar: hizayı koru, içeriği gizle */
.kp-placeholder{ visibility:hidden; }

/* Satıcı satırı (başlığın biraz altında) */
.kp-market-sellerline{
  display:flex;
  align-items:center;
  gap:0.4rem;
  min-width:0;
  font-size:0.74rem;
  color: var(--text-muted);
  margin-top: 0;
  min-height: 1.15em;
}
.kp-market-sellerline .kp-seller-name{
  color: var(--text-main);
  font-weight:900;
  min-width:0;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9.5rem;
}

/* Badge var/yok hizasını sabitle: her zaman aynı alan ayrılsın */
.kp-seller-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

/* Bilgi satırı (ilan: puan+işlem / supermarket: stok) */
.kp-market-inforow{
  display:flex;
  align-items:center;
  gap:0.55rem;
  min-width:0;
  font-size:0.74rem;
  color: var(--text-muted);
  font-weight:800;
  min-height: 1.15em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* İlan kartları: Puan satırı + Toplam İşlem satırı (2 satır) */
.kp-market-inforow.kp-market-inforow-2{
  display:flex;
  flex-direction: column;
  align-items:flex-start;
  gap:0.18rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.kp-market-infol1{
  display:flex;
  align-items:center;
  gap:0.45rem;
  min-width:0;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.kp-market-votes{
  font-weight:800;
  white-space: nowrap;
}

.kp-market-infol2{
  font-weight:800;
  white-space: nowrap;
}

.kp-market-seller{
  display:flex;
  flex-direction: column;
  align-items:flex-start;
  gap:0.25rem;
  min-width:0;
  font-size:0.74rem;
  color: var(--text-muted);
  margin-top: 0;
}
.kp-market-seller-top,
.kp-market-seller-bottom{
  display:flex;
  align-items:center;
  gap:0.4rem;
  min-width:0;
  flex-wrap:nowrap;
}
.kp-market-seller-bottom{
  gap:0.55rem;
}
.kp-seller-tx{
  font-weight:800;
  white-space: nowrap;
}

.kp-market-seller .kp-seller-name{
  color: var(--text-main);
  font-weight:900;
  min-width:0;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9.5rem;
}

.kp-market-rating{
  display:inline-flex;
  align-items:center;
  gap:0.25rem;
  font-weight:800;
  min-width: 0;
  white-space: nowrap;
}
.kp-market-star{
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  opacity: 0.95;
  color: #ef4444;
}
.kp-market-rating-text{
  display:inline-block;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 6.5rem;
}

.kp-market-stock{
  font-size:0.74rem;
  color: var(--text-muted);
  font-weight:800;
}

.kp-market-price{
  font-weight:900;
  font-size:0.85rem;
  color: var(--accent);
}

.kp-market-footer{
  display:flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kp-market-actions{
  display:flex;
  gap:0.5rem;
}
.kp-market-actions .btn{
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}
