/* ==========================================================================
   Бибихауз · типографика v2 («Гротеск»)
   Подключать ПОСЛЕ template_styles.css (см. README.md).

   Что меняется: шрифт, начертания, кегли, интерлиньяж, трекинг, цвет текста
   и ритм меню каталога. Цвета фона, сетка, формы и картинки — прежние.

   Шрифт — Onest (OFL): кириллица, ₽, вариативный вес. Цифры пропорциональные:
   моноширинные дают дыру после «1» («1  500 ₽»), а столбцов цифр на сайте нет.
   Прежний шрифт набирала весь сайт одним «жирным» начертанием — отсюда
   ощущение перегруза. Теперь веса работают по ролям:
     400 — текст и названия товаров
     500 — интерфейс и заголовки
     600 — только цены
   Чистый чёрный заменён тремя «чернилами» с холодным оттенком кобальта.

   Роли (десктоп / ≤1240 / ≤767):
     display  34 / 30 / 25 — заголовки страниц и секций
     title    28 / 24 / 22 — товар, большие карточки
     subtitle 22 / 20 / 19 — магазины, подзаголовки
     price    18 / 16 / 16 — цена в сетке
     body     15 / 15 / 14 — тексты, описания
     card     14 / 14 / 13 — название товара в сетке
     ui       14 / 14 / 13 — кнопки, вкладки, шапка, меню
     small    13          — крошки, старая цена, вспомогательные ссылки
     meta     12          — даты, подписи, юр. строки
     caps     12          — метки колонок в подвале (единственный капс)
   ========================================================================== */

/* --- Шрифты ------------------------------------------------------------- */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/onest-1.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/onest-2.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/onest-3.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* пока Onest грузится, Arial занимает ровно столько же места — без скачка вёрстки */
@font-face {
  font-family: "Onest Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103.3%;
  ascent-override: 93.9%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}

/* --- Токены ------------------------------------------------------------- */

:root {
  --bh-font-text: "Onest", "Onest Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bh-font-display: var(--bh-font-text);

  /* чернила: холодный оттенок кобальта вместо чистого #010101 */
  --bh-ink: #16181D;    /* заголовки, цены, активное — 17,8:1 */
  --bh-ink-2: #41454D;  /* текст, названия, ссылки — 9,6:1 */
  --bh-ink-3: #646972;  /* мета, неактивное, подсказки — 5,5:1 на белом, 4,8:1 на #EFEFEF */
  --bh-line: #E9EBEF;
  --bh-tint: #F2F4F7;   /* подложка наведённого пункта меню */

  --bh-fw-text: 400;
  --bh-fw-ui: 500;
  --bh-fw-strong: 600;
  --bh-fw-display: 500;

  --bh-fs-display: 3.4rem;
  --bh-lh-display: 1.15;
  --bh-ls-display: -0.025em;
  --bh-fs-title: 2.8rem;
  --bh-lh-title: 1.18;
  --bh-ls-title: -0.02em;
  --bh-fs-subtitle: 2.2rem;
  --bh-lh-subtitle: 1.25;
  --bh-ls-subtitle: -0.015em;

  --bh-fs-price: 1.8rem;
  --bh-fs-price-l: 3.4rem;
  --bh-fs-body: 1.5rem;
  --bh-fs-card: 1.4rem;
  --bh-fs-ui: 1.4rem;
  --bh-fs-small: 1.3rem;
  --bh-fs-meta: 1.2rem;
  --bh-fs-caps: 1.2rem;

  --bh-lh-text: 1.55;
  --bh-lh-snug: 1.4;
  --bh-ls-meta: 0.01em;
  --bh-ls-caps: 0.08em;

  --bh-card-lines: 3;
}

@media screen and (max-width: 1240px) {
  :root {
    --bh-fs-display: 3rem;
    --bh-fs-title: 2.4rem;
    --bh-fs-subtitle: 2rem;
    --bh-fs-price: 1.6rem;
    --bh-fs-price-l: 3rem;
  }
}

