.homefeed { position: relative; }
.homefeed__title { margin-bottom: 12px; }
.homefeed__more { display: flex; justify-content: center; padding: 24px 0; }
.homefeed__more[hidden] { display: none; }
.homefeed__spinner {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid rgba(0,0,0,.12); border-top-color: rgba(0,0,0,.5);
    animation: homefeed-spin .8s linear infinite;
}
@keyframes homefeed-spin { to { transform: rotate(360deg); } }
.homefeed__end { text-align: center; color: #888; padding: 16px 0; font-size: 14px; }

/* Блок в карточке товара: встроенные карточки как в instock («В наличии сейчас») */
.homefeed_product { margin: 40px 0 20px; }
.homefeed_product .homefeed__title { font-size: 22px; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.homefeed-cards {
    display: grid;
    grid-template-columns: repeat(var(--homefeed-cols, 6), minmax(0, 1fr));
    gap: 28px 24px;
}
.homefeed__list .homefeed-cards + .homefeed-cards { margin-top: 28px; }
.homefeed-card { min-width: 0; }
.homefeed-card__link { display: block; color: inherit; text-decoration: none; }
.homefeed-card__link:hover .homefeed-card__name { color: var(--cheme-color, #e30016); }
.homefeed-card__img { display: block; height: 140px; margin-bottom: 8px; overflow: hidden; }
.homefeed-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.homefeed-card__badge {
    display: inline-block; margin-bottom: 8px; background: #12a44a; color: #fff; font-size: 13px; font-weight: 700;
    padding: 3px 8px; border-radius: 4px; line-height: 1.2;
}
.homefeed-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.homefeed-card__price { font-size: 17px; font-weight: 700; line-height: 1.2; }
.homefeed-card__name {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 13px; line-height: 1.4; color: #222; min-height: 4.2em; transition: color .3s ease-out;
}
.homefeed-card__rating { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #222; flex: none; }
.homefeed-card__rating .star { flex: none; }
.homefeed-card__rating b { font-weight: 600; }
.homefeed-card__rating span { color: #888; }
@media (max-width: 760px) {
    .homefeed_product .homefeed__title { font-size: 18px; }
    .homefeed-cards { gap: 20px 12px; }
}

/* Встроенная плитка (когда в теме нет шаблона списка товаров) */
.homefeed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.homefeed-grid__item { border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #fff; }
.homefeed-grid__link { display: block; color: inherit; text-decoration: none; }
.homefeed-grid__img { display: block; aspect-ratio: 1 / 1; background: #f6f6f6; }
.homefeed-grid__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.homefeed-grid__name { display: block; padding: 8px 10px 0; font-size: 14px; line-height: 1.3; min-height: 2.6em; }
.homefeed-grid__price { display: block; padding: 6px 10px 10px; font-weight: 600; }
.homefeed-grid__old { color: #999; font-weight: 400; margin-left: 6px; }
