/* 1. ПОДКЛЮЧЕНИЕ ШРИФТОВ */
/* Regular (400) */
@font-face { 
    font-family: 'Oswald'; 
    src: url('../fonts/regular.woff2') format('woff2'),
         url('../fonts/regular.ttf') format('truetype'); 
    font-weight: 400; 
    font-style: normal;
    font-display: swap; /* Чтобы текст не пропадал при загрузке */
}

/* Semi-Bold (600) */
@font-face { 
    font-family: 'Oswald'; 
    src: url('../fonts/600.woff2') format('woff2'),
         url('../fonts/600.ttf') format('truetype'); 
    font-weight: 600; 
    font-style: normal;
    font-display: swap;
}

/* Light (300) */
@font-face { 
    font-family: 'Oswald'; 
    src: url('../fonts/300.woff2') format('woff2'),
         url('../fonts/300.ttf') format('truetype'); 
    font-weight: 300; 
    font-style: normal;
    font-display: swap;
}

/* 2. БАЗОВЫЕ НАСТРОЙКИ */
html {
    /* Фикс прыжка контента в 6пкс при появлении скролла */
    overflow-y: scroll; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Oswald', sans-serif; 
    color: #333; 
    line-height: 1.2; 
    /* Фоновый цвет для мобилок, где картинка не грузится */
    background-color: #f4f4f4; 
}

/* ФОН ТОЛЬКО ДЛЯ ДЕСКТОПА (Физически не грузится на мобильных) */
@media (min-width: 1001px) {
    body {
        background-image: url('../images/design/fon.webp'); 
        background-repeat: repeat-y; 
        background-size: 1920px auto; 
        background-position: center top;
        background-attachment: fixed; /* Паралакс включается скриптом */
        background-color: #fff;
        image-rendering: -webkit-optimize-contrast;
    }
}

/* --- ХЛЕБНЫЕ КРОШКИ --- */
.breadcrumbs {
    margin-top: 10px; 
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #aaa;
    font-family: Arial, sans-serif;
}

/* Поднимаем крошки выше на больших экранах */
@media (min-width: 1001px) {
    .breadcrumbs {
        margin-top: -15px; 
    }
}

/* --- ГЛОБАЛЬНЫЕ СТИЛИ ЗАГОЛОВКОВ --- */
h1, h2, h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 300; /* Тонкое начертание */
    color: var(--main-color) !important;
    margin-bottom: 15px;
    line-height: 1.2;
}

h1 { 
    font-size: 36px; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 5px; 
}


h2 { 
    font-size: 30px; 
    border-bottom: 1px solid #f4f4f4; 
    padding-bottom: 5px;
    margin-top: 30px; 
}

h3 { 
    font-size: 24px;
	border-bottom: 1px solid #f4f4f4; 
	padding-bottom: 10px;	
    margin-top: 25px; 
}

/* ГЛАВНЫЙ КОНТЕЙНЕР (Строго 1200px для ПК) */
.container { 
    width: 1200px !important; 
    margin: 0 auto; 
    padding: 0 15px;
}

/* 3. ШАПКА — теперь фон только здесь */
.main-header { 
    padding: 20px 0; 
    background-color: #ffffff; /* Страховочная белая подложка */
    background-image: url('../images/design/fon-header.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    width: 100%;
    display: block;
    border-bottom: 1px solid #eee; /* Тонкая линия, чтобы отделить от меню */
}

/* --- ИНВЕРСНЫЙ ДИЗАЙН ШАПКИ --- */
.main-header.inverse-header {
    background-color: var(--main-color) !important;
    border-bottom: none !important;
}

/* --- ОТКЛЮЧЕНИЕ ФОНА ШАПКИ --- */
.main-header.no-header-bg {
    background-image: none !important;
    background-color: #ffffff !important; /* Жестко задаем белый цвет */
}
.main-header.inverse-header .c-item a {
    color: #ffffff !important;
}
.main-header.inverse-header .c-item img {
    filter: drop-shadow(40px 0 0 #ffffff) !important; 
}

/* --- БЕЛЫЙ ЛОГОТИП --- */
.main-header.white-logo .logo img {
    filter: brightness(0) invert(1) !important;
}

.header-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    height: 90px; 
    display: block; 
}
/* Анимация света по логотипу */
@media (min-width: 1001px) {
    .logo-shine {
        position: relative;
        display: inline-block;
        vertical-align: middle;
        /* ВОТ ГЛАВНЫЙ ВИНОВНИК! Убираем невидимую рамку, которая резала свет: */
        overflow: visible !important; 
    }

    .logo-shine::after {
        content: "";
        position: absolute;
        top: 50%;       
        left: -100px; 
        width: 250px; 
        height: 200px;    
        margin-top: -100px; /* Идеально центрируем по вертикали */
        
        /* Создаем мягкий шар света. Только 100% плавность */
        background: radial-gradient(
            circle, 
            rgba(255, 255, 255, 0.45) 0%, 
            rgba(255, 255, 255, 0) 65%
        );
        
        border-radius: 50%; /* 100% геометрическая гарантия отсутствия углов */
        transform: scaleX(1.5) skewX(-25deg); /* Сплющиваем шар в красивый широкий блик */
        animation: shine-once 3s ease-in-out forwards;
        pointer-events: none; /* Свет не будет мешать кликать на логотип */
        z-index: 10;
    }

    @keyframes shine-once {
        0% { left: -250px; opacity: 0; }
        15% { opacity: 1; }
        85% { opacity: 1; }
        100% { left: 110%; opacity: 0; } /* Свет уходит за край и плавно гаснет */
    }
}


.header-contacts { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    align-items: flex-start;
}

.c-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 20px; 
}