@media screen and (max-width: 767px) {
  :root {
    --bh-fs-display: 2.5rem;
    --bh-fs-title: 2.2rem;
    --bh-fs-subtitle: 1.9rem;
    --bh-fs-price: 1.6rem;
    --bh-fs-price-l: 2.8rem;
    --bh-fs-body: 1.4rem;
    --bh-fs-card: 1.3rem;
    --bh-fs-ui: 1.3rem;
    --bh-card-lines: 4;
  }
}

/* --- База --------------------------------------------------------------- */

body {
  font-family: var(--bh-font-text);
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-text);
  line-height: 1.5;
  color: var(--bh-ink-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

b, strong {
  font-weight: var(--bh-fw-ui);
}

::placeholder {
  color: var(--bh-ink-3);
  opacity: 1;
}

h1, .h1, h2 {
  text-wrap: balance;
}

p, .set_item .text_block, .journal_item .title, .product_item .name {
  text-wrap: pretty;
}

/* --- Заголовки: три роли, одно начертание ------------------------------- */

h1, .h1, h1.custom, .h1.custom, main.sml h1, main.auth h1, .text_page_section h1,
h2, h3, .text_page_section h2,
.set_item .name, .journal_item_main .title, .spoiler_title,
.product_txt_block h1, .article_detail h1, .specifications_window .spec_title,
.catalog-not-found__title, .callback_popup_result .title, .countries_title .title,
.opt_callback_section .title, .order_item .title, .order_main_block .title {
  font-family: var(--bh-font-display);
  font-weight: var(--bh-fw-display);
  font-synthesis: none;
}

h1, .h1, h1.custom, .h1.custom, main.sml h1, main.auth h1, .text_page_section h1, h2 {
  font-size: var(--bh-fs-display);
  line-height: var(--bh-lh-display);
  letter-spacing: var(--bh-ls-display);
  color: var(--bh-ink);
}

.product_txt_block h1, .set_item .name, .journal_item_main .title, .article_detail h1,
.catalog-not-found__title, .callback_popup_result .title, .countries_title .title,
.opt_callback_section .title {
  font-size: var(--bh-fs-title);
  line-height: var(--bh-lh-title);
  letter-spacing: var(--bh-ls-title);
}

h3, .text_page_section h2, .spoiler_title, .specifications_window .spec_title,
.order_item .title, .order_main_block .title {
  font-size: var(--bh-fs-subtitle);
  line-height: var(--bh-lh-subtitle);
  letter-spacing: var(--bh-ls-subtitle);
  color: var(--bh-ink);
}

.product_txt_block h1, .set_item .name, .journal_item_main .title, .catalog-not-found__title {
  color: var(--bh-ink);
}

/* --- Шапка -------------------------------------------------------------- */

.header_line {
  font-size: var(--bh-fs-ui);
  color: var(--bh-ink-2);
}

.header_link_icon:hover,
.header_line a:hover {
  color: var(--bh-ink);
}

.header_main .header_nav {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

.header_main .catalog_link {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  letter-spacing: 0;
}

.header_main .header_personal a {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-2);
  letter-spacing: var(--bh-ls-meta);
}

.header_main .header_personal a:hover {
  color: var(--bh-ink);
}

.search_form input {
  font-size: var(--bh-fs-ui);
  color: var(--bh-ink);
}

.cart-quantity__num {
  width: 14px;
  height: 14px;
  font-size: var(--bh-fs-meta);
  font-weight: var(--bh-fw-ui);
}

/* --- Меню каталога: собранные колонки ------------------------------------
   Было: пункты 15px с шагом 47px, колонки разной ширины «прыгали» при смене
   раздела, неактивное почти белое. Стало: шаг 36px, колонки фиксированной
   ширины с тонкими разделителями, путь подсвечен плашкой, панель отделена
   от страницы мягкой тенью. */

.catalog_dropdown.open {
  padding: 2.4rem 0 3.2rem;
  box-shadow: 0 2.4rem 4rem -2.8rem rgba(22, 24, 29, 0.28);
}

.catalog_dropdown ul:not(:last-child) {
  margin-right: 0;
}

.catalog_dropdown .dropdown_lvl_1 {
  width: 26rem;
  flex-shrink: 0;
  padding-right: 2.4rem;
}

.catalog_dropdown .dropdown_lvl_2,
.catalog_dropdown .dropdown_lvl_3 {
  width: 30rem;
  flex-shrink: 0;
  padding: 0 2.4rem;
  border-left: 1px solid var(--bh-line);
}

.catalog_dropdown li {
  line-height: 1.3;
}

.catalog_dropdown li:not(:last-child) {
  margin-bottom: 0.2rem;
}

.catalog_dropdown a {
  padding: 0.8rem 1.2rem;
  margin: 0 -1.2rem;
  border-radius: 1rem;
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-text);
  color: var(--bh-ink-2);
  transition: 0.15s background, 0.15s color;
}

