/* =====================================================================
                        1) КАТАЛОГ: сетка + карточка
   ===================================================================== */

.listings {
  display: flow-root;
  padding-inline: var(--padding-x);
  margin: 0;
}

.listings__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Адаптивная сетка карточек */
/* 320px - 600px: 1 карточка в ряд */
@media (min-width: 320px) and (max-width: 599px) {
  .listings__grid,
  .catalog__list .listings__grid,
  .catalog.catalog--no-filters .listings__grid {
    grid-template-columns: 1fr !important;
  }
}

/* Оптимизация для экранов от 320px */
@media (max-width: 480px) {
  .listings {
    padding-inline: var(--padding-x);
  }

  .listing-card__content {
    padding: 0.75rem;
  }

  .listing-card__title {
    font-size: 0.875rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .listing-card__price {
    font-size: 0.9375rem;
  }

  .listing-card__meta {
    font-size: 0.8125rem;
  }
}

/* Очень маленькие экраны (320px) */
@media (max-width: 360px) {
  .listing-card__content {
    padding: 0.5rem;
  }

  .listing-card__title {
    font-size: 0.8125rem;
  }

  .listing-card__price {
    font-size: 0.875rem;
  }
}

/* 600px - 800px: 2 карточки в ряд */
@media (min-width: 600px) and (max-width: 799px) {
  .listings__grid,
  .catalog__list .listings__grid,
  .catalog.catalog--no-filters .listings__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 800px и выше: 3 карточки в ряд */
@media (min-width: 800px) {
  .listings__grid,
  .catalog__list .listings__grid,
  .catalog.catalog--no-filters .listings__grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Специальные стили для секции "Proprietăți similare" на странице объявления */
/* Карточки должны быть шире, примерно как контейнер "Distribuie" (360px) */
/* В сайдбаре карточки всегда в одну колонку, чтобы занимать всю ширину */
.single .similar .listings__grid {
  grid-template-columns: 1fr !important;
  gap: 1rem;
}

/* Анимации появления карточек отключены для лучшей производительности */

/* =====================================================================
                    SKELETON SCREENS ДЛЯ КАРТОЧЕК
   ===================================================================== */

.listing-card-skeleton {
  position: relative;
  background: #fff;
  border: 1px solid rgb(var(--black) / 0.08);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.listing-card-skeleton__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

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

.listing-card-skeleton__content {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.listing-card-skeleton__title {
  height: 1.25rem;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  width: 80%;
}

.listing-card-skeleton__price {
  height: 1.5rem;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  width: 60%;
}

.listing-card-skeleton__meta {
  height: 1rem;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  width: 70%;
}

.listing-card-skeleton__attrs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.listing-card-skeleton__attr {
  height: 0.875rem;
  width: 3rem;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* Индикатор загрузки для AJAX */
.catalog.is-loading {
  position: relative;
}

.catalog.is-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.catalog.is-loading .listings__grid::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid rgba(220, 38, 38, 0.2);
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  z-index: 11;
  pointer-events: none;
}

@keyframes spinner-rotate {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.catalog.is-loading::before {
  opacity: 1;
}

.listing-card {
  position: relative;
  background: #fff;
  border: 1px solid rgb(var(--black) / 0.08);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  transform: translateY(0);
}

.listing-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: rgb(var(--black) / 0.16);
  transform: translateY(-2px);
}

.listing-card__body {
  display: grid;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: default !important;
}

.listing-card__body:active {
  opacity: 0.9;
}

.listing-card__media {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #f6f6f6;
  overflow: hidden;
  min-height: 0;
}

.listing-card__media img,
.listing-card__media video {
  cursor: default !important;
}

/* Курсор по умолчанию для всего контента карточки */
.listing-card__body,
.listing-card__body * {
  cursor: default !important;
}

/* Watermark (водяной знак) на изображениях объявлений */
.listing-card__media::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 50px;
  background-image: url("/assets/images/logo-admin.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
  filter: brightness(0) invert(1); /* Делаем логотип белым для лучшей видимости */
}

.listing-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  cursor: default !important;
}

.listing-card__img[data-lazy="true"] {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.listing-card__img[data-lazy="true"].loaded {
  opacity: 1;
  animation: none;
}

.listing-card__no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #666;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

/* Бейджи */
.listing-card__badges {
  position: absolute;
  inset: 0.5rem auto auto 0.5rem;
  display: flex;
  gap: 0.35rem;
  z-index: 1;
}

.listing-card__content {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
}

.listing-card__title {
  font-weight: 600;
  line-height: 1.3;
}

.listing-card__price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--red-80);
}

.listing-card__price .price__old {
  text-decoration: line-through;
  text-decoration-color: #b00020;
  color: #b00020;
  opacity: 0.8;
  margin-right: 8px;
  font-weight: 400;
}

.listing-card__price .price__new {
  font-weight: 700;
}

.listing-card__currency {
  margin-left: 0.15rem;
}

.listing-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.listing-card__icon {
  flex: 0 0 auto;
}

.listing-card__attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.listing-card__attr {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgb(var(--black) / 0.12);
  border-radius: 999px;
  background: #fff;
}

/* =====================================================================
                        2) КАТАЛОГ: тулбар + пагинация
   ===================================================================== */

.catalog__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 1rem 0;
  flex-wrap: nowrap;
}

.toolbar__right {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

/* Кнопка TG и счётчик */
.btn.btn-telegram,
.toolbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 10px;
}

.btn.btn-telegram {
  gap: 0.4rem;
  padding: 0 0.95rem;
  background: #ff0000;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08);
  transition: background 0.3s ease;
  /* Убираем движение при hover - только изменение цвета */
  transform: none !important;
}

.btn.btn-telegram:hover {
  background: rgb(201, 33, 33);
  /* Убираем движение при hover - только изменение цвета */
  transform: none !important;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08);
}

.btn.btn-telegram .tg-ico {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.toolbar__count {
  padding: 0 0.75rem;
  background: #fff;
  border: 1px solid rgba(34, 34, 34, 0.12);
  font-weight: 600;
  color: var(--black, #222);
}

.sort-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sort-form__label {
  font-weight: 600;
  color: var(--black, #222);
}

.sort__form--select {
  width: 100%;
  min-width: 240px;
  height: 34px;
  padding: 0 0.9rem;
  font-size: 14px;
  border-radius: var(--border-radius, 10px);
  border: 1px solid rgba(34, 34, 34, 0.12);
  background: #fff;
  color: var(--black, #222);
}

@media (max-width: 480px) {
  .sort__form--select {
    min-width: 0;
    max-width: 100%;
  }
}

/* Пагинация */
.pagination {
  margin-block: 1rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.pagination__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  border: 1px solid rgb(var(--black) / 0.12);
  border-radius: var(--border-radius);
  background: #fff;
  color: rgb(var(--black));
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.03) inset;
  transition: transform var(--transition-duration),
    box-shadow var(--transition-duration),
    border-color var(--transition-duration),
    background-color var(--transition-duration),
    color var(--transition-duration);
}

.pagination__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
}

.pagination__link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}

.pagination__link:focus-visible {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px
    color-mix(in oklab, var(--accent-color) 30%, transparent);
}

.pagination__link.is-current {
  font-weight: 600;
  border-color: var(--accent-color);
  background: color-mix(in oklab, var(--accent-color) 8%, #fff);
  box-shadow: 0 0 0 2px
    color-mix(in oklab, var(--accent-color) 25%, transparent);
}

.pagination__link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* =====================================================================
   3) СТРАНИЦА ОБЪЯВЛЕНИЯ: хлебные крошки, бар, галерея, info, контакты
   ===================================================================== */

html,
body {
  overflow-x: clip;
}

.single {
  overflow-x: hidden;
  padding: var(--padding-x);
  color: var(--black);
}

/* Топлайн */
.single .single__topline {
  margin-bottom: 0;
}

.single .single__topline .breadcrumbs {
  margin: 0 0 0.5rem 0;
}

.single .single__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  color: rgba(34, 34, 34, 0.65);
  margin-bottom: 0.5rem;
}

.single .single__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.single .single__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.single .single__bar-left {
  flex: 1;
  min-width: 0;
}

.single .single__bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.single .single__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .single .single__bar {
    flex-wrap: wrap;
  }
}