.c-item img { 
    width: 28px; 
    height: 28px; 
}

/* Контакты: убираем синий цвет и подчеркивание */
.c-item a { 
    text-decoration: none !important; 
    color: #000 !important; 
    font-weight: 600; 
}

/* МЕНЮ */
#topMenu { 
    width: 100%;
    background-color: #f4f4f4 !important; /* Тот самый серый цвет меню */
    position: relative; 
    z-index: 10; /* Поднимаем над фоном шапки */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Легкая тень для объема */
}

/* 4. ОСНОВНОЙ БЛОК КОНТЕНТА */
main.container { 
    padding: 40px 30px; 
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    /* Острый верх, скругленный низ */
    border-radius: 0 0 20px 20px; 
    margin-bottom: 15px; 
}

/* --- ПРЕВЬЮ --- */


/* --- КАРТОЧКИ --- */
.cards-grid {
    display: grid;
    /* Уменьшаем минимальную ширину до 250px: теперь на ПК влезет ровно 4 карточки в ряд */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px; 
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: transform 0.4s ease, box-shadow 0.4s ease; 
    display: flex;
    flex-direction: column;
}

.card-item:hover {
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.07); 
}

/* Контейнер картинки должен обрезать всё, что выходит за его пределы */
.card-image { 
    height: 285px; 
    overflow: hidden; /* КРИТИЧНО: чтобы картинка не вылезала при увеличении */
}

/* Сама картинка внутри карточки */
.card-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; /* Плавность анимации */
}

/* Эффект при наведении на ВСЮ карточку */
.card-item:hover .card-image img {
    transform: scale(1.1); /* Увеличение на 10% */
}

.card-info { padding: 20px; }
.card-info h3 {
    font-weight: 300; font-size: 26px; margin: 0 0 15px 0; color: #000;
    position: relative; padding-bottom: 10px;
	line-height: 1.35 !important;
}
.card-info h3::after {
    content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
    background: #d1d1d1; transition: width 0.4s ease;
}
.card-item:hover .card-info h3::after { width: 100%; }

/* --- КАРТОЧКА ТОВАРА: ИТОГОВЫЙ ВАРИАНТ --- */

/* Контейнер карточки */
.card-item.product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    border-radius: 20px;
    border: 1px solid #f0f0f0;
    padding: 0;           /* Убираем внутренние отступы, чтобы фото прилегало к краям */
    background: #fff;
    overflow: hidden;    /* Важно для скругления углов картинки */
    transition: 0.3s;
    height: 100%;
}

.card-item.product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

/* Квадратная область для картинки */
.card-item.product-card .card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Жесткий квадрат 1:1 */
    height: auto;
    margin: 0;
    padding: 0;
    background: #fff;
    display: block;
}

/* Сама картинка: заполняет весь квадрат без полей */
.card-item.product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Растягивает фото на весь квадрат без дырок по бокам */
    display: block;
}

/* Блок с текстом под картинкой */
.card-item.product-card .card-info {
    padding: 15px 15px 20px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between заставит нижний блок всегда быть внизу */
    justify-content: space-between !important; 
}

/* Название: шрифт Oswald 300, как в h1/h3 страниц */
    .card-item.product-card .card-info h3 {
		font-size: 20px !important; /* ЕДИНЫЙ РАЗМЕР */
		line-height: 1.2 !important;
        border-bottom: 1px solid #eee !important; 
        padding-bottom: 10px !important;
        margin-bottom: 1px !important;
        display: block !important;
        width: 100%;
        min-height: 3.5em !important; 
        line-height: 1.3 !important;
        display: flex !important;
        align-items: flex-start !important;
    }

/* Создаем анимированную линию */
.card-item.product-card .card-info h3::after {
    content: ''; 
    position: absolute; 
    left: 0; 
    bottom: -2px; 
    width: 0; 
    height: 1px;
    background: #d1d1d1; 
    transition: width 0.4s ease; /* Плавное появление */
}

/* Анимация: при наведении на всю карточку линия удлиняется */
.card-item.product-card:hover .card-info h3::after { 
    width: 100%; 
}

.card-desc {
    font-family: 'Oswald', sans-serif; /* Тот же шрифт, что на всем сайте */
    font-weight: 300;                  /* Тонкое начертание */
    font-size: 20px;                   /* Размер текста */
    color: #444;                       /* Темно-серый цвет */
    line-height: 1.4;
    margin-top: 10px;
    text-align: left;                  /* Выравнивание по левому краю */
}

/* Цена на карточке */
.product-price {
    font-family: 'Oswald', sans-serif;
    color: #4d534c;
    font-size: 22px; /* Уменьшили для комфортного размещения 6 цифр */
    font-weight: 500;
    margin: 0;
    text-align: left;
    line-height: 1;
    white-space: nowrap; /* Принудительно держим "руб." на одной строке с цифрами */
}

.product-price span {
    font-size: 15px; /* Чуть меньше для идеального баланса */
    font-weight: 300;
    color: #4d534c;
}

