/* ============================================================
   INK.MARKET REDESIGN 2026 — foundation layer
   Дизайн-референс: design-variants/redesign-2026/ (README.md)
   Слой грузится последним в theme.scss и перекрывает legacy.
   Префикс классов: im-
   ============================================================ */

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

:root {
  --im-orange: #EB7E00;
  --im-orange-hover: #D57100;
  --im-crimson: #AE2C52;
  --im-blue: #2C6197;

  --im-bg: #FBFAF8;
  --im-card: #FFFFFF;
  --im-border: #ECE9E3;
  --im-border-soft: #F1EEE8;
  --im-border-ctl: #E2DED6;
  --im-hover-bg: #F2EFEA;

  --im-text: #23272e;
  --im-text-2: #565b64;
  --im-muted: #8a8f98;
  --im-muted-2: #9aa0a8;

  --im-green: #1F8A4C;
  --im-amber: #B96504;
  --im-navy: #1d3a56;

  --im-bg-blue: #EDF2F7;
  --im-bg-cream: #FCEFE0;
  --im-bg-cream-2: #FDEBD2;
  --im-bg-pink: #F7E3EA;

  --im-footer-link: #D3E1EF;
  --im-footer-muted: #B7CCE0;
  --im-topbar-b2b: #FFC98A;

  --im-font: 'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --im-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --im-shadow-card: 0 8px 24px rgba(30, 36, 48, 0.08);
  --im-shadow-cta: 0 4px 14px rgba(235, 126, 0, 0.35);

  --im-r-card: 14px;
  --im-r-block: 12px;
  --im-r-btn: 10px;
  --im-r-input: 8px;
  --im-r-chip: 999px;
  --im-r-badge: 6px;
}

/* ---------- База ---------- */
body {
  background: var(--im-bg);
  font-family: var(--im-font);
  color: var(--im-text);
}

a { color: var(--im-blue); text-decoration: none; }
a:hover { color: var(--im-orange); }

.im-container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* Обёртки лэйаута на всю ширину (planka/шапка/футер) */
.header-wrapper { background: var(--im-card); }

/* ---------- Кнопки ---------- */
.im-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--im-r-btn);
  font-family: var(--im-font);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.im-btn--primary {
  background: var(--im-orange);
  color: #fff;
}
.im-btn--primary:hover { background: var(--im-orange-hover); color: #fff; }
.im-btn--blue {
  background: var(--im-blue);
  color: #fff;
}
.im-btn--blue:hover { background: #24507d; color: #fff; }
.im-btn--outline {
  background: #fff;
  color: var(--im-blue);
  border: 1.5px solid var(--im-blue);
}
.im-btn--outline:hover { background: var(--im-bg-blue); color: var(--im-blue); }

/* ============================================================
   Верхняя планка
   ============================================================ */
.im-topbar {
  background: var(--im-blue);
  color: #fff;
  font-size: 12.5px;
  line-height: 1;
}
.im-topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 16px;
}
.im-topbar__links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.im-topbar a { color: #fff; }
.im-topbar a:hover { color: var(--im-topbar-b2b); }
.im-topbar__b2b { color: var(--im-topbar-b2b) !important; font-weight: 600; }
.im-topbar__b2b:hover { color: #fff !important; }
.im-topbar__contacts {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}
.im-topbar__address { opacity: .92; }
.im-topbar__email { font-weight: 600; }
.im-topbar__phone { font-weight: 700; color: #fff; }
.im-topbar__slogan { display: none; }
/* на средних ширинах жертвуем адресом, телефон и почта остаются */
@media screen and (max-width: 1180px) {
  .im-topbar__address { display: none; }
}

/* ============================================================
   Шапка
   ============================================================ */
.im-header {
  background: var(--im-card);
}
.im-header__row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Логотип */
.im-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.im-logo:hover { text-decoration: none; }
.im-logo__img {
  width: 64px;
  height: auto;
  display: block;
}
.im-logo__text-wrap { display: flex; flex-direction: column; gap: 2px; }
.im-logo__text {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--im-crimson);
  line-height: 1;
}
.im-logo__text .im-logo__dot { color: var(--im-blue); }
.im-logo__slogan {
  font-size: 11.5px;
  color: var(--im-muted);
  line-height: 1.2;
}
.im-logo:hover .im-logo__text { color: var(--im-crimson); }

/* Поиск (обвязка вокруг legacy .search-widget) */
.im-header__search {
  flex: 1 1 auto;
  min-width: 0;
}
.im-header__search .search-widget {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--im-blue);
  border-radius: var(--im-r-btn);
  /* overflow:hidden нельзя — внутри позиционируется дропдаун живого поиска */
  background: #fff;
  height: 46px;
  margin: 0;
  padding: 0;
  width: 100%;
}
.im-header__search .search-widget-field { border-radius: 8px 0 0 8px; }
.im-header__search .search-widget-field {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 16px;
  font-family: var(--im-font);
  font-size: 14px;
  color: var(--im-text);
  height: auto;
  margin: 0;
  box-shadow: none;
}
.im-header__search .search-widget-field::placeholder { color: var(--im-muted-2); }
.im-header__search .search-widget-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--im-blue);
  color: #fff;
  font-family: var(--im-font);
  font-size: 14.5px;
  font-weight: 700;
  padding: 0 26px;
  cursor: pointer;
  width: auto;
  height: auto;
  margin: 0;
}
.im-header__search .search-widget-button:hover { background: #24507d; }
.im-header__search .search-widget-button::before,
.im-header__search .search-widget-button::after { display: none; }

/* Иконка Прайс-чека внутри строки поиска */
.im-search__pc {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--im-muted-2);
}
.im-search__pc:hover { color: var(--im-blue); }

/* Подсказка при вставке списка в поиск */
.im-pc-pop {
  position: fixed;
  z-index: 1200;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  box-shadow: var(--im-shadow-card);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--im-text);
}
.im-pc-pop__close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 15px;
  color: var(--im-muted);
  cursor: pointer;
  padding: 2px;
}
.im-pc-pop .im-btn { margin-top: 10px; padding: 8px 16px; font-size: 13px; }

/* Действия: избранное / сравнение / корзина */
.im-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.im-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 74px;
  padding: 7px 10px;
  border-radius: var(--im-r-btn);
  color: var(--im-text-2);
  font-size: 11.5px;
  line-height: 1;
  position: relative;
}
.im-action:hover { background: var(--im-hover-bg); color: var(--im-blue); }
.im-action__icon { width: 22px; height: 22px; display: block; }
.im-action__icon svg { width: 100%; height: 100%; display: block; }
.im-action__count {
  position: absolute;
  top: 2px;
  right: 14px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--im-orange);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-action__count:empty { display: none; }

/* Корзина — оранжевая кнопка */
.im-cart { position: relative; }
.im-cart__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 88px;
  padding: 8px 18px;
  border-radius: var(--im-r-btn);
  background: var(--im-orange);
  color: #fff;
  line-height: 1.15;
}
.im-cart__btn:hover { background: var(--im-orange-hover); color: #fff; text-decoration: none; }
.im-cart__count {
  font-size: 15px;
  font-weight: 800;
  min-height: 17px;
}
.im-cart__label { font-size: 13px; font-weight: 600; }
.im-cart__icon { display: none; width: 20px; height: 20px; }
.im-cart__icon svg { width: 100%; height: 100%; display: block; }
/* скрытый узел суммы — его пишет legacy JS */
.im-cart .js-shopcart-widget-amount { display: none; }

/* Выпадающая мини-корзина (legacy js-widget-dropdown) */
.im-cart .cart-widget-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 340px;
  background: #fff;
  border-radius: var(--im-r-block);
  box-shadow: var(--im-shadow-card);
  border: 1px solid var(--im-border);
  padding: 14px;
  z-index: 1200;
}

/* Бургер (мобайл) */
.im-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--im-r-input);
  flex-shrink: 0;
}
.im-burger span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--im-blue);
}

/* Строка мобильного поиска */
.im-header__search-mobile {
  display: none;
  padding-bottom: 12px;
}

/* ============================================================
   Мобильное меню-шторка
   ============================================================ */
