/* Главная: слайдер, преимущества, табы (карточки товара — в _product-card.css) */

/* ============================================
   ГЛАВНАЯ СТРАНИЦА (новая вёрстка rf) — включена для всех
   Модули: slideshow (content_top), преимущества (home.tpl),
   nik_home_tabs (content_bottom). Принято 2026-08-23.
   ============================================ */

/* ===== Слайдер ===== */
.rf-slideshow {
    border-radius: 14px; /* --rf-radius */
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 30, 18, .04), 0 6px 18px rgba(15, 30, 18, .04);
}

.rf-slideshow .owl-carousel .item img,
.rf-slideshow .owl-carousel img {
    width: 100%;
    border-radius: 0;
}

/* ===== Преимущества ===== */
.rf-advantages {
    margin: 28px 0;
}

.rf-advantages__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rf-advantage {
    background: #fff; /* --rf-surface-2 */
    border: 1px solid #e3e8e3; /* --rf-border */
    border-radius: 14px; /* --rf-radius */
    padding: 22px 20px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.rf-advantage: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-advantage__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #e8f3ec; /* --rf-accent-soft */
    color: #2d6a3e; /* --rf-accent */
}

.rf-advantage__icon svg {
    width: 22px;
    height: 22px;
}

.rf-advantage__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1f1a; /* --rf-text */
}

.rf-advantage__desc {
    font-size: 13px;
    color: #5a655a; /* --rf-text-muted */
    margin: 0;
    line-height: 1.5;
}

/* ===== Табы товаров ===== */
.rf-catalog__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
}

.rf-catalog__tab-link {
    display: inline-block;
    padding: 9px 18px;
    background: #fff;
    border: 1px solid #e3e8e3; /* --rf-border */
    border-radius: 999px;
    color: #1a1f1a; /* --rf-text */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}

.rf-catalog__tab-link:hover,
.rf-catalog__tab.active .rf-catalog__tab-link {
    background: #2d6a3e; /* --rf-accent */
    border-color: #2d6a3e;
    color: #fff;
}

/* ===== Адаптив главной ===== */
@media (max-width: 992px) {
    .rf-advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .rf-advantages__grid {
        grid-template-columns: 1fr;
    }
}
/* ===== ГЛАВНАЯ (rf): приветствие с H1 и цифрами, категории 2/3/2, карусели
   популярных/новинок, купоны, преимущества, CTA. Перенесено с превью 2026-08-23.
   Карточки — _product-card.css, купоны — discounts.css, rf-cta — _components.css. */

/* ===== Приветствие + цифры ===== */
.rf-intro {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: center;
    background: var(--rf-surface, #f6f8f6);
    border: 1px solid #e3e8e3;
    border-radius: 14px;
    padding: 30px 28px;
    margin: 36px 0 34px; /* сверху — тот же ритм, что между секциями */
}

.rf-intro__title {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #1a1f1a;
    margin: 0 0 10px;
}

.rf-intro__sub {
    margin: 0 0 18px;
    max-width: 540px;
}

.rf-intro__sub p {
    font-size: 15px;
    line-height: 1.6;
    color: #5a655a;
    margin: 0;
}

.rf-intro__sub p + p {
    margin-top: 6px;
}

.rf-intro__sub .rf-intro__lead {
    color: #1a1f1a;
    font-weight: 600;
}

.rf-intro__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rf-intro__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 170px;
    padding: 13px 22px;
    background: #2d6a3e;
    border: 1px solid #2d6a3e;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}

.rf-intro__btn:hover {
    background: #1f4a2c;
    color: #fff;
}

.rf-intro__btn--ghost {
    background: #fff;
    border-color: #c8d0c8;
    color: #1a1f1a;
}

.rf-intro__btn--ghost:hover {
    border-color: #2d6a3e;
    color: #1f4a2c;
    background: #fff;
}

.rf-intro__btn--ghost svg {
    width: 17px;
    height: 17px;
    color: #2d6a3e;
}

/* Цифры: сетка 2×3 */
.rf-intro__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.rf-stat {
    background: #fff;
    border: 1px solid #e3e8e3;
    border-radius: 12px;
    padding: 16px 14px 13px;
    text-align: center;
}

.rf-stat__num {
    display: block;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #2d6a3e;
    margin-bottom: 5px;
}

.rf-stat__label {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: #5a655a;
}

/* ===== Секции ===== */
.rf-home-section {
    margin-bottom: 36px;
}

.rf-home-section__title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #1a1f1a;
    margin: 0 0 16px;
}

.rf-home-section__link {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #2d6a3e;
    text-decoration: underline;
}

.rf-home-section__link:hover {
    color: #1f4a2c;
}

/* ===== Плитки категорий: раскладка 2 / 3 / 2 ===== */
.rf-cat-tiles {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

/* Инъекционные | Оральные */
.rf-cat-tile:nth-child(6n+1),
.rf-cat-tile:nth-child(6n+2) {
    grid-column: span 3;
}

/* ПКТ | Аптека | Жиросжигатели */
.rf-cat-tile:nth-child(6n+3),
.rf-cat-tile:nth-child(6n+4),
.rf-cat-tile:nth-child(6n+5) {
    grid-column: span 2;
}

/* Гормон роста | Пептиды */
.rf-cat-tile:nth-child(6n+6) {
    grid-column: span 3;
}

.rf-cat-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e3e8e3;
    border-radius: 12px;
    padding: 16px 14px;
    text-decoration: none;
    transition: border-color .15s, background .15s, transform .15s;
}

.rf-cat-tile:hover {
    border-color: #2d6a3e;
    background: #f6f8f6;
    transform: translateY(-2px);
}

.rf-cat-tile__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e8f3ec;
    color: #2d6a3e;
}

