@import url("reset.css");
@import url("stile-new.css");

/*CSS Document */

body {
    background: #FFF;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #FFF;
    min-height: 100%;
    line-height: 1.5;
    margin: 0;
    min-width: 310px;
}

/*------------------------ TOP--------*/
#had {
    position: relative;
    top: 0px;
    z-index: 1000;
    width: 100%;
    min-height: 140px;
    background: #F8F8F8;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.had_info {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

/* Всплывающее окно внимания */
.attention_info {
    display: none;
    flex-direction: column;
    position: absolute;
    left: 10%;
    right: 10%;
    top: 220px;
    width: 80%;
    background-color: white;
    border: 2px solid black;
    border-radius: 20px;
    padding-top: 50px;
    padding-bottom: 40px;
    z-index: 2000; /* Добавил, чтобы было поверх всего */
}

.attention_info > p {
    margin: 0 50px 10px;
}

.attention_info div.close {
    position: absolute;
    right: -30px;
    top: -30px;
    border: 2px solid black;
    border-radius: 50%;
    font-size: 30px;
    width: 50px;
    height: 50px;
    background-color: white;
    text-align: center;
    transition: background-color 0.5s ease;
    line-height: 50px; /* Добавил для вертикального центрирования крестика */
    cursor: pointer; /* Лучше добавить сюда, а не только на hover */
}

.attention_info div.close:hover {
    background-color: blue;
    color: white;
}

p.privet {
    text-align: center;
    font-size: 20px;
}

p.ready_chenge {
    font-size: 20px;
}

.logo_top {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.slogan {
    font-size: 12px;
    position: relative;
    top: -10px;
}

#logo-top-info {
    position: sticky;
    top: 0;
    z-index: 1010;
    margin: 0 auto;
    padding: 5px 5%;
    background: #F8F8F8;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.poisk-pos {
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 90%;
    margin: -40px auto;
}

table.ya-site-form__search {
    display: flex;
    justify-content: flex-end;
}

.ya-site-form__input-text,
.ya-site-form__submit {
    padding: 5px;
}

/*---------- content -------------*/
#content {
    max-width: 93%;
    padding: 15px 5px 5px 5px;
    margin: 0 auto;
    background: #FFF;
    border: 1px solid #CCC;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slayd {
    background: #CCC;
}

.w-p {
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 5px;
    margin-bottom: 10px;
    padding-left: 5px;
    text-align: justify;
    font-size: calc(0.9rem + 0.2vw);
    line-height: 1.3;
    color: #333; /* Добавил цвет, т.к. у body цвет текста белый */
}

.logo-pr {
    text-align: right;
}

.logo-pl {
    text-align: left;
}

.t-j {
    text-align: center;
    font-size: calc(0.8rem + 0.2vw);
    line-height: normal;
    color: #333;
}

.h_1 {
    display: block;
    font-size: 18px;
    color: #000;
    padding: 5px 5px 5px 5px;
    border-bottom: solid 1px #CCC;
    border-top: solid 1px #CCC;
    background-color: #F8F8F8;
    text-align: center;
    width: 100%;
}

.image_qr {
    margin-left: 20%;
    width: 60%;
    height: auto;
}

.select_d {
    width: 100%;
    margin-top: 20px;
    padding-bottom: 10px;
}

/* Карточки товаров/категорий (.pdev) - эти стили пересекаются с nnftest.css */
.pdev {
    width: 230px;
    border-radius: 15px;
    margin: 10px 1% 10px 1%;
    box-shadow: 0 0 5px 2px #CCC;
    padding: 1px;
    float: left;
    text-align: center;
    transition: box-shadow 0.5s ease;
    background-color: #fff; /* Добавил фон, чтобы текст не сливался */
}

.pdev:hover {
    box-shadow: 0 0 10px 5px #0d6efd;
}

.pdev a {
    text-decoration: none;
    outline: none;
    color: inherit; /* Чтобы ссылка не была синей по умолчанию */
}

.pdev a p {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #878686;
    border-top: solid 1px #CCC;
    padding: 10px 5px;
    font-size: 16px;
    line-height: normal;
    font-weight: 400;
    transition: color 0.5s ease;
    margin: 0; /* Убрал лишние отступы у p */
}

.pdev a:hover p {
    color: #060606;
}

.border-bl {
    border-right: solid 1px #CCC;
    padding-right: 5px;
}