.im-mobmenu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 86%;
  max-width: 360px;
  background: var(--im-bg);
  z-index: 1400;
  transform: translateX(-105%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 40px rgba(30, 36, 48, 0.18);
}
body.im-mobmenu-open .im-mobmenu { transform: translateX(0); }
.im-mobmenu__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 36, 0.45);
  z-index: 1350;
}
body.im-mobmenu-open .im-mobmenu__backdrop { display: block; }
body.im-mobmenu-open { overflow: hidden; }
.im-mobmenu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid var(--im-border);
  flex-shrink: 0;
}
.im-mobmenu__close {
  border: 0;
  background: none;
  font-size: 18px;
  color: var(--im-muted);
  cursor: pointer;
  padding: 6px 10px;
}
.im-mobmenu__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0));
}
.im-mobmenu__login {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--im-blue);
  color: #fff !important;
  border-radius: var(--im-r-btn);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 16px;
}
.im-mobmenu__section {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--im-muted-2);
  margin: 14px 0 8px;
}
.im-mobmenu__cats {
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  overflow: hidden;
}
.im-mobmenu__cat { border-top: 1px solid var(--im-border-soft); }
.im-mobmenu__cat:first-child { border-top: 0; }
.im-mobmenu__cat summary,
.im-mobmenu__cat--link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--im-text);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.im-mobmenu__cat summary::-webkit-details-marker { display: none; }
.im-mobmenu__chev { margin-left: auto; color: var(--im-muted-2); transition: transform .15s ease; flex-shrink: 0; }
.im-mobmenu__cat[open] .im-mobmenu__chev { transform: rotate(180deg); }
.im-mobmenu__subs {
  display: flex;
  flex-direction: column;
  padding: 2px 14px 10px 34px;
}
.im-mobmenu__subs a {
  padding: 8px 0;
  font-size: 13px;
  color: var(--im-text-2);
  border-top: 1px solid var(--im-border-soft);
}
.im-mobmenu__subs a:first-child { border-top: 0; }
.im-mobmenu__all { color: var(--im-blue) !important; font-weight: 600; }
.im-mobmenu__links {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  overflow: hidden;
}
.im-mobmenu__links a {
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--im-text);
  border-top: 1px solid var(--im-border-soft);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.im-mobmenu__links a:first-child { border-top: 0; }
.im-mobmenu__links .im-nav__link--sale { color: var(--im-crimson); font-weight: 600; }
.im-mobmenu__contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--im-muted);
}
.im-mobmenu__phone { font-size: 16px; font-weight: 800; color: var(--im-text); }

/* ============================================================
   Навигация
   ============================================================ */
.im-nav {
  background: var(--im-card);
  border-bottom: 1px solid var(--im-border);
}
.im-nav__row {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.im-nav__catalog {
  padding: 11px 20px;
  font-size: 14.5px;
  gap: 10px;
}
.im-nav__catalog-icon {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  width: 16px;
}
.im-nav__catalog-icon span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: #fff;
}
.im-nav { position: relative; }
.im-nav__catalog-chev { margin-left: 2px; transition: transform .15s ease; }
.im-nav__catalog[aria-expanded="true"] .im-nav__catalog-chev { transform: rotate(180deg); }
.im-nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--im-card);
  border-top: 1px solid var(--im-border);
  border-bottom: 1px solid var(--im-border);
  box-shadow: 0 24px 48px rgba(30, 36, 48, 0.14);
  z-index: 1200;
  max-height: 72vh;
  overflow-y: auto;
  padding: 22px 0 26px;
}
.im-nav__panel[hidden] { display: none; }
.im-catmenu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 24px;
}
.im-catmenu__root {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--im-text);
  line-height: 1.3;
  margin-bottom: 8px;
}
.im-catmenu__root:hover { color: var(--im-blue); }
.im-catmenu__root .im-cat__dot { margin-top: 5px; }
.im-catmenu__subs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 17px;
}
.im-catmenu__subs a {
  font-size: 12.5px;
  color: var(--im-text-2);
  line-height: 1.35;
}
.im-catmenu__subs a:hover { color: var(--im-orange); }
.im-catmenu__more { font-weight: 600; color: var(--im-blue) !important; }
.im-nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.im-nav__link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--im-text);
}
.im-nav__link:hover { color: var(--im-orange); }
.im-nav__link--sale { color: var(--im-crimson); font-weight: 600; }

/* ============================================================
   Футер
   ============================================================ */
.footer-wrapper { background: var(--im-blue); }

.im-footer {
  background: var(--im-blue);
  color: var(--im-footer-link);
  font-size: 13.5px;
}
.im-footer a { color: var(--im-footer-link); }
.im-footer a:hover { color: #fff; }

.im-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 36px;
  padding-bottom: 30px;
}
.im-footer__title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 14px;
}
.im-footer__col ul { list-style: none; margin: 0; padding: 0; }
.im-footer__col li { margin: 0 0 10px; }

.im-footer__logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}
.im-footer__logo .im-logo__dot { color: var(--im-orange); }
.im-footer__brandname { color: var(--im-footer-muted); font-size: 12.5px; margin-top: 6px; }
.im-footer__address {
  color: var(--im-footer-muted);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 14px 0 10px;
}
.im-footer__contact { color: #fff; font-weight: 700; font-size: 13.5px; }
.im-footer__contact a { color: #fff; }
.im-footer__dots { display: flex; gap: 7px; margin-top: 16px; }
.im-footer__dots span {
  width: 10px; height: 10px; border-radius: 50%;
  display: block;
}
.im-footer__dots span:nth-child(1) { background: var(--im-orange); }
.im-footer__dots span:nth-child(2) { background: var(--im-crimson); }
.im-footer__dots span:nth-child(3) { background: var(--im-bg-blue); }

.im-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 16px;
  padding-bottom: 18px;
  color: var(--im-footer-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Компактный футер (не главная) */
.im-footer--compact .im-footer__compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.im-footer--compact .im-footer__logo { font-size: 18px; }
.im-footer--compact .im-footer__copy { color: var(--im-footer-muted); font-size: 12.5px; }
.im-footer--compact .im-footer__contact { white-space: nowrap; }

/* ============================================================
   Мобильный таб-бар
   ============================================================ */
.im-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--im-border);
  z-index: 1100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.im-tabbar__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 7px;
  color: var(--im-muted);
  font-size: 10.5px;
  line-height: 1;
  min-height: 52px;
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--im-font);
}
.im-tabbar__item svg { width: 18px; height: 18px; display: block; }
.im-tabbar__item:hover { color: var(--im-blue); }
.im-tabbar__item--active { color: var(--im-blue); font-weight: 600; }
.im-tabbar__badge {
  position: absolute;
  top: 3px;
  right: calc(50% - 18px);
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--im-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-tabbar__badge:empty { display: none; }

/* ============================================================
   Главная страница
   ============================================================ */
.im-main { padding: 20px 0 40px; }

.im-section { margin-top: 28px; }
.im-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.im-section__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--im-text);
  margin: 0;
}
.im-section__more {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Hero --- */
.im-hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}
.im-hero__slider {
  min-width: 0;
  border-radius: var(--im-r-card);
  overflow: hidden;
  background: var(--im-bg-blue);
}
.im-hero__slider .promo-slider-wrapper { border-radius: var(--im-r-card); overflow: hidden; }
.im-hero__slider .promo-slide-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
.im-hero__slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #fff;
  opacity: .65;
}
.im-hero__slider .swiper-pagination-bullet-active {
  background: var(--im-blue);
  opacity: 1;
}
.im-hero__slider .promo-slider-prev,
.im-hero__slider .promo-slider-next { display: none; }