.catalog_dropdown a svg {
  stroke: var(--bh-ink-3);
  margin-left: 1.6rem;
}

.catalog_dropdown a.active,
.catalog_dropdown a:hover {
  color: var(--bh-ink);
  background: var(--bh-tint);
}

.catalog_dropdown a.active svg,
.catalog_dropdown a:hover svg {
  stroke: var(--bh-ink);
}

.catalog_dropdown .dropdown_lvl_1 > li > a {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

/* Разделы первого уровня заведены в админке капсом («СЕРВИРОВКА»), второй
   и третий уровни — строчными. До переименования разделов приводим первый
   уровень к обычному регистру; после — правило ничего не меняет.
   Ссылка из flex в block, иначе ::first-letter не работает. */
.catalog_dropdown .dropdown_lvl_1 > li > a {
  display: block;
  position: relative;
  padding-right: 3.6rem;
  text-transform: lowercase;
}

.catalog_dropdown .dropdown_lvl_1 > li > a::first-letter {
  text-transform: uppercase;
}

.catalog_dropdown .dropdown_lvl_1 > li > a svg {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  margin: 0;
  transform: translateY(-50%);
}

/* --- Мобильное меню ----------------------------------------------------- */

.mobile_link {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

.mobile_city_block .t {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
}

/* --- Кнопки и вкладки --------------------------------------------------- */

.btn,
.btn.big,
.btn.lk,
.custom_checkbox_tab .check {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  line-height: 1.2;
}

.custom_checkbox_tab .check {
  color: var(--bh-ink);
}

/* --- Карточка товара -----------------------------------------------------
   Название — обычным начертанием и не длиннее трёх строк, цена — единственный
   акцент и стоит на одной линии во всём ряду, как бы ни было длинно название. */

.product_item {
  display: flex;
  flex-direction: column;
}

.product_item .text_block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.product_item .name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--bh-card-lines);
  overflow: hidden;
  font-size: var(--bh-fs-card);
  font-weight: var(--bh-fw-text);
  line-height: 1.45;
  color: var(--bh-ink-2);
  margin-bottom: 1rem;
  transition: 0.15s color;
}

.product_item .name:hover {
  color: var(--bh-ink);
}

.product_item .price_block {
  margin-top: auto;
  font-size: var(--bh-fs-price);
  font-weight: var(--bh-fw-strong);
  letter-spacing: -0.01em;
  color: var(--bh-ink);
  white-space: nowrap;
}

.product_item .old {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-text);
  letter-spacing: 0;
  color: var(--bh-ink-3);
}

.sale {
  font-size: var(--bh-fs-meta);
  font-weight: var(--bh-fw-ui);
  letter-spacing: var(--bh-ls-meta);
}