/* Секция ГОСТ */
.gost {
    width: 100%;
    padding-bottom: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gost ul {
    font-size: 16px;
    padding-left: 0; /* Сбросил отступ у ul */
    list-style: none; /* Убрал маркеры списка */
    width: 100%;
    max-width: 600px; /* Ограничил ширину для читаемости */
}

.gost ul li a {
    display: block;
    text-decoration: none;
    border: 1px solid #CCC;
    color: #999;
    font-size: calc(0.7rem + 0.2vw);
    background: #FFF;
    padding: 3px;
    margin-bottom: 2px;
    transition: all 0.3s ease; /* Добавил плавность */
}

.gost ul li a:hover {
    color: #000;
    background: #CCC;
    border-color: #09F;
}

.select_p {
    list-style-type: square;
    padding-left: 30px;
    font-size: 12px;
    color: #000;
    background: #CCC;
    padding: 3px;
    margin-bottom: 2px;
}

.poisk-main {
    height: 30px;
    float: right;
}

.img-accord {
    float: left;
    margin: 5px 5px 5px 5px;
    width: 142px;
}

.text-accord {
    float: right;
    width: 60%;
    padding-right: 10px;
}

.h3-accord {
    display: block;
    background: #CCC;
    border-radius: 5px 5px 0 0;
    padding: 5px;
    font-size: 14px;
    color: #333;
}

.h3-accord:hover {
    color: #09F;
}

.border-accord {
    border-left: solid 1px #CCCCCC;
    border-right: solid 1px #CCCCCC;
    border-bottom: solid 1px #CCCCCC;
    border-radius: 0 0 5px 5px;
    padding-right: 2px;
    margin-bottom: 10px;
    padding-left: 2px;
}

/* Блок с информацией об устройствах */
.info_dev {
    width: 100%;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-evenly;
}

.accod_info {
    margin: 0 auto;
    width: 100%;
    padding-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.h2-p {
    font-weight: bold;
    color: #333;
    padding: 10px 0 10px 0;
    font-size: calc(0.8rem + 0.2vw);
    width: 100%;
    border-bottom: solid 1px #CCC;
    border-top: solid 1px #CCC;
    background-color: #F8F8F8;
}

.li-n {
    font-weight: bold;
    font-style: italic;
}

.ul-text-o {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    padding-left: 20px;
    color: #333;
}

.t-gost {
    width: 100%;
    text-align: center;
}

.tth {
    width: 450px;
    padding: 5px;
    margin: 0 auto;
}

.tth td {
    padding: 5px;
}

.tthS {
    width: 100%;
    padding: 5px;
    margin: 0 auto;
    font-size: 11px;
    vertical-align: middle;
    text-align: center;
}

.tthG {
    width: 100%;
    padding: 5px;
    margin: 0 auto;
    margin-top: 10px;
    font-size: 11px;
    vertical-align: middle;
    text-align: center;
}

.tthG td {
    padding: 5px;
    vertical-align: middle;
    text-align: center;
}

.tthG td a:hover {
    color: #09F;
}

.tthS td {
    padding: 5px;
    border: 1px solid #999;
    vertical-align: middle;
    text-align: center;
}

.tthS th {
    border: 1px solid #999;
    background-color: #EFEFEF;
    font-weight: bold;
    vertical-align: middle;
    padding: 5px;
}

.block_p {
    width: 300px;
    min-height: 200px; /* Исправил, так как height:200px может обрезать контент */
    padding: 5px;
    border: 1px solid #999;
    float: left;
    margin-bottom: 20px;
}

.opisanie {
    margin: 0 auto;
    max-width: 98%;
    min-width: 660px;
    padding-top: 10px;
}

.fr-size {
    width: 560px;
    height: 315px;
}

.on-768,
.on-410,
.blok-off {
    display: none;
}

/*--------------web_up-------------------*/
#scrollup {
    position: fixed;
    opacity: 0.3;
    padding: 0px 15px 0px;
    right: 15px;
    bottom: 0px;
    display: none;
    cursor: pointer;
    z-index: 999; /* Добавил, чтобы была поверх всего */
}

/*------------------------podval-------------*/
#podval {
    z-index: 1000;
    position: relative; /* Изменил с absolute, чтобы не перекрывал контент */
    width: 100%;
    background: #F8F8F8;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0px;
    min-width: 310px;
    display: flex;
    padding: 1% 4%;
    flex-direction: row;
    flex-wrap: wrap;
    box-sizing: border-box; /* Добавил, чтобы padding не увеличивал общую ширину */
}