.im-hero__tiles {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.im-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-radius: var(--im-r-card);
  padding: 20px 22px;
}
.im-tile:hover { text-decoration: none; }
.im-tile__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.im-tile__title {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.im-tile__link { font-size: 13px; font-weight: 700; margin-top: 2px; }
.im-tile--navy { background: var(--im-navy); }
.im-tile--navy .im-tile__label { color: rgba(255, 255, 255, 0.6); }
.im-tile--navy .im-tile__title { color: #fff; }
.im-tile--navy .im-tile__link { color: var(--im-orange); }
.im-tile--navy:hover .im-tile__link { color: #ffb35c; }
.im-tile--cream { background: var(--im-bg-cream); }
.im-tile--cream .im-tile__label { color: var(--im-amber); }
.im-tile--cream .im-tile__title { color: var(--im-navy); }
.im-tile--cream .im-tile__link { color: var(--im-amber); }

/* --- Плитка категорий --- */
.im-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.im-cat {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  padding: 14px 16px;
  transition: border-color .15s ease;
}
.im-cat:hover { border-color: var(--im-blue); text-decoration: none; }
.im-cat__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.im-cat__dot--0 { background: var(--im-blue); }
.im-cat__dot--1 { background: var(--im-orange); }
.im-cat__dot--2 { background: var(--im-crimson); }
.im-cat__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.im-cat__name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--im-text);
  line-height: 1.3;
}
.im-cat:hover .im-cat__name { color: var(--im-blue); }
.im-cat__count { font-size: 12px; color: var(--im-muted); }

/* --- Бейджи товаров (Хит / Новинка / Акция / скидка) --- */
.im-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  max-width: calc(100% - 50px);
}
.im-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--im-r-badge);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.3;
}
.im-badge--crimson { background: var(--im-crimson); }
.im-badge--orange { background: var(--im-orange); }
.im-badge--blue { background: var(--im-blue); }
.im-badge--disc { background: var(--im-bg-pink); color: var(--im-crimson); }
.im-badges--row {
  position: static;
  margin-bottom: 4px;
  max-width: none;
}
.im-badges--row .im-badge { font-size: 9.5px; padding: 2px 6px; }

/* --- Кнопка входа (мобильная шапка) --- */
.im-mob-login {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--im-blue);
  border-radius: var(--im-r-input);
  flex-shrink: 0;
}

/* --- Карточка товара (плитка) --- */
.im-novelties {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.im-card {
  display: flex;
  flex-direction: column;
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  padding: 14px;
  transition: box-shadow .15s ease;
  position: relative;
  min-width: 0;
}
.im-card:hover { box-shadow: var(--im-shadow-card); }
.im-card__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin-bottom: 10px;
}
.im-card__photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.im-card__sku {
  font-family: var(--im-mono);
  font-size: 11.5px;
  color: var(--im-muted-2);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.im-card__title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--im-text);
  min-height: 54px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.im-card__title:hover { color: var(--im-blue); }
.im-card__price {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--im-text);
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.im-card__old {
  font-size: 13px;
  font-weight: 500;
  color: var(--im-muted-2);
}
.im-card__stock {
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0 10px;
}
.im-card__stock--in { color: var(--im-green); }
.im-card__stock--low { color: var(--im-amber); }
.im-card__stock--out { color: var(--im-muted-2); }
.im-card__form { margin-top: auto; }
.im-card__buy {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
}

/* --- Полоса фактов --- */
.im-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 22px 26px;
}
.im-fact__num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.im-fact__num--blue { color: var(--im-blue); }
.im-fact__num--orange { color: var(--im-orange); }
.im-fact__num--crimson { color: var(--im-crimson); }
.im-fact__text { font-size: 12.5px; color: var(--im-text-2); line-height: 1.45; }

/* --- Новости и блог --- */
.im-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.im-post {
  display: flex;
  flex-direction: column;
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.im-post:hover { box-shadow: var(--im-shadow-card); text-decoration: none; }
.im-post__cover {
  display: block;
  height: 130px;
  background: var(--im-bg-blue);
}
.im-post__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.im-post__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 16px;
}
.im-post__meta { display: flex; align-items: center; gap: 10px; }
.im-post__tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.im-post__tag--blue { color: var(--im-blue); }
.im-post__tag--orange { color: var(--im-orange); }
.im-post__tag--crimson { color: var(--im-crimson); }
.im-post__tag--grey { color: var(--im-muted); }
.im-post__date { font-size: 12px; color: var(--im-muted); }
.im-post__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--im-text);
}
.im-post:hover .im-post__title { color: var(--im-blue); }

/* --- SEO-текст --- */
.im-seo {
  font-size: 13px;
  color: var(--im-muted);
  line-height: 1.6;
  margin-top: 28px;
}

/* ============================================================
   Каталог (collection)
   ============================================================ */
.im-btn--muted {
  background: #fff;
  color: var(--im-text-2);
  border: 1.5px solid var(--im-border-ctl);
}
.im-btn--muted:hover { border-color: var(--im-muted-2); color: var(--im-text); }

/* Крошки */
.im-crumbs { margin-bottom: 10px; }
.im-crumbs .breadcrumb-wrapper { margin: 0; padding: 0; }
.im-crumbs .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
}
.im-crumbs .breadcrumb-item { display: flex; align-items: center; gap: 4px; }
/* сепаратор рисует legacy (.breadcrumb-item + .breadcrumb-item::before) — свой не добавляем */
.im-crumbs .breadcrumb-item + .breadcrumb-item::before { color: var(--im-border-ctl); padding: 0 2px; }
.im-crumbs .breadcrumb-link { color: var(--im-muted-2); }
.im-crumbs a.breadcrumb-link:hover { color: var(--im-orange); }
.im-crumbs .breadcrumb .fa { display: none; }

/* Заголовок + счётчик */
.im-catalog__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 2px 0 14px;
}
.im-catalog__title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--im-text);
}
.im-catalog__count { font-size: 13.5px; color: var(--im-muted); white-space: nowrap; }

/* Чипы */
.im-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--im-r-chip);
  border: 1px solid var(--im-border-ctl);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--im-text);
  cursor: pointer;
  font-family: var(--im-font);
}
.im-chip:hover { border-color: var(--im-blue); color: var(--im-blue); }
.im-chip--active {
  background: var(--im-bg-cream-2);
  border-color: var(--im-bg-cream-2);
  color: var(--im-amber);
  font-weight: 600;
}
.im-chip--active:hover { border-color: var(--im-amber); color: var(--im-amber); }
.im-chip__x { font-size: 11px; opacity: .7; }
.im-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
/* свёрнутый список подкатегорий: два ряда, разворот кнопкой */
.im-subcats--collapsed {
  max-height: 84px;
  overflow: hidden;
  margin-bottom: 8px;
}
.im-subcats--collapsed.im-subcats--open { max-height: none; }
.im-subcats__toggle {
  margin-bottom: 18px;
  color: var(--im-blue);
  font-weight: 600;
  border-style: dashed;
}

/* Сетка страницы */
.im-catalog__layout {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 20px;
  align-items: start;
}