@media screen and (max-width: 1240px) {
  .product_item .btn {
    font-size: var(--bh-fs-ui);
    font-weight: var(--bh-fw-ui);
  }

  .product_item .old {
    font-size: var(--bh-fs-small);
  }
}

/* --- Подборки ----------------------------------------------------------- */

.set_item .text_block {
  font-size: var(--bh-fs-ui);
  line-height: 1.6;
  color: var(--bh-ink-2);
}

/* на планшете и телефоне у плашки фиксированная высота 13.2rem — текст должен влезть */
@media screen and (max-width: 1240px) {
  .set_item .name {
    font-size: var(--bh-fs-subtitle);
  }

  .set_item .text_block {
    font-size: var(--bh-fs-meta);
    line-height: 1.45;
  }
}

/* --- Популярные категории -----------------------------------------------
   Названия разделов в админке капсом — та же подстраховка, что в меню. */

.categories_item .text_block {
  display: block;
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
  line-height: 6.2rem;
  padding: 0 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: lowercase;
}

.categories_item .text_block::first-letter {
  text-transform: uppercase;
}

@media screen and (max-width: 1240px) {
  .categories_item .text_block {
    font-size: var(--bh-fs-ui);
    line-height: 3.2rem;
  }
}

/* --- Журнал ------------------------------------------------------------- */

.journal_item .title,
.journal_section.main .journal_item .title {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--bh-ink);
}

.journal_item_main .date,
.journal_item .date,
.article_detail .date {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
  letter-spacing: var(--bh-ls-meta);
}

/* --- Бренды: подпись дублирует логотип — тише, но читаемо --------------- */

.brand_item .text_block,
.brand_item .txt {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
  letter-spacing: var(--bh-ls-meta);
}

/* --- Магазины ----------------------------------------------------------- */

.shop_contact_block .item {
  font-size: var(--bh-fs-ui);
  line-height: var(--bh-lh-text);
  color: var(--bh-ink-2);
}

/* --- Подвал: метки колонок капсом — единственный капс на сайте ---------- */

.footer_contacts .phone {
  font-size: var(--bh-fs-subtitle);
  font-weight: var(--bh-fw-ui);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--bh-ink);
}

.footer_contacts .txt {
  font-size: var(--bh-fs-meta);
  line-height: 1.5;
  color: var(--bh-ink-3);
}

.footer_links .title {
  font-size: var(--bh-fs-caps);
  font-weight: var(--bh-fw-ui);
  letter-spacing: var(--bh-ls-caps);
  text-transform: uppercase;
  color: var(--bh-ink-3);
}

.footer_links a {
  font-size: var(--bh-fs-ui);
  line-height: 1.5;
  color: var(--bh-ink-2);
}

.footer_links a:hover {
  color: var(--bh-ink);
}

.footer_line,
.footer_line.sml .copy,
footer.sml .footer_line .copy {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
}

@media screen and (max-width: 767px) {
  .footer_contacts .phone {
    font-size: var(--bh-fs-subtitle);
  }
}

/* --- Каталог: крошки, заголовок, фильтр, сортировка --------------------- */

.breadcrumbs,
.auth_breadcrumbs {
  font-size: var(--bh-fs-small);
  color: var(--bh-ink-3);
}

/* шаблон красит не сам блок, а ссылки и span внутри — #8C8C8C, контраст 3,3 */
.breadcrumbs a,
.breadcrumbs span {
  color: var(--bh-ink-3);
}

.breadcrumbs a:hover,
.breadcrumbs a:hover span {
  color: var(--bh-ink);
}

.breadcrumbs > span:last-child,
.breadcrumbs > span:last-child span {
  color: var(--bh-ink-2);
}



.h1_block .sub {
  font-size: var(--bh-fs-ui);
  color: var(--bh-ink-3);
}

.filter_title .title {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  letter-spacing: -0.005em;
  color: var(--bh-ink);
}