/* Стили для кнопки TikTok перенесены в конец файла с максимальной специфичностью */

.single .single__bar .btn.btn-telegram {
  flex-shrink: 0;
}

.single .single__price {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 34px;
  padding: 0 0.95rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08);
  color: var(--red-80);
  font-weight: 700;
  white-space: nowrap;
}

.single .single__price .price__old {
  text-decoration: line-through;
  text-decoration-color: #b00020;
  color: #b00020;
  opacity: 0.8;
  font-weight: 400;
}

.single .single__price .price__new {
  font-weight: 700;
  color: var(--red-80);
}

.single__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

.single__left,
.single__aside {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Informație */
.single .info {
  margin-top: 1rem;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}


.single .info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1rem;
}

.single .info__grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.single .info__grid dt {
  color: rgba(34, 34, 34, 0.65);
}

.single .info__grid dd {
  margin: 0;
  font-weight: 600;
  color: var(--black);
}

/* Descriere Accordion */
.single .info__description-accordion {
  background: #fff;
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.single .info__description-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.2s ease;
}

.single .info__description-summary::-webkit-details-marker {
  display: none;
}

.single .info__description-summary::marker {
  display: none;
}

.single .info__description-summary:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.single .info__description-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--black);
}

.single .info__description-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--black);
  line-height: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.single .info__description-icon--close {
  display: none;
}

