/* Контейнер секции */
.cardsholder-section {
  padding: 48px 0;
}

.cardsholder-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.cardsholder-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 32px;
  color: #1a1a1a;
}

/* Сетка: на всех экранах карточки в столбик (flex-column), 
   а сами карточки — flex-контейнеры, где картинка и текст выстраиваются как нужно */
.cardsholder-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Карточка */
.cardsholder-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  width:100%;
  transition: all 0.5s ease;
}

.cardsholder-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.cardsholder-card__content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
  order: 1; /* контент выше футера */
}


/* Изображение */
.cardsholder-card__image-wrapper {
  width: 240px;
  height: auto;
  min-height: 220px;
  overflow: hidden;
}

.cardsholder-card__image {
  width: 260px;
  min-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0px;
  margin: 0;
}

/* Контент */
.cardsholder-card__content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0; /* важно для выравнивания кнопки */
  flex-grow: 1;
}

.cardsholder-card__title {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0 0 12px 0;
  color: #1a1a1a;
}

.cardsholder-card__description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

/* Кнопка */
.cardsholder-btn-primary {
  display: inline-block;
  padding: 10px 18px;
  background-color: #007bff; /* замени на свой акцентный цвет */
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  align-self: flex-start;
}

.cardsholder-btn-primary:hover {
  background-color: #0056b3;
}

.cardsholder-card__footer {
  background-color: #f8f9fa;
  padding: 16px 24px;
  width: 100%;
  box-sizing: border-box;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  display: flex;
  align-items: center;
  order: 2;
  justify-content: space-between;
  flex-grow: 0;
}


.cardsholder-card__label {
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
}

.cardsholder-card__price {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  white-space: nowrap;
}


/* Анимация исчезновения карточек */
.cardsholder-card.hidden {
  opacity: 0;                /* прозрачность */
  transform: scale(0.95);    /* лёгкое сжатие */
  height: 0;                 /* схлопываем высоту */
  padding: 0;                /* убираем внутренние отступы */
  margin: 0;                 /* убираем внешние отступы */
  border: none;              /* убираем рамку */
  box-shadow: none;           /* убираем тень */
  overflow: hidden;           /* чтобы контент не вылезал при схлопывании */
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* более плавная кривая */
}

/* Бейдж возле заголовка */
.cardsholder-title-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cardsholder-badge {
  background: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cardsholder-badge-close {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 1.1rem;
}

.cardsholder-badge-close:hover {
  color: #d9534f;
}

/* Ссылки-хэштеги в футере */
.cardsholder-tag-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.cardsholder-tag-link:hover {
  text-decoration: underline;
}

.cardsholder-badge-close svg {
  color: #d9534f;
  width: 16px;
  height: 16px;
}

.cardsholder-badge-close:hover svg {
  color: #dc3545;
}

/* Мобильная версия: картинка сверху, текст снизу */
@media (max-width: 768px) {

  .cardsholder-card__footer {
    justify-content: center; /* на мобильном — по центру */
  }

  .cardsholder-card {
    flex-direction: column;
  }

  .cardsholder-card__image-wrapper {
    width: 100%;
    height: 220px;
    min-width: auto;
    padding-top: 20px;
  }

  .cardsholder-card__image {
    height: 100%;
    min-height: auto;
  }

  .cardsholder-card__content {
    padding: 20px;
    flex-grow: 0;
  }

  .cardsholder-card__footer {
    padding: 16px 20px;
  }

  .cardsholder-card__label,
  .cardsholder-card__price {
    display: block;
    width: 100%;
    text-align: center;
  }

}