.filter_title .reset {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
}

.filter_title .reset svg {
  stroke: var(--bh-ink-3);
}

.filter_checkbox_block .custom_checkbox {
  font-size: var(--bh-fs-ui);
  line-height: 1.4;
  color: var(--bh-ink-2);
}

.filter_checkbox_block .checkbox_more_link {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink-2);
}

.catalog_filter_item .filter_search_input,
.filter_price input {
  font-size: var(--bh-fs-small);
}

.filter_price .input_block .text,
.link_icon.link_gray {
  color: var(--bh-ink-3);
}

.link_icon.link_gray svg {
  stroke: var(--bh-ink-3);
}

.link_icon.link_gray:hover {
  color: var(--bh-ink);
}

.link_icon.link_gray:hover svg {
  stroke: var(--bh-ink);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
}

/* --- Карточка товара ---------------------------------------------------- */

.product_description .item {
  font-size: var(--bh-fs-ui);
  line-height: var(--bh-lh-snug);
  padding: 1.6rem 0 1.4rem;
}

.product_description .t {
  color: var(--bh-ink-3);
}

.product_description .v {
  color: var(--bh-ink);
}

.desc_link {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

.product_price_block .price,
.specifications_window .price {
  font-size: var(--bh-fs-price-l);
  font-weight: var(--bh-fw-strong);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--bh-ink);
}

.specifications_window .price {
  font-size: var(--bh-fs-title);
}

.product_price_block .old_price,
.specifications_window .old_price {
  font-size: var(--bh-fs-small);
  color: var(--bh-ink-3);
}

.product_price_block .old_price .c,
.product_price_block .old_price .l,
.specifications_window .old_price .c,
.specifications_window .old_price .l {
  font-size: var(--bh-fs-meta);
  color: var(--bh-ink-3);
}

.product_price_block .btn:not(.fav) {
  font-size: var(--bh-fs-body);
}

.product_price_block .delivery_block .title {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

.delivery_item .b {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}

.delivery_item div:not(.s):not(.b) {
  font-size: var(--bh-fs-ui);
  line-height: var(--bh-lh-snug);
  color: var(--bh-ink-2);
}

.delivery_item .s,
.delivery_note {
  font-size: var(--bh-fs-meta);
  line-height: var(--bh-lh-snug);
  color: var(--bh-ink-3);
}

.delivery_item .prc {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink-2);
}

/* --- Статья журнала: колонка ~68 знаков, воздух между строками ---------- */

.article_detail {
  font-size: var(--bh-fs-body);
  line-height: var(--bh-lh-text);
  color: var(--bh-ink-2);
}

.article_detail h2,
.article_detail h3,
.article_detail h4 {
  font-family: var(--bh-font-display);
  font-weight: var(--bh-fw-display);
  font-size: var(--bh-fs-subtitle);
  line-height: var(--bh-lh-subtitle);
  letter-spacing: var(--bh-ls-subtitle);
  font-synthesis: none;
}

.article_detail p,
.article_detail ul,
.article_detail ol {
  max-width: 68ch;
}

/* текст статьи лежит прямо в section, без <p> — сужаем колонку целиком,
   картинку выпускаем на прежние 92rem */
@media screen and (min-width: 1241px) {
  .article_detail {
    max-width: 70rem;
  }

  .article_detail .img_block {
    margin-left: -11rem;
    margin-right: -11rem;
  }
}

@media screen and (max-width: 1240px) {
  .article_detail {
    font-size: var(--bh-fs-body);
    line-height: var(--bh-lh-text);
  }
}

/* --- Корзина, заказ, личный кабинет: без Bold --------------------------- */

.basket_item .price_block,
.basket_section .total_block .price_main,
.order_main_block .b,
.order_slide .price {
  font-weight: var(--bh-fw-strong);
  color: var(--bh-ink);
}