.single .info__description-accordion[open] .info__description-icon--plus {
  display: none;
}

.single .info__description-accordion[open] .info__description-icon--close {
  display: inline-block;
}

.single .info__description-wrapper {
  padding: 0 1.25rem 1.25rem;
}

.single .info__description {
  color: var(--black);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  white-space: normal;
}

.single .info__description p {
  margin: 0 0 1rem 0;
}

.single .info__description p:last-child {
  margin-bottom: 0;
}

.single .info__description strong {
  font-weight: 600;
}

.single .info__description ul {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.single .info__description ul:last-child {
  margin-bottom: 0;
}

.single .info__description li {
  margin-bottom: 0.5rem;
}

.single .info__description li:last-child {
  margin-bottom: 0;
}


/* Контакты */
.single .panel {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.single .panel__title {
  margin: 0;
  font-size: 1rem;
  color: var(--black);
}

.single .single__contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.single .contactform {
  display: grid;
  gap: 1rem;
}

.single .contactform__row input {
  height: 2.2rem;
  width: 100%;
  padding: 0 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--border-radius);
  background: #fff;
  color: var(--black);
}

.single .contactform__row input::placeholder {
  color: rgba(34, 34, 34, 0.65);
}

.single .contactform__row input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Иконки в кнопках */
.btn__icon {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: inherit;
  stroke: currentColor;
  fill: none;
}

/* Белая иконка для кнопок с белым текстом */
.btn--primary .btn__icon,
.btn.btn--primary .btn__icon {
  color: #ffffff;
  stroke: #ffffff;
}

.btn:hover .btn__icon {
  transform: scale(1.1);
}

.single .contactform__submit,
.single .contacts__call {
  background: var(--red-80);
  color: #fff;
  border: 0;
  height: 2.2rem;
  width: 100%;
  border-radius: var(--border-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.single .contactform__submit:hover,
.single .contacts__call:hover {
  background: rgb(201, 33, 33);
}

/* =====================================================================
                             4) ЛАЙТБОКС
   ===================================================================== */

#lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  overflow: hidden;
}

#lightbox.is-open {
  display: flex;
}

body.lb-open {
  overflow: hidden;
}

.lb {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.lb.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lb__media {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  overflow: visible; /* Позволяем watermark выходить за границы если нужно */
}

/* Скрываем watermark по умолчанию */
.lb__watermark {
  display: none;
}

.lb__img {
  /* Изображение адаптируется по размеру без обрезки */
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  cursor: default !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  /* Плавное масштабирование с сохранением качества */
  image-rendering: auto;
  position: relative;
  overflow: visible; /* Позволяем watermark выходить за границы если нужно */
  /* Анимация открытия с zoom эффектом */
  transform: scale3d(0.5, 0.5, 0.5);
  opacity: 0;
  transform-origin: 50% 50%;
  transition: opacity 250ms cubic-bezier(0, 0, 0.25, 1),
    transform 250ms cubic-bezier(0, 0, 0.25, 1);
}

/* Когда изображение загружено - показываем с анимацией */
.lb.is-open .lb__img[src] {
  transform: scale3d(1, 1, 1);
  opacity: 1;
}

/* Если изображение еще загружается */
.lb__img:not([src]),
.lb__img[src=""] {
  transform: scale3d(0.5, 0.5, 0.5);
  opacity: 0;
}

/* Watermark для lightbox - отдельный элемент для полного контроля */
.lb__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  width: 300px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0, 0, 0.25, 1);
}

