body { background-color: #f0f0f0 !important; }
div .packagingimg {
    background-image: url(/images/DeepinScreenshot_select-area_20220822160548.png);
    background-repeat: no-repeat;
    min-height: 250px;
    background-size: 100%;
    background-position: 0ch 4em;
}
.customer_note .packagingimg{
    height: 100px;
    background-image: none;
}
#packagingimg_field{
    display: none;
}

#fancybox-wrap { width: 50% !important; max-width: 700px !important; }
#fancybox-wrap #fancybox-outer { padding: 15px; }
#fancybox-content { width: 100% !important; }
#fancybox-content .padded-wrap { display: flex; flex-direction: column-reverse; }
#fancybox-content .padded-product-name { margin-top: 25px; }
#fancybox-content .padded-product-name h4 { font-weight: bold; font-size: 20px; color: #000; }
#fancybox-content .padded-product-image { text-align: center; padding: 15px; }
#fancybox-content .padded-product-image img { max-height: 100px; }

.btn-padded-wrap {  }
#fancybox-close { top: 10px; right: 10px; }

#fancybox-content .showcart { color: #fff; background: #2aa8db;}

.user-details.regstr tr.field_address_1, .user-details.regstr tr.field_packaging, .user-details.regstr tr.field_name {display: none !important;}

