/* Список акций /actions (2026-09-24): сетка карточек, картинка сверху, текст под ней — ничего не наезжает. */
.actions-list.deals-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0 30px;
  padding: 0;
  width: auto;
  height: auto;
}
.actions-list.deals-grid::before, .actions-list.deals-grid::after { display: none; }

.deal-card {
  display: flex; flex-direction: column;
  min-width: 0;
  font-size: 14px; line-height: 1.4;     /* у .actions-list line-height: 0 (старая раскладка inline-block) */
  white-space: normal; text-align: left;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(18, 38, 63, .08), 0 4px 14px rgba(18, 38, 63, .06);
  overflow: hidden;
  color: inherit; text-decoration: none !important;
  transition: box-shadow .15s, transform .15s;
}
.deal-card:hover { box-shadow: 0 4px 10px rgba(18, 38, 63, .12), 0 10px 26px rgba(18, 38, 63, .10); transform: translateY(-2px); }

.deal-card__img {
  display: block; position: relative;
  aspect-ratio: 16 / 9;
  background: #eef2f5;
  overflow: hidden;
}
.deal-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* логотип магазина: целиком, на белом фоне */
.deal-card__img--logo { background: #fff; border-bottom: 1px solid #eef1f4; }
.deal-card__img--logo img { object-fit: contain; padding: 18px 28px; box-sizing: border-box; }

.deal-card__body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 14px 16px 16px; min-width: 0; }
.deal-card__shop { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7b8a99; }
.deal-card__title {
  font-size: 16px; font-weight: 700; line-height: 1.3; color: #1e3246;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-card__lead {
  font-size: 20px; font-weight: 800; line-height: 1.25; color: #2eab5f;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.deal-card__lead u { text-decoration: none; }
.deal-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: auto; padding-top: 8px; font-size: 13px; color: #7b8a99; }
.deal-card__code { padding: 2px 8px; border: 1px dashed #2eab5f; border-radius: 4px; color: #1e3246; }
.deal-card__code b { letter-spacing: .03em; }
.deal-card__ends { color: #1e3246; }
.deal-card__ends--soon { color: #d9534f; font-weight: 700; }
.deal-card__host { margin-left: auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* фильтр категорий: плотнее */
.page-sales .categories-list a { white-space: nowrap; }

@media (max-width: 767px) {
  .actions-list.deals-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
  .deal-card__body { padding: 10px 12px 12px; gap: 4px; }
  .deal-card__title { font-size: 14px; }
  .deal-card__lead { font-size: 16px; }
  .deal-card__img--logo img { padding: 10px 14px; }
  .deal-card__meta { font-size: 12px; }
  .deal-card__host { margin-left: 0; }
}
@media (max-width: 420px) {
  .actions-list.deals-grid { grid-template-columns: 1fr; }
}

/* блок «Интересные акции» на главной: 4 карточки в ряд */
.index-block-actions .actions-list.deals-grid--index { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1000px; height: auto !important; min-height: 0 !important; align-items: stretch; margin: 24px auto 30px !important; }
@media (max-width: 991px) { .index-block-actions .actions-list.deals-grid--index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* все карточки акций одной высоты — и в разных рядах тоже */
.actions-list.deals-grid { grid-auto-rows: 1fr; }

/* Скидки и акции магазина на странице товара (2026-09-25): те же карточки, до 4 в ряд */
.product-shop-sales .actions-list.deals-grid--product { grid-template-columns: repeat(4, minmax(0, 1fr)); height: auto !important; min-height: 0 !important; margin: 16px 0 24px; }
@media (max-width: 991px) { .product-shop-sales .actions-list.deals-grid--product { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .product-shop-sales .actions-list.deals-grid--product { grid-template-columns: 1fr; } }
