

@media (max-width: 991px) {
    /* 1. ПОЛНОСТЬЮ УНИЧТОЖАЕМ КНОПКУ СО СТРЕЛКОЙ */
    button.filter_tags-more, 
    .filter_tags-more {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        z-index: -9999 !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* 2. ПРИНУДИТЕЛЬНО ДОСТАЕМ ВСЕ СКРЫТЫЕ ТЕГИ */
    /* Теперь им не нужна кнопка "Показать еще", они просто стоят друг за другом */
    .filter_tags-group.hidden-group {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
    }

    /* 3. ОБЕРТКА ТЕГОВ - ЗАМОРАЖИВАЕМ РАЗМЕРЫ */
    .filter_tags-wrapper {
        display: flex !important;
        flex-wrap: wrap !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 4. ГЛУШИМ ВСЕ ФАНТОМНЫЕ НАЖАТИЯ ПО ТЕГАМ */
    .filter_tags-toggle:active, 
    .filter_tags-toggle:focus,
    .filter_tags-toggle:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* 1. Делаем главную обертку "точкой отсчета" для меню */
    #product-category .filter_tags-wrapper {
        position: relative !important;
    }

    /* 2. Отвязываем выпадашку от конкретной кнопки */
    #product-category .filter_tags-group {
        position: static !important; 
    }

    /* 3. Заставляем меню открываться ровно по центру на всю ширину экрана */
    #product-category .filter_tags-dropdown {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 10px auto 0 !important;
        /* Убираем жесткую привязку, если она была */
        transform: none !important; 
    }

    /* 4. Выравниваем сами теги внутри меню по центру, чтобы было красиво */
    #product-category .filter_tags-dropdown .filter_tags.row {
        justify-content: center !important;
    }


/* 1. Жестко отключаем вертикальный скролл конкретно для верхнего меню (ul.top-links__ul) */
@media (min-width: 992px) {
    .top-menu .top-links__ul.dropdown-menu {
        max-height: none !important;      /* Убиваем лимит по высоте */
        overflow: visible !important;     /* Разрешаем контенту выходить за рамки без появления скролла */
        overflow-y: hidden !important;    /* Наглухо запрещаем вертикальный скролл */
        scrollbar-width: none !important; /* Убиваем скроллбар в Firefox */
        -ms-overflow-style: none !important; /* Убиваем скроллбар в IE/Edge */
    }

    /* Убиваем вебкитовский скроллбар (Chrome, Safari) для этого меню */
    .top-menu .top-links__ul.dropdown-menu::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    /* 2. Скрываем любые "паразитные" иконки/кнопки, которые могут генерироваться справа от ссылок */
    /* Если это стрелки от карусели OwlCarousel или Slick */
    .top-menu .top-links__ul .owl-nav,
    .top-menu .top-links__ul .slick-arrow,
    /* Если это стрелки от самописного JS UniShop (scroll-btn и тд) */
    .top-menu .top-links__ul + i,
    .top-menu .top-links__ul + div[class*="scroll"],
    .top-links > i[class*="fa-caret"],
    .top-links > i[class*="fa-chevron"],
    .top-menu .top-links__ul ~ .scroll-right,
    .top-menu .top-links__ul ~ .scroll-left {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        pointer-events: none !important;
    }
}


/* Жесткий фикс для плавающей панели товара на десктопе */
@media (min-width: 992px) {
    .fly-menu__product.desktop {
        position: fixed !important;
        top: 0px !important; /* Укажи высоту своей шапки, если она тоже плавает (обычно 60-80px). Если нет, ставь 0 */
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important; /* Растягиваем на всю ширину экрана */
        max-width: 100% !important;
        height: auto !important;
        background: #fff !important;
        z-index: 2147483647 !important; /* Максимальный z-index */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
        margin: 0 !important;
        padding: 10px 20px !important; /* Аккуратные отступы внутри панели */
        transform: none !important; /* Убиваем любые трансформации JS */
        bottom: auto !important; /* Жестко отменяем привязку к низу */
        /* Настройки flex для выравнивания содержимого (название, цена, кнопка) */
        display: flex !important; 
        align-items: center !important;
        justify-content: center !important; 
    }
    
    /* Отключаем стили родительских контейнеров, чтобы они не ломали панель */
    .fly-menu__product.desktop .row,
    .fly-menu__product.desktop .container {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 1200px !important; /* Ограничиваем ширину контента внутри панели, как у сайта */
        margin: 0 auto !important;
    }
}

#fly-menu {
  margin-top: 0 !important;
}

/* --- Адаптивность картинок --- */
.article-page__description .article-adaptive-img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px; 
    margin: 25px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- Стили для текстовой перелинковки --- */
.mnd-article-anchor {
    color: #EF7F1A;
    font-weight: 600;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}
.mnd-article-anchor:hover {
    color: #d16b12;
    text-decoration-style: solid;
}

/* --- Сетка товаров --- */
.mnd-article-products {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 2px dashed #eee;
    border-bottom: 2px dashed #eee;
    padding-bottom: 10px;
}

/* --- БЛОК ЖУРНАЛА (Шорткод [mag_grid]) --- */
.mnd-mag-shelf {
    margin: 50px 0;
    background: #fdfaf5;
    border-radius: 12px;
    padding: 30px;
}