/* --- Фильтры --- */
.im-filters__sheet-head { display: none; }
.im-filters .filter { display: block; }
.im-filters .filter-heading { display: none; }
.im-filters .filter-section {
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  margin-bottom: 10px;
  padding: 4px 14px;
}
.im-filters .filter-section-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.im-filters .filter-section-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: none;
  border: 0;
  padding: 10px 0;
  font-family: var(--im-font);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--im-text);
  cursor: pointer;
  text-align: left;
}
.im-filters .filter-marker {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--im-muted-2);
  border-bottom: 2px solid var(--im-muted-2);
  transform: rotate(45deg);
  transition: transform .15s ease;
  flex-shrink: 0;
}
.im-filters [data-filter-section-items]:not(.is-closed) ~ * .filter-marker,
.im-filters .filter-section:has([data-filter-section-items]:not(.is-closed)) .filter-marker { transform: rotate(-135deg); }
.im-filters .filter-section-count { color: var(--im-blue); font-size: 11px; }
.im-filters .filter-section-clear {
  background: none;
  border: 0;
  color: var(--im-muted-2);
  font-size: 11px;
  cursor: pointer;
  padding: 4px;
}
.im-filters .filter-items-wrapper { padding-bottom: 12px; }
.im-filters .filter-items-wrapper.is-closed { display: none; }
.im-filters .filter-items-list { list-style: none; margin: 0; padding: 0; }
.im-filters .filter-item { margin: 0 0 8px; }
.im-filters .filter-field {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--im-text);
}
.im-filters .filter-field-input { position: absolute; opacity: 0; pointer-events: none; }
.im-filters .filter-field .filter-field-marker {
  width: 17px !important;
  height: 17px !important;
  border: 1.5px solid var(--im-border-ctl) !important;
  border-radius: 4px !important;
  background: #fff !important;
  flex-shrink: 0;
  position: relative;
  margin: 0 !important;
  transition: background .12s ease, border-color .12s ease;
}
.im-filters .filter-field .filter-field-marker::before { display: none !important; }
.im-filters .filter-field-input:checked + .filter-field-marker {
  background: var(--im-blue) !important;
  border-color: var(--im-blue) !important;
}
/* поля цены (фоллбэк вместо слайдера) */
.im-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.im-price-inputs input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  padding: 8px 10px;
  font-family: var(--im-mono);
  font-size: 13px;
  outline: none;
  background: #fff;
}
.im-price-inputs input:focus { border-color: var(--im-blue); }
.im-price-inputs span { color: var(--im-muted-2); }
.im-filters .filter-field-input:checked + .filter-field-marker {
  background: var(--im-blue);
  border-color: var(--im-blue);
}
.im-filters .filter-field-input:checked + .filter-field-marker::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.im-filters .filter-field-caption { line-height: 1.3; }
.im-filter-search {
  width: 100%;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  padding: 7px 10px;
  font-family: var(--im-font);
  font-size: 13px;
  margin-bottom: 8px;
  background: var(--im-bg);
  outline: none;
}
.im-filter-search:focus { border-color: var(--im-blue); background: #fff; }
.im-filter-scroll { max-height: 218px; overflow-y: auto; }
.im-filters .filter-section-toolbar { display: none; }
.im-filters .filter-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.im-filters .filter-controls [data-filter-submit] {
  background: var(--im-orange);
  color: #fff;
  border: 0;
  border-radius: var(--im-r-btn);
  padding: 11px 16px;
  font-family: var(--im-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.im-filters .filter-controls [data-filter-submit]:hover { background: var(--im-orange-hover); }
.im-filters .filter-controls [data-filter-clear] {
  background: none;
  border: 0;
  color: var(--im-muted);
  font-size: 12.5px;
  text-align: center;
  cursor: pointer;
  padding: 4px;
}
.im-filters .filter-controls [data-filter-clear]:hover { color: var(--im-crimson); }
/* range-слайдер цены: активная зона синяя */
.im-filters .irs-bar { background: var(--im-blue); }
.im-filters .irs-slider { border-color: var(--im-blue); }
.im-filters__backdrop { display: none; }

/* --- Тулбар --- */
.im-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.im-toolbar__sort .collection-order { margin: 0; }
.im-toolbar__sort .collection-order-row { display: flex; align-items: center; gap: 8px; margin: 0; }
.im-toolbar__sort .collection-order-label { display: none; }
.im-toolbar__sort .collection-order-field {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23565b64' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding: 9px 32px 9px 12px;
  font-family: var(--im-font);
  font-size: 13px;
  color: var(--im-text);
  cursor: pointer;
  outline: none;
}
.im-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.im-toolbar__filters-btn { display: none; padding: 9px 14px; font-size: 13px; gap: 7px; }
.im-view {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.im-view__btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  background: #fff;
  color: var(--im-muted);
  cursor: pointer;
}
.im-view__btn--active {
  background: var(--im-blue);
  border-color: var(--im-blue);
  color: #fff;
}

/* --- Табличный вид --- */
.im-listing--list .im-tiles { display: none; }
.im-listing--grid .im-table { display: none; }
.im-table {
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  overflow: hidden;
}
.im-table__head,
.im-row {
  display: grid;
  grid-template-columns: 58px 118px 1fr 170px 118px 186px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
}
.im-table__head {
  background: #F7F5F1;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--im-muted-2);
  padding-top: 9px;
  padding-bottom: 9px;
}
.im-table__head-price { text-align: right; }
.im-row { border-top: 1px solid var(--im-border-soft); }
.im-row:hover { background: #FDFCFa; }
.im-row__photo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-row__photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.im-row__sku {
  font-family: var(--im-mono);
  font-size: 12px;
  color: var(--im-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.im-row__name { min-width: 0; }
.im-row__name a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--im-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.im-row__name a:hover { color: var(--im-blue); }
.im-row__stock { display: flex; flex-direction: column; gap: 2px; }
.im-stock {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.im-stock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.im-stock--in { color: var(--im-green); }
.im-stock--low { color: var(--im-amber); }
.im-stock--out { color: var(--im-muted-2); }
.im-ship { font-size: 12px; color: var(--im-muted); padding-left: 13px; }
.im-ship--today { color: var(--im-green); font-weight: 700; }
.im-row__price {
  font-family: var(--im-mono);
  font-size: 14.5px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.im-row__old {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--im-muted-2);
}
.im-row__price-na { font-size: 12px; color: var(--im-muted); font-weight: 500; }
.im-row__action { display: flex; justify-content: flex-end; }
.im-row__form { display: flex; align-items: center; gap: 8px; }
.im-row__buy { padding: 8px 16px; font-size: 13px; white-space: nowrap; }

/* Селектор количества (обвязка legacy product_counter) */
.im-row__form .counter,
.im-card__buyrow .counter {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  overflow: hidden;
  height: 34px;
  background: #fff;
  flex-shrink: 0;
}
.im-row__form .counter-button,
.im-card__buyrow .counter-button {
  width: 26px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--im-text-2);
  font-size: 14px;
  position: relative;
}
.im-row__form .counter-button::before,
.im-card__buyrow .counter-button::before { font-family: var(--im-font); }
.im-row__form .counter-button.is-count-down::before,
.im-card__buyrow .counter-button.is-count-down::before { content: '−'; }
.im-row__form .counter-button.is-count-up::before,
.im-card__buyrow .counter-button.is-count-up::before { content: '+'; }
.im-row__form .counter-button:hover,
.im-card__buyrow .counter-button:hover { background: var(--im-hover-bg); color: var(--im-text); }
.im-row__form .counter-input,
.im-card__buyrow .counter-input {
  width: 30px;
  border: 0;
  text-align: center;
  font-family: var(--im-mono);
  font-size: 13px;
  color: var(--im-text);
  outline: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* --- Плиточный вид --- */
.im-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.im-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: var(--im-muted-2);
  cursor: pointer;
  padding: 4px;
}
.im-card__fav:hover { color: var(--im-crimson); }
.im-card__fav svg { width: 100%; height: 100%; }
.im-card__buyrow { display: flex; align-items: center; gap: 8px; }
.im-card__buyrow .im-card__buy { flex: 1; }

/* --- Пагинация --- */
.im-pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.im-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.im-pages__item {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--im-text);
  padding: 0 6px;
}
a.im-pages__item:hover { border-color: var(--im-blue); color: var(--im-blue); }
.im-pages__item--active {
  background: var(--im-blue);
  border-color: var(--im-blue);
  color: #fff;
}
.im-pages__item--void { border: 0; background: none; color: var(--im-muted-2); }
.im-pages__next {
  margin-left: 6px;
  font-size: 13.5px;
  font-weight: 600;
}
.im-show-more { padding: 9px 18px; font-size: 13.5px; }
.im-empty {
  background: #fff;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  padding: 32px;
  text-align: center;
  color: var(--im-text-2);
}
.im-empty .im-btn { margin-top: 12px; padding: 9px 18px; }
.im-empty__hint { font-size: 13px; color: var(--im-muted); margin-top: 6px; }

/* ============================================================
   Блог: листинг (7a) и статья (7b)
   ============================================================ */
.im-chip--blue {
  background: var(--im-blue);
  border-color: var(--im-blue);
  color: #fff;
  font-weight: 600;
}
.im-chip--blue:hover { background: #24507d; color: #fff; border-color: #24507d; }

.im-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  overflow: hidden;
  margin-bottom: 18px;
  transition: box-shadow .15s ease;
}
.im-featured:hover { box-shadow: var(--im-shadow-card); text-decoration: none; }
.im-featured__cover {
  min-height: 280px;
  background: var(--im-bg-blue);
  display: block;
}
.im-featured__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-featured__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 28px;
  justify-content: center;
}
.im-featured__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--im-text);
}
.im-featured:hover .im-featured__title { color: var(--im-blue); }
.im-featured__lead { font-size: 14px; line-height: 1.55; color: var(--im-text-2); }
.im-featured__more { font-size: 13.5px; font-weight: 700; color: var(--im-blue); }

.im-blog__grid { margin-bottom: 0; }
.im-post__lead {
  font-size: 13px;
  line-height: 1.5;
  color: var(--im-text-2);
}
.im-post__time { font-size: 12px; color: var(--im-muted-2); margin-top: auto; padding-top: 6px; }

/* --- Статья --- */
.im-article__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
  margin-top: 6px;
}
.im-article__main { min-width: 0; }
.im-article__title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 10px 0 18px;
  max-width: 720px;
  color: var(--im-text);
}
.im-article__cover {
  border-radius: var(--im-r-card);
  overflow: hidden;
  margin-bottom: 20px;
  max-height: 300px;
}
.im-article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-article__body {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--im-text);
  max-width: 720px;
}
.im-article__body h2 { font-size: 21px; font-weight: 800; margin: 26px 0 10px; letter-spacing: -0.01em; }
.im-article__body h3 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; }
.im-article__body p { margin: 0 0 14px; }
.im-article__body img { max-width: 100%; height: auto; border-radius: var(--im-r-block); }
.im-article__body blockquote {
  background: var(--im-bg-cream);
  border: 0;
  border-radius: var(--im-r-block);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14.5px;
  color: var(--im-text);
}
.im-article__body blockquote strong:first-child,
.im-article__body blockquote b:first-child { color: var(--im-amber); }
.im-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  max-width: 720px;
}
.im-article__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--im-border-soft);
  margin-top: 22px;
  padding-top: 16px;
  max-width: 720px;
}
.im-article__back { font-size: 13.5px; font-weight: 600; }
.im-article__share { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--im-muted); }
.im-share-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  color: var(--im-blue);
}
.im-share-btn:hover { border-color: var(--im-blue); color: var(--im-blue); background: var(--im-bg-blue); }
.im-article__comments { margin-top: 24px; max-width: 720px; }
.im-article__comments .im-desc-card { margin-top: 0; }