.catalog-menu .VMmenu {padding: 0; margin: 0;}
.catalog-menu .VMmenu li {padding: 0;}
.catalog-menu .VMmenu li > div > a {color: #474747; display: block; padding: 5px 0; border-bottom: 1px solid #f7f7f7;font-size: 16px;width: 100%;}
.catalog-menu .VMmenu li > div {display: flex; justify-content: space-between;align-items: center;}
.catalog-menu .VMmenu .VmArrowdown { background: center center no-repeat url('/images/svg/menu-plus.svg'); cursor: pointer; float: none; width: 18px; height: 18px; min-width: 18px; min-height: 18px; padding: 0; background-color: #2aa8db; transition: all 0.3s linear; display: block; }
.catalog-menu .VMmenu .VmOpen > div > .VmArrowdown {background: center center no-repeat url('/images/svg/menu-minus.svg');background-color: #2aa8db;}

.catalog-menu .VMmenu > li ul {padding: 0 0 0 20px;}
.catalog-menu .VMmenu > li ul li {position: relative;}
.catalog-menu .VMmenu > li ul li::before {font-family: "fontello"; content: '\e801'; position: absolute; left: -10px; top: 7px; line-height: normal;}

.catalog-menu .VMmenu > li > ul > li > ul {}
.catalog-menu .VMmenu > li ul div > a {font-size: 14px;}

.home .category_description {margin: 20px 0 40px;; background: #f7f7f7; padding: 20px 30px 10px;}

#t3-mainnav > .container {margin-left: auto; margin-right: auto;}

.navbar-header .off-canvas-toggle {display: none;}


/* ========================================================= */
/* >>> ВСТАВЛЯЕМ НАШ НОВЫЙ CSS-КОД СЮДА <<<                  */
/* ========================================================= */

/* 1. Уплотняем заголовок товара */
.category-product .product-name h2,
.category-product .product-name h2 a {
    line-height: 1.25 !important; 
    margin-top: 5px !important;
    margin-bottom: 8px !important;
    font-size: 14px; 
}

/* 2. Настройка сетки (Flexbox) ТОЛЬКО для видов каталога */
.browse-view .flex-catalog,
.category-view .flex-catalog {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* 3. Убиваем старые костыли Bootstrap (clearfix) ТОЛЬКО в каталоге */
.browse-view .flex-catalog::before,
.browse-view .flex-catalog::after,
.category-view .flex-catalog::before,
.category-view .flex-catalog::after {
    display: none !important;
}

/* 4. Колонки товаров: убиваем float, превращаем во внутренний flex */
.category-product {
    float: none !important;
    display: flex !important;
    margin-bottom: 20px;
}

/* 5. Карточка товара (spacer): настройки высоты + подготовка к всплывающей корзине
   ОГРАНИЧЕНО только страницами каталога — не затрагивает страницу товара */
.browse-view .category-product .spacer,
.category-view .category-product .spacer {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    overflow: visible !important;
    border-bottom: 1px solid transparent;
    padding-bottom: 15px !important;
}

/* 6. Название товара: работает как вертикальная пружина */
.category-product .product-name {
    flex-grow: 1 !important;
}

/* 7. Эффект при наведении на карточку */
.browse-view .category-product .spacer:hover,
.category-view .category-product .spacer:hover {
    box-shadow: 0px 5px 15px rgba(0,0,0,0.08);
    background: #fff;
    z-index: 10; 
}

/* 8. Скрываем и вырываем из потока блок добавления в корзину
   ОГРАНИЧЕНО только страницами каталога */
.browse-view .category-product .spacer .addtocart-area,
.browse-view .category-product .spacer .addtocart-bar,
.browse-view .category-product .spacer .tocart-form,
.category-view .category-product .spacer .addtocart-area,
.category-view .category-product .spacer .addtocart-bar,
.category-view .category-product .spacer .tocart-form {
    position: absolute; 
    left: 0;
    right: 0;
    bottom: -10px; 
    background-color: #ffffff; 
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    z-index: 11; 
    box-shadow: 0px 10px 15px rgba(0,0,0,0.1); 
    transition: all 0.3s ease-in-out;
    margin: 0 !important;
}

/* 9. Показываем корзину при наведении мыши
   ОГРАНИЧЕНО только страницами каталога */
.browse-view .category-product .spacer:hover .addtocart-area,
.browse-view .category-product .spacer:hover .addtocart-bar,
.browse-view .category-product .spacer:hover .tocart-form,
.category-view .category-product .spacer:hover .addtocart-area,
.category-view .category-product .spacer:hover .addtocart-bar,
.category-view .category-product .spacer:hover .tocart-form {
    opacity: 1;
    visibility: visible;
    bottom: -45px;
}


/* ========================================================= */
/* >>> КОНЕЦ ВСТАВКИ <<<                                     */
/* ========================================================= */

/* Блок из статьи проектирование, не забыть <style> */
/* =========================================
   1. БАЗОВЫЕ БЛОКИ (Вводная и Преимущества)
   ========================================= */
.engineering-intro {
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 30px 25px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #eef2f5;
}
.engineering-title { font-size: 26px; font-weight: 700; color: #333333; margin-top: 0; margin-bottom: 15px; }
.engineering-subtitle { font-size: 16px; color: #555555; line-height: 1.5; max-width: 800px; margin: 0 auto; }

.eng-benefits { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin-bottom: 40px; }
.eng-benefit-card { flex: 0 0 calc(33.333% - 15px); background: #ffffff; border: 1px solid #e0e6ed; border-radius: 6px; padding: 25px 15px; text-align: center; box-sizing: border-box; transition: transform 0.3s, box-shadow 0.3s; }
.eng-benefit-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.05); }
.eng-benefit-icon { font-size: 32px; color: #2aa8db; margin-bottom: 15px; }
.eng-benefit-title { font-size: 16px; font-weight: 700; color: #333333; margin-bottom: 10px; text-transform: uppercase; }
.eng-benefit-desc { font-size: 13px; color: #666666; line-height: 1.4; margin: 0; }

.section-heading { font-size: 22px; font-weight: 700; color: #333333; text-align: center; margin-bottom: 20px; margin-top: 0; }

/* =========================================
   2. ГАЛЕРЕИ (Исправленные: без обрезки и дыр)
   ========================================= */
.project-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
    justify-content: flex-start;
    margin-top: 20px;
    margin-bottom: 40px;
}
.gallery-item {
    flex: 0 0 calc(33.333% - 10px);
    height: 200px; 
    background-color: #ffffff; 
    border: 1px solid #eef2f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item img {
    max-width: 95%; 
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.gallery-item:hover {
    transform: scale(1.03);
    z-index: 2;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #dbeafe;
}

/* =========================================
   3. БЛОК: ШАГИ РАБОТЫ
   ========================================= */
.work-steps-wrapper { margin-bottom: 40px; }
.work-steps { display: flex; gap: 15px; }
.step-card { flex: 1; background: #ffffff; border: 1px solid #e0e6ed; padding: 25px 20px; border-radius: 6px; position: relative; }
.step-num { font-size: 36px; font-weight: 800; color: rgba(42, 168, 219, 0.15); position: absolute; top: 15px; right: 20px; line-height: 1; }
.step-title { font-size: 16px; font-weight: 700; color: #333333; margin-bottom: 10px; position: relative; z-index: 1; }
.step-desc { font-size: 13px; color: #555555; line-height: 1.5; margin: 0; position: relative; z-index: 1; }

/* =========================================
   4. БЛОК: КЕЙСЫ (ПРИМЕРЫ РАБОТ)
   ========================================= */
.cases-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.case-item { display: flex; align-items: center; padding: 18px 20px; background: #f8fafc; border-left: 4px solid #2aa8db; border-radius: 0 6px 6px 0; text-decoration: none !important; color: #333333; font-weight: 600; font-size: 15px; transition: all 0.2s ease; border: 1px solid #eef2f5; border-left-color: #2aa8db; }
.case-item:hover { background: #ffffff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transform: translateX(5px); color: #2aa8db; }
.case-icon { margin-right: 15px; color: #2aa8db; font-size: 18px; }

/* =========================================
   5. БЛОК: ФИНАЛЬНЫЙ БАННЕР CTA
   ========================================= */
.cta-banner { background: #2aa8db; padding: 35px 20px; border-radius: 6px; text-align: center; color: #ffffff; margin-bottom: 20px; box-shadow: 0 10px 20px rgba(42, 168, 219, 0.2); }
.cta-title { font-size: 22px; font-weight: 700; margin-top: 0; margin-bottom: 10px; color: #ffffff; }
.cta-desc { font-size: 15px; margin-bottom: 25px; opacity: 0.9; }
.cta-btn { display: inline-block; background: #ffffff; color: #2aa8db; padding: 14px 30px; font-size: 16px; font-weight: 700; text-decoration: none !important; border-radius: 4px; transition: background 0.3s, transform 0.3s; text-transform: uppercase; }
.cta-btn:hover { background: #f0f0f0; transform: translateY(-2px); }

/* =========================================
   АДАПТАЦИЯ (Мобильные устройства)
   ========================================= */
@media (max-width: 991px) {
    .eng-benefit-card { flex: 0 0 calc(50% - 10px); }
    .work-steps { flex-direction: column; }
}
@media (max-width: 767px) {
    .eng-benefit-card { flex: 0 0 100%; }
    .project-gallery { gap: 10px; }
    .gallery-item { flex: 0 0 calc(50% - 5px); height: 150px; }
    .case-item { font-size: 13px; padding: 15px; }
}
/* Блок из статьи проектирование, не забыть </style> */

/*========== Блок из преимущества <style>  ==========*/
/* Делаем так, чтобы карточки всегда были одной высоты */
.advantages-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.advantages-row > [class*='col-'] {
    display: flex;
    margin-bottom: 20px;
}

/* Красивый дизайн самой карточки */
.advantage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 15px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 100%;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Эффект при наведении мыши (карточка "приподнимается") */
.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(42, 168, 219, 0.15);
    border-color: #2aa8db;
}

/* Анимация и цвет иконок */
.advantage-card .fa {
    color: #2aa8db;
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}
.advantage-card:hover .fa {
    transform: scale(1.15);
}

/* Типографика */
.advantage-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.advantage-desc {
    font-size: 14px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}
/*==========  Блок из преимущества </style>  ==========*/


/*==========  из блока телефон <style>  ==========*/
/* =========================================
   Базовые стили блока контактов (Десктоп)
   ========================================= */
.header-contact-block {
    font-family: inherit;
    color: #333333;
    line-height: 1.1;
}

/* Отступ между базовыми строками */
.hc-item {
    margin-bottom: 1px !important; 
}

/* Адрес: отделяем от остальных контактов */
.hc-address {
    font-size: 14px; 
    font-weight: 600;
    color: #222222;
    margin-bottom: 0px !important; 
}

/* Телефон (Блок "Телефон") */
.hc-phone-wrapper {
    margin-bottom: 2px !important; /* Отбиваем телефон от блока почты */
}

.hc-phone {
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    text-decoration: none;
    display: inline-block; 
}

.hc-phone:hover {
    color: #2aa8db; /* Легкий акцент при наведении */
}

/* Почты: склеиваем вплотную друг к другу */
.hc-item.hc-email {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

/* Вторая почта (нижняя) - принудительно подтягиваем для идеальной линии */
.hc-item.hc-email:last-child {
    margin-top: -4px !important; 
}

.hc-email a {
    font-size: 15px; 
    color: #2aa8db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 0 !important; 
    margin: 0 !important;
}

.hc-email a:hover {
    text-decoration: underline;
}

.hc-email i.fa {
    font-size: 15px; 
    margin-right: 6px;
    color: #888888;
}

/* =========================================
   Адаптация для мобильных (экраны до 767px)
   ========================================= */
@media (max-width: 767px) {
    .header-contact-block { line-height: 1; }
    .hc-item { margin-bottom: 2px !important; }
    .hc-address { font-size: 12px; margin-bottom: 6px !important; }
    .hc-phone-wrapper { margin-bottom: 3px !important; }
    .hc-phone { font-size: 14px; }
    .hc-email a { font-size: 14px; }
    .hc-item.hc-email:last-child { margin-top: -2px !important; }
}

/*==========  из блока телефон </style>  ==========*/

/*==========  из Материала FAQ <style>  ==========*/
/* Стили для аккордеонов FAQ */
.faq-accordion {
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.faq-summary {
    font-weight: 600;
    font-size: 16px;
    color: #333333;
    cursor: pointer;
    padding: 16px 45px 16px 20px;
    list-style: none;
    outline: none;
    position: relative;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.faq-summary:hover {
    background-color: #f8f9fa;
}
/* Скрытие стандартного треугольника в WebKit */
.faq-summary::-webkit-details-marker {
    display: none;
}
/* Добавление иконки из FontAwesome 4 */
.faq-summary::after {
    content: "\f107"; /* Иконка fa-angle-down */
    font-family: FontAwesome;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #2aa8db;
    transition: transform 0.3s ease;
}
/* Состояние при открытом аккордеоне */
.faq-accordion[open] .faq-summary::after {
    transform: translateY(-50%) rotate(180deg);
}
.faq-accordion[open] .faq-summary {
    color: #0056b3;
    border-bottom: 1px solid #e9ecef;
}
.faq-content {
    padding: 20px;
    color: #444444;
    line-height: 1.6;
    font-size: 15px;
}
.faq-content p:first-child {
    margin-top: 0;
}
.faq-content p:last-child {
    margin-bottom: 0;
}
.faq-section-title {
    margin-top: 40px;
    margin-bottom: 20px;
    color: #222222;
    font-size: 22px;
    border-bottom: 2px solid #2aa8db;
    padding-bottom: 10px;
}
/* Внутренние ссылки в тексте FAQ */
.faq-link {
    color: #2aa8db;
    text-decoration: underline;
}
.faq-link:hover {
    color: #0056b3;
}
/*==========  из Материала FAQ </style>  ==========*/

/*==========  из Материала Главная <style>  ==========*/
/* Контейнер главного экрана */
.hero-section {
    position: relative;
    background-image: url('/images/banners/main_bg_img_3_lr3.jpg'); 
    background-size: cover;
    background-position: center;
    padding: 20px 40px;
    margin-bottom: 0px;
    border-radius: 6px;
    overflow: hidden;
}

/* Затемняющий слой (Светлый вариант 0.85) */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(30, 41, 51, 0.85) 0%, rgba(30, 41, 51, 0.55) 100%);
}

/* Контентная часть */
.hero-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
    max-width: 700px;
}

/* Главный SEO-заголовок (H1) */
.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.25;
}

/* Подзаголовок */
.hero-subtitle {
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #e0e6ed;
}

/* Список преимуществ */
.hero-features {
    list-style: none;
    padding: 0;
    margin-bottom: 35px;
}
.hero-features li {
    font-size: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
}
.hero-features .fa {
    color: #2aa8db;
    font-size: 18px;
    margin-right: 12px;
    margin-top: 3px;
}

/* Стили для ссылок внутри текста */
.hero-features a {
    color: #2aa8db;
    text-decoration: none;
    border-bottom: 1px dashed rgba(42, 168, 219, 0.4);
    transition: all 0.3s ease;
}
.hero-features a:hover {
    color: #4dc4f5;
    border-bottom-color: #4dc4f5;
}

/* Кнопки */
.hero-btn-primary {
    display: inline-block;
    background: #2aa8db;
    color: #ffffff;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
    margin-right: 15px;
    margin-bottom: 10px;
    border: 2px solid #2aa8db;
}
.hero-btn-primary:hover {
    background: #1e8bb8;
    border-color: #1e8bb8;
    color: #ffffff;
}
.hero-btn-secondary {
    display: inline-block;
    background: transparent;
    color: #ffffff;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #ffffff;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    margin-bottom: 10px;
}
.hero-btn-secondary:hover {
    background: #ffffff;
    color: #333333;
}

/* Адаптация под мобильные телефоны */
@media (max-width: 767px) {
    .hero-section { padding: 40px 20px; }
    .hero-title { font-size: 26px; }
    .hero-subtitle { font-size: 15px; }
    .hero-btn-primary, .hero-btn-secondary { width: 100%; text-align: center; margin-right: 0; }
}

/* Секция популярных категорий */
.popular-categories-section {
    padding: 20px 0;
    background-color: #ffffff;
}

/* Заголовок секции (H2 для SEO) */
.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Сетка карточек */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Сама карточка */
.category-card {
    flex: 0 0 calc(25% - 15px); /* 4 карточки в ряд на десктопе */
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 25px 15px;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Эффект наведения (Hover) */
.category-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: #2aa8db;
    transform: translateY(-4px);
}

/* Контейнер для картинки (фиксированная высота держит сетку ровной) */
.category-img-wrapper {
    height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.category-card:hover .category-img-wrapper img {
    transform: scale(1.04);
}

/* Название категории */
.category-name {
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    transition: color 0.3s;
    margin-top: auto; /* Прижимает текст к низу, если картинки разной пропорции */
    display: block;
}

.category-card:hover .category-name {
    color: #2aa8db;
}

/* Адаптация для планшетов (по 2 в ряд) */
@media (max-width: 991px) {
    .category-card {
        flex: 0 0 calc(50% - 10px);
        padding: 20px 15px;
    }
}

/* Адаптация для мобильных телефонов */
@media (max-width: 767px) {
    .popular-categories-section {
        padding: 25px 0;
    }
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .categories-grid {
        gap: 12px;
    }
    .category-card {
        flex: 0 0 calc(50% - 6px);
        padding: 15px 10px;
    }
    .category-img-wrapper {
        height: 110px;
        margin-bottom: 12px;
    }
    .category-name {
        font-size: 13px;
        line-height: 1.3;
    }
}

/* Секция преимуществ */
.advantages-section {
    padding: 35px 0;
    background-color: #f8fafc; 
    border-top: 1px solid #eef2f5;
    border-bottom: 1px solid #eef2f5;
    margin-top: 0px;
}

.advantages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
}

/* Карточка преимущества (теперь это ссылка) */
.adv-card {
    display: block;
    flex: 0 0 calc(25% - 15px);
    background: #ffffff;
    border-radius: 6px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none !important; /* Убираем подчеркивание ссылок */
    color: inherit; /* Сохраняем цвета текста */
}

.adv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: #e0e6ed;
}

/* Иконки */
.adv-icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(42, 168, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2aa8db;
    font-size: 28px;
    transition: background 0.3s, color 0.3s;
}

.adv-card:hover .adv-icon-wrapper {
    background: #2aa8db;
    color: #ffffff;
}

/* Тексты */
.adv-title {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.adv-desc {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin: 0;
}

/* Адаптация */
@media (max-width: 991px) {
    .adv-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 767px) {
    .advantages-section {
        padding: 30px 0;
    }
    .adv-card {
        flex: 0 0 100%;
        padding: 25px 15px;
    }
}

/* Стили для текстового SEO-блока внизу страницы */
.seo-about-section {
    padding: 0px 0px;
    background-color: #ffffff;
    max-width: 900px; /* Ограничиваем ширину, чтобы текст было удобно читать */
    margin: 20px auto; /* Центрируем блок */
    color: #444444;
    font-size: 16px;
    line-height: 1.6;
}

.seo-about-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.3;
}

.seo-about-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2aa8db;
    margin-top: 35px;
    margin-bottom: 15px;
}

.seo-about-section p {
    margin-bottom: 15px;
    text-align: justify; /* Делаем ровный край текста для солидности */
}

.seo-about-section ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.seo-about-section li {
    margin-bottom: 10px;
    position: relative;
    list-style-type: disc;
    color: #2aa8db; /* Делаем маркеры синими */
}

.seo-about-section li span {
    color: #444444; /* Возвращаем тексту черный цвет */
}

@media (max-width: 767px) {
    .seo-about-section {
        padding: 30px 15px;
    }
    .seo-about-section h2 {
        font-size: 22px;
        text-align: left; /* На мобильных заголовки лучше по левому краю */
    }
    .seo-about-section h3 {
        font-size: 18px;
    }
    .seo-about-section p {
        text-align: left; /* Убираем justify на мобильных, чтобы не было дыр в тексте */
    }
}

/*==========  из Материала Главная</style>  ==========*/

/*========== Стили для материалов и справочных блоков (HG & Tech) ==========*/
.hg-content { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
.hg-content h2 { font-size: 1.5em; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-top: 30px; color: #333; }
.hg-content h3 { font-size: 1.2em; margin: 20px 0 10px 0; color: #333; }
.hg-features { padding-left: 20px; }
.hg-features li { margin-bottom: 15px; }
.hg-features strong { display: block; font-size: 1.1em; margin-bottom: 5px; color: #333; }
.hg-img-responsive { max-width: 100%; height: auto; display: block; margin: 15px auto; }

/* Стили для спойлера */
.tech-spoiler { margin: 20px 0; }
.tech-spoiler summary {
    background-color: #f4f6f8; 
    color: #333;
    padding: 14px;
    border: 1px solid #dcdcdc;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    list-style: none;
    outline: none;
}
.tech-spoiler summary:hover { background-color: #e2e6ea; }
.tech-spoiler summary::-webkit-details-marker { display: none; }

/* Стили для таблиц */
.table-responsive-wrapper { margin-top: 15px; overflow-x: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 0 10px rgba(0,0,0,0.03); border-radius: 6px; border: 1px solid #eaeaea; }
.tech-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 14px; }
.tech-table th { background-color: #f4f6f8; color: #333; padding: 12px 8px; font-weight: 700; border-bottom: 2px solid #009edb; }
.tech-table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; color: #444; vertical-align: middle; }
.tech-table tr:nth-child(even) { background-color: #fafbfc; }
.tech-table tr:hover { background-color: #f0f8ff; }
.tech-table .divider-row td { height: 3px; background-color: #eef2f5; padding: 0; border: none; }

@media (max-width: 480px) {
    .tech-table th { padding: 10px 4px; font-size: 13px; }
    .tech-table td { padding: 8px 4px; font-size: 13px; }
}

/*==========  Стили для материалов и справочных блоков (HG & Tech)  ==========*/


/* =========================================
   Адаптивный iframe карты с защитой скролла
   ========================================= */
.map-wrapper {
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    background-color: #f8fafc;
}

.map-wrapper iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
    pointer-events: none; /* Защита: карта не перехватывает скролл страницы */
}

/* При наведении или клике/тапе карта активируется для масштабирования */
.map-wrapper:hover iframe,
.map-wrapper:active iframe {
    pointer-events: auto;
}

/* Адаптируем высоту для мобильных устройств */
@media (max-width: 767px) {
    .map-wrapper iframe {
        height: 300px;
    }
}
/* =========================================
   Адаптивный iframe карты с защитой скролла
   ========================================= */

/* =========================================
   БЛОК: ХАРАКТЕРИСТИКИ ТОВАРА (VirtueMart)
   ========================================= */

/* Заголовок H3 (Стилизация под ваши FAQ и блоки) */
h3.product-specs-title {
    margin-top: 40px;
    margin-bottom: 20px;
    color: #222222;
    font-size: 22px;
    font-weight: 700;
    border-bottom: 2px solid #2aa8db;
    padding-bottom: 10px;
    display: inline-block; /* Линия будет ровно по длине слова */
}

/* Контейнер таблицы против CLS (прыжков верстки) */
table.vm-specs-table {
    width: 100% !important;
    table-layout: fixed !important; /* Жестко фиксируем сетку для скорости отрисовки */
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #ffffff; /* Перебиваем ваш глобальный серый фон body */
    box-shadow: 0 1px 3px rgba(0,0,0,0.04); /* Легкая тень, как в ваших FAQ */
    border-radius: 4px;
    overflow: hidden;
}

table.vm-specs-table td {
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.4;
    vertical-align: top;
    color: #444444;
}

/* Левая колонка (Название) */
table.vm-specs-table tr td:first-child {
    width: 45% !important;
    font-weight: 600;
    color: #333333;
    background-color: #f8fafc; /* Фирменный серый фон, как в преимуществах */
}

/* Правая колонка (Значение) */
table.vm-specs-table tr td:last-child {
    width: 55% !important;
}

/* "Зебра" для правой колонки (четные строки) */
table.vm-specs-table tr:nth-child(even) td:last-child {
    background-color: #fafbfc; /* Взято из ваших .tech-table */
}

/* Адаптация для мобильных устройств (смартфоны) */
@media (max-width: 767px) {
    h3.product-specs-title {
        font-size: 20px;
        margin-top: 30px;
    }
    
    /* Превращаем таблицу в список карточек */
    table.vm-specs-table, 
    table.vm-specs-table tbody, 
    table.vm-specs-table tr, 
    table.vm-specs-table td {
        display: block !important;
        width: 100% !important;
    }
    
    table.vm-specs-table tr {
        margin-bottom: 8px;
        border: 1px solid #e9ecef;
    }
    
    table.vm-specs-table tr td:first-child {
        border-bottom: none;
        padding: 8px 12px;
        background-color: #f4f6f8;
    }
    
    table.vm-specs-table tr td:last-child {
        border: none;
        padding: 4px 12px 12px 12px;
        font-weight: 500;
    }
}
/*==========  для характеристик в карточке  ==========*/


/* Выделение ссылок ТОЛЬКО в основном контенте из custom code настроек шаблона*/
.category_description p a,
.article-details p a {
    color: #428bca !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(66, 139, 202, 0.4) !important;
}

.category_description p a:hover,
.article-details p a:hover {
    color: #2a6496 !important;
    border-bottom-color: #2a6496 !important;
}

/*==========  из Материала <style>  ==========*/
/*==========  из Материала </style>  ==========*/


/*==========  Non-Mobile First Method  ==========*/

/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {

}

/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {

}

/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
    div .packagingimg {
        background-position: 0ch 9em;
    }

    .navbar-header .off-canvas-toggle {display: block;}
}

/* Extra Small Devices, Phones */
@media only screen and (max-width : 480px) {

}

/* Custom, iPhone Retina */
@media only screen and (max-width : 320px) {

}


/* ==========================================================================
   ИНЖЕНЕРНЫЙ КАЛЬКУЛЯТОР ПРОГИБА: СТИЛИ ДЛЯ CUSTOM.CSS
   Разработано для сайта ummachine.ru (ООО "Умные Машины")
   ========================================================================== */

:root {
    --deflect-primary: #2aa8db;
    --deflect-primary-hover: #1e8cb8;
    --deflect-bg-dark: #1a202c;
    --deflect-bg-card: #ffffff;
    --deflect-border: #e2e8f0;
    --deflect-text-main: #2d3748;
    --deflect-text-muted: #718096;
    --deflect-text-light: #f7fafc;
    --deflect-success: #48bb78;
    --deflect-danger: #e53e3e;
    --deflect-warning: #ecc94b;
}

/* Общий контейнер */
.product-deflection-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--deflect-text-main);
    background-color: #f8fafc;
    border: 1px solid var(--deflect-border);
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.product-deflection-calculator * {
    box-sizing: border-box;
}

/* Заголовки */
.calc-header {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--deflect-border);
    padding-bottom: 12px;
}

.calc-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 6px 0 !important;
}

.calc-subtitle {
    font-size: 13px;
    color: var(--deflect-text-muted);
    margin: 0 !important;
}

.calc-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 16px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Сетка из 6 карточек нагрузок (3 в ряд) */
.limit-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .limit-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .limit-cards-grid {
        grid-template-columns: 1fr;
    }
}

.limit-card {
    background-color: var(--deflect-bg-card);
    border: 1px solid var(--deflect-border);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    user-select: none;
}

.limit-card:hover {
    border-color: var(--deflect-primary);
    box-shadow: 0 4px 12px rgba(42, 168, 219, 0.1);
    transform: translateY(-2px);
}

.limit-card.active {
    border-color: var(--deflect-primary);
    background-color: #f0f9ff;
    box-shadow: 0 0 0 2px rgba(42, 168, 219, 0.2);
}

.limit-card.active::before {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--deflect-primary);
    font-size: 12px;
    font-weight: bold;
}

.limit-card-icon {
    width: 100%;
    max-width: 100px;
    height: auto;
    margin-bottom: 8px;
}

.limit-card-icon svg {
    width: 100%;
    height: auto;
    display: block;
}

.limit-card-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--deflect-text-main);
    line-height: 1.3;
    margin-bottom: 6px;
    height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.limit-card-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--deflect-primary);
    background: rgba(42, 168, 219, 0.08);
    padding: 3px 8px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
}

.limit-card-value.fail-low {
    color: var(--deflect-danger);
    background: rgba(229, 62, 62, 0.08);
}

/* Общий контейнер: теперь блоки идут друг под другом */
.calc-layout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* Левая колонка (Управление и результаты): делаем в два столбца */
.calc-controls-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .calc-controls-panel {
        grid-template-columns: 1fr 1fr; /* Настройки слева, результаты справа */
    }
}

.calc-control-group {
    background-color: var(--deflect-bg-card);
    border: 1px solid var(--deflect-border);
    border-radius: 6px;
    padding: 16px;
}

/* Выбор оси */
.calc-axis-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.axis-btn {
    flex: 1;
    background-color: var(--deflect-bg-card);
    border: 1px solid var(--deflect-border);
    color: var(--deflect-text-main);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.axis-btn:hover {
    border-color: var(--deflect-primary);
}

.axis-btn.active {
    background-color: var(--deflect-primary);
    border-color: var(--deflect-primary);
    color: #ffffff;
}

/* Слайдеры и инпуты */
.calc-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.calc-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.calc-input-field-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-number-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--deflect-border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.calc-number-input:focus {
    outline: none;
    border-color: var(--deflect-primary);
    box-shadow: 0 0 0 1px rgba(42, 168, 219, 0.3);
}

.calc-unit {
    font-size: 11px;
    color: var(--deflect-text-muted);
    width: 25px;
}

.calc-slider-wrapper {
    margin-bottom: 16px;
}

.calc-range-slider {
    width: 100%;
    height: 6px;
    background: #edf2f7;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    margin: 8px 0;
}

.calc-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--deflect-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
}

.calc-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--deflect-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
}

.calc-range-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Блок результатов */
.calc-results-card {
    background-color: var(--deflect-bg-card);
    border: 1px solid var(--deflect-border);
    border-radius: 6px;
    padding: 16px;
}

/* Уменьшаем расстояние между ячейками */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px; /* Было 12px */
    margin-bottom: 8px; /* Было 12px */
}

/* Уменьшаем внутренние отступы в самих ячейках */
.result-box {
    background-color: #f7fafc;
    border: 1px solid var(--deflect-border);
    border-radius: 4px;
    padding: 6px 8px; /* Было 10px */
    text-align: center;
}

/* Прижимаем заголовки ячеек ближе к цифрам */
/* Подписи ячеек */
.result-box-label {
    font-size: 10px;
    color: var(--deflect-text-muted);
    text-transform: uppercase;
    margin-bottom: 3px;
    font-weight: bold;
    line-height: 1; /* Убираем лишний интервал */
    white-space: nowrap; /* Жестко запрещаем перенос на новую строку */
}

/* Контейнер с цифрами */
.result-box-value {
    font-size: 16px;
    font-weight: 800;
    color: #1a202c;
    display: flex; /* Включаем Flexbox для выстраивания в линию */
    justify-content: center;
    align-items: baseline; /* Выравниваем цифры и буквы по нижней границе текста */
    gap: 4px; /* Расстояние между цифрой и единицами измерения */
    line-height: 1; /* Убираем лишний интервал */
}

/* Единый стиль для всех единиц измерения (мм, МПа, х) */
.result-box-value span {
    font-size: 11px;
    font-weight: normal;
    color: var(--deflect-text-main);
}

.result-box-value output {
    font-family: monospace;
}

/* Статус безопасности */
/* Делаем сигнальный баннер чуть тоньше */
.calc-status-banner {
    padding: 8px 10px; /* Было 10px 14px */
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calc-status-banner.safe {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--deflect-success);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.calc-status-banner.warning {
    background-color: rgba(236, 201, 75, 0.1);
    color: var(--deflect-warning);
    border: 1px solid rgba(236, 201, 75, 0.2);
}

.calc-status-banner.danger {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--deflect-danger);
    border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Правая колонка: Холст графика */
.calc-chart-panel {
    background-color: var(--deflect-bg-dark);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Холст графика: делаем его широким (панорамным), чтобы не был слишком высоким на всю ширину */
.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9; /* Более широкая пропорция */
    min-height: 280px;
}

.chart-canvas-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Спецификация профиля под калькулятором */
.calc-spec-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #4a5568; /* Сделали пунктирную линию светлее, чтобы ее было видно */
    font-size: 11px;
    color: #a0aec0; /* Светло-серый цвет для подписей (Артикул:, Вес: и т.д.) */
}

.spec-item strong {
    color: #ffffff; /* Чисто белый цвет для самих значений (UM.1..., цифры) */
}

/* --- СТИЛИ ДЛЯ ВКЛАДКИ 3D МОДЕЛИ --- */

/* Базовый вид неактивной вкладки */
.nav-tabs > li.tab-3d-li > a.tab-3d-highlight {
    background-color: #f4fbff; /* Легкий голубой фон */
    color: #2aa8db; /* Синий цвет текста и иконки */
    border: 1px solid #cce9f8;
    border-bottom-color: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 4px 4px 0 0;
}

/* Иконка внутри вкладки */
.tab-3d-highlight i.fa-cube {
    margin-right: 6px;
    font-size: 1.1em;
}

/* Эффект при наведении на неактивную вкладку */
.nav-tabs > li.tab-3d-li > a.tab-3d-highlight:hover,
.nav-tabs > li.tab-3d-li > a.tab-3d-highlight:focus {
    background-color: #e0f2fb;
    color: #1976d2;
    border-color: #aeddf3;
}

/* Вид АКТИВНОЙ (открытой) вкладки */
.nav-tabs > li.active.tab-3d-li > a.tab-3d-highlight,
.nav-tabs > li.active.tab-3d-li > a.tab-3d-highlight:hover,
.nav-tabs > li.active.tab-3d-li > a.tab-3d-highlight:focus {
    background-color: #2aa8db; /* Заливаем фирменным синим */
    color: #ffffff; /* Белый текст */
    border-color: #2aa8db;
    border-bottom-color: transparent;
    box-shadow: inset 0 -3px 0 0 rgba(0,0,0,0.1); /* Легкая тень снизу для объема */
}

/* Ненавязчивая пульсация для привлечения внимания (работает только пока вкладка не открыта) */
@keyframes pulse-3d-tab {
    0% { box-shadow: 0 0 0 0 rgba(42, 168, 219, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(42, 168, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 168, 219, 0); }
}

.nav-tabs > li.tab-3d-li:not(.active) > a.tab-3d-highlight {
    animation: pulse-3d-tab 2s infinite;
}

.nav-tabs > li.tab-3d-li:not(.active) > a.tab-3d-highlight:hover {
    animation: none; /* Отключаем пульсацию при наведении */
}

/* --- Стили для кнопок управления 3D-вьюером --- */
.view-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none; 
    border-bottom: 1px solid #ddd;
    padding: 12px 5px; 
    cursor: pointer; 
    color: #444;
    font-size: 11px; 
    font-weight: bold; 
    transition: all 0.2s;
    width: 55px; 
    text-align: center;
}

.view-btn:last-child { 
    border-bottom: none; 
}

.view-btn:hover { 
    background: #2aa8db; 
    color: #fff; 
}

#btn-help {
    background: rgba(255, 255, 255, 0.95);
    border: none; 
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 10px; 
    cursor: pointer; 
    color: #2aa8db;
    transition: all 0.2s; 
    width: 55px; 
    height: 55px;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

#btn-help:hover { 
    background: #2aa8db; 
    color: #fff; 
}

/* --- calculator ----*/

    .reverse-calc-container { max-width: 100%; margin: 30px auto; font-family: sans-serif; box-sizing: border-box; }
    .calc-section { background: #f8f9fa; border: 1px solid #e2e8f0; border-radius: 6px; padding: 20px; margin-bottom: 20px; }
    
    .limit-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
    .limit-card { background: #fff; border: 2px solid #e2e8f0; border-radius: 6px; padding: 10px; text-align: center; cursor: pointer; transition: 0.2s; outline: none; display: flex; flex-direction: column; justify-content: center; align-items: center; }
    .limit-card:hover { border-color: #cbd5e0; }
    .limit-card.active { border-color: #2aa8db; background: #ebf8ff; box-shadow: 0 0 10px rgba(42,168,219,0.2); }
    .limit-card-icon svg { max-width: 100px; height: auto; display: block; margin: 0 auto 10px; }
    .limit-card-title { font-size: 13px; font-weight: 600; color: #4a5568; line-height: 1.2; }
    .limit-card-value { display: none; }
    
    .input-group { margin-bottom: 20px; }
    .input-group label { display: block; font-weight: bold; margin-bottom: 8px; color: #2d3748; line-height: 1.3; }
    .input-row { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
    .input-row input[type="number"], .input-row select { padding: 8px; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 16px; background: #fff; }
    .input-row input[type="number"] { width: 120px; }
    .input-row select { width: 100%; max-width: 500px; cursor: pointer; }
    .input-row input[type="range"] { flex-grow: 1; cursor: pointer; }
    
    .btn-submit { background: #2aa8db; color: #fff; border: none; padding: 15px 30px; font-size: 16px; font-weight: bold; border-radius: 4px; cursor: pointer; width: 100%; transition: 0.3s; text-transform: uppercase; }
    .btn-submit:hover { background: #1c8cb4; }

    /* --- Стили для Таблицы --- */
    .calc-table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 15px; border-radius: 6px; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
    
    .calc-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: #fff; font-size: 13px; }
    
    .calc-table th:nth-child(1), .calc-table td:nth-child(1) { width: 40%; }
    .calc-table th:not(:nth-child(1)), .calc-table td:not(:nth-child(1)) { width: 15%; }

    .calc-table th, .calc-table td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; word-wrap: break-word; }
    
    .calc-table th { background: #edf2f7; font-weight: 700; color: #4a5568; cursor: pointer; transition: background 0.2s; user-select: none; text-align: left; white-space: normal; line-height: 1.3; }
    .calc-table th:hover { background: #e2e8f0; }
    .calc-table th.active-sort { color: #2aa8db; }
    
    .sort-indicator { display: inline-block; font-size: 11px; margin-left: 4px; color: #a0aec0; }
    .calc-table th.active-sort .sort-indicator { color: #2aa8db; }
    .calc-table tr:hover { background: #f8f9fa; }
    .calc-table tr.optimal-row { background: #f0fff4; }
    .calc-table tr.optimal-row:hover { background: #e6ffed; }
    .calc-table tr.optimal-row td { border-bottom-color: #c6f6d5; }
    .optimal-badge { background: #38a169; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 8px; text-transform: uppercase; white-space: nowrap; display: inline-block; margin-top: 3px; }
    
    .td-num { text-align: right !important; padding-right: 25px !important; font-variant-numeric: tabular-nums; font-weight: 600; color: #2d3748; }
    .th-num { text-align: right !important; padding-right: 25px !important; }
    
    .prof-link { color: #2aa8db; text-decoration: none; font-weight: bold; font-size: 14px; display: block; margin-bottom: 3px; }
    .prof-link:hover { text-decoration: underline; color: #1c8cb4; }
    .prof-meta { font-size: 12px; color: #718096; line-height: 1.4; }

    /* Адаптивность */
    @media (max-width: 768px) {
        .calc-table { min-width: 650px; }
    }
    @media (max-width: 600px) {
        .limit-cards-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 400px) {
        .limit-cards-grid { grid-template-columns: 1fr; }
        .input-row { flex-direction: column; align-items: stretch; }
        .input-row input[type="number"], .input-row select { width: 100%; max-width: none; }
    }
    
/* --- calculator ----*/


/* ==========================================================================
   ОБНОВЛЕНИЕ СПРАВОЧНИКА СОЕДИНИТЕЛЕЙ (ПОЛНАЯ ОПТИМИЗАЦИЯ ТАБЛИЦЫ)
   ========================================================================== */

/* 1. Глобальная сетка таблицы */
.connector-guide-wrapper .table-responsive-wrapper {
  margin: 25px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--site-border);
  background: #ffffff;
  overflow-x: hidden; 
  border-radius: 8px;
}

.connector-guide-wrapper .tech-table {
  width: 100%;
  min-width: 100% !important; 
  border-collapse: collapse;
  table-layout: fixed; 
}

/* 2. Пропорции столбцов */
.connector-guide-wrapper .tech-table th:nth-child(1) { width: 18%; } /* Элемент */
.connector-guide-wrapper .tech-table th:nth-child(2) { width: 14%; } /* Момент */
.connector-guide-wrapper .tech-table th:nth-child(3) { width: 45%; } /* Нагрузки (максимум места) */
.connector-guide-wrapper .tech-table th:nth-child(4) { width: 12%; } /* Обработка */
.connector-guide-wrapper .tech-table th:nth-child(5) { width: 11%; }  /* Цена */

/* Стилизация заголовков и ячеек (УМЕНЬШЕННЫЕ ШРИФТЫ) */
.connector-guide-wrapper .tech-table th {
  background-color: #f4f6f8;
  color: #333333;
  padding: 12px 6px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px; /* Было 11px */
  letter-spacing: 0.5px;
  border-bottom: 3px solid var(--site-accent);
  vertical-align: middle;
  text-align: left;
}

.connector-guide-wrapper .tech-table td {
  padding: 12px 8px; /* Уменьшили внутренние отступы */
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  line-height: 1.3;
  text-align: left;
  word-wrap: break-word; 
}

/* 3. Оформление столбцов и их содержимого */

/* Столбец 1: Картинки и названия */
.connector-guide-wrapper .connector-thumb {
  max-width: 60px; /* Еще меньше для экономии места */
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
  border-radius: 4px;
  border: 1px solid var(--site-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.connector-guide-wrapper .connector-name {
  font-size: 11px; /* Было 14px */
}
.connector-guide-wrapper .connector-desc {
  font-size: 10px; /* Было 11px */
}

/* Столбец 2: Выравнивание и шрифт */
.connector-guide-wrapper .torque-cell {
  text-align: left !important;
  font-size: 11px; /* Сделали значительно меньше и нежирным */
  color: #444;
}

/* Столбец 3: Компактные списки и иконки */
.connector-guide-wrapper .load-summary {
  font-size: 12px;
  display: inline-block;
  margin-bottom: 4px;
}
.connector-guide-wrapper .tech-spec-list {
  padding-left: 15px; /* Прижали левее к границе */
  margin-top: 5px;
  margin-bottom: 0;
}
.connector-guide-wrapper .tech-spec-list li {
  font-size: 11px; /* Уменьшили шрифт в списках */
  margin-bottom: 4px;
  color: #333;
}
.connector-guide-wrapper .load-icon {
  color: var(--site-accent); /* Синий фирменный цвет для иконок FontAwesome */
  margin-right: 2px;
  margin-left: 4px;
  font-size: 12px;
}

/* Столбец 4 и 5: Бейджи */
.connector-guide-wrapper .tech-badge {
  display: inline-block;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 9px; /* Минимально допустимый читаемый размер */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: normal; /* Разрешаем перенос строк (br) */
  text-align: center;
  line-height: 1.2;
}
.connector-guide-wrapper .proc-desc {
  font-size: 10px; 
  margin-top: 5px; 
  color: var(--site-muted);
  line-height: 1.3;
}
/* Цвета бейджей */
.connector-guide-wrapper .badge-no-proc { background-color: #e6fffa; color: #1a7f64; }
.connector-guide-wrapper .badge-med-proc { background-color: #fffaf0; color: #b7791f; }
.connector-guide-wrapper .badge-cost-low { background-color: #f1f5f9; color: #475569; }
.connector-guide-wrapper .badge-cost-med { background-color: #e0f2fe; color: #0369a1; }
.connector-guide-wrapper .badge-cost-high { background-color: #fef2f2; color: #991b1b; } 

/* 4. Мобильная верстка (вертикальные карточки) */
@media (max-width: 991px) {
  .connector-guide-wrapper .table-responsive-wrapper {
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
  }
  .connector-guide-wrapper .tech-table {
    min-width: 650px !important;
  }
}

@media (max-width: 767px) {
  .connector-guide-wrapper .table-responsive-wrapper {
    overflow-x: hidden;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .connector-guide-wrapper .tech-table,
  .connector-guide-wrapper .tech-table tbody,
  .connector-guide-wrapper .tech-table tr,
  .connector-guide-wrapper .tech-table td {
    display: block;
    width: 100% !important;
  }
  .connector-guide-wrapper .tech-table thead {
    display: none; 
  }
  .connector-guide-wrapper .tech-table tr {
    margin-bottom: 20px;
    border: 1px solid var(--site-border);
    border-radius: 8px;
    background: #fff;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  }
  .connector-guide-wrapper .tech-table td {
    padding: 12px 15px 12px 35%; /* Отступ слева под мобильные заголовки */
    border-bottom: 1px dashed #eaeaea;
    position: relative;
    text-align: left !important;
    font-size: 13px; /* На телефоне шрифт чуть крупнее для удобства пальца */
  }
  .connector-guide-wrapper .tech-table td:last-child {
    border-bottom: none;
  }
  .connector-guide-wrapper .tech-table td:first-child {
    padding: 15px;
    text-align: center !important;
    border-bottom: 2px solid var(--site-accent);
    background-color: #fcfdfe;
    border-radius: 8px 8px 0 0;
  }
  .connector-guide-wrapper .tech-table td:first-child .connector-name {
    font-size: 14px;
  }
  .connector-guide-wrapper .tech-table td:first-child .connector-thumb {
    max-width: 80px;
    height: 80px;
    margin: 0 auto 10px;
  }
  /* Генерируем мобильные заголовки */
  .connector-guide-wrapper .tech-table td:not(:first-child)::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 12px;
    width: 30%;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--site-muted);
    white-space: normal;
    line-height: 1.3;
  }
  .connector-guide-wrapper .tech-spec-list li {
    font-size: 12px;
  }
}

    /* Наглядные бейджи для технических параметров */
    .tech-badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .badge-no-proc { background-color: #e6fffa; color: #1a7f64; }
    .badge-med-proc { background-color: #fffaf0; color: #b7791f; }
    
    .badge-cost-low { background-color: #f1f5f9; color: #475569; }
    .badge-cost-med { background-color: #e0f2fe; color: #0369a1; }

/* ==========================================================================
   БЛОК 2: Рекомендации по проектированию (Выводы)
   ========================================================================== */
.conclusions-section {
    margin-top: 40px;
    margin-bottom: 40px;
}
.conclusions-section .section-heading {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    margin-bottom: 25px;
    margin-top: 0;
}
.conclusions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.conclusion-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #eef2f5;
    border-left: 5px solid #2aa8db;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
}
.conclusion-card:hover {
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(42, 168, 219, 0.1);
    transform: translateX(4px);
}
.conclusion-icon-box {
    margin-right: 15px;
    color: #2aa8db;
    font-size: 20px;
    line-height: 1;
    padding-top: 2px;
}
.conclusion-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 6px 0 !important;
}
.conclusion-text {
    font-size: 14px;
    color: #555555;
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   БЛОК 3: Научно-популярный блок (Простыми словами)
   ========================================================================== */
.pop-science-section {
    margin-top: 50px;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fdfbf7 0%, #f5f7fa 100%);
    border: 1px dashed #2aa8db;
    border-radius: 12px;
    position: relative;
}
.pop-science-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(42, 168, 219, 0.2);
    padding-bottom: 15px;
}
.pop-science-badge {
    background-color: #2aa8db;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pop-science-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 !important;
}
.pop-science-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pop-science-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.pop-science-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(42, 168, 219, 0.12);
    border-color: #2aa8db;
}
.pop-card-icon {
    font-size: 28px;
    color: #2aa8db;
    margin-bottom: 12px;
}
.pop-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0 !important;
}
.pop-card-formula {
    font-family: monospace;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #0f172a;
    display: inline-block;
    margin-bottom: 12px;
    font-weight: bold;
}
.pop-card-desc {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
}
.pop-science-footer {
    margin-top: 25px;
    padding: 15px;
    background: rgba(42, 168, 219, 0.05);
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    border-left: 3px solid #2aa8db;
}

/* ==========================================================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================================== */
@media (max-width: 991px) {
    .pop-science-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .pop-science-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .conclusion-card {
        flex-direction: column;
        padding: 15px;
    }
    .conclusion-icon-box {
        margin-bottom: 10px;
    }
    .pop-science-section {
        padding: 20px 15px;
    }
}

/* ==========================================================================
   ИНЖЕНЕРНЫЙ ДИСКЛЕЙМЕР (ДЛЯ ВСЕХ СТАТЕЙ)
   ========================================================================== */
.tech-disclaimer-block {
    display: flex;
    align-items: flex-start;
    background-color: #fffaf0; /* Сигнальный светло-желтый фон */
    border: 1px solid #f6e0b5;
    border-left: 5px solid #b7791f; /* Акцентная оранжево-желтая полоса */
    border-radius: 6px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.tech-disclaimer-block .disclaimer-icon {
    font-size: 24px;
    color: #b7791f;
    margin-right: 15px;
    padding-top: 2px;
}

.tech-disclaimer-block .disclaimer-content {
    flex: 1;
}

.tech-disclaimer-block .disclaimer-title {
    font-size: 16px;
    font-weight: 700;
    color: #975a16;
    margin: 0 0 10px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-disclaimer-block p {
    font-size: 13px;
    color: #555555;
    line-height: 1.6;
    margin: 0 0 10px 0;
    text-align: left;
}

.tech-disclaimer-block p:last-child {
    margin-bottom: 0;
}

/* Мобильная адаптация */
@media (max-width: 767px) {
    .tech-disclaimer-block {
        flex-direction: column;
        padding: 15px;
    }
    .tech-disclaimer-block .disclaimer-icon {
        margin-bottom: 10px;
    }
}
/* ==========================================================================
   БАЗА ЗНАНИЙ (ИНЖЕНЕРНЫЙ ХАБ)
   ========================================================================== */
.kb-wrapper {
    max-width: 1140px;
    margin: 0 auto;
}

.kb-section {
    margin-bottom: 50px;
}

.kb-grid {
    display: grid;
    gap: 20px;
}

/* Настройка колонок */
.kb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kb-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Карточка калькулятора (Делаем ее акцентной) */
.kb-card-highlight {
    border: 2px solid #2aa8db !important;
    background: linear-gradient(to right, #ffffff, #f0f9ff) !important;
}

.kb-card-highlight .pop-card-icon {
    font-size: 36px; /* Чуть крупнее для главного инструмента */
}

/* Ссылки-карточки (чтобы весь блок был кликабельным) */
a.pop-science-card {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

/* Карточки в разработке */
.kb-card-disabled {
    opacity: 0.7;
    background: #f8fafc !important;
    cursor: default;
}
.kb-card-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e2e8f0 !important;
}

/* Бейдж "Скоро" */
.kb-badge-soon {
    display: inline-block;
    background-color: #e2e8f0;
    color: #475569;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    vertical-align: middle;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Адаптивность для Хаба */
@media (max-width: 991px) {
    .kb-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .kb-grid-3, .kb-grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   МИНИ-ГАЛЕРЕЯ ДЛЯ КАРТОЧЕК БАЗЫ ЗНАНИЙ
   ========================================================================== */
.kb-card-images {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: flex-start;
    align-items: center;
}

.kb-card-images img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s ease;
}

/* Легкий эффект при наведении на всю карточку */
.pop-science-card:hover .kb-card-images img {
    border-color: #2aa8db;
    transform: translateY(-2px);
}


/* ==========================================================================
   Сетка мини-карточек базы знаний для описаний категорий
   ========================================================================== */
.cat-kb-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr); /* Строго 3 в ряд на ПК */
    gap: 15px;
    margin: 25px 0;
}

/* Адаптация под телефоны */
@media (max-width: 767px) {
    .cat-kb-grid {
        grid-template-columns: 1fr !important; /* На телефонах 1 в ряд (друг под другом) */
    }
}
/* Сетка для 2 мини-карточек */
.cat-kb-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
}

/* Адаптация под телефоны */
@media (max-width: 767px) {
    .cat-kb-grid-2 {
        grid-template-columns: 1fr; /* На телефонах 1 в ряд */
    }
}

/* ==========================================================================
   СХЕМЫ НАГРУЗОК ДЛЯ КАРТОЧКИ КАЛЬКУЛЯТОРА
   ========================================================================== */
.kb-load-schemes {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: center;
}

.load-scheme {
    width: 60px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.load-scheme svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Анимация: при наведении на всю карточку схемы "оживают" */
.pop-science-card:hover .load-scheme {
    border-color: #2aa8db;
    background: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(42, 168, 219, 0.15);
}

/* Эффект давления: стрелка силы чуть опускается при наведении */
.pop-science-card:hover .load-scheme svg path {
    transform: translateY(2px);
    transition: transform 0.2s ease;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .kb-load-schemes {
        gap: 10px;
    }
    .load-scheme {
        width: 50px;
        height: 35px;
    }
}

/* ==========================================================================
   Убираем пустой выпадающий список и стрелку у хаба "База знаний"
   ========================================================================== */

/* 1. Скрываем стрелочку (caret) рядом с текстом */
li.dropdown > a[href="/knowledge-base"] .caret,
li.dropdown > a[href="/knowledge-base"]::after,
li.dropdown > a[href="/knowledge-base"] i.fa-angle-down {
    display: none !important;
}

/* 2. Полностью скрываем пустой выпадающий блок (те самые несколько пикселей) */
li.dropdown > a[href="/knowledge-base"] ~ .dropdown-menu,
li.dropdown > a[href="/knowledge-base"] ~ ul {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 3. Гарантируем, что клик по кнопке в меню сразу откроет хаб, а не зависнет */
li.dropdown > a[href="/knowledge-base"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}


/* ==========================================================================
   Стили из карты раскроя - начало
   ========================================================================== */

/* CSS специфичный для модуля раскроя (наследует от custom.css) */
.reverse-calc-container { max-width: 100%; margin: 30px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; box-sizing: border-box; }
.calc-section { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }
.input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #2d3748; }
.input-row select { width: 100%; max-width: 500px; cursor: pointer; padding: 8px 12px; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 14px; background: #fff; }

.product-selector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }
@media(max-width: 768px) { .product-selector-grid { grid-template-columns: 1fr; } }

.profile-info-card { display: flex; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 15px; gap: 15px; margin-top: 20px; display: none; }
.profile-info-card.active { display: flex; }
.profile-img { width: 100px; height: 100px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 4px; padding: 5px; }
.profile-details { flex: 1; }
.profile-details h4 { margin: 0 0 5px 0; font-size: 16px; }
.profile-details a { color: #2aa8db; text-decoration: none; font-weight: 700; }
.profile-details a:hover { text-decoration: underline; }
.profile-meta { font-size: 13px; color: #4a5568; line-height: 1.5; }
.checkbox-label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; margin-left: 10px; font-size: 12px; color: #2aa8db; font-weight: 600; border-bottom: 1px dashed #2aa8db; }

/* Таблица отрезков */
.cuts-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: #fff; text-align: center; font-size: 14px; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; }
.cuts-table th { background: #edf2f7; padding: 12px; font-weight: 700; border-bottom: 2px solid #2aa8db; color: #333; }
.cuts-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.cut-input-len { width: 120px; padding: 6px 10px; text-align: right; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 14px; }
.cut-qty-wrapper { display: inline-flex; align-items: center; border: 1px solid #cbd5e0; border-radius: 4px; overflow: hidden; }
.qty-btn { background: #f4f6f8; border: none; padding: 6px 12px; cursor: pointer; font-weight: bold; color: #4a5568; transition: background 0.2s; }
.qty-btn:hover { background: #e2e8f0; }
.cut-input-qty { width: 50px; text-align: center; border: none; border-left: 1px solid #cbd5e0; border-right: 1px solid #cbd5e0; padding: 6px 0; font-size: 14px; -moz-appearance: textfield; }
.cut-input-qty::-webkit-outer-spin-button, .cut-input-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.action-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 4px 8px; transition: transform 0.2s; }
.action-btn.del { color: #e53e3e; }
.action-btn.add { color: #48bb78; }
.action-btn:hover { transform: scale(1.15); }

/* Кнопки действий */
.actions-bar { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; }
.btn-primary { background: #2aa8db; color: #fff; border: 2px solid #2aa8db; padding: 12px 24px; font-size: 15px; font-weight: 700; border-radius: 4px; cursor: pointer; transition: all 0.3s; text-transform: uppercase; }
.btn-primary:hover { background: #1e8bb8; border-color: #1e8bb8; }
.btn-secondary { background: transparent; color: #2aa8db; border: 2px solid #2aa8db; padding: 12px 24px; font-size: 14px; font-weight: 700; border-radius: 4px; cursor: pointer; transition: all 0.3s; text-transform: uppercase; }
.btn-secondary:hover { background: #2aa8db; color: #fff; }
.btn-success { background: #48bb78; border-color: #48bb78; }
.btn-success:hover { background: #38a169; border-color: #38a169; }

/* Блок результатов */
.results-wrapper { display: none; margin-top: 30px; }
.res-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 13px; border: 1px solid #e2e8f0; }
.res-table th { background: #f4f6f8; padding: 10px; border-bottom: 2px solid #2aa8db; text-align: left; }
.res-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; }
.remnant-badge { background: #ecc94b; color: #744210; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; margin-left: 5px; }

/* SVG визуализация */
.svg-map-wrapper { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 15px; margin-top: 20px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.svg-bundle { margin-bottom: 15px; }
.svg-bundle-title { font-size: 12px; font-weight: bold; margin-bottom: 5px; color: #4a5568; }

/* Оптимизация таблицы отрезков для мобильных */
@media (max-width: 767px) {
    .cuts-table { table-layout: fixed !important; width: 100%; }
    .cuts-table th, .cuts-table td { padding: 8px 3px; vertical-align: middle; }
    .cuts-table th { font-size: 11px; line-height: 1.2; white-space: normal; word-wrap: break-word; }
    .cuts-table th:nth-child(1), .cuts-table td:nth-child(1) { width: 33%; }
    .cuts-table th:nth-child(2), .cuts-table td:nth-child(2) { width: 42%; }
    .cuts-table th:nth-child(3), .cuts-table td:nth-child(3) { width: 25%; }
    .cut-input-len { width: 100%; padding: 6px 2px; font-size: 13px; text-align: center; box-sizing: border-box; }
    .cut-qty-wrapper { display: flex; width: 100%; justify-content: center; align-items: stretch; }
    .qty-btn { padding: 6px 8px; flex: 0 0 auto; }
    .cut-input-qty { width: 100%; min-width: 25px; padding: 6px 0; font-size: 13px; }
    .cuts-table td:last-child { white-space: nowrap; text-align: center; }
    .action-btn { padding: 4px; font-size: 16px; margin: 0 2px; }
}

/* Стили для выпадающего меню сохраненных раскроев */
.saved-cut-item { padding: 10px 15px; border-bottom: 1px solid #edf2f7; cursor: pointer; transition: all 0.2s; color: #2d3748; line-height: 1.4; }
.saved-cut-item:hover { background: #ebf8ff; color: #2aa8db; }
.saved-cut-item:last-child { border-bottom: none; }
.saved-cut-item-empty { padding: 20px; text-align: center; color: #a0aec0; font-size: 13px; }

/* Таблица сохраненных сессий */
.saved-sessions-wrapper { margin-bottom: 25px; background: #fff; border: 1px solid #cbd5e0; border-radius: 6px; display: none; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.saved-sessions-header { background: #f8fafc; padding: 12px 20px; font-weight: 700; font-size: 13px; color: #4a5568; border-bottom: 1px solid #cbd5e0; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; }
.saved-sessions-table-container { max-height: 260px; overflow-y: auto; overflow-x: auto; }
.saved-sessions-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; margin: 0; }
.saved-sessions-table th { background: #edf2f7; padding: 10px 15px; position: sticky; top: 0; z-index: 1; color: #4a5568; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 0 #cbd5e0; }
.saved-sessions-table td { padding: 10px 15px; border-bottom: 1px solid #edf2f7; vertical-align: middle; }
.saved-sessions-table tbody tr { transition: background 0.2s; }
.saved-sessions-table tbody tr:hover { background: #ebf8ff; }
.btn-load-session { background: #2aa8db; color: #fff; border: none; padding: 6px 16px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; transition: 0.2s; white-space: nowrap; }
.btn-load-session:hover { background: #1e8bb8; }
.btn-hide-sessions { background: transparent; border: 1px solid #cbd5e0; color: #718096; padding: 4px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; transition: 0.2s; }
.btn-hide-sessions:hover { background: #e2e8f0; color: #2d3748; }


/* ==========================================================================
   Стили из карты раскроя - цонец
   ========================================================================== */
   
/* ==========================================================================
   Сопутствующие категории в карточке товара
   ========================================================================== */
   /* 1. Выстраиваем сопутствующие категории в сетку (4 в ряд) */
.product-related-products .product-field {
    display: inline-block;
    vertical-align: top;
    width: 25%; /* 4 колонки, как у товаров */
    padding: 10px 15px;
    box-sizing: border-box;
    text-align: center;
}

/* 2. Заставляем картинку сжиматься под ширину колонки */
.product-related-products .product-field-display img {
    max-width: 100%;
    height: auto; /* Пропорциональное сжатие */
    margin: 0 auto 10px auto;
    display: block;
}

/* 3. Адаптивность для мобильных телефонов и планшетов */
@media (max-width: 768px) {
    .product-related-products .product-field {
        width: 50%; /* На планшетах по 2 в ряд */
    }
}
@media (max-width: 480px) {
    .product-related-products .product-field {
        width: 100%; /* На телефонах по 1 в ряд */
    }
}
/* ==========================================================================
   Сопутствующие категории в карточке товара - КОНЕЦ
   ========================================================================== */
   
/* Фиксируем блок под 3 строки для ровной сетки и устранения CLS */
.product-name .h2-style {
    font-size: 14px;
    line-height: 1.1;
    margin: 10px 0;
    text-align: center;
    
    /* Жестко резервируем 36px (12px * 3 строки) */
    height: 60px; 
    overflow: hidden;
    
    /* Добавляем красивое многоточие, если текст длиннее 3 строк */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Стили для самой ссылки внутри блока */
.product-name .h2-style a {
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.product-name .h2-style a:hover {
    color: #2aa8db; /* Небольшой бонус: цвет при наведении (задайте свой фирменный) */
}

/* --- СТИЛИ ДЛЯ СОПУТСТВУЮЩИХ КАТЕГОРИЙ (Устранение CLS и выравнивание) --- */

/* 1. Настраиваем сам блок ссылки как Flex-контейнер */
.product-related-products .product-field-type-Z .product-field-display a {
    display: flex;
    flex-direction: column;
    align-items: center;  /* Центрируем всё по горизонтали */
    text-align: center;   /* Выравниваем текст по центру */
    
    /* Шрифты в точности как у товаров */
    font-size: 14px;
    line-height: 1.1;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    
    /* Жесткая фиксация высоты: 150px картинка + 10px отступ + 60px текст */
    height: 220px;
    overflow: hidden; /* Скрываем текст, если он вдруг превысит 60px */
}

/* Эффект при наведении на категорию */
.product-related-products .product-field-type-Z .product-field-display a:hover {
    color: #2aa8db;
}

/* 2. Настраиваем картинку внутри ссылки */
.product-related-products .product-field-type-Z .product-field-display a img {
    height: 150px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 10px; /* Отступ до текста */
    flex-shrink: 0; /* ЗАЩИТА: запрещаем браузеру сжимать картинку, если текста слишком много */
}

/* Контейнер карточки */
.category .spacer {
    padding: 0 !important;
    border: 1px solid #e0e4e8;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    background: #fff;
    height: 100%;
}

.category .spacer:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Ссылка-обертка */
.um-category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    height: 100%;
}

/* Блок с картинкой */
.um-category-image {
    padding: 15px;
    text-align: center;
    background: #fff;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.um-category-image img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
}

/* ФИРМЕННАЯ СИНЯЯ ПЛАШКА С ТЕКСТОМ (Зарезервировано 3 строки) */
.um-category-title-panel {
    background-color: #2aa8db;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    margin: 0;
    line-height: 1.2;
    
    /* Жестко фиксируем общую высоту (3 строки + отступы) */
    height: 78px; 
    box-sizing: border-box;
    
    /* Добавляем многоточие, если текст длиннее 3 строк */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* Выравниваем текст строго по центру по вертикали */
    -webkit-box-pack: center;
    
    transition: background-color 0.2s ease;
}

.um-category-card:hover .um-category-title-panel {
    background-color: #1e8bb8;
}
/* --- СТИЛИ ДЛЯ СОПУТСТВУЮЩИХ КАТЕГОРИЙ (Устранение CLS и выравнивание) --- */

/* CSS для одинаковых вкладок с иконками */
.vm-custom-tabs { display: flex; flex-wrap: nowrap; margin: 0 0 20px 0; padding: 0; list-style: none; border-bottom: 2px solid #e5e5e5; }
.vm-custom-tabs > li { flex: 1 1 0; margin-bottom: -2px; }
.vm-custom-tabs > li > a { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 75px; padding: 10px 4px; margin-right: 2px; background: #f9f9f9; border: 1px solid #e5e5e5; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; color: #666; font-size: 13px; line-height: 1.2; white-space: normal; text-decoration: none; transition: all 0.2s ease-in-out; }
.vm-custom-tabs > li:last-child > a { margin-right: 0; }
.vm-custom-tabs > li > a i.fa { font-size: 20px; margin-bottom: 6px; color: #999; transition: all 0.2s ease; }
.vm-custom-tabs > li.active > a, .vm-custom-tabs > li > a:hover { background: #fff; color: #2aa8db; border-color: #e5e5e5; border-bottom-color: #2aa8db; }
.vm-custom-tabs > li.active > a i.fa, .vm-custom-tabs > li > a:hover i.fa { color: #2aa8db; transform: scale(1.15); }

/* Адаптивность */
@media (max-width: 768px) {
    .vm-custom-tabs { flex-wrap: wrap; border-bottom: none; }
    .vm-custom-tabs > li { flex: 0 0 50%; max-width: 50%; margin-bottom: 4px; }
    .vm-custom-tabs > li > a { margin: 0 2px; border-bottom: 2px solid #e5e5e5; border-radius: 4px; }
    .vm-custom-tabs > li.active > a { border-bottom-color: #2aa8db; }
}
@media (max-width: 480px) { .vm-custom-tabs > li > a { font-size: 11px; min-height: 65px; } }
/* CSS для одинаковых вкладок с иконками конец */


/* Возвращаем скрытие технического текста описания картинок после отключения базовых стилей VM */
.vm-img-desc { display: none !important; }    

/* Общие стили для логотипа, чтобы он не выходил за рамки контейнера */
.logo-image .logo-img {
    max-width: 70%;
    height: auto;
    width: 250px; /* Задайте желаемую ширину для десктопа */
}

/* Адаптация для мобильных устройств (смартфоны до 767px) */
@media (max-width: 767px) {
    .logo-image .logo-img {
        width: 220px; /* Уменьшенная ширина для мобильной версии */
        /* Если нужно центрировать логотип на мобильных: */
        margin: 0 auto;
        display: block;
    }
}