/* СКОВЗНАЯ карточка товара rf-product-card + сетка rf-product-grid.
   Используется: главная (табы), категории, поиск/акции (план). Стили общие — не дублировать */

/* ===== Сетка карточек товара ===== */
.rf-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 16px;
}

.rf-product-grid.tab-pane {
    display: none;
}

.rf-product-grid.tab-pane.active {
    display: grid;
}

.rf-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e3e8e3; /* --rf-border */
    border-radius: 14px; /* --rf-radius */
    overflow: hidden;
    position: relative;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.rf-product-card:hover {
    transform: translateY(-2px);
    border-color: #c8d0c8; /* --rf-neutral-300 */
    box-shadow: 0 4px 8px rgba(15, 30, 18, .06), 0 12px 30px rgba(15, 30, 18, .08);
}

.rf-product-card--discount::before {
    content: "Акция";
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    background: #c8342a; /* --rf-danger */
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    border-radius: 999px;
}

.rf-product-card__media {
    display: block;
    background: #f6f8f6; /* --rf-surface */
    padding: 0;
    height: 180px; /* фикс-высота контейнера, img заполняет (height:100%/cover) */
    overflow: hidden;
    text-decoration: none;
}

.rf-product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rf-product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.rf-product-card__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1f1a; /* --rf-text */
    text-decoration: none;
    margin-bottom: 2px;
}

.rf-product-card__title:hover {
    color: #2d6a3e; /* --rf-accent */
    text-decoration: underline;
}

.rf-product-card__model {
    font-size: 12px;
    color: #9aa49a; /* --rf-neutral-400 */
    margin-bottom: 10px;
}

.rf-product-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: auto;
}

.rf-product-card__price-current {
    font-size: 17px;
    font-weight: 800;
    color: #1a1f1a; /* --rf-text */
}

.rf-product-card--discount .rf-product-card__price-current {
    color: #c8342a; /* --rf-danger */
}

.rf-product-card__price-old {
    font-size: 13px;
    color: #9aa49a; /* --rf-neutral-400 */
    text-decoration: line-through;
}

.rf-product-card__price-tax {
    display: none;
}

.rf-product-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    background: #2d6a3e; /* --rf-accent */
    color: #fff;
    border: none;
    border-radius: 10px; /* --rf-radius-sm */
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.rf-product-card__btn svg {
    width: 16px;
    height: 16px;
}

.rf-product-card__btn:hover {
    background: #1f4a2c; /* --rf-accent-dark */
    color: #fff;
}

.rf-product-card__btn--disabled,
.rf-product-card__btn--disabled:hover {
    background: #f1f3f1; /* --rf-neutral-100 */
    color: #9aa49a; /* --rf-neutral-400 */
    cursor: default;
}

/* ===== Адаптив карточек ===== */
@media (max-width: 480px) {
    .rf-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rf-product-card__media {
        height: 130px;
    }

    .rf-product-card__body {
        padding: 10px 12px 12px;
    }
}

/* ===== Равная высота карточек в ряду =====
   В сетках растяжка работает по умолчанию (align-items: stretch),
   в owl-каруселях — включаем явно: строка и айтемы становятся flex. */
.rf-product-grid {
    align-items: stretch;
}

.rf-carousel .owl-stage {
    display: flex;
}

.rf-carousel .owl-item {
    display: flex;
    flex: 0 0 auto;
}

.rf-carousel .owl-item > .rf-product-card {
    width: 100%;
}