/* На ПК: Цена слева, Кнопка строго справа внизу */
.price-buy-row {
    display: flex !important;
    justify-content: space-between !important; 
    align-items: center !important; /* Центруем по вертикали, чтобы смотрелось ровно */
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 15px;
    gap: 5px; /* Защита от слипания, если цена будет очень длинной */
}

/* Эта магия прижмет кнопку вправо, даже если цены нет */
.price-buy-row .buy-btn {
    margin-left: auto !important; 
    width: auto !important;
    min-width: 100px !important; /* Уменьшили ширину кнопки */
    padding: 6px 12px !important; /* Убрали лишние боковые отступы */
    font-size: 14px !important; /* Сделали шрифт аккуратнее */
    white-space: nowrap !important; /* Блокируем перенос текста внутри кнопки */
}

/* --- КАРТОЧКА ТОВАРА (ВНУТРЕННЯЯ СТРАНИЦА) --- */
.product-card-top {
    display: flex;          /* Включаем колонки */
    gap: 40px;             /* Расстояние между фото и текстом */
    margin-bottom: 30px;
    align-items: flex-start; /* Выравнивание по верху */
}

/* Левая колонка с фото — Настройки для ПК */
.product-card-image {
    flex: 0 0 450px !important; /* Возвращаем твои 450px для десктопа */
    max-width: 100%;
}

/* Убираем отступ у фото, так как оно теперь в колонке */
.product-card-image .main-featured-image {
    margin-bottom: 0 !important;
}

/* Правая колонка с инфо */
.product-card-info {
    flex: 1;               /* Занимает остаток ширины */
    display: flex;
    flex-direction: column;
}

/* 1. Возвращаем линию заголовку h1 в карточке */
.product-card-info h1 {
    border-bottom: 1px solid #eee !important; /* Линия под заголовком */
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 32px;
}

/* 2. Настраиваем описание (убираем у него нижнюю линию, чтобы не двоилось) */
.product-short-desc {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 20px;
    border-bottom: none; /* Убрали снизу */
}

/* Надпись "Цена:" — серая, тонкая, как обычный текст */
.product-main-price .price-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;         /* Нежирный */
    font-size: 20px;          /* Размер как у текста на странице */
    color: #888;              /* Серый цвет */
    margin-right: 10px;       /* Отступ от цифр */
    text-transform: none;     /* Отмена заглавных, если были */
    display: inline-block;
    vertical-align: middle;
}

/* Цена на самой странице товара */
.product-main-price {
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    color: #4d534c;
    font-weight: 600;
    border-top: 1px solid #eee; /* Линия НАД ценой */
    padding-top: 15px;
    margin-top: 10px;
}


/* --- Стили блока "Вам может быть интересно" --- */
.related-section {
    margin-top: 10px !important;    /* УБРАЛИ ДЫРУ НАД ЛИНИЕЙ (было 60px) */
    padding-top: 15px !important;   /* УМЕНЬШИЛИ ОТСТУП ПОД ЛИНИЕЙ (было 30px) */
    border-top: 1px solid #eee;
    clear: both; /* На всякий случай, чтобы текст не обтекал блок */
}

.related-title {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 300; /* Как у <p> в .entry */
    margin-bottom: 20px;
    text-transform: none; /* Убираем капс, чтобы было как в тексте */
    color: #333;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    
    /* Жесткий сброс для мобилок */
    white-space: normal !important; 
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
}

/* Контейнер для скролла (как в хлебных крошках) */
.related-scroll-container {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Скрываем скроллбар в Firefox */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

@media (max-width: 768px) {
    .related-scroll-container {
        /* Принудительно расширяем контейнер за пределы экрана */
        margin-left: -10px !important;  
        margin-right: -10px !important; 
        padding-left: 10px !important;  
        padding-right: 15px !important; 
        
        /* КРИТИЧНО: ширина должна быть больше 100%, чтобы "прилипнуть" */
        width: calc(100% + 20px) !important; 
        max-width: none !important; 
        box-sizing: border-box !important;
    }
}

.related-scroll-container::-webkit-scrollbar {
    display: none; /* Скрываем скроллбар в Chrome/Safari */
}

.related-grid {
    display: flex;
    gap: 20px;
    min-width: max-content; /* Чтобы карточки не сжимались, а уходили за экран */
}

.related-card {
    width: 220px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.related-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff; /* Меняем серый фон на белый */
}

.related-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото будет заполнять весь квадрат без серых дырок */
    padding: 0;        /* Удаляем внутренний отступ */
}

.related-card-info {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Выравниваем содержимое: заголовок вверху, цена внизу */
    justify-content: space-between !important;
}

.related-card-info h3 {
    font-size: 20px;
    line-height: 1.4 !important;
    margin: 0 0 auto 0 !important; /* Отталкивает цену вниз */
    font-weight: 300;
    font-family: 'Oswald', sans-serif;
    display: block !important;
    white-space: normal !important; 
    overflow: visible !important;
    height: auto !important; 
    min-height: auto !important; 
    border-bottom: none !important; 
    padding-bottom: 0;
}

/* Добавляем линию ТОЛЬКО если в карточке есть цена */
.related-card-info:has(.related-card-price) h3 {
    border-bottom: 1px solid #eee !important;
    padding-bottom: 8px !important; /* Уменьшили отступ над линией */
    margin-bottom: 5px !important;  /* Уменьшили пустоту ПОД линией */
}