.lb.is-open .lb__watermark {
  opacity: 1;
}

.lb__watermark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Делаем логотип белым */
  opacity: 0.5; /* Прозрачность 50% */
}

/* Адаптивность watermark для мобильных */
@media (max-width: 768px) {
  .lb__watermark {
    width: 200px;
    height: 67px;
  }
}

/* Для средних экранов */
@media (min-width: 769px) and (max-width: 1200px) {
  .lb__watermark {
    width: 250px;
    height: 83px;
  }
}

/* Для очень больших экранов */
@media (min-width: 1920px) {
  .lb__watermark {
    width: 400px;
    height: 133px;
  }
}

/* На мобильных устройствах: изображение полностью помещается с отступами */
@media (max-width: 768px) {
  .lb__media {
    padding: 12px;
  }

  .lb__img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Убираем aspect-ratio и фиксированные размеры, чтобы изображение сохраняло свои пропорции */
  }
}

.lb__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  pointer-events: auto;
  transition: background-color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lb__btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.lb__btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.lb__prev {
  left: 20px;
}

.lb__prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lb__next {
  right: 20px;
}

.lb__next:hover {
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .lb__btn {
    width: 44px;
    height: 44px;
  }

  .lb__btn svg {
    width: 20px;
    height: 20px;
  }

  .lb__prev {
    left: 12px;
  }

  .lb__next {
    right: 12px;
  }
}

/* Верхняя панель */
.lb__topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 70%,
    transparent 100%
  );
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
}

/* Создаем невидимую зону в верхней части lightbox для hover */
.lb__topbar-hover-zone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px; /* Зона для наведения курсора */
  z-index: 1001;
  pointer-events: auto;
  background: transparent;
}

/* Показываем панель при наведении на верхнюю зону */
.lb__topbar-hover-zone:hover ~ .lb__topbar,
.lb__topbar-hover-zone:hover + .lb__topbar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Также показываем при наведении непосредственно на панель */
.lb__topbar:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lb__topbar > * {
  pointer-events: auto;
}

.lb__counter {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lb__counter-current {
  font-weight: 600;
}

.lb__counter-separator {
  opacity: 0.7;
  margin: 0 0.125rem;
}

.lb__topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lb__action-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  text-decoration: none;
}

.lb__action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.lb__action-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.lb__action-btn--close {
  background: rgba(255, 255, 255, 0.2);
}

.lb__action-btn--close:hover {
  background: rgba(255, 0, 0, 0.3);
}

/* Кнопка сетки в правом нижнем углу */
.lb__grid-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1001;
  padding: 0;
}

.lb__grid-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.lb__grid-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Всплывающее окно для шаринга */
.lb__share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100003;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: share-popup-fade 2s ease-out forwards;
}

@keyframes share-popup-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
}

.lb__share-popup-content {
  text-align: center;
  font-size: 0.9375rem;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .lb__topbar {
    padding: 0.75rem 1rem;
  }

  .lb__counter {
    font-size: 0.875rem;
  }

  .lb__action-btn {
    width: 36px;
    height: 36px;
  }

  .lb__action-btn svg {
    width: 18px;
    height: 18px;
  }

  .lb__grid-btn {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
  }
}