#logo-podval-info {
    float: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

.bott_info {
    width: 60%;
}

.pd-processing {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-bottom: 1%;
}

/*---------------poisk-----------------*/
#ya-site-results {
    color: #000000;
    background: #FFFFFF;
}

#ya-site-results .b-pager__current,
#ya-site-results .b-serp-item__number {
    color: #000000 !important;
}

#ya-site-results {
    font-family: Arial !important;
}

#ya-site-results :visited,
#ya-site-results .b-pager :visited,
#ya-site-results .b-foot__link:visited,
#ya-site-results .b-copyright__link:visited {
    color: #800080;
}

#ya-site-results a:link,
#ya-site-results a:active,
#ya-site-results .b-pseudo-link,
#ya-site-results .b-head-tabs__link,
#ya-site-results .b-head-tabs__link:link,
#ya-site-results .b-head-tabs__link:visited,
#ya-site-results .b-dropdown__list .b-pseudo-link,
#ya-site-results .b-dropdowna__switcher .b-pseudo-link,
.b-popupa .b-popupa__content .b-menu__item,
#ya-site-results .b-foot__link:link,
#ya-site-results .b-copyright__link:link,
#ya-site-results .b-serp-item__mime,
#ya-site-results .b-pager :link {
    color: #0033FF;
}

#ya-site-results :link:hover,
#ya-site-results :visited:hover,
#ya-site-results .b-pseudo-link:hover {
    color: #FF0000 !important;
}

#ya-site-results .l-page,
#ya-site-results .b-bottom-wizard {
    font-size: 13px;
}

#ya-site-results .b-pager {
    font-size: 1.25em;
}

#ya-site-results .b-serp-item__text,
#ya-site-results .ad {
    font-style: normal;
    font-weight: normal;

}

#ya-site-results .b-serp-item__title-link,
#ya-site-results .ad .ad-link {
    font-style: normal;
    font-weight: normal;
}

#ya-site-results .ad .ad-link a {
    font-weight: bold;
}

#ya-site-results .b-serp-item__title,
#ya-site-results .ad .ad-link {
    font-size: 16px;

}

#ya-site-results .b-serp-item__title-link:link,
#ya-site-results .b-serp-item__title-link {
    font-size: 1em;
}

#ya-site-results .b-serp-item__number {
    font-size: 13px;
}

#ya-site-results .ad .ad-link a {
    font-size: 0.88em;
}

#ya-site-results .b-serp-url,
#ya-site-results .b-direct .url,
#ya-site-results .b-direct .url a:link,
#ya-site-results .b-direct .url a:visited {
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    color: #329932;
}

#ya-site-results .b-serp-item__links-link {
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    color: #000000 !important;
}

#ya-site-results .b-pager__inactive,
#ya-site-results .b-serp-item__from,
#ya-site-results .b-direct__head-link,
#ya-site-results .b-image__title,
#ya-site-results .b-video__title {
    color: #000000 !important;
}

#ya-site-results .b-pager__current,
#ya-site-results .b-pager__select {
    background: #E0E0E0;
}

#ya-site-results .b-foot,
#ya-site-results .b-line {
    border-top-color: #E0E0E0;
}

#ya-site-results .b-dropdown__popup .b-dropdown__list,
.b-popupa .b-popupa__content {
    background-color: #FFFFFF;
}

.b-popupa .b-popupa__tail {
    border-color: #E0E0E0 transparent;
}

.b-popupa .b-popupa__tail-i {
    border-color: #FFFFFF transparent;
}

.b-popupa_direction_left.b-popupa_theme_ffffff .b-popupa__tail-i,
.b-popupa_direction_right.b-popupa_theme_ffffff .b-popupa__tail-i {
    border-color: transparent #FFFFFF;
}

#ya-site-results .b-dropdowna__popup .b-menu_preset_vmenu .b-menu__separator {
    border-color: #E0E0E0;
}

.b-specification-list,
.b-specification-list .b-pseudo-link,
.b-specification-item__content label,
.b-specification-item__content .b-link,
.b-specification-list .b-specification-list__reset .b-link {
    color: #000000 !important;
    font-family: Arial;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
}