.related-card-price {
    margin-top: 5px !important;     
    font-weight: 600;
    font-size: 25px !important; /* УВЕЛИЧИЛИ: теперь как заголовок над ней */
    color: #333;
}

.related-card-price span {
    font-size: 15px !important; /* Чуть увеличили "руб." для баланса */
    font-weight: normal;
    color: #888;
}

/* Кнопки навигации ленты */
.rel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    opacity: 0; /* Скрыты по умолчанию */
}

/* Показываем стрелки при наведении на всю секцию */
.related-section-wrapper:hover .rel-nav {
    opacity: 1;
}

.rel-nav:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.rel-prev { left: -20px; }
.rel-next { right: -20px; }

/* На мобилках стрелки не нужны */
@media (max-width: 1000px) {
    .rel-nav { display: none !important; }
    .related-scroll-container { padding: 0 10px; }
    .rel-prev { left: 0; }
    .rel-next { right: 0; }
}

/* Кнопка прокрутки экрана вверх */
#scrollToTop {
    display: flex;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    color: var(--main-color);
    border: 1px solid #eee;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 26px; /* Чуть увеличили для наглядности */
    
    /* ИСПРАВЛЕНИЕ ЦЕНТРА: */
    padding-bottom: 4px !important; 
    
    transform: rotate(90deg) scale(0);
    transition: transform 0.3s ease-in-out, opacity 0.3s, background-color 0.2s;
    opacity: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Состояние, когда кнопка должна появиться (добавляется скриптом) */
#scrollToTop.visible {
    transform: rotate(90deg) scale(1) !important;
    opacity: 1 !important;
}

#scrollToTop:hover {
    /* Светло-серый фон вместо темного */
    background-color: #fcfcfc !important; 
    /* Делаем майн-цвет стрелки визуально светлее через прозрачность */
    color: var(--main-color) !important;
    opacity: 0.8 !important;
    border-color: #ddd !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    #scrollToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}


/* На мобильных уменьшаем ширину карточек в рекомендациях */
@media (max-width: 600px) {
    /* Рассчитываем ширину так, чтобы в экран входило 2 полных и кусочек третьей */
    .related-card {
        width: calc((100vw - 45px) / 2.3) !important; 
        min-width: 140px !important;
        flex-shrink: 0 !important;
    }

    /* Уменьшаем зазор между ними */
    .related-grid {
        gap: 15px !important;
    }
	.related-card-info h3 {
        font-size: 17px !important; /* Уменьшили с 20px до 17px для мобильных */
        line-height: 1.2 !important;
        white-space: normal !important; /* Гарантируем перенос строк */
        margin-bottom: 8px !important;
    }
	/* ВОЗВРАЩАЕМ ЦЕНУ В 17px ТОЛЬКО ДЛЯ МОБИЛЬНЫХ */
    .related-card-price {
        font-size: 18px !important;
        margin-top: 2px !important;
    }
    
    .related-card-price span {
        font-size: 13px !important; /* Уменьшаем "руб." обратно */
    }
}

/* Адаптивность для мобильных */
@media (max-width: 900px) {
    .product-card-top {
        flex-direction: column; 
        gap: 0 !important; /* Убираем gap, который создавал дыру между фото и текстом */
    }
    .product-card-image {
        flex: none !important;
        width: 100% !important;
        margin-bottom: 0 !important; /* Убираем отступ снизу у контейнера фото */
    }
}

/* 5. ФУТЕР */
footer { 
    width: 100%;
    background: transparent; 
    padding: 30px 0; /* Увеличили отступ, чтобы тексту было просторно */
    text-align: center; 
    clear: both;
    position: relative;
    z-index: 10;
}

footer p { 
    font-family: 'Oswald', sans-serif; /* Тот же шрифт, что и на сайте */
    font-weight: 200;                  /* Легкое начертание */
    color: #999;                       /* Приятный серый цвет */
    font-size: 20px;                   /* Размер как у основного шрифта сайта */
    margin: 0;
}

/* ТЕКСТ */
h1 { font-weight: 300; font-size: 36px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; color: #000; }

/* Полная зачистка рамки, фона и тени для главной картинки в статьях */
.no-border-style .main-featured-image,
.no-border-style .main-featured-image img,
.no-border-style [class*="featured-image"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    background: none !important;
    border-radius: 0 !important;
}

/* Единый стиль контента */
.entry { 
    font-weight: 300; 
    font-size: 20px; 
    text-align: left !important; 
    color: #333; 
    /* Устанавливаем 1.4 — это даст ту самую легкость, как в списках */
    line-height: 1.4 !important; 
    hyphens: auto;
}
/* Делаем все картинки в тексте адаптивными */
.entry img {
    max-width: min(100%, 640px) !important; 
    height: auto !important;      
    display: block;               
    margin: 20px auto;            /* По умолчанию (для мобильных) — центр */
    border-radius: 3px;           
}

/* Делаем все видео (iframe) в тексте адаптивными */
.entry iframe {
    max-width: 100% !important;
    border-radius: 8px; /* Добавим аккуратное скругление углов */
}

/* На мобильных принудительно делаем видео на всю ширину экрана с правильной пропорцией */
@media (max-width: 768px) {
    .entry iframe {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9; /* Сохраняем классические пропорции видео, чтобы оно не сплющилось */
    }
}

/* СТРОГО ДЛЯ ПК: прижимаем фото в статьях к левому краю */
@media (min-width: 1001px) {
    .entry img {
        margin: 20px 0; 
    }
}

/* Настраиваем только отступы, не трогая интервал (он наследуется выше) */
.entry p { 
    margin-bottom: 20px; 
	line-height: 1.4 !important; 
}

/* --- СТИЛИ ДЛЯ ТАБЛИЦ В ТЕКСТЕ --- */
.entry table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 17px; /* Чуть меньше основного текста для опрятности */
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Мягкая тень */
    border-radius: 8px; /* Скругленные углы */
    overflow: hidden; /* Важно, чтобы скругления работали */
    border: 1px solid #d6d4d4 !important; /* Гасим жесткие черные рамки из редактора */
}

