/* NoComment Реклами — САМО .ncads-* (нула глобални селектори за витрината).
   Задачата на стила: окото веднага да разбере „това не е новина", БЕЗ мигане
   и въртележки. Средството е контраст на ФОРМАТА — плътен фон и кант в цвета
   на рекламодателя (златно) срещу брандовото червено на сайта. */

.ncads-slot {
  grid-column: 1 / -1;      /* пълна ширина в мрежата на витрината */
  max-width: 1000px;        /* решение на собственика: по-събрано от 1232 */
  /* ЦЕНТРИРАНО (12.09): при max-width в grid елементът се лепи вляво и
     отдясно зее празно — изглежда накриво. auto отстрани го слага по
     средата на колоната. Снимката НЕ се разтяга — ширината си остава 1000. */
  margin: 28px auto 30px;
  justify-self: center;     /* същото и когато родителят е grid */
  width: 100%;
}

.ncads-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding-left: 2px;
}
.ncads-label span {
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8a8a96;
}
.ncads-label::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(to right, rgba(201,169,110,.32), rgba(201,169,110,0));
}

.ncads-creative {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(201,169,110,.42);
  background: #12100d;
  line-height: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.42);
  transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease;
}
.ncads-creative img { display: block; width: 100%; height: auto; }

.ncads-creative:hover,
.ncads-creative:focus-visible {
  border-color: rgba(201,169,110,.85);
  filter: brightness(1.03);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 14px 40px rgba(201,169,110,.22);
}
.ncads-creative:focus-visible { outline: 2px solid #C9A96E; outline-offset: 3px; }

/* тънка златна нишка отдолу — подпис на мястото */
.ncads-creative::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  opacity: .55;
  background: linear-gradient(to right, rgba(201,169,110,0), rgba(201,169,110,.9), rgba(201,169,110,0));
}

/* ДВОЕН златен проблясък при първото показване — акцентът вместо въртележка
   (собственикът поиска два замаха един след друг). Пуска се веднъж от
   ncads.js и после не се повтаря. Двата замаха са в ЕДНА анимация с пауза
   помежду им: така вторият тръгва точно когато първият е излязъл от кадър. */
.ncads-sheen {
  position: absolute; top: 0; bottom: 0; width: 45%;
  left: -50%; opacity: 0; pointer-events: none;
  background: linear-gradient(100deg,
    rgba(201,169,110,0), rgba(201,169,110,.20) 45%,
    rgba(255,240,214,.30) 55%, rgba(201,169,110,0));
}
.ncads-sheen.is-on { animation: ncads-sweep 3.1s cubic-bezier(.3,.7,.3,1) 1; }
@keyframes ncads-sweep {
  /* първи замах */
  0%   { left: -50%; opacity: 0; }
  4%   { opacity: 1; }
  36%  { left: 105%; opacity: 0; }
  /* връщане назад, докато е невидим — читателят не вижда прескачането */
  37%  { left: -50%; opacity: 0; }
  /* кратка пауза */
  52%  { left: -50%; opacity: 0; }
  /* втори замах */
  56%  { opacity: 1; }
  88%  { left: 105%; opacity: 0; }
  100% { left: 105%; opacity: 0; }
}

@media (max-width: 719px) {
  .ncads-slot { margin: 20px auto 22px; }   /* auto и тук, иначе отменя центрирането */
}
/* ══════════════ ВЪРТЕЛЕЖКА: банер + обяви (0.1.3) ══════════════
   Първият кадър е марката, следващите са конкретни оферти. Смяната е в
   браузъра, защото началната се сервира от дисков кеш — избор, направен на
   сървъра, би замръзнал за всички до изтичане на кеша.
   Всички кадри са с ЕДНО И СЪЩО съотношение (1000:361 на компютър, 800:450 на
   телефон), за да не подскача страницата при смяна. */

.ncads-car {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(201,169,110,.42);
  background: #12100d;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.42);
}
.ncads-car::after {                      /* златната нишка минава върху кадрите */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 4;
  opacity: .55; pointer-events: none;
  background: linear-gradient(to right, rgba(201,169,110,0), rgba(201,169,110,.9), rgba(201,169,110,0));
}
/* в режим въртележка кантът е на кутията, не на всеки кадър */
.ncads-slot--car .ncads-creative {
  border: 0; border-radius: 0; box-shadow: none;
}
.ncads-slot--car .ncads-creative::after { display: none; }
.ncads-slot--car .ncads-creative:hover { filter: none; }