/* =====================================================================
                     5) БЕЙДЖИ: общий вид + точки
   ===================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: #fff;
  color: #000;
  border-radius: var(--border-radius);
  padding: 0.25rem 0.5rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset;
  line-height: 1;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--red-80);
}

.listing-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #fff;
  color: var(--black, #222);
  border: 1px solid rgba(34, 34, 34, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.listing-card__badge .badge__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--red-80, #d90429);
  flex: 0 0 0.55rem;
}

.listing-card__badge--oferta_fierbinte .badge__dot,
.listing-card__badge[data-badge="oferta_fierbinte"] .badge__dot,
.listing-card__badge--hot .badge__dot,
.listing-card__badge[data-badge="hot"] .badge__dot {
  background: #ff7a00;
}

.listing-card__badge--pret_nou .badge__dot,
.listing-card__badge[data-badge="pret_nou"] .badge__dot,
.listing-card__badge--newprice .badge__dot,
.listing-card__badge[data-badge="newprice"] .badge__dot {
  background: #d90429;
}

.listing-card__badge--vandut .badge__dot {
  background: #9ca3af;
}

.listing-card__badge--popular .badge__dot {
  background: #f59e0b;
}
.listing-card__badge[data-badge="vandut"] .badge__dot,
.listing-card__badge--sold .badge__dot,
.listing-card__badge[data-badge="sold"] .badge__dot {
  background: #2fb35f;
}

.listing-card__badge + .listing-card__badge {
  margin-left: 0.1rem;
}

.catalog__toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
.sort-form {
  order: -1;
  width: 100%;
}
.toolbar__right {
  order: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}
.toolbar__count {
  margin-left: auto;
}
.sort__form--select,
.sort-form .sort__form--select {
  min-width: 0;
  width: 100%;
}

/* =====================================================================
                        SEARCH RESULTS PAGE
   ===================================================================== */

.search-results {
  padding: 2rem var(--padding-x);
  min-height: 60vh;
  display: flex;
  flex-direction: column;
}

.search-results .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.search-results__header {
  margin-bottom: 2rem;
}

.search-results__header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.search-results__query {
  font-size: 1rem;
  color: #666;
}

.search-results__query strong {
  color: #000;
  font-weight: 600;
}

.search-results__count {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  font-size: 0.9375rem;
  color: #666;
}

.search-results__empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #666;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-results__empty p {
  font-size: 1.0625rem;
  margin: 0;
}

/* =====================================================================
   TIKTOK BUTTON - максимальная специфичность для перекрытия глобальных стилей
   ===================================================================== */
.single .single__bar a.single__tiktok-btn {
  position: relative !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  height: 34px !important;
  padding: 0 2.5rem 0 0.95rem !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  background: #ff0000 !important;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08) !important;
  transition: box-shadow 0.3s ease, background 0.3s ease !important;
  border: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.single .single__bar a.single__tiktok-btn:hover {
  background: rgb(201, 33, 33) !important;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08) !important;
  transform: none !important;
  color: #ffffff !important;
}

.single .single__bar a.single__tiktok-btn::before {
  content: "" !important;
  position: absolute !important;
  right: 0.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  background: center/contain no-repeat url("/assets/images/tiktok.svg") !important;
  filter: brightness(0) invert(1) !important;
  opacity: 0.95 !important;
  z-index: 1 !important;
}

/* Мобильная версия кнопки TikTok (под миниатюрками) */
.single__tiktok-btn--mobile {
  position: relative !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.4rem !important;
  height: 34px !important;
  padding: 0 2.5rem 0 0.95rem !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  font-family: system-ui, -apple-system, sans-serif !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  background: #ff0000 !important;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08) !important;
  transition: box-shadow 0.3s ease, background 0.3s ease !important;
  border: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  transform: none !important;
}

.single__tiktok-btn--mobile:hover {
  background: rgb(201, 33, 33) !important;
  box-shadow: 0 6px 16px rgba(34, 34, 34, 0.08) !important;
  transform: none !important;
  color: #ffffff !important;
}

.single__tiktok-btn--mobile::before {
  content: "" !important;
  position: absolute !important;
  right: 0.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  background: center/contain no-repeat url("/assets/images/tiktok.svg") !important;
  filter: brightness(0) invert(1) !important;
  opacity: 0.95 !important;
  z-index: 1 !important;
}