/* Прокрутка на мобильных (чтобы широкая таблица не ломала экран) */
@media (max-width: 768px) {
    .entry table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap; /* Не даем тексту сплющиваться в узкие столбики */
    }
}

/* Ячейки таблицы */
.entry table th, 
.entry table td {
    padding: 15px 20px;
    text-align: left;
    border: 1px solid #d6d4d4 !important; /* Нежные светло-серые разделители */
    vertical-align: middle;
}

/* Спец-стиль для заголовков (первой строки) */
.entry table th,
.entry table thead td,
.entry table tr:first-child td { /* Захватываем первую строку, даже если редактор не прописал th */
    background-color: #f8f9fa; /* Светло-серый фон шапки */
    font-weight: 600;
    color: var(--main-color); /* Акцентный цвет сайта */
    font-size: 16px;
}

/* Отменяем спец-стиль шапки для первой ячейки (где слово "Модель котла"), если нужно, 
   но обычно вся первая строка выглядит хорошо в акцентном цвете */

/* Зебра (чередование цвета строк) */
.entry table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* Эффект подсветки строки при наведении (только на ПК) */
@media (min-width: 1001px) {
    .entry table tbody tr:hover td {
        filter: brightness(0.95); /* Слегка затемняем родной цвет ячейки */
        transition: filter 0.3s ease;
    }
}

/* Единый стиль для списков внутри контента (Десктоп) */
.entry ul, .entry ol {
    list-style-position: outside; 
    padding-left: 35px; /* Увеличили с 25 до 35, чтобы маркеры не вылезали влево */          
    margin-bottom: 20px;
}

.entry li {
    padding-left: 5px;            
    margin-bottom: 10px;          
    text-align: left;
    /* Наследует line-height: 1.4 от .entry автоматически */
}

/* АКЦЕНТНЫЙ цвет элементов */

/* Перекрашивание иконок через переменную из админки */
.c-item {
    display: flex;
    align-items: center;
    overflow: hidden; /* Скрываем оригинал, оставляем только цветную тень */
}

.c-item img {
    /* Создаем цветную копию иконки и сдвигаем её */
    filter: drop-shadow(40px 0 0 var(--main-color));
    position: relative;
    left: -40px;
}

/* Добавим плавную смену цвета для ссылок при наведении */
.c-item a {
    transition: color 0.3s ease;
}

.c-item a:hover {
    color: var(--main-color) !important;
}


/* ==========================================
   ВИДЕО-КАРТОЧКИ (КАСТОМНЫЙ ПЛЕЕР)
   ========================================== */
@keyframes spinVideo{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}