.b-specification-item__content .b-calendar__title {
    font-family: Arial;
    color: #000000;
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
}

.b-specification-item__content .b-calendar-month__day_now_yes {
    color: #E0E0E0;
}

.b-specification-item__content .b-calendar .b-pseudo-link {
    color: #000000;
}

.b-specification-item__content {

    font-family: Arial !important;
    font-size: 13px;
}

.b-specification-item__content :visited {
    color: #800080;

}

.b-specification-item__content .b-pseudo-link:hover,
.b-specification-item__content :visited:hover {
    color: #FF0000 !important;
}

#ya-site-results .b-popupa .b-popupa__tail-i {
    background: #FFFFFF;
    border-color: #E0E0E0 !important;
}

/*-------------------end poisk----------------*/

@media screen and (max-width: 1135px) {
    .logo_top {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .slogan {
        text-align: center;
    }

    #ya-site-form0 .ya-site-form__form * {
        justify-content: center;
        font-size: 12px !important;
    }
}

@media screen and (max-width: 979px) {
    .had_info {
        width: 98%;
    }

    .logo-pr {
        text-align: center;
        display: none;
    }

    #content {
        width: 95%;
        box-shadow: none;
    }

    #slider {
        display: none;
    }

    .info_dev {
        width: 100%;
    }

    .select_d {
        margin-top: 5px;
    }

    .border-br {
        border-left: none;
    }

    .gost {
        margin-top: 5px;
    }

    #rating_mash {
        display: none;
    }

    #scrollup {
        display: none;
    }

    .bott_info {
        width: 100%;
    }

    /* Фикс для изображений в категориях */
    .category__container > .pdev img {
        width: auto;
        max-width: 100%;
        height: auto;
    }

    .off {
        display: none;
    }

    .blok-off {
        display: block;
    }

    .block_p {
        width: 45%;
        min-height: 200px;
    }

    .block_p img {
        width: 100%;
        height: auto;
    }

    .blok_part {
        padding-left: 2%;
    }

    .bn {
        margin-left: 1%;
    }

    .accor_info {
        width: 98%;
    }

    .opisanie {
        width: 100%;
        min-width: 100%;
        margin: 0px;
        box-sizing: border-box; /* Добавил */
    }

    #tabs {
        width: 100%;
        padding: 0px;
        overflow: hidden;
    }

    #tabs-4 .tth {
        width: 100%;
        padding: 0px;
        margin: 0 auto;
    }

    .tthS {
        width: 100%;
        margin-left: 0px;
        padding: 1px;
    }

    .tthS td,
    .tthS th {
        padding: 1px;
    }

    .tth,
    .tthG {
        width: 95%;
        padding: 0px;
    }

    .img-accord {
        width: 30%;
        margin: 5px 1px;
    }

    .fr-size {
        width: 90%;
        height: auto;
    }
}

@media screen and (max-width: 700px) {
    .text-w {
        display: none;
    }

    .reklam {
        display: none;
    }
}

@media screen and (max-width: 568px) {
    .on-410 {
        display: block;
    }

    .off-568,
    .off-410 {
        display: none;
    }
}

@media screen and (max-width: 520px) {
    .poisk-main {
        clear: both;
    }
}

@media screen and (max-width: 480px) {
    .gost {
        display: none;
    }

    #logo-podval-info {
        width: 95%;
    }

    .select_d {
        width: 100%;
        margin: 0 auto;
        clear: right;
    }

    .poisk-main {
        clear: both;
    }

    .on-410 {
        display: block;
    }

    .off-410 {
        display: none;
    }

    #ya-site-results,
    #yandex_site_callbacks {
        padding-left: 0px;
        text-align: left;
    }

    table.tthS img {
        min-width: 120px;
        width: 99%;
        height: auto;
    }

    .img-accord {
        float: none;
        margin-bottom: 1%;
        height: auto;
        width: 100%; /* На мобильных аккордеон картинка на всю ширину */
        max-width: 300px; /* Но с ограничением */
        margin-left: auto;
        margin-right: auto;
    }

    .text-accord {
        margin-top: 0px;
        width: 98%;
        float: none;
    }

    .fr-size {
        width: 100%;
        height: auto;
    }

    .had_info {
        max-width: 100%;
    }
    
    /* Фикс для карточек pdev на 480px */
    .pdev {
        width: 100%;
        max-width: 280px; /* Но не слишком широкие */
        margin-left: auto;
        margin-right: auto;
        float: none; /* Убираем float */
    }
}