.mnd-mag-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #EF7F1A;
    padding-bottom: 10px;
}

.mnd-mag-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #333;
}
.mnd-mag-title span {
    color: #EF7F1A;
}

.mnd-mag-all {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}
.mnd-mag-all:hover {
    color: #EF7F1A;
}

.mnd-mag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.mnd-mag-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mnd-mag-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.mnd-mag-img {
    height: 140px;
    overflow: hidden;
}

.mnd-mag-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.mnd-mag-card:hover .mnd-mag-img img {
    transform: scale(1.05);
}

.mnd-mag-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.mnd-mag-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mnd-mag-btn {
    font-size: 12px;
    font-weight: 700;
    color: #EF7F1A;
    text-transform: uppercase;
}

/* Адаптивность для Журнала */
@media (max-width: 991px) {
    .mnd-mag-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575px) {
    .mnd-mag-grid {
        grid-template-columns: 1fr;
    }
    .mnd-mag-shelf {
        padding: 20px 15px;
    }
}



/* 1. БАЗОВЫЙ ДИЗАЙН И ФУТЕР */
button.compare, button.wishlist { position:unset; }
.add_to_cart { order:1; }
#uni_banner_1 .uni-banner__img { max-height:585px; }
.footer__column:nth-child(3) { order:4; }
.footer__column+.col-sm-12 { order:6; }
.uni-banner .uni-banner__item { width:auto !important; }
#uni_banner_1 { display:flex; justify-content:center; }
.menu__level-1-img { width:24px; height:24px; }
.product-data__item.highlight { color:#FF760A !important; }
.product-data__item .question-icon { cursor:pointer; }
.spec-toggle-btn { display:none !important; }

/* 2. КАРТОЧКИ ТОВАРОВ: РАССТОЯНИЕ И ВЫРАВНИВАНИЕ КНОПОК */
.products-block.row-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -10px !important; /* Компенсация отступов */
    margin-right: -10px !important;
}

.products-block.row-flex .product-layout {
    display: flex !important; 
    padding: 10px !important; /* ВОТ ЭТО ДАЕТ ВОЗДУХ МЕЖДУ КАРТОЧКАМИ */
}

.product-thumb.uni-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
    background: #fff;
    border: 1px solid #eee; /* Чтобы видеть границы, если нужно */
}

.product-thumb__caption {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; 
}

.product-thumb__cart.cart {
    margin-top: auto !important; 
    padding-top: 15px !important;
}

/* 3. ГЛОБАЛЬНЫЙ ФИКС ДЕРГАНИЙ И СКРОЛЛА */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
}

header.fixed {
    width: 100vw !important;
    left: 0 !important;
    z-index: 9999 !important;
}

header.fixed ~ main {
    padding-top: var(--header-height, 70px) !important;
}

body.modal-open, body.fancybox-active, body.mfp-zoom-out-cur {
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

/* 4. МОБИЛЬНЫЕ ПРАВКИ */
@media (max-width: 767px) {
    .products-block.row-flex {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
    .products-block.row-flex .product-layout {
        padding: 5px !important; /* Компактнее на мобилках */
    }
    
    #tab-specification { max-height: 320px; overflow: hidden; position: relative; }
    #tab-specification.is-open { max-height: none; }
    .spec-toggle-btn { 
        display: block !important; 
        width: 100%; padding: 12px; border: 1px solid #ddd; background: #fff; font-weight: 600; 
    }
}

/* 5. ЗАЩИТА ОТ ТРЯСКИ КАРТИНОК */
.product-page__image img, .product-thumb__image img, .category-wall__image img {
    -webkit-touch-callout: none !important;
    touch-action: pan-y !important;
    transform: none !important;
}




/* --- КИЛЛЕР УРОДСКОЙ ПОЛОСЫ ПРОКРУТКИ В ШАПКЕ --- */

/* 1. Делаем контейнер ссылок листаемым, но прячем скроллбар */
#top .top-menu__links {
    display: flex !important;
    overflow-x: auto !important; /* Разрешаем листать влево-вправо */
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: none !important; /* Прячем полосу в Firefox */
    -ms-overflow-style: none !important;  /* Прячем в Edge/IE */
    -webkit-overflow-scrolling: touch !important; /* Плавный скролл на iPhone */
}

/* 2. Прячем полосу прокрутки в Chrome, Safari и Яндекс.Браузере */
#top .top-menu__links::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 3. Фикс контейнера, чтобы скролл не "выпрыгивал" наружу */
#top .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    padding-right: 15px !important;
}

/* Защита телефона: он не должен сжиматься, когда мы листаем меню */
.header-phones__main {
    flex-shrink: 0 !important;
    margin-left: 15px !important;
}

/* Картинки в карусели категорий на всю высоту */
#product-category .category-list__item {
    justify-content: auto!important;
}
#product-category .category-list__item .category-list__img {
    width: 100%!important;
    max-width: 100%!important;
    height: 100px!important;
    flex: 1!important;
}
#product-category .category-list__item .category-list__name {
    font-size: 13px!important;
    line-height: 16px!important;
}