{
}
.js-product .t-product__option-select {
    width: 100%;
    border: 1px #ddd solid;
    background: #f8f8f8;
    color: #000;
    box-sizing: border-box;
    cursor: pointer;
    padding: 2px 30px 2px 10px;
    border-radius: 2px; /* скругление */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.js-product .t-product__option-selected_select {
    padding: 2px 30px 2px 10px;
    position: relative;
    display: table;
    min-width: 150px;
    min-height: 28px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #000;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 2px; /* скругление */
}

.js-product .t-product__option-variants_buttons .t-product__option-item_simple {
    margin-bottom: 5px;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    min-height: 35px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 2px; /* скругление */
}


document.addEventListener("DOMContentLoaded", function(){
    function fixLineBreaksInCharacteristics() {
        let elems = document.querySelectorAll('.js-store-prod-all-charcs p');

        elems.forEach(function(elem) {
            // Заменяем переносы строк на 
            let html = elem.innerHTML
                .replace(/(?:\\n|&#10;|\r\n|\r|\n)/g, ""); // обрабатываем все варианты

            // Если строка содержит "Название: Значение", форматируем в таблицу
            if (html.includes(':')) {
                let parts = html.split(':');
                let title = parts[0];
                let value = parts.slice(1).join(':'); // если внутри значения тоже есть ":"
                elem.innerHTML = `${title}${value}`;
            } else {
                elem.innerHTML = html; // если нет ":", просто заменяем переносы
            }
        });

        document.querySelector('.js-store-prod-all-charcs')?.classList.add('show-chrs');
    }

    setTimeout(function () {
        if (document.querySelectorAll('.t-store__product-snippet').length) {
            fixLineBreaksInCharacteristics();
        }
    }, 1500);

    document.addEventListener('click', function(e){
        let prodElem = e.target.closest('a[href*="/tproduct/"]');
        if (prodElem != null) {
            setTimeout(fixLineBreaksInCharacteristics, 1000);
        }
    });
});