/* --- Сайдбар статьи --- */
.im-article__side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.im-side-card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 16px;
}
.im-side-card--blue {
  background: var(--im-bg-blue);
  border-color: var(--im-bg-blue);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.im-side-card--blue b { font-size: 14px; color: var(--im-navy); }
.im-side-card--blue span { color: var(--im-text-2); line-height: 1.45; }
.im-side-card--blue a { font-weight: 700; }
.im-side-products { display: flex; flex-direction: column; }
.im-side-product {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--im-border-soft);
}
.im-side-product:first-child { border-top: 0; padding-top: 2px; }
.im-side-product__photo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--im-bg);
  border-radius: var(--im-r-input);
}
.im-side-product__photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.im-side-product__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.im-side-product__name {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--im-text);
  font-weight: 500;
}
.im-side-product__name:hover { color: var(--im-blue); }
.im-side-product__row { display: flex; align-items: center; gap: 8px; }
.im-side-product__price { font-size: 14.5px; font-weight: 800; }
.im-side-product__stock { font-size: 11px; color: var(--im-green); font-weight: 600; }
.im-side-product__buy {
  align-self: flex-start;
  border: 0;
  background: var(--im-orange);
  color: #fff;
  font-family: var(--im-font);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--im-r-input);
  cursor: pointer;
}
.im-side-product__buy:hover { background: var(--im-orange-hover); }
.im-side-links { display: flex; flex-direction: column; gap: 10px; }
.im-side-links a { font-size: 13px; line-height: 1.4; color: var(--im-blue); }
.im-side-links a:hover { color: var(--im-orange); }

/* ============================================================
   Карточка товара (product, 6a)
   ============================================================ */
.im-product__title {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2px 0 10px;
  color: var(--im-text);
}
.im-product__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--im-muted);
}
.im-product__sku { font-family: var(--im-mono); font-size: 12.5px; }
.im-product__sku b { font-weight: 600; color: var(--im-text-2); }
.im-product__reviews { color: var(--im-amber); font-weight: 600; }
.im-product__ask { color: var(--im-blue); }
/* легаси .labels-list — absolute-наклейка на фото; в строке меты она улетает в угол страницы */
.im-product__labels .product-labels { display: inline-flex; gap: 6px; position: static !important; }
.im-product__labels .label {
  white-space: nowrap;
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--im-r-badge);
  background: var(--im-bg-cream-2);
  color: var(--im-amber);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.im-product__grid {
  display: grid;
  grid-template-columns: 440px 340px 1fr;
  gap: 20px;
  align-items: start;
}

/* --- Галерея --- */
.im-gallery {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 16px;
}
.im-gallery__main {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-gallery__main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.im-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.im-gallery__thumb {
  width: 72px;
  height: 64px;
  flex-shrink: 0;
  border: 2px solid var(--im-border);
  border-radius: var(--im-r-input);
  background: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-gallery__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.im-gallery__thumb--active { border-color: var(--im-blue); }
.im-gallery__links {
  display: flex;
  gap: 18px;
  margin-top: 14px;
}
.im-gallery__link {
  border: 0;
  background: none;
  font-family: var(--im-font);
  font-size: 12.5px;
  color: var(--im-blue);
  cursor: pointer;
  padding: 0;
}
.im-gallery__link:hover { color: var(--im-orange); }

/* --- Блок покупки --- */
.im-buy { display: flex; flex-direction: column; gap: 14px; }
.im-buy__form {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.im-buy__price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.im-buy__price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--im-text);
}
.im-buy__old {
  font-size: 16px;
  color: var(--im-muted-2);
  text-decoration: line-through;
}
.im-buy__disc {
  background: var(--im-bg-pink);
  color: var(--im-crimson);
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--im-r-badge);
}
.im-buy__stock { display: flex; flex-direction: column; gap: 4px; }
.im-buy__today { color: var(--im-green); font-size: 12.5px; font-weight: 700; }
.im-buy__srok { color: var(--im-muted); font-size: 12.5px; }
.im-buy__row { display: flex; align-items: stretch; gap: 10px; }
.im-buy__row .counter {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  overflow: hidden;
  height: 42px;
  background: #fff;
  flex-shrink: 0;
}
.im-buy__row .counter-button {
  width: 32px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--im-text-2);
  font-size: 15px;
}
.im-buy__row .counter-button.is-count-down::before { content: '−'; }
.im-buy__row .counter-button.is-count-up::before { content: '+'; }
.im-buy__row .counter-button:hover { background: var(--im-hover-bg); }
.im-buy__row .counter-input {
  width: 36px;
  border: 0;
  text-align: center;
  font-family: var(--im-mono);
  font-size: 14px;
  outline: none;
  background: transparent;
  margin: 0;
  padding: 0;
}
.im-buy__oneclick { flex: 1; font-size: 13.5px; padding: 0 10px; }
.im-buy__cta {
  width: 100%;
  font-size: 16.5px;
  font-weight: 800;
  padding: 14px;
  box-shadow: var(--im-shadow-cta);
}
.im-buy__note { font-size: 13px; color: var(--im-muted); }
.im-buy__delivery {
  border-top: 1px solid var(--im-border-soft);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.im-buy__dl-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--im-text-2);
}
.im-buy__dl-row b { font-weight: 600; color: var(--im-text); }
.im-buy__dl-today { color: var(--im-green) !important; }
.im-buy__fine { font-size: 11px; color: var(--im-muted-2); line-height: 1.5; }
.im-buy__b2b {
  background: var(--im-bg-blue);
  border-radius: var(--im-r-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.im-buy__b2b b { font-size: 14px; color: var(--im-navy); }
.im-buy__b2b span { color: var(--im-text-2); line-height: 1.45; }
.im-buy__b2b a { font-weight: 700; color: var(--im-blue); }

/* --- Информация --- */
.im-props { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.im-props__card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 16px 18px;
}
.im-props__heading { font-size: 15px; font-weight: 800; margin-bottom: 12px; color: var(--im-text); }
.im-props__short {
  font-size: 13px;
  line-height: 1.55;
  color: var(--im-text-2);
  margin-bottom: 12px;
}
.im-props__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.im-props__row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  min-width: 0;
}
.im-props__key {
  color: var(--im-muted);
  flex-shrink: 0;
  max-width: 55%;
}
.im-props__row::before { content: none; }
.im-props__key::after {
  content: '';
  display: inline-block;
  width: 30px;
  border-bottom: 1px dotted var(--im-border-ctl);
  margin: 0 2px;
  vertical-align: baseline;
  flex: 1;
}
.im-props__row { position: relative; }
.im-props__val { color: var(--im-text); font-weight: 500; min-width: 0; overflow-wrap: break-word; }
.im-props__all {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}
.im-compat { display: flex; flex-wrap: wrap; gap: 7px; }
.im-compat__chip {
  font-family: var(--im-mono);
  font-size: 12px;
  background: var(--im-bg-blue);
  color: var(--im-blue);
  padding: 5px 11px;
  border-radius: var(--im-r-chip);
  white-space: nowrap;
}
.im-compat__chip:hover { background: var(--im-blue); color: #fff; }
.im-compat__chip--extra { display: none; }
.im-compat__more {
  border: 0;
  background: none;
  font-family: var(--im-font);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--im-blue);
  cursor: pointer;
  padding: 5px 0;
}
.im-compat__replaces {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--im-text-2);
  line-height: 1.5;
}
.im-compat__replaces span { color: var(--im-muted); }