.ncads-track {
  display: flex;
  transition: transform .62s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.ncads-slide { flex: 0 0 100%; min-width: 0; }

/* ── карта на обява ── */
.ncads-card {
  display: grid;
  grid-template-columns: 54% 46%;
  aspect-ratio: 1000 / 361;
  background: #1b1815;
  color: #ECE7DD;
  text-decoration: none;
  line-height: 1.5;
  transition: background .25s ease;
}
.ncads-card:hover { background: #201c18; }
.ncads-card:focus-visible { outline: 2px solid #C9A96E; outline-offset: -3px; }
/* Само min-width — БЕЗ display. `.ncads-card > span` (0,1,1) побеждаваше
   `.ncads-in { display:flex }` (0,1,0), затова цената и данните излизаха слети
   без разстояние помежду си. Децата на grid/flex и без това стават блокове. */
.ncads-card > .ncads-ph,
.ncads-card > .ncads-in { min-width: 0; }

.ncads-ph { position: relative; overflow: hidden; background: #0d0c0b; }
.ncads-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ncads-ph::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 55%, rgba(27,24,21,.92) 100%);
}

.ncads-tags {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.ncads-tag {
  font: 700 10px/1 Inter, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(201,169,110,.92); color: #17140f;
}
.ncads-tag--new { background: rgba(111,191,139,.92); }

.ncads-shots {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font: 600 11px/1 Inter, -apple-system, "Segoe UI", sans-serif;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(0,0,0,.62); color: #e8e2d6;
}

.ncads-in {
  padding: 20px 22px 16px;
  display: flex; flex-direction: column;
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
}

.ncads-where {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #C9A96E; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ncads-kind {
  font-family: Lora, Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 24px; line-height: 1.18;
  margin-top: 5px; text-wrap: balance;
}
.ncads-desc {
  margin-top: 6px; font-size: 12.5px; line-height: 1.42; color: #9C9488;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ncads-price {
  margin-top: auto; padding-top: 10px;
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
}
.ncads-price b {
  font-size: 27px; font-weight: 700; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; color: #F2E6CB;
}
.ncads-price s { text-decoration: none; font-size: 12px; color: #6E675D; font-variant-numeric: tabular-nums; }

.ncads-facts {
  display: flex; gap: 13px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.ncads-f { font-size: 11.5px; color: #9C9488; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ncads-f b { color: #ECE7DD; font-weight: 600; }

.ncads-go {
  margin-top: 10px; align-self: flex-start;
  font-size: 12px; font-weight: 600; color: #17140f; background: #C9A96E;
  padding: 8px 14px; border-radius: 8px;
  transition: background .2s ease;
}
.ncads-card:hover .ncads-go { background: #F2E6CB; }

/* ── управление ── */
.ncads-arw {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(201,169,110,.4);
  background: rgba(10,9,8,.68);
  color: #F2E6CB; cursor: pointer;
  font: 400 17px/1 Inter, -apple-system, "Segoe UI", sans-serif;
  display: grid; place-items: center; padding: 0;
  opacity: 0; transition: opacity .25s ease, background .2s ease, color .2s ease;
}
.ncads-car:hover .ncads-arw,
.ncads-arw:focus-visible { opacity: 1; }
.ncads-arw:hover { background: rgba(201,169,110,.92); color: #17140f; }
.ncads-arw--l { left: 12px; }
.ncads-arw--r { right: 12px; }
.ncads-arw:focus-visible { outline: 2px solid #C9A96E; outline-offset: 2px; }

.ncads-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0; z-index: 5;
  background: rgba(242,230,203,.8);
}

.ncads-dots {
  display: flex; justify-content: center; align-items: center;
  gap: 7px; margin-top: 10px; flex-wrap: wrap;
}
.ncads-dot {
  width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(201,169,110,.28);
  transition: width .25s ease, background .25s ease;
}
.ncads-dot.is-on { width: 22px; border-radius: 999px; background: #C9A96E; }
.ncads-dot--first.is-on { background: #F2E6CB; }
.ncads-dot:focus-visible { outline: 2px solid #C9A96E; outline-offset: 3px; }

/* ── телефон: снимката пълни кадъра, текстът ляга върху нея ── */
@media (max-width: 719px) {
  .ncads-card { grid-template-columns: 1fr; aspect-ratio: 800 / 450; position: relative; }
  .ncads-ph { position: absolute; inset: 0; }
  .ncads-ph::after {
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(13,12,11,.55) 45%, rgba(13,12,11,.95) 100%);
  }
  .ncads-in { position: relative; z-index: 2; padding: 12px 14px 12px; justify-content: flex-end; }
  .ncads-kind { font-size: 19px; }
  .ncads-desc { display: none; }
  /* БЕЗ margin-top:auto на телефон. Иначе цената се лепи долу, а адресът и
     видът остават ГОРЕ — точно върху баджовете „Продава"/„Ново строителство",
     които са в слоя на снимката. Текстът се четеше един върху друг.
     Сега целият текст е един блок долу, в тъмната част на преливката. */
  .ncads-price { margin-top: 0; padding-top: 6px; }
  .ncads-price b { font-size: 22px; }
  .ncads-facts { margin-top: 6px; padding-top: 6px; gap: 10px; }
  .ncads-f { font-size: 11px; }
  .ncads-go { display: none; }
  .ncads-shots { display: none; }
  .ncads-arw { opacity: 1; width: 32px; height: 32px; font-size: 15px; }
  .ncads-arw--l { left: 7px; } .ncads-arw--r { right: 7px; }

  /* Точките остават видимо 7 px (така изглежда чисто), но получават невидима
     мишена 22x40 px — 7x7 е неуцелваемо с пръст. Разстоянието се вдига, за да
     не се застъпват мишените на съседните точки. */
  .ncads-dots { gap: 16px; padding: 2px 0; }
  .ncads-dot { position: relative; }
  .ncads-dot::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 22px; height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ncads-track { transition: none; }
  .ncads-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ncads-creative { transition: none; }
  .ncads-sheen { display: none; }
}