.basket_item .price_block .old {
  font-weight: var(--bh-fw-text);
  color: var(--bh-ink-3);
}

main.auth input.txt {
  font-weight: var(--bh-fw-ui);
}


/* Integration with the existing bibi template. Keep semantic button/status colors. */
a { color: var(--bh-ink-2); }
a:hover { color: var(--bh-ink); }
input, textarea, select, button { font-family: var(--bh-font-text); }
input.txt, textarea, select {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
}
input.txt, .search_form input { color: var(--bh-ink); }
input.txt.bg::placeholder, .search_form input::placeholder { color: var(--bh-ink-3); }
h4, h5, h6 {
  font-family: var(--bh-font-display);
  font-size: var(--bh-fs-subtitle);
  font-weight: var(--bh-fw-display);
  line-height: var(--bh-lh-subtitle);
  color: var(--bh-ink);
}
.text_page_section, .catalog-not-found__desc {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-text);
  color: var(--bh-ink-2);
}
.article_detail h2, .text_page_section h2 {
  font-size: var(--bh-fs-display);
  line-height: var(--bh-lh-display);
  letter-spacing: var(--bh-ls-display);
  color: var(--bh-ink);
}
.article_detail h1 { color: var(--bh-ink); }
.article_detail h3, .article_detail h4 { color: var(--bh-ink); }
.catalog_dropdown ul:last-child a { color: var(--bh-ink-2); }
.catalog_dropdown ul:last-child a:hover { color: var(--bh-ink); }
.cart-quantity__num {
  width: auto;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 .3rem;
}
.basket_item .price_block, .order_slide .price, .order_main_block .b {
  font-size: var(--bh-fs-price);
}
.basket_section .total_block .price_main {
  font-size: var(--bh-fs-price);
  line-height: var(--bh-lh-display);
}
.basket_item .price_block .old {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-text);
}
.basket_item .name {
  font-size: var(--bh-fs-card);
  font-weight: var(--bh-fw-text);
  line-height: 1.45;
  color: var(--bh-ink-2);
}
.header_sml .phone, .header_auth .phone {
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink);
}
.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-container--default .select2-selection--multiple .select2-selection__clear,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
.select2-container--classic .select2-selection--single .select2-selection__clear,
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
  font-weight: var(--bh-fw-ui);
}

/* Foundation and semantic text tokens preserve existing functional states. */
:root {
  --bh-fs-root: 10px;
  --bh-fs-hidden: 0;
  --bh-on-accent: #fff;
  --bh-accent: #0047AB;
  --bh-on-accent-muted: #86A9D8;
  --bh-danger: #E60909;
  --bh-danger-muted: #D16060;
  --bh-success: #01CA54;
  --bh-success-status: #01CA4F;
}
body { font-size: var(--bh-fs-body); }
.catalog_dropdown a, .catalog_dropdown .dropdown_lvl_1 > li > a,
.header_main .catalog_link, .header_main .header_personal a, .mobile_link,
.filter_title .title, .filter_checkbox_block .custom_checkbox,
.filter_checkbox_block .checkbox_more_link, .catalog_filter_item .filter_search_input,
.filter_price input, .btn, .btn.big, .btn.lk, .custom_checkbox_tab .check {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  line-height: 1.5;
}
.product_price_block .btn:not(.fav) { font-size: var(--bh-fs-ui); }
.product_item .btn { font-size: var(--bh-fs-hidden); }
@media screen and (max-width: 1240px) {
  .product_item .btn { font-size: var(--bh-fs-ui); }
}
.product_price_block .old_price .c, .product_price_block .old_price .l,
.specifications_window .old_price .c, .specifications_window .old_price .l {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-snug);
}
.specifications_window .price { font-size: var(--bh-fs-price-l); }
.set_item .text_block {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-text);
  min-height: 13.2rem;
  height: auto;
}
.set_item .name { font-size: var(--bh-fs-title); }
.basket_item .text_block .title {
  font-size: var(--bh-fs-card);
  font-weight: var(--bh-fw-text);
  color: var(--bh-ink-2);
}
.order_main_block .prc { font-size: var(--bh-fs-price) !important; }
.order_main_block .b, .order_main_block .b.name {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  color: var(--bh-ink-2);
}
.article_detail, .text_page_section { font-weight: var(--bh-fw-text); }
.product_item .img_block {
  flex: 0 0 auto;
  min-height: 0;
}