/* --- Описание / характеристики --- */
.im-desc-card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 22px 24px;
  margin-top: 20px;
}
.im-desc-card__heading {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--im-text);
}
.im-desc-card__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--im-text-2);
  column-count: 2;
  column-gap: 36px;
}
.im-desc-card__body p { margin: 0 0 12px; break-inside: avoid-column; }
.im-specs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
/* «Вы смотрели ранее»: легаси-слайдер → сетка im-карточек */
.im-viewed .im-viewed-grid,
.im-viewed .product-slider.is-reviews {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  height: auto !important;
  width: auto !important;
  max-width: 100%;
  overflow: visible;
  transform: none !important;
}
.im-viewed .product-slider-controls { display: none !important; }
.im-viewed .reviews-products {
  min-width: 0;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}
.im-viewed .product-card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  height: 100%;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0;
  transition: box-shadow .15s ease;
}
.im-viewed .product-card:hover { box-shadow: var(--im-shadow-card); }
.im-viewed .product-card-inner { padding: 12px !important; display: flex; flex-direction: column; height: 100%; }
.im-viewed .product-card-photo {
  height: 110px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  position: relative;
}
.im-viewed .product-card-photo img {
  position: static !important;
  /* легаси .image-container img центрирует абсолютную картинку translate(-50%,-50%) —
     при static этот transform наоборот сдвигает её влево-вверх */
  transform: none !important;
  max-height: 100% !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
.im-viewed .reviews-products { overflow: hidden; }
.im-viewed .product-card-inner { min-width: 0; }
.im-viewed .product-link {
  font-size: 12.5px !important;
  font-weight: 500;
  color: var(--im-text);
  line-height: 1.35 !important;
  min-height: 34px;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.im-viewed .product-link:hover { color: var(--im-blue); }
.im-viewed .price.in-card {
  font-size: 15px !important;
  font-weight: 800;
  color: var(--im-text);
}
.im-viewed .more-info .button {
  background: #fff;
  border: 1.5px solid var(--im-blue);
  color: var(--im-blue);
  border-radius: var(--im-r-input);
  font-size: 12px !important;
  font-weight: 700;
  padding: 6px 12px !important;
}
.im-reviews-card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 20px 22px;
}

/* --- Липкая мобильная панель --- */
.im-buybar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--im-border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
  z-index: 1150;
  gap: 10px;
  align-items: stretch;
}
.im-buybar__counter {
  display: flex;
  align-items: center;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}
.im-buybar__counter button {
  width: 40px;
  height: 48px;
  border: 0;
  background: none;
  font-size: 17px;
  color: var(--im-text-2);
  cursor: pointer;
}
.im-buybar__counter span {
  min-width: 30px;
  text-align: center;
  font-family: var(--im-mono);
  font-size: 15px;
}
.im-buybar__cta { flex: 1; font-size: 15.5px; font-weight: 800; min-height: 48px; }

/* ============================================================
   Липкое меню (theme.js вешает .fixed на .js-main-menu при скролле >250)
   В прилипшем состоянии: синий фон + поиск, B2B, избранное/сравнение, корзина
   ============================================================ */
.im-nav__extras { display: none; }
.im-nav.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1180;
  box-shadow: 0 6px 18px rgba(30, 36, 48, 0.18);
  background: var(--im-blue);
  border-bottom: 0;
}
.im-nav.fixed .im-nav__row { padding-top: 8px; padding-bottom: 8px; gap: 18px; }
.im-nav.fixed .im-nav__link { color: #fff; }
.im-nav.fixed .im-nav__link:hover { color: var(--im-topbar-b2b); }
.im-nav.fixed .im-nav__link--sale { color: var(--im-topbar-b2b); }
.im-nav.fixed .im-nav__link--sec { display: none; }
.im-nav.fixed .im-nav__links { gap: 18px; flex-wrap: nowrap; }
.im-nav.fixed .im-nav__catalog {
  background: #fff;
  color: var(--im-blue);
  padding: 9px 16px;
}
.im-nav.fixed .im-nav__catalog:hover { background: var(--im-bg-blue); }
.im-nav.fixed .im-nav__catalog-icon span { background: var(--im-blue); }

.im-nav.fixed .im-nav__extras {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}
.im-nav__search { width: 300px; min-width: 0; }
.im-nav__search .search-widget {
  display: flex;
  align-items: stretch;
  height: 36px;
  border-radius: var(--im-r-input);
  background: #fff;
  margin: 0;
  width: 100%;
}
.im-nav__search .search-widget-field {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 12px;
  font-family: var(--im-font);
  font-size: 13px;
  color: var(--im-text);
  margin: 0;
  height: auto;
  box-shadow: none;
  border-radius: 8px 0 0 8px;
}
.im-nav__search .search-widget-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--im-orange);
  color: #fff;
  font-family: var(--im-font);
  font-size: 13px;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  margin: 0;
  height: auto;
  width: auto;
}
.im-nav__search .search-widget-button:hover { background: var(--im-orange-hover); }
.im-nav__search .search-widget-button::before,
.im-nav__search .search-widget-button::after { display: none; }
.im-nav__search .itb-ac-dropdown { left: auto; right: 0; transform: none; }
.im-nav__extra-link {
  color: var(--im-topbar-b2b);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.im-nav__extra-link:hover { color: #fff; }
.im-nav__icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--im-r-input);
  flex-shrink: 0;
}
.im-nav__icon-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.im-nav__cart {
  position: relative;
  width: 42px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--im-orange);
  border-radius: var(--im-r-input);
  color: #fff;
  flex-shrink: 0;
}
.im-nav__cart:hover { background: var(--im-orange-hover); color: #fff; }
.im-nav__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #fff;
  color: var(--im-blue);
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.im-nav__badge--cart { color: var(--im-orange); }
@media (max-width: 1199px) {
  .im-nav.fixed .im-nav__links { display: none; }
}

/* ============================================================
   Статические страницы (page)
   ============================================================ */
.im-page__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2px 0 16px;
  color: var(--im-text);
}
.im-page__body {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 24px 28px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--im-text);
  max-width: 980px;
}
.im-page__body h2 { font-size: 20px; font-weight: 800; margin: 22px 0 10px; letter-spacing: -0.01em; }
.im-page__body h3 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.im-page__body p { margin: 0 0 12px; }
.im-page__body img { max-width: 100%; height: auto; border-radius: var(--im-r-block); }
/* пиктограммы соцсетей в контенте: не даём разрастаться до natural-размера */
.im-page__body img.social_icon {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  display: inline-block;
  border-radius: 8px;
  vertical-align: middle;
}
.im-page__body table { border-collapse: collapse; max-width: 100%; }
.im-page__body td, .im-page__body th { border: 1px solid var(--im-border); padding: 8px 12px; font-size: 13.5px; }
.im-page__body th { background: #F7F5F1; }

/* Индекс брендов A–Z (страница «Выбор по производителю») */
.im-brandindex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px 26px;
  margin-top: 8px;
}
.im-brandindex__group h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--im-crimson);
  border-bottom: 1px solid var(--im-border-soft);
  padding-bottom: 4px;
  margin: 0 0 8px;
}
.im-brandindex__group ul { list-style: none; margin: 0; padding: 0; }
.im-brandindex__group li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 13.5px;
}
.im-brandindex__group li a { color: var(--im-text); font-weight: 500; }
.im-brandindex__group li a:hover { color: var(--im-orange); }
.im-brandindex__group li span { font-size: 11.5px; color: var(--im-muted-2); }

