/* ==========================================================================
   1. ОБЩИЕ СТИЛИ (Глобальные настройки элементов)
   ========================================================================== */

/* Шрифт и Чекбоксы в фильтрах */
.t-store__filter__item label {
  font-size: 18px !important;
  font-weight: 400 !important;
}

.t-store__filter__item input {
  transform: scale(1.1);
  margin-right: 6px;
  border-radius: 4px;
}

/* Кнопки и количество в магазине */
.t-store .t-btnflex_xs,
.t-store__prod-popup .t-btnflex_xs {
  height: 45px !important;
  line-height: 45px !important;
  margin-top: 0px !important;
  font-weight: 500 !important;
}

.t-store__prod__quantity.t-store__prod__quantity_xs,
.t-store__prod__quantity_xs input {
  height: 45px !important;
  line-height: 45px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  border-color: #d0d0d0 !important;
  color: #444 !important;
}

.t-store__card__title {
  display: block;
  overflow: hidden;

  line-height: 1.3;
  height: calc(1.3em * 3);      /* ⬅️ РЕЗЕРВ под 3 строки */
  max-height: calc(1.3em * 3);  /* ⬅️ ОБРЕЗКА */

}


#allrecords .t-store__card__descr {
  margin-top: 2px !important;
  margin-bottom: 12px !important;
}

/* ==========================================================================
   2. ПОПАП ТОВАРА (Детальная страница)
   ========================================================================== */

/* Скрываем ненужные элементы */
.js-store-prod-charcs, 
.t-store__filter__toggler,
.t-store__filter__category-title::after {
  display: none !important;
}

/* Текстовый блок */
.t-store__prod-popup__text.js-store-prod-text,
.t-store__prod-popup__text.js-store-prod-text * {
  font-size: 17px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #000 !important;
}

/* Заголовки внутри текста попапа */
.t-store__prod-popup__text.js-store-prod-text > b,
.t-store__prod-popup__text.js-store-prod-text > strong,
.t-store__prod-popup__text.js-store-prod-text p > b:only-child,
.t-store__prod-popup__text.js-store-prod-text p > strong:only-child {
  font-size: 22px !important;
  font-weight: 700 !important;
  display: block !important;
  margin: 16px 0 6px 0 !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

/* Списки характеристик/описания */
.t-store__prod-popup__text.js-store-prod-text ul {
  background-color: #f9f9f9 !important;
  border-radius: 6px !important;
  padding: 20px 18px 20px 24px !important;
  margin: 6px 0 14px 0 !important;
  list-style: none !important;
}

.t-store__prod-popup__text.js-store-prod-text li {
  margin: 2px 0 !important;
  font-weight: 400 !important;
}

/* Цены и калькулятор */
.t-store__prod-popup__price-value {
  font-size: 24px !important;
  font-weight: 700 !important;
}

.t-store__prod-popup__text.js-store-prod-text .pricelab,
.t-store__prod-popup__text.js-store-prod-text .js-calc-price7 {
  font-size: 20px !important;
  font-weight: 700 !important;
}

/* Бренд и Артикул */
.js-product-brand, .t-store__prod-popup__sku {
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #777 !important;
}

/* Сброс ограничений заголовка в попапе */
.t-popup .t-store__card__title {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  min-height: unset !important;
}

/* ==========================================================================
   3. ПОИСК (Custom Search)
   ========================================================================== */

#custom-search-wrapper { position: relative; }

#custom-search.sticky {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 990;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  min-height: 60px;
}

#custom-search-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 6px 0;
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  padding: 12px 48px 12px 16px;
  font-size: 16px;
  border: 2px solid #ff7b00;
  border-radius: 6px;
  outline: none;
  font-family: 'TildaSans', sans-serif;
  box-sizing: border-box;
}

#search-input::placeholder {
  color: #666;
  font-weight: 500;
}