hr {
    color: #CCCCCC;
}

.ya-page_js_yes .ya-site-form_inited_no {
    display: none;
}

/* Контейнер для категорий */
div.category__container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid #CCC;
    gap: 10px; /* Добавил отступы между карточками */
    margin: 20px;
}

/* Специфичные контейнеры для разной высоты */
div.category__container1 > div {
    min-height: 150px;
}

div.category__container2 > div {
    min-height: 110px;
}

div.category__container3 > div {
    min-height: 130px;
}

/* мобильное меню */
.mobile {
    display: flex;
    align-items: center;
}

.menu-triger {
    background: url('/images/svg-ico/menu-outline.svg') no-repeat 0 0;
    display: block;
    width: 28px;
    height: 28px;
    filter: brightness(0.1);
    background-size: contain; /* Добавил */
}

.menu-close {
    background: url('/images/svg-ico/close-circle-outline.svg') no-repeat 0 0;
    display: block;
    width: 28px;
    height: 28px;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 100;
    filter: brightness(0.1);
    background-size: contain; /* Добавил */
    cursor: pointer;
}

.menu-popup {
    background: #f8f8f8;
    display: none;
    position: absolute;
    left: -110%;
    top: 0;
    width: 320px;
    box-sizing: border-box;
    padding: 30px;
    z-index: 9999;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    overflow: auto;
    max-height: 500px; /* Изменил height на max-height */
}

.menu-popup ul {
    margin: 0;
    padding: 0;
}

.menu-popup li {
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

.menu-popup li a {
    font-size: 18px;
    font-family: "Arial";
    color: #000; /* Изменил с белого на черный, т.к. фон светлый */
    line-height: 1.4;
    text-decoration: none;
}

.body_pointer * {
    cursor: pointer;
}

.menu__item {
    text-decoration: none;
}

details > a {
    padding: 12px 0px;
    text-decoration: none;
}

.menu-popup > a,
details > summary,
details > p {
    padding: 12px 0;
    text-decoration: none;
}

.position_menu_item {
    padding: 6px 0 6px 10px;
}

@media screen and (min-width: 980px) {
    .mobile {
        display: none;
    }
}

/* Прокрутка якоря */
html {
    scroll-behavior: smooth;
}

/* Иконки для YouTube и Rutube */
.youtube__link:after {
    content: " ";
    display: inline-block;
    background-image: url('/images/youtube-svgrepo-com.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 20px; /* Задал размер */
    height: 20px;
    margin: 0 5px;
    vertical-align: middle;
}

.rutube__link:after {
    content: " ";
    display: inline-block;
    background-image: url('/images/rutube-svgrepo-com.svg');
    background-repeat: no-repeat;
    background-size: contain;
    width: 20px; /* Задал размер */
    height: 20px;
    margin: 0 5px;
    vertical-align: middle;
}

.ul__seoеtext__list,
.ul__seotext__list > li {
    list-style: inside;
    padding: 0 0 0 10px;
}

/* Специфичный селектор для SEO-страниц */
.seo_cat > .nnf-info,
.seo_cat > .pdev {
    width: 25% !important; /* !important зло, лучше переопределить более специфично */
}

/* Лучше так */
.seo_cat .nnf-info,
.seo_cat .pdev {
    width: calc(25% - 20px); /* Пример с учетом отступов */
}

.logo-pr-mobile {
    padding-top: 20px;
    padding-left: 12px;
}

/*--кнопки добавить в корзину МК---*/
.item-quantity {
    display: flex;
    align-items: center;
    margin: 0 15px 10px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

.quantity-btn {
    background-color: #ecf0f1;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.quantity-input {
    width: 50%;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.add-to-cart {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* Исправление отступов между слайдером и следующим блоком */
.sl_w {
    margin-bottom: 40px;
    clear: both;
    display: block;
}

.sl_w + .company-block {
    margin-top: 0;
    clear: both;
}

.modern-slider-container {
    margin-bottom: 30px;
}

/* Убедимся, что блок company-block не наезжает на слайдер */
.company-block {
    clear: both;
    position: relative;
    z-index: 1;
}

/* Убираем возможное переполнение */
#content {
    overflow-x: hidden;
}