/* CTA-карточка на сервисных страницах */
.im-page__cta {
  max-width: 980px;
  margin-top: 16px;
  background: var(--im-bg-blue);
  border-radius: var(--im-r-card);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.im-page__cta b { font-size: 16px; color: var(--im-navy); }
.im-page__cta span { font-size: 13.5px; color: var(--im-text-2); line-height: 1.5; }
.im-page__cta .im-btn { margin-top: 6px; padding: 11px 22px; font-size: 14px; }

/* --- Прайс-чек (/page/price-check) --- */
.im-pc { margin-top: 4px; }
.im-pc__card {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-card);
  padding: 18px 20px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.im-pc__tabs { display: flex; gap: 8px; }
.im-pc__text {
  width: 100%;
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-input);
  padding: 10px 12px;
  font-family: var(--im-mono);
  font-size: 13px;
  resize: vertical;
}
.im-pc__text:focus { outline: none; border-color: var(--im-blue); }
.im-pc__hint { margin-top: 8px; font-size: 12.5px; color: var(--im-muted); line-height: 1.5; }
.im-pc__actions { display: flex; align-items: center; gap: 14px; }
.im-pc__status { font-size: 13px; color: var(--im-muted); }
.im-pc__error {
  background: #FDF0EF;
  color: #A33B32;
  border-radius: var(--im-r-input);
  padding: 10px 14px;
  font-size: 13.5px;
}
.im-pc__summary { margin: 18px 0 10px; font-size: 14px; font-weight: 600; color: var(--im-text-2); }
.im-pc__table .im-pc__row {
  display: grid;
  grid-template-columns: 96px 130px 1fr 100px 140px 56px 190px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--im-border);
  font-size: 13px;
}
.im-pc__table .im-table__head { padding-top: 0; }
.im-pc__row--none { background: var(--im-bg-cream); }
.im-pc__sku { font-family: var(--im-mono); font-size: 12.5px; }
.im-pc__num { text-align: right; }
.im-pc__muted { color: var(--im-muted); }
.im-pc__pill {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--im-r-badge);
  white-space: nowrap;
}
.im-pc__pill--ok { background: #E4F3E9; color: #1E7A3C; }
.im-pc__pill--soft { background: var(--im-bg-blue); color: var(--im-blue); }
.im-pc__pill--warn { background: var(--im-bg-cream-2); color: var(--im-amber); }
.im-pc__pill--none { background: #F0EEEA; color: var(--im-muted); }
.im-pc__btns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.im-pc__buy { padding: 6px 12px; font-size: 12px; }
.im-pc__link { font-size: 12.5px; color: var(--im-blue); font-weight: 600; white-space: nowrap; }
.im-pc__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.im-pc__total { font-size: 15px; }
@media screen and (max-width: 768px) {
  .im-pc__table .im-table__head { display: none; }
  .im-pc__table .im-pc__row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    padding: 10px 12px;
  }
  .im-pc__num { text-align: left; }
  .im-pc__btns { justify-content: flex-start; grid-column: 1 / -1; }
}

/* Кнопки-формы обратной связи */
.im-buy__b2b-btn,
.im-side-card__btn {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--im-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--im-blue);
  cursor: pointer;
  text-align: left;
}
.im-buy__b2b-btn:hover,
.im-side-card__btn:hover { color: var(--im-orange); }
.im-product__ask {
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--im-font);
  font-size: 13px;
  color: var(--im-blue);
  cursor: pointer;
}
.im-product__ask:hover { color: var(--im-orange); }

/* ============================================================
   Корзина (рестайл legacy-разметки, хуки нетронуты)
   ============================================================ */
.im-cartpage .cart-list {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  overflow: hidden;
}
.im-cartpage .cart-item { border-top: 1px solid var(--im-border-soft); }
.im-cartpage .cart-item:first-child { border-top: 0; }
.im-cartpage .cart-item-inner {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 14px;
  align-items: center;
}
.im-cartpage .item-image-wrapper { width: 64px; }
.im-cartpage .item-image-link { display: flex; align-items: center; justify-content: center; height: 64px; }
.im-cartpage .item-image { max-width: 100%; max-height: 64px; object-fit: contain; }
.im-cartpage .item-content {
  display: grid;
  grid-template-columns: 1fr 110px 120px 110px 36px;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.im-cartpage .item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--im-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.im-cartpage .item-title:hover { color: var(--im-blue); }
.im-cartpage .item-prices {
  font-family: var(--im-mono);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}
.im-cartpage .js-item-total-price { font-weight: 800; font-size: 14.5px; }
.im-cartpage .item-counter .counter {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  overflow: hidden;
  height: 34px;
  background: #fff;
  width: fit-content;
  margin: 0 auto;
}
.im-cartpage .counter-button {
  width: 28px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--im-text-2);
  font-size: 14px;
}
.im-cartpage .counter-button.is-count-down::before { content: '−'; }
.im-cartpage .counter-button.is-count-up::before { content: '+'; }
.im-cartpage .counter-button:hover { background: var(--im-hover-bg); }
.im-cartpage .counter-input {
  width: 34px;
  border: 0;
  text-align: center;
  font-family: var(--im-mono);
  font-size: 13px;
  outline: none;
  background: transparent;
  margin: 0;
  padding: 0;
}
.im-cartpage .is-item-delete {
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  color: var(--im-muted-2);
}
.im-cartpage .is-item-delete::before {
  content: '✕';
  font-size: 14px;
}
.im-cartpage .is-item-delete:hover { color: var(--im-crimson); }

