/* Мобильный поиск */
.mobile-search-block {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-search-block.active {
    display: block;
    height: 100vh;
}

.mobile-search-wrapper {
    padding: 20px;
    display: flex;
    align-items: center;
}

.mobile-search {
    display: flex;
    width: 100%;
    align-items: center;
    height: 10%;
    padding-left: 10px;
    padding-right: 10px;
}

.mobile-search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /*max-height: 95vh;*/
    height: 90%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-search-results-container.scrollbar .bx_searche.scrollbar {
    overflow: hidden;
}

.mobile-search-results {
    padding: 10px;
}

@media (max-width: 767px) {
    .mobile-search-wrapper {
        position: sticky;
    }
}

.mobile-search-input-div .mobile-search-input {
    border: 1px solid #bd1c3c;
}

.mobile-search-input-div {
    flex-grow: 1;
}

.mobile-search-button-div {
    display: flex;
    align-items: center;
}

.btn-search, .close-mobile-search {
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.btn-search i, .close-mobile-search span {
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}

.btn-search i {
    background-image: url('/local/templates/aspro_tires2/images/svg/Search_black_sm.svg');
}

.close-mobile-search span {
    background-image: url('/local/templates/aspro_tires2/images/svg/Close_black_sm.svg');
}

.mobile-search-results {
    /*margin-top: 10px;*/
}

/* Медиа-запросы */
@media (min-width: 992px) {
    .mobile-search-block {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-search-wrapper {
        padding: 20px;
    }
    
    .mobile-search-input {
        font-size: 14px;
    }

    .btn-search, .close-mobile-search {
        width: 32px;
        height: 32px;
    }
    
    .btn-search i, 
    .close-mobile-search span {
        width: 18px;
        height: 18px;
    }

}

@media (max-width: 480px) {
    .mobile-search-wrapper {
        padding: 20px;
    }
    
    .mobile-search-input {
        font-size: 12px;
    }

    .btn-search, .close-mobile-search {
        width: 28px;
        height: 28px;
    }
    
    .btn-search i, 
    .close-mobile-search span {
        width: 16px;
        height: 16px;
    }
}

.mobile-search-button-div .btn.btn-search {
    width: 24px;
    height: 24px;
    margin-left: 5px;
    margin-right: 5px;
}

.mobile-search-block .svg-search.svg-black {
    background-image: url(/local/templates/aspro_tires2/css/../images/svg/Search_black_sm.svg);
    width: 24px;
    height: 24px;
    background-size: auto;
}

.mobile-search-results-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #fff;
    overflow: auto;
}

.mobile-search-results-container.fullscreen .mobile-search-results {
    padding: 5px;
    box-sizing: border-box;
    height: 90%;
}

.mobile-search-block.active .btn[disabled], .btn.disabled {
    border: none !important;
    cursor: pointer;
    pointer-events: auto;
}

/* Дополнительные стили */
.warning_number-of-attempts{
    color:red;
    margin-bottom: 5px;
}
#wrap_ajax_auth .bottom_form_block{
    padding: 0 35px 35px;
}
@media(max-width: 768px){
    input[type="text"], input[type="password"], input[type="email"], input[type="tel"], textarea{
        font-size: 16px !important;
    }
}
/* Общие стили для поиска */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Стили для результатов поиска */

div.title-search-result{
    width: auto !important;
    /*margin-left: -125px;*/
}
.bx_searche > a{
    padding: 0;
}
.licence_block input[type="checkbox"]:checked + label:before, .licence_block input[type="checkbox"]:checked + label:after,.filter.label_block input[type="checkbox"] + label:before, .filter.label_block input[type="checkbox"] + label:after{
    display: none;
}

.search-container {
    position: relative; /* Позволяет дочерним элементам позиционироваться относительно этого контейнера */
}

.search-input {
    width: 100%; /* Полная ширина для поля ввода */
    padding: 10px; /* Отступы для удобства */
    box-sizing: border-box; /* Учитываем отступы в ширине */
}

.search-result-page {
    scrollbar-width: none; /* Для Firefox */
}

.search-result-page::-webkit-scrollbar {
    display: none; /* Для Chrome, Safari и Opera */
}

.search-result-page {
    position: absolute; /* Позиционируем относительно родителя */
    top: 100%; /* Располагаем под полем ввода */
    left: 0;
    width: 100%; /* Ширина соответствует ширине родителя */
    background-color: white; /* Фон белый */
    /*border: 1px solid #ccc; /* Тонкая серая рамка */
    border-radius: 4px; /* Закругленные углы */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Тень */
    z-index: 1000; /* Поверх других элементов */
    display: none; /* Скрываем по умолчанию */
    max-height: 300px; /* Максимальная высота (по желанию) */
    overflow: visible;
    box-sizing: border-box; /* Учитываем отступы и границы в ширине */
}

.search-result-page .bx_searche {
    overflow: auto;
    max-height: 500px;
    background: none repeat scroll 0 0 #ffffff;
    border: medium none;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.title-search-result.title-search-result--open {
    display: block;
}

.search-result-page.title-search-result--open {
    display: block;
}

.title-search-result--open .kolesa-title-content span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-search-result--open .bx_searche .bx_item_element {
    padding-left: 0;
}

.bx_searche .bx_item_block .maxwidth-theme {
    padding: 0;
}
.bx_searche .bx_item_block.all_result .maxwidth-theme{
    padding-left: 30px;
}
/* Новые стили для изображений в поиске */
.bx_searche .bx_item_block .bx_img_element {
    /*width: 65px;
    height: 65px;*/
}

.bx_searche .bx_item_block .bx_img_element img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.bx_searche .all_result_wrapper {
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
}
.bx_searche .all_result_wrapper .bx_item_element {
    display: block;
    justify-content: center;
}
.bx_searche .all_result_wrapper .all_result_title {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    /*text-transform: uppercase;*/
}
.search-block-header .btn[disabled], .btn.disabled {
    border: none !important;
    cursor: pointer;
    pointer-events: auto;
}
.bx_searche .search-item-wrapper {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.bx_searche .bx_img_element {
    flex-shrink: 0;
    margin-right: 10px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bx_searche .bx_img_element img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.bx_searche .bx_item_element {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 70px;
    padding: 2px 0;
}
.bx_item_block.all_result {
    text-align: center;
}

.bx_item_block.all_result .kolesa-title-content {
    display: inline-block;
    max-width: 100%;
}

.bx_searche .bx_item_element .no-results-message {
    display: inline !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    line-height: inherit;
}

.bx_searche .bx_item_element .no-results-message .kolesa-title-empty__term {
    font-weight: bold;
    display: inline;
}

/* Переопределение стилей для span внутри .no-results-message */
.bx_searche .bx_item_element .no-results-message span {
    display: inline;
    word-wrap: normal;
    overflow-wrap: normal;
    hyphens: none;
    max-width: none;
    white-space: normal;
    line-height: inherit;
}
.bx_searche .item-name {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin: 0;
    white-space: normal;
}
.bx_searche .price.cost.prices {
    margin: 0;
}
.bx_searche .bx_item_element .title-search-price {
    line-height: 1;
    margin: 0;
}
.bx_searche .bx_img_element + .bx_item_element {
    margin-left: 0;
}
.bx_searche .bx_img_element {
    line-height: normal;
}
.bx_searche .cost .price {
    margin-left: 0;
}
.bx_searche .bx_item_block .bx_img_element {
    padding-top: 5px;
}
.bx_searche .cost.prices .price {
    margin-bottom: 0;
}
.kolesa-title-empty__term {
    color: #BD1C3C;
}

/* Контейнер иконки акции */
.catalog_item .image_wrapper_block .actions_props {
    position: absolute;
    left: 0;
    top: 0;
}

.catalog_item .image_wrapper_block .actions_props.left {
    position: absolute;
    left: 0;
    top: 0;
    right: unset;
}

.catalog_item .image_wrapper_block .actions_props.right {
    position: absolute;
    right: 0;
    top: 0;
    left: unset;
}

/* Общие стили для всех устройств */
.catalog_item .image_wrapper_block .actions_props .action-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    margin: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.catalog_item .image_wrapper_block .actions_props .action-icon:hover {
    background: #e3e3e3;
}

.catalog_item .image_wrapper_block .actions_props .action-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: all 0.2s ease;
    z-index: 1;
}

.catalog_item .image_wrapper_block .actions_props .action-icon:hover img {
    filter: 
        brightness(0) 
        saturate(100%) 
        invert(16%) 
        sepia(89%) 
        saturate(4213%) 
        hue-rotate(349deg) 
        brightness(89%) 
        contrast(101%);
}

.catalog_item .image_wrapper_block .actions_props .action-icon:focus img {
    filter: 
        brightness(0) 
        saturate(100%) 
        invert(16%) 
        sepia(89%) 
        saturate(4213%) 
        hue-rotate(349deg) 
        brightness(89%) 
        contrast(101%);
}

/* Стили тултипа для десктопа */
.catalog_item .image_wrapper_block .actions_props .action-icon .tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #E32329;
    color: #fff;
    border-radius: 3px;
    padding: 5px 8px;
    margin-left: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    min-width: 100px;
    max-width: 150px;
    width: max-content;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
    text-align: left;
}

.catalog_item .image_wrapper_block .actions_props.left .action-icon .tooltip {
    position: absolute;
    left: 100%;
    right: unset;
}

.catalog_item .image_wrapper_block .actions_props.right .action-icon .tooltip {
    position: absolute;
    right: 100%;
    left: unset;
}

.catalog_item .image_wrapper_block .actions_props .action-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.catalog_item .image_wrapper_block .actions_props .tooltip-link {
    cursor: pointer;
    text-decoration: underline;
    color: #fff;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    /* Показ тултипа при клике */
    .catalog_item .image_wrapper_block .actions_props .action-icon.active .tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Стиль ссылки только для мобилок */
    

    /* Изменение цвета иконки при активации */
    .catalog_item .image_wrapper_block .actions_props .action-icon:focus img {
        filter: 
            brightness(0) 
            saturate(100%) 
            invert(16%) 
            sepia(89%) 
            saturate(4213%) 
            hue-rotate(349deg) 
            brightness(89%) 
            contrast(101%);
    }

    /* Скрываем hover-эффекты на мобилках */
    .catalog_item .image_wrapper_block .actions_props .action-icon:hover {
        background: transparent;
    }

    /* Адаптация позиции для маленьких экранов */
    .catalog_item.small .actions_props .action-icon .tooltip {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 5px;
    }

    /* Разрешаем multiple line в тултипах */
    .catalog_item .image_wrapper_block .actions_props .tooltip {
        white-space: normal;
        word-break: break-word;
    }

    .catalog_item .image_wrapper_block .actions_props .action-icon:focus .tooltip {
        pointer-events: auto; /* Разрешаем взаимодействие */
    }
    
    .catalog_item .image_wrapper_block .actions_props .tooltip {
        pointer-events: none; /* По умолчанию отключаем */
    }
    
    .catalog_item .image_wrapper_block .actions_props .tooltip-link {
        pointer-events: auto; /* Разрешаем клики по ссылке */
    }
    
    .actions_props .action-icon:focus {
        z-index: 1000; /* Поднимаем над другими элементами */
    }

    .catalog_item .image_wrapper_block .actions_props .action-icon.active {
        background: #e3e3e3;
        z-index: 1000;
      }
      
      .catalog_item .image_wrapper_block .actions_props .action-icon.active .tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
      }
      
      .catalog_item .image_wrapper_block .actions_props .action-icon img {
        pointer-events: none;
      }
}

/* Скрываем ссылки в тултипе на десктопе */
@media (min-width: 769px) {
    .catalog_item .image_wrapper_block .actions_props .action-icon .tooltip {
        display: none;
    }
      
    .catalog_item .image_wrapper_block .actions_props .action-icon:hover .tooltip {
        display: block;
    }
    .catalog_item .image_wrapper_block .actions_props .tooltip-link {
        text-decoration: none;
    }
    .catalog_item .image_wrapper_block .actions_props .action-icon:hover .tooltip-link {
        text-decoration: none;
    }
}

/* Попап с Куки */
.cookies {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    transform: translateY(0);
    transition: transform 0.3s ease;
  }
  
  .cookies__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
  }
  
  .cookies__text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    flex: 1;
  }
  
  .cookies__text a {
    color: #d9242b; /* Основной красный с сайта */
    text-decoration: underline;
    transition: color 0.2s;
  }
  
  .cookies__text a:hover {
    color: #b01e24; /* Темнее при наведении */
  }
  
  .cookies__btn {
    background: #d9242b; /* Красный акцентный цвет */
    color: white !important;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
  }
  
  .cookies__btn:hover {
    background: #b01e24; /* Темный оттенок при наведении */
  }
  
  /* Адаптив для мобильных */
  @media (max-width: 768px) {
    .cookies__inner {
      flex-direction: column;
      align-items: flex-start;
      gap: 12px;
    }
    
    .cookies__btn {
      align-self: flex-end;
      padding: 6px 16px;
    }
  }
  
  @media (max-width: 480px) {
    .cookies {
      padding: 12px 0;
    }
    
    .cookies__inner {
      padding: 0 15px;
    }
    
    .cookies__btn {
      width: 100%;
      text-align: center;
      align-self: center;
    }
  }