.rf-cat-tile__icon svg {
    width: 21px;
    height: 21px;
}

.rf-cat-tile__name {
    font-size: 14.5px;
    font-weight: 700;
    color: #1a1f1a;
    line-height: 1.3;
}

/* ===== Карусель популярных (owl) ===== */
.rf-carousel .rf-product-card {
    width: 100%;
    margin: 0;
}

.rf-carousel .owl-nav {
    opacity: 1 !important; /* старая тема прячет до hover — на мобиле не видно */
}

.rf-carousel .owl-nav .owl-prev,
.rf-carousel .owl-nav .owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px !important;
    height: 40px !important;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* фирменный градиент; !important — старая тема красит стрелки в белый с !important */
    background: linear-gradient(135deg, #1a3324 0%, #2d6a3e 100%) !important;
    border: 1px solid #2d6a3e;
    border-radius: 10px;
    color: #fff !important;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(15, 30, 18, .18) !important;
    transition: opacity .15s, transform .15s;
}

.rf-carousel .owl-nav .owl-prev:hover,
.rf-carousel .owl-nav .owl-next:hover {
    color: #fff;
    opacity: .88;
}

.rf-carousel .owl-nav svg {
    width: 18px;
    height: 18px;
}

.rf-carousel .owl-nav .owl-prev { left: -12px; }
.rf-carousel .owl-nav .owl-next { right: -12px; }

.rf-home-section .rf-advantages {
    margin: 0;
}

/* ===== Адаптив ===== */
@media (max-width: 992px) {
    .rf-cat-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .rf-cat-tile:nth-child(n) {
        grid-column: auto;
    }

    .rf-intro {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rf-carousel .owl-nav .owl-prev { left: -6px; }
    .rf-carousel .owl-nav .owl-next { right: -6px; }
}

@media (max-width: 480px) {
    .rf-intro {
        padding: 22px 18px;
    }

    .rf-intro__title {
        font-size: 26px;
    }

    .rf-intro__btn {
        min-width: 0;
        width: 100%;
    }

    .rf-carousel .owl-nav .owl-prev,
    .rf-carousel .owl-nav .owl-next {
        width: 34px !important;
        height: 34px !important;
    }

    .rf-carousel .owl-nav svg {
        width: 15px;
        height: 15px;
    }
}

/* Интро-абзац секции (купоны) */
.rf-home-section__intro {
    font-size: 15px;
    line-height: 1.6;
    color: #5a655a;
    max-width: 760px;
    margin: -6px 0 16px;
}