.im-cartpage__summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.im-cartpage .cart-total {
  font-size: 15px;
  color: var(--im-text-2);
}
.im-cartpage .cart-total b { font-size: 20px; font-weight: 800; color: var(--im-text); font-family: var(--im-mono); }
.im-cartpage__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.im-cartpage .discount-row { display: flex; gap: 8px; }
.im-cartpage .discount-input {
  border: 1px solid var(--im-border-ctl);
  border-radius: var(--im-r-input);
  padding: 10px 12px;
  font-family: var(--im-font);
  font-size: 13.5px;
  outline: none;
  background: #fff;
  min-width: 220px;
}
.im-cartpage .discount-input:focus { border-color: var(--im-blue); }
.im-cartpage .discount-button {
  border: 1.5px solid var(--im-blue);
  background: #fff;
  color: var(--im-blue);
  border-radius: var(--im-r-btn);
  padding: 0 18px;
  font-family: var(--im-font);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.im-cartpage .discount-button:hover { background: var(--im-bg-blue); }
.im-cartpage .discount-comment { font-size: 13px; color: var(--im-green); margin-top: 8px; }
.im-cartpage .discounts-notice.is-error { color: var(--im-crimson); font-size: 13px; margin-top: 8px; }
.im-cartpage .discounts-notice.hidden { display: none; }
.im-cartpage__checkout {
  font-size: 16px;
  font-weight: 800;
  padding: 14px 34px;
  box-shadow: var(--im-shadow-cta);
}
.im-cartpage__empty {
  background: var(--im-card);
  border: 1px solid var(--im-border);
  border-radius: var(--im-r-block);
  padding: 32px;
  text-align: center;
  color: var(--im-text-2);
  font-size: 15px;
}
.im-cartpage__empty.hidden { display: none; }
.im-cartpage__tocatalog { margin-top: 14px; padding: 9px 18px; }
.im-cartpage__share { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.im-cartpage__share .im-btn { padding: 9px 18px; font-size: 13px; }
.im-cartpage__hint { font-size: 12.5px; color: var(--im-muted); margin-top: 8px; }

/* ============================================================
   Мобайл ≤768px
   ============================================================ */
@media screen and (max-width: 768px) {
  .im-container { padding-left: 14px; padding-right: 14px; }

  body { padding-bottom: 60px; } /* место под таб-бар */

  /* Планка: только слоган + телефон */
  .im-topbar__links, .im-topbar__address, .im-topbar__email { display: none; }
  .im-topbar__slogan { display: block; opacity: .92; }
  .im-topbar__row { min-height: 32px; }

  /* Шапка: бургер + лого + корзина */
  .im-header__row { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .im-burger { display: flex; }
  .im-logo__img { width: 36px; }
  .im-logo__text { font-size: 20px; }
  .im-logo__slogan { display: none; }
  .im-logo { gap: 8px; }

  .im-header__search { display: none; }
  .im-header__search-mobile { display: block; }
  .im-header__search-mobile .search-widget {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--im-blue);
    border-radius: var(--im-r-btn);
    /* overflow:hidden нельзя — дропдаун живого поиска */
    background: #fff;
    height: 42px;
    margin: 0;
    width: 100%;
  }
  .im-header__search-mobile .search-widget-field { border-radius: 8px 0 0 8px; }
  .im-header__search-mobile .search-widget-button { border-radius: 0 8px 8px 0; }
  .im-header__search-mobile .itb-ac-dropdown { max-width: calc(100vw - 28px); }
  .im-header__search-mobile .search-widget-field {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 12px;
    font-family: var(--im-font);
    font-size: 16px;
    color: var(--im-text);
    margin: 0;
    height: auto;
    box-shadow: none;
  }
  .im-header__search-mobile .search-widget-button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    background: var(--im-blue);
    color: #fff;
    font-family: var(--im-font);
    font-size: 14px;
    font-weight: 700;
    padding: 0 18px;
    width: auto;
    height: auto;
    margin: 0;
  }

  .im-action { display: none; }
  .im-mob-login { display: flex; margin-left: auto; }
  .im-header__actions { margin-left: 0; }
  .im-cart__btn {
    min-width: 0;
    padding: 9px 11px;
    position: relative;
  }
  .im-cart__label { display: none; }
  .im-cart__icon { display: block; }
  .im-cart__count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #fff;
    border: 1.5px solid var(--im-orange);
    color: var(--im-orange);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }
  .im-cart .cart-widget-dropdown { display: none !important; }
  .im-header__search-mobile .search-widget-button::before,
  .im-header__search-mobile .search-widget-button::after { display: none; }

  /* Навигация скрыта — категории через бургер/таб-бар */
  .im-nav { display: none; }

  /* Футер */
  .im-footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .im-footer--compact .im-footer__compact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .im-tabbar { display: flex; }

  /* --- Главная: мобайл --- */
  .im-main { padding: 12px 0 32px; }
  .im-section { margin-top: 22px; }
  .im-section__title { font-size: 20px; }

  .im-hero { grid-template-columns: 1fr; gap: 10px; }
  .im-hero__slider .promo-slide-image { height: 180px; }
  .im-hero__tiles {
    grid-template-rows: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .im-tile { padding: 14px 16px; gap: 5px; }
  .im-tile__title { font-size: 13.5px; }
  .im-tile__link { font-size: 12px; }

  .im-cats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .im-cat { padding: 12px 12px; }
  .im-cat__name { font-size: 13px; }
  .im-cat__count { display: none; }

  .im-novelties {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin: 0 -14px;
    padding: 0 14px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .im-novelties::-webkit-scrollbar { display: none; }
  .im-novelties .im-card { flex: 0 0 160px; }
  .im-novelties .im-card__photo { height: 110px; }
  .im-novelties .im-card__title { font-size: 12.5px; min-height: 50px; }
  .im-novelties .im-card__price { font-size: 16px; }

  .im-facts { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 18px; }
  .im-fact__num { font-size: 19px; }

  .im-posts { grid-template-columns: 1fr; }
  .im-post__cover { height: 150px; }

  /* --- Каталог: мобайл (8b) --- */
  .im-catalog__title { font-size: 21px; }
  .im-catalog__head { margin-bottom: 10px; }
  .im-catalog__layout { grid-template-columns: 1fr; gap: 0; }
  .im-subcats {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -14px 14px;
    padding: 0 14px 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .im-subcats::-webkit-scrollbar { display: none; }
  .im-subcats .im-chip { white-space: nowrap; flex-shrink: 0; }

  /* фильтры = bottom-sheet */
  .im-filters {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    max-height: 82vh;
    background: var(--im-bg);
    border-radius: 16px 16px 0 0;
    z-index: 1300;
    transform: translateY(105%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -12px 40px rgba(30,36,48,.18);
  }
  body.im-filters-open .im-filters { transform: translateY(0); }
  .im-filters__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--im-text);
  }
  .im-filters__close {
    border: 0;
    background: none;
    font-size: 16px;
    color: var(--im-muted);
    cursor: pointer;
    padding: 4px 8px;
  }
  .im-filters__body {
    overflow-y: auto;
    padding: 0 14px calc(16px + env(safe-area-inset-bottom, 0));
    -webkit-overflow-scrolling: touch;
  }
  .im-filters__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 26, 36, 0.45);
    z-index: 1250;
  }
  body.im-filters-open .im-filters__backdrop { display: block; }
  body.im-filters-open { overflow: hidden; }

  .im-toolbar { gap: 8px; }
  .im-toolbar__filters-btn { display: inline-flex; }
  .im-view { display: none; }
  .im-toolbar__chips { order: 5; flex-basis: 100%; }

  /* таблица → компактные строки-карточки */
  .im-table, .im-listing--grid .im-table { display: block; }
  .im-listing--grid .im-tiles, .im-tiles { display: none; }
  .im-table__head { display: none; }
  .im-row {
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "photo sku"
      "photo name"
      "photo stock"
      "photo buy";
    gap: 2px 12px;
    padding: 12px;
  }
  .im-row__photo { grid-area: photo; width: 64px; height: 64px; align-self: start; }
  .im-row__sku { grid-area: sku; font-size: 11px; }
  .im-row__name { grid-area: name; }
  .im-row__name a { font-size: 13px; -webkit-line-clamp: 2; }
  .im-row__stock {
    grid-area: stock;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
  }
  .im-ship { padding-left: 0; }
  .im-ship::before { content: '·'; margin-right: 6px; color: var(--im-muted-2); }
  .im-row__price {
    display: none;
  }
  .im-row__action { grid-area: buy; justify-content: flex-start; margin-top: 8px; }
  .im-row__form { width: 100%; gap: 10px; }
  .im-row__form::before {
    content: attr(data-im-price);
    font-family: var(--im-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--im-text);
    margin-right: auto;
  }
  .im-row__form .counter { display: none; }
  .im-row__buy { padding: 8px 18px; }

  .im-pagination-row { justify-content: center; }
  .im-pages { display: none; }
  .im-show-more { width: 100%; padding: 12px; }

  /* --- Блог: мобайл (8d) --- */
  .im-featured { grid-template-columns: 1fr; }
  .im-featured__cover { min-height: 160px; height: 160px; }
  .im-featured__body { padding: 14px 16px; gap: 8px; }
  .im-featured__title { font-size: 17px; }
  .im-featured__lead { font-size: 12.5px; }
  .im-blog__grid .im-post {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 10px;
    padding: 10px;
  }
  .im-blog__grid .im-post__cover {
    width: 84px;
    height: 72px;
    border-radius: var(--im-r-input);
    overflow: hidden;
  }
  .im-blog__grid .im-post__body { padding: 0; gap: 4px; }
  .im-blog__grid .im-post__title { font-size: 13px; }
  .im-blog__grid .im-post__lead, .im-blog__grid .im-post__time { display: none; }

  .im-article__layout { grid-template-columns: 1fr; gap: 14px; }
  .im-article__title { font-size: 22px; }
  .im-article__body { font-size: 14.5px; }
  .im-article__cover { max-height: 200px; }
  .im-article__side { position: static; }
  .im-article__footer { flex-wrap: wrap; }

  /* --- Корзина: мобайл --- */
  .im-cartpage .item-content {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title title"
      "price counter"
      "total delete";
    gap: 8px;
  }
  .im-cartpage .item-caption { grid-area: title; }
  .im-cartpage .js-item-price { grid-area: price; text-align: left; align-self: center; }
  .im-cartpage .item-counter { grid-area: counter; justify-self: end; }
  .im-cartpage .js-item-total-price { grid-area: total; text-align: left; align-self: center; }
  .im-cartpage .item-delete { grid-area: delete; justify-self: end; }
  .im-cartpage__footer { flex-direction: column; }
  .im-cartpage__checkout { width: 100%; }
  .im-cartpage .discount-row { flex-wrap: wrap; }
  .im-cartpage .discount-input { min-width: 0; flex: 1; }

  /* --- Карточка товара: мобайл (8c) --- */
  .im-product__title { font-size: 17px; margin-bottom: 8px; }
  .im-product__meta { gap: 10px; margin-bottom: 12px; }
  .im-product__grid { grid-template-columns: 1fr; gap: 12px; }
  .im-gallery { padding: 10px; }
  .im-gallery__main { height: 240px; }
  .im-gallery__thumb { width: 56px; height: 50px; }
  .im-buy__price { font-size: 26px; }
  .im-buy__cta { font-size: 15px; padding: 12px; }
  .im-buy__form { padding: 14px; }
  .im-props__grid, .im-specs__grid { grid-template-columns: 1fr; }
  .im-desc-card { padding: 16px; margin-top: 12px; }
  .im-desc-card__body { column-count: 1; }
  .im-buybar { display: flex; }
  body:has(.im-buybar) .im-tabbar { display: none; }
  .im-viewed .im-viewed-grid,
  .im-viewed .product-slider.is-reviews { grid-template-columns: 1fr 1fr; }
}