.custom-vcard { padding:0 !important; border:none !important; background:#050505 !important; position:relative; display:block !important; height:auto !important; min-height:0 !important; aspect-ratio: 9 / 16 !important; border-radius: 0 !important; overflow: hidden !important; transform: translateZ(0); -webkit-mask-image: -webkit-radial-gradient(white, black); box-shadow: 0 4px 10px rgba(0,0,0,0.1); cursor: pointer; }

/* Статичный фон-подложка */
.custom-vcard-bg { position:absolute; top:0; left:0; width:100%; height:100%; overflow:hidden; z-index:1; border-radius:inherit; pointer-events: none; background: #000; }
.custom-vcard-bg img { position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; opacity:1; transform: scale(1.1); }
.custom-vcard-overlay { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.3); }

/* Бесшовный повторяющийся фон для ПК */
@media (min-width: 1001px) {
    .custom-vcard-bg img { display: none !important; }
    .custom-vcard-bg { 
        background-image: url('../images/design/fon-video_player.webp') !important; 
        background-repeat: repeat !important; 
        background-size: 640px !important; /* Уменьшаем масштаб картинки в несколько раз */
    }
}

/* Текстовые плашки */
.vcard-glass-header { position:absolute; top:0; left:0; width:100%; padding:20px 20px 40px; background:linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%); z-index:4; text-align:center; box-sizing:border-box; pointer-events: none; transition: opacity 0.3s ease; }
.vcard-glass-header { position:absolute; top:0; left:0; width:100%; padding:20px 20px 40px; background:linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%); z-index:4; text-align:center; box-sizing:border-box; pointer-events: none; transition: opacity 0.3s ease; }
.vcard-glass-header h3 { margin:0 !important; font-size:18px !important; color:#fff !important; line-height:1.3 !important; border:none !important; padding:0 !important; text-shadow:0 1px 4px rgba(0,0,0,0.9); font-weight: 500; }
.vcard-glass-footer { position:absolute; bottom:0; left:0; width:100%; padding:50px 20px 20px; background:linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%); z-index:4; text-align:center; box-sizing:border-box; pointer-events: none; transition: opacity 0.3s ease; }
.vcard-glass-footer p { margin:0 !important; font-size:16px !important; color:#eee !important; line-height:1.5 !important; text-shadow:0 1px 4px rgba(0,0,0,0.9); }

@media (max-width: 768px) { .vcard-glass-footer p { font-size:14px !important; } }

/* Плеер */
.custom-vcard-player { position:absolute; top:0; left:0; width:100%; height:100%; z-index:2; display: flex; align-items: center; justify-content: center; background: transparent !important; }

/* Режим contain гарантирует, что горизонтальное видео не обрежется по бокам, а встанет ровно по центру над фоном! */
.native-vcard-video { width: 100%; height: 100%; object-fit: contain; opacity: 1; background: transparent !important; }
/* В полном экране тоже contain */
.custom-vcard.is-fullscreen .native-vcard-video { object-fit: contain !important; }

@media (max-width: 768px) {
    .custom-vcard {
        height: auto !important; 
        min-height: 0 !important; /* Обязательно 0, чтобы не рвало сетку по ширине */
        aspect-ratio: 9 / 16 !important; /* Жестко задаем пропорции вертикального видео */
    }
}

/* Идеально ровный центр для спиннера */
.vcard-spinner { position:absolute; top:50% !important; left:50% !important; margin:-20px 0 0 -20px !important; width:40px; height:40px; border:3px solid rgba(255,255,255,0.2); border-top-color:#fff; border-radius:50%; animation:spinVideo 1s linear infinite; z-index:7; pointer-events: none; }

/* Кнопка Play / Pause по центру */
.custom-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; background: rgba(0,0,0,0.5); border-radius: 50%; border: 2px solid rgba(255,255,255,0.8); backdrop-filter: blur(4px); z-index: 5; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 1; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.custom-play-btn .icon-play { display: block; }
.custom-play-btn .icon-pause { display: none; }
.custom-play-btn.hidden { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
.custom-vcard:hover .custom-play-btn { background: var(--main-color); border-color: var(--main-color); transform: translate(-50%, -50%) scale(1.1); }
.custom-play-btn.hidden .icon-play { display: none; }
.custom-play-btn.hidden .icon-pause { display: block; }
.custom-vcard:hover .custom-play-btn.hidden { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }

/* Кнопка Звука (правый нижний угол) */
.custom-mute-btn { position: absolute; bottom: 15px; right: 55px; width: 36px; height: 36px; background: rgba(0,0,0,0.5); border-radius: 50%; backdrop-filter: blur(4px); z-index: 6; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.5); transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.custom-vcard.has-desc .custom-mute-btn { bottom: 80px; }
.custom-mute-btn:hover { background: var(--main-color); border-color: var(--main-color); transform: scale(1.1); }
.custom-mute-btn .icon-unmute { display: block; }
.custom-mute-btn .icon-mute { display: none; }
.custom-mute-btn.muted .icon-unmute { display: none; }
.custom-mute-btn.muted .icon-mute { display: block; }

/* Кнопка На весь экран (правый нижний угол) */
.custom-fullscreen-btn { position: absolute; bottom: 15px; right: 15px; width: 36px; height: 36px; background: rgba(0,0,0,0.5); border-radius: 50%; backdrop-filter: blur(4px); z-index: 6; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.5); transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.custom-vcard.has-desc .custom-fullscreen-btn { bottom: 80px; }
.custom-fullscreen-btn:hover { background: var(--main-color); border-color: var(--main-color); transform: scale(1.1); }

/* Полоса прогресса (скрыта по умолчанию) */
.custom-progress-bar { display: none; position: absolute; bottom: 0; left: 0; width: 100%; height: 10px; background: rgba(255,255,255,0.2); z-index: 6; transition: opacity 0.3s ease; cursor: pointer; }
.custom-vcard.has-desc .custom-progress-bar { bottom: auto; top: 100%; margin-top: -10px; }
.custom-progress-fill { position: relative; height: 100%; width: 0%; background: var(--main-color); pointer-events: none; transition: width 0.1s linear; }

/* Круглый бегунок */
.custom-progress-fill::after { content: ''; position: absolute; top: 50%; right: -6px; width: 12px; height: 12px; background: #fff; border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 5px rgba(0,0,0,0.5); transition: transform 0.2s ease; }
.custom-progress-bar:hover .custom-progress-fill::after { transform: translateY(-50%) scale(1.3); }

/* Показываем полосу ТОЛЬКО в полноэкранном режиме (в виде плавающего бара) */
.custom-vcard.is-fullscreen .custom-progress-bar { 
    display: block !important;
    height: 8px !important; 
    bottom: 40px !important; 
    left: 5% !important; 
    width: 90% !important; 
    border-radius: 4px !important; 
    top: auto !important; 
    margin-top: 0 !important; 
    z-index: 9999 !important; 
}
.custom-vcard.is-fullscreen .custom-progress-fill { border-radius: 4px !important; }
.custom-vcard.is-fullscreen .custom-progress-fill::after { right: -8px; width: 18px; height: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.6); }

/* Плавное исчезновение контролов через 2 секунды (в обычном режиме текст остается) */
.custom-vcard.hide-controls .custom-play-btn,
.custom-vcard.hide-controls .custom-mute-btn,
.custom-vcard.hide-controls .custom-fullscreen-btn,
.custom-vcard.hide-controls .custom-progress-bar {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.4s ease;
}

/* Скрываем текст ТОЛЬКО когда видео открыто на весь экран и пропадает интерфейс */
.custom-vcard.is-fullscreen.hide-controls .vcard-glass-header,
.custom-vcard.is-fullscreen.hide-controls .vcard-glass-footer {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.4s ease;
}

/* --- ПОЛНОЭКРАННЫЙ РЕЖИМ КАРТОЧКИ --- */
.custom-vcard.is-fullscreen,
.custom-vcard:fullscreen,
.custom-vcard:-webkit-full-screen {
    background: #000 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
.custom-vcard::backdrop {
    background: #000 !important;
}
/* Переносим кнопку закрытия (крестик) в правый верхний угол */
.custom-vcard.is-fullscreen .custom-fullscreen-btn {
    top: 20px;
    right: 20px;
    bottom: auto;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
}
/* Переносим кнопку звука в левый верхний угол на уровень крестика */
.custom-vcard.is-fullscreen .custom-mute-btn {
    top: 20px !important;
    left: 20px !important;
    bottom: auto !important;
    right: auto !important;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.6);
}
.custom-vcard.is-fullscreen .icon-enter-fs { display: none; }
.custom-vcard.is-fullscreen .icon-exit-fs { display: block !important; }

/* Увеличиваем шрифты текста в полном экране */
.custom-vcard.is-fullscreen .vcard-glass-header h3 {
    font-size: 28px !important;
    margin-top: 15px !important;
}
.custom-vcard.is-fullscreen .vcard-glass-footer p {
    font-size: 20px !important;
    margin-bottom: 25px !important;
}


/* ==========================================
   АУДИО ПЛЕЕР (ОБЫЧНАЯ ВЕРСИЯ)
   ========================================== */
.plyr--audio {
    --plyr-color-main: var(--main-color) !important;
    --plyr-audio-controls-background: #ffffff !important;
    --plyr-audio-control-color: #333333 !important;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.song-item {
    position: relative;
    overflow: hidden; /* Скрываем шкалу за пределами скругленных углов карточки */
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    transition: background 0.3s ease, border 0.3s ease;
}

.song-item h4 {
    font-size: 22px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--main-color) !important; /* Название песни в акцентном цвете */
    font-family: 'Oswald', sans-serif;
}

.song-item .song-desc {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #666;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Линия внизу карточки: при наведении серенькая с размытыми краями */
.song-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(130, 130, 130, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.song-item:hover::after {
    opacity: 1;
}

/* Когда песня играет: линия превращается в шкалу, двигающуюся на всю длину блока */
.song-item.is-playing::after {
    opacity: 1;
    background: var(--main-color) !important; /* Акцентный цвет шкалы */
    height: 4px;
    width: var(--track-progress, 0%);
    left: 0;
    transition: width 0.1s linear; /* Плавное движение под музыку */
}


/* ==========================================
   МОБИЛЬНАЯ ВЕРСИЯ (ОБЩАЯ) 
   ========================================== */
@media (max-width: 1000px) {
    .container, main.container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px;
        margin: 0 !important;
        border-radius: 0;
    }

    .main-header { padding: 5px 0 10px 0 !important; 
	background-image: none !important; 
        background-color: #fff !important;}
    .main-header.inverse-header { background-color: var(--main-color) !important; }
    .logo img { height: 85px !important; } 
    .header-contacts { gap: 2px; margin-left: 10px; }
    .c-item { font-size: 16px; } 
    #topMenu { background-color: #b3b3b3 !important; height: 45px; }

    /* --- СТАТЬИ В КАТАЛОГЕ (1 в ряд) --- */
    .card-item:not(.product-card) .card-image {
        height: 200px !important; 
    }
    .card-item:not(.product-card) .card-info {
        padding: 8px 15px 5px 15px !important;
        text-align: left !important;
    }
    .card-item:not(.product-card) .card-info h3 {
        margin: 0 !important;
        padding-bottom: 2px !important;
        line-height: 1.3 !important;
        font-size: 17px !important; /* ЕДИНЫЙ РАЗМЕР */
    }
    /* Скрываем описание статей на всех мобильных экранах */
    .card-item:not(.product-card) .card-desc {
        display: none !important;
    }

    /* --- ТОВАРЫ (Левый край, отступы и линия) --- */
    .card-item.product-card .card-info {
        padding: 15px 15px 20px 15px !important;
        text-align: left !important;
    }

    .card-item.product-card .card-info h3 {
        border-bottom: 1px solid #eee !important; 
        padding-bottom: 10px !important;
        margin-bottom: 1px !important;
        display: block !important;
        width: 100%;
        min-height: 3.5em !important; 
        line-height: 1.3 !important;
        display: flex !important;
        align-items: flex-start !important;
        font-size: 17px !important; /* ЕДИНЫЙ РАЗМЕР */
    }

    /* --- ОСТАЛЬНЫЕ МОБИЛЬНЫЕ ПРАВКИ --- */
    /* Текст статьи и списки — приводим к общему 17px */
    .entry p, .entry ul, .entry ol, .entry li, .entry div {
        font-size: 18px !important; 
        line-height: 1.4 !important;
    }
	    /* Заголовки мобильные */
    h1 { font-size: 25px !important; }
    h2 { font-size: 23px !important; }
    h3 { font-size: 22px !important; } /* Заголовки на самой странице */

    /* Маркированный список (точки) */
    .entry ul {
        list-style-position: outside; 
        padding-left: 20px; /* Отступ всего блока от края */
        margin-bottom: 15px;
    }

    /* Нумерованный список (цифры) */
    .entry ol {
        list-style-position: outside; 
        padding-left: 22px; /* Уменьшили с 28px до 22px, чтобы прижать список к левому краю */
        margin-bottom: 15px;
    }

    /* Индивидуальная подстройка зазора до текста */
    .entry ul li {
        padding-left: 0px; /* МАКСИМАЛЬНО прижимаем текст к точке */
    }

    .entry ol li {
        padding-left: 5px; /* Оставляем небольшой зазор для цифр */
    }

    /* Общие стили для всех LI */
    .entry li {
        margin-bottom: 15px;           
        text-align: left;
    }
	
    footer { background: #fff !important; padding: 10px 0 !important; }
    footer p { font-size: 17px !important; color: #888; }
    .links-container li a { font-size: 17px !important; line-height: 1.3 !important; }
    .links-container img { width: 15px !important; height: 15px !important; }
    
    .breadcrumbs {
        display: flex; overflow-x: auto; white-space: nowrap;
        position: relative; padding-right: 30px;
    }
    .breadcrumbs::after {
        content: ''; position: absolute; right: 0; width: 30px; height: 100%;
        background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
    }

    /* --- СТРАНИЦА ТОВАРА (Внутренняя) --- */
    .product-card-info h1 {
        font-size: 22px !important; /* Уменьшаем огромный заголовок */
        margin-top: 10px !important;
        line-height: 1.2 !important;
    }

    .product-short-desc {
        font-size: 17px !important; /* Приводим к единому стандарту 17px */
        line-height: 1.4 !important;
        margin-bottom: 15px !important;
    }

    .product-main-price {
        font-size: 24px !important; /* Цена чуть крупнее текста, но не огромная */
        margin-top: 15px !important;
        padding-top: 10px !important;
    }

    .product-main-price .price-label {
        font-size: 17px !important; /* Слово "Цена:" — 17px */
    }

    /* Кнопка "Добавить в корзину" на странице товара */
    .product-card-info .buy-btn {
        width: 100% !important; /* На мобилках лучше на всю ширину */
        font-size: 18px !important;
        padding: 12px 20px !important;
    }
}

/* ==========================================
   КОМПАКТНАЯ СЕТКА (2 В РЯД - СМАРТФОНЫ)
   ========================================== */
@media (max-width: 768px) {
    .cards-grid.compact-on {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        margin: 20px 0 !important;
    }

    /* Общие настройки (возвращаем естественную высоту для статей и разделов) */
    .compact-on .card-item { 
        border-radius: 12px !important; 
        height: 100% !important; 
        aspect-ratio: auto !important; 
    }

    /* Пропорции 9:16 применяем ТОЛЬКО к видео-карточкам и товарам */
    .compact-on .card-item.product-card,
    .compact-on .custom-vcard {
        aspect-ratio: 9 / 16 !important; 
        height: auto !important; 
        min-height: 0 !important; 
    }

    /* Картинки в статьях (2 в ряд) */
    .compact-on .card-item:not(.product-card) .card-image {
        height: 140px !important;
    }

    /* Информация в компактных карточках */
    .compact-on .card-info {
        padding: 8px 10px 5px 10px !important;
    }

    .compact-on .card-info h3 {
        font-size: 17px !important; /* ЕДИНЫЙ РАЗМЕР (был 15) */
        line-height: 1.3 !important;
        min-height: auto !important;
        margin: 0 !important;
        border: none !important;
    }

    /* Цены и кнопки в товарах (2 в ряд) */
    .compact-on .price-buy-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    .compact-on .product-price {
        font-size: 17px !important;
        text-align: left !important;
		font-weight: 700 !important; /* Делаем жирным как в рекомендациях */
    }
    .compact-on .buy-btn {
        width: 100% !important;
        height: 34px !important;
        font-size: 13px !important;
    }
}

/* --- КНОПКА СВЯЗИ MAX С АНИМАЦИЕЙ И СКРЫТИЕМ --- */
.max-float-btn {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    
    /* Состояние "Скрыто" (пока не прокрутили 400px) */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); 
}

/* Класс для показа (добавляется скриптом в index.php) */
.max-float-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* АНИМАЦИЯ РАСХОДЯЩИХСЯ КРУГОВ (возвращаем её) */
.max-float-btn::before,
.max-float-btn::after {
    content: "";
    position: absolute;
    border: 1px solid var(--main-color);
    left: -5px; right: -5px; top: -5px; bottom: -5px;
    border-radius: 50%;
    animation: max-pulse 2s linear infinite;
    opacity: 0;
}

.max-float-btn::after {
    animation-delay: 1s;
}

@keyframes max-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Иконка внутри (делаем белой) */
.max-float-btn img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

/* Адаптация под мобилки */
@media (max-width: 768px) {
    .max-float-btn {
        bottom: 85px; /* Чуть выше стрелки "Наверх" на мобиле */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