#search-button {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: transparent url('https://static.tildacdn.com/tild6262-3635-4564-b434-343163623637/icons8-sear22ch-50-2.png') no-repeat center / contain;
  border: none;
  cursor: pointer;
  font-size: 0;
}

/* Выпадающий блок результатов поиска */
#search-results {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  z-index: 1000;
  box-sizing: border-box;
  /* Форсируем шрифт TildaSans для всего блока и его детей */
  font-family: 'TildaSans', Arial, sans-serif !important;
}

/* Принудительно задаем шрифт для всех элементов внутри списка (заголовки, ссылки, цены) */
#search-results *, 
#search-results a, 
#search-results div, 
#search-results span {
  font-family: 'TildaSans', Arial, sans-serif !important;
}

/* Стили заголовков внутри поиска */
.search-title {
  font-family: 'TildaSans', Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #000 !important;
}

/* Стили цен внутри поиска (если они есть) */
.search-price {
  font-family: 'TildaSans', Arial, sans-serif !important;
  font-weight: 600 !important;
}


mark {
  background-color: rgba(0, 0, 0, 0.06);
  font-weight: 600;
  border-radius: 4px;
}

/* ==========================================================================
   4. АДАПТИВНОСТЬ (Медиа-запросы)
   ========================================================================== */

/* ДЕСКТОП (от 641px) */
@media screen and (min-width: 641px) {
  .t-store__filter__item-title {
    font-size: 20px !important;
    font-weight: 500 !important;
    margin-bottom: 20px !important;
  }
  .t-store__filter__title {
    font-size: 17px !important;
  }
  .t-store__card__title {
  min-height: 75px; /* Фиксация высоты для выравнивания */
}

}

/* МОБИЛЬНЫЕ (до 640px / 768px для поиска) */
@media screen and (max-width: 768px) {
  #custom-search-inner { padding: 6px 5vw; }
  #search-button { right: calc(5vw + 14px); }
  #search-results { left: 5vw; right: 5vw; width: auto; max-height: 450px; overflow-y: auto; }
  
  .logotip { position: absolute !important; left: 5vw !important; }
  .kontaktisprava {
    position: absolute !important;
    right: 5vw !important;
    left: auto !important;
    width: max-content;
  }
  .verh-shape { width: 90vw !important; left: 5vw !important; }
}

@media screen and (max-width: 640px) {
  /* Фильтры: всегда раскрыты, кнопка скрыта */
  .t-store__filter__wrap { display: block !important; height: auto !important; overflow: visible !important; }
  .t-store__filter__toggler, .js-store-filter-mob-btn { display: none !important; }
  .t-store__filter__category { max-height: none !important; overflow: visible !important; }
  .t-store__filter__category-title { pointer-events: none !important; }

  .t-store__filter__item-title { font-size: 18px !important; }
  .t-btnflex_sm { height: 50px !important; }

  /* Текст в попапе на мобильных */
  .t-store__prod-popup__text.js-store-prod-text,
  .t-store__prod-popup__text.js-store-prod-text * { font-size: 17px !important; line-height: 1.5 !important; }
  .t-store__prod-popup__text.js-store-prod-text > b { font-size: 20px !important; }
  .t-store__prod-popup__price-value { font-size: 22px !important; }
  .t-store__prod-popup__name { font-size: 20px !important; }

  /* Слайдер картинок */
  .t-slds__bgimg { padding-bottom: 70% !important; background-size: contain !important; }
  .t-slds__container { background-color: #ffffff !important; }
}

#search-results {
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

#search-results > * {
  padding: 10px 14px;
  cursor: pointer;
}

#search-results > *:hover {
  background-color: #f5f5f5;
}

#search-results > * + * {
  border-top: 1px solid #eee;
}

mark {
  background-color: #f5f5f5;
}

:root {
  --search-bar-height: 80px;
}

#search-results {
  max-height: calc(100dvh - var(--search-bar-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Полностью скрыть панель выбранных фильтров */
.t-store__filter__chosen-bar {
  display: none !important;
}