/* ============================================
   AMD-ADLIST.CSS — responsive ad listing cards
   ============================================ */

.amd-adlist-wrap {
  width: 100%;
  background: rgba(255, 255, 255, 0.40);
  box-sizing: border-box;
}

/* ── Sort bar ─────────────────────────────── */

.amd-adlist-sortbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.30);
}

.amd-adlist-sort-lbl {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #666;
  margin-right: 2px;
  white-space: nowrap;
}

.amd-adlist-sortbtn {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #333;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.10);
  white-space: nowrap;
  transition: background 0.15s;
}

.amd-adlist-sortbtn:hover {
  background: rgba(0, 0, 0, 0.13);
  text-decoration: none;
  color: #000;
}

.amd-adlist-sortbtn--on {
  background: #3f516b;
  color: #fff !important;
  border-color: #3f516b;
}

.amd-adlist-sortbtn--on:hover {
  background: #2d3a50;
  color: #fff !important;
}

/* ── Card list container ──────────────────── */

.amd-adlist-body {
  display: flex;
  flex-direction: column;
}

/* ── Single card ──────────────────────────── */

.amd-adlist-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-decoration: none !important;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.amd-adlist-card:hover {
  background: rgba(255, 255, 255, 1);
}

.amd-adlist-card--urgent {
  border-left: 3px solid #cc0000;
}

/* ── Thumbnail ────────────────────────────── */

.amd-adlist-card-img {
  width: 130px;
  flex-shrink: 0;
  overflow: hidden;
  background: #e8eaed;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.amd-adlist-card-img img {
  display: block;
  width: 130px;
  height: 98px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.amd-adlist-card:hover .amd-adlist-card-img img {
  transform: scale(1.06);
}

.amd-adlist-nopic {
  background: #f0f2f4;
}

.amd-adlist-nopic-ico {
  font-size: 28px;
  color: rgba(0, 0, 0, 0.18);
}

/* ── Card body ────────────────────────────── */

.amd-adlist-card-body {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* Top row: name left, price right */

.amd-adlist-card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.amd-adlist-card-name {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #000066;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amd-adlist-card:hover .amd-adlist-card-name {
  text-decoration: underline;
  color: #000033;
}

.amd-adlist-card-price {
  font-family: Verdana, Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  color: #006600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Specs: year • body • km */

.amd-adlist-card-specs {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta: city • date */

.amd-adlist-card-meta {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Urgent badge ─────────────────────────── */

.amd-adlist-urgent {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #cc0000;
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.4;
}

/* ── Responsive ───────────────────────────── */

@media (max-width: 600px) {
  .amd-adlist-card-img {
    width: 90px;
  }
  .amd-adlist-card-img img {
    width: 90px;
    height: 68px;
  }
  .amd-adlist-card-body {
    padding: 6px 8px;
    gap: 3px;
  }
  .amd-adlist-card-name {
    font-size: 13px;
  }
  .amd-adlist-card-price {
    font-size: 13px;
  }
  .amd-adlist-card-specs {
    font-size: 11px;
  }
  .amd-adlist-card-meta {
    font-size: 10px;
  }
}