/* Final acceptance: complete the typography roles in secondary states. */
:root {
  --bh-lh-ui: 1.5;
  --bh-lh-card: 1.45;
}

.header_line a, .header_line .custom_checkbox, .header_sml .phone_block .phone,
.header_auth .phone, .footer_links a, .search_item, .js_city_go,
.sber_btn, .title_basket, .spinner input, .spinner .down, .spinner .up,
.order_main_block .b, .order_main_block .b.name,
.order_main_block .custom_checkbox .txt, .order_main_block label.label,
.input_block .label, .desc_link, .delivery_item .b {
  font-size: var(--bh-fs-ui);
  font-weight: var(--bh-fw-ui);
  line-height: var(--bh-lh-ui);
}
.sber_btn { color: var(--bh-on-accent); }

.breadcrumbs, .auth_breadcrumbs, .product_item .old,
.product_price_block .old_price, .specifications_window .old_price {
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-snug);
}
.journal_item_main .date, .journal_item .date, .article_detail .date,
.brand_item .text_block, .brand_item .txt, .footer_contacts .txt,
.footer_line .copy, .header_sml .phone_block .text, .header_auth .text,
.title_basket .sub, .basket_item .iem, .order_main_block .tag.first {
  font-size: var(--bh-fs-meta);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-snug);
  letter-spacing: var(--bh-ls-meta);
}
.header_sml .text, .header_auth .text { color: var(--bh-ink-3); }

.text_page_section.v2, .text_page_section.v3,
.shop_contact_block .item, main.auth .title_block .text,
.advantages_section .item .txt {
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-text);
  color: var(--bh-ink-2);
}
h2.custom_wh, .article_detail h2, .text_page_section h2 {
  line-height: var(--bh-lh-display);
  letter-spacing: var(--bh-ls-display);
}
.basket_item .text_block .title {
  line-height: var(--bh-lh-card);
}

/* Long property labels must keep a gap from their values on narrow screens. */
.product_description .item {
  gap: 1.2rem;
  align-items: flex-start;
}
.product_description .t {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--bh-fs-small);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-snug);
}
.product_description .v {
  min-width: 0;
  max-width: 52%;
  overflow-wrap: anywhere;
  font-size: var(--bh-fs-body);
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-text);
  color: var(--bh-ink-2);
}
.product_description .v .copy_link { flex-shrink: 0; }

.delivery_item .prc, .order_main_block .prc.mobile,
.order_main_block .custom_checkbox .tag:not(.first),
.basket_section .total_block .text_row > :last-child:not(:first-child),
.basket_item .spinner_block .text {
  font-size: var(--bh-fs-price);
  font-weight: var(--bh-fw-strong);
  line-height: var(--bh-lh-ui);
}
.delivery_item .prc, .order_main_block .prc.mobile,
.basket_section .total_block .text_row > :last-child:not(:first-child),
.basket_item .spinner_block .text { color: var(--bh-ink); }
.order_main_block .prc:not(.mobile) {
  font-size: var(--bh-fs-small) !important;
  font-weight: var(--bh-fw-text);
  line-height: var(--bh-lh-snug);
}
@media screen and (max-width: 767px) {
  .order_main_block .custom_checkbox .tag:not(.first) { color: var(--bh-ink); }
  .header_sml .phone_block .phone {
    font-size: var(--bh-fs-hidden);
    line-height: 0;
  }
}
