/* zem-cards.css (13.10.2026, решение на Христо): картите на обявите в списъците.
   Телефон (до 600 px): снимката на цял ред над заглавието (квадрат, защото списъкът
   подава квадратни изрезки и лога; така нищо не се реже), описанието до 4 реда на 17 px
   с избледняване, цялата карта е натискаема (невидим слой от връзката на заглавието;
   скролването не се засяга; от 13.10 вечерта и на десктоп). Обява без снимка: без празната кутия (лист от
   zem-listings-mobile.php), картата започва от заглавието.
   Десктоп (от 768 px): еднакъв отстъп отляво и отдясно (празният .clr в .post-block
   заемаше 21 px до цената), описанието до 6 реда, снимката остава 110 px.
   Ширини 601-767 px остават както са. Изключване: wp option add zem_cards_off 1 --autoload=no.
   Зарежда се след zem-design.css и zem-perf-fix.css (zem-cards.php, wp_head 99). */

@media (max-width: 600px) {
  html body .post-block-out .post-block {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "image" "title" "price" "meta" "location" "desc" !important;
    gap: 8px 0 !important;
  }
  html body .post-block-out .post-left,
  html body .post-block-out .post-left a,
  html body .post-block-out .post-left a.preview {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    display: block !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
  }
  html body .post-block-out .post-left img {
    width: 100% !important;
    max-width: none !important;
    max-height: 320px !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover !important;
    border-radius: 6px;
    position: static !important;
  }
  /* Обява без снимка: кутията с листа (zem-listings-mobile.php) се маха. */
  html body .post-block-out .post-left.zem-noimg {
    display: none !important;
  }
  html body .post-block-out .post-right.full > h3,
  html body .post-block-out .post-right.full > h2 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  html body .post-block-out .post-right.full > p.post-desc {
    font-size: 17px !important;
    line-height: 1.5 !important;
    max-height: 6em;
    overflow: hidden;
    position: relative;
  }
  html body .post-block-out .post-right.full > p.post-desc::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.6em;
    background: linear-gradient(to bottom, rgba(253, 251, 246, 0), var(--zem-cream, #fdfbf6));
    pointer-events: none;
  }
}

@media (min-width: 768px) {
  html body .post-block-out {
    padding-right: 17px !important;
  }
  html body .post-block-out .post-block > .clr {
    display: none !important;
  }
  html body .post-block-out .post-right,
  html body .post-block-out .post-right.full {
    flex: 1 1 100% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  html body .post-block-out .post-right > p.post-desc {
    max-height: 6.4em;
    overflow: hidden;
    position: relative;
  }
  html body .post-block-out .post-right > p.post-desc::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.6em;
    background: linear-gradient(to bottom, rgba(253, 251, 246, 0), var(--zem-cream, #fdfbf6));
    pointer-events: none;
  }
}

/* Цялата карта води към обявата на всички ширини (Христо, 13.10): невидим слой
   от връзката на заглавието покрива картата; скролването не се засяга. */
html body .post-block-out {
  position: relative !important;
  cursor: pointer;
}
html body .post-block-out .post-right.full > h3 > a::after,
html body .post-block-out .post-right.full > h2 > a::after,
html body .post-block-out .post-right > h3 > a::after,
html body .post-block-out .post-right > h2 > a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
