/* ============================================================
   Энергосервис — тема прототипа (UIkit 3.21 + надстройка)
   Переносится в MODX как assets/template/css/theme.css
   ============================================================ */

/* -------- 0. Шрифты (self-host, 20.09.26 перф-2) --------
   Inter/Manrope — variable woff2, только latin+cyrillic (то, что реально отдал Google при
   запросе с UA современного Chrome), лежат в assets/templates/enesv/fonts/. Убирает round-trip
   на fonts.googleapis.com/fonts.gstatic.com. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* -------- 1. Токены -------- */
:root {
  /* Палитра — фирменная, из BRAND.md: primary #0162AF (тёмно-синий знак),
     accent #00ADEF (голубая «комета»), текст #111, фон светлый холодный.
     Имена токенов --es-accent* сохранены от первой версии темы, но значения
     теперь фирменные: --es-accent = primary, --es-accent-2 = голубой акцент. */
  --es-ink:        #111111;   /* основной текст и заголовки */
  --es-ink-2:      #24374A;   /* текст второго уровня */
  --es-muted:      #60748A;   /* вторичный текст */
  --es-line:       #DCE5F0;   /* границы */
  --es-white:      #FFFFFF;
  --es-dark:       #0B2A4A;   /* подложка футера и offcanvas */

  --es-accent:     #0162AF;   /* primary: ссылки, кнопки, иконки */
  --es-accent-dk:  #014C8A;   /* hover primary */
  --es-accent-lt:  #E3F1FD;   /* светлая подложка акцента */
  --es-accent-2:   #00ADEF;   /* голубой акцент, правый стоп градиента */
  --es-accent-2dk: #1580CE;   /* затемнённый голубой — там, где по нему идёт белый текст */
  --es-warm:       #E8A33D;   /* цена/наличие, «под заказ» */

  --es-bg:         #F5F8FC;   /* общий фон */
  --es-bg-2:       #EAF1F9;
  /* Контраст: белый текст на #00ADEF даёт всего 2,4:1, поэтому кнопки и CTA-полоса
     используют градиент с затемнённым правым стопом (#1580CE → 4,6:1 в самой светлой точке).
     Чистая фирменная пара 0A5DAF → 1CA9F5 остаётся для декора (цифра 404, подложки). */
  --es-grad-cta:   linear-gradient(100deg, var(--es-accent) 0%, var(--es-accent-2dk) 100%);
  --es-grad-bright:linear-gradient(100deg, var(--es-accent) 0%, var(--es-accent-2) 100%);
  --es-grad-bg:    radial-gradient(1200px 520px at 12% -8%, #DFEDFB 0%, rgba(223,237,251,0) 62%),
                   radial-gradient(1000px 480px at 92% 2%, #E4EFFA 0%, rgba(228,239,250,0) 60%),
                   linear-gradient(180deg, var(--es-bg) 0%, var(--es-bg-2) 100%);

  /* Радиусы */
  --es-r-8: 8px;  --es-r-12: 12px; --es-r-16: 16px; --es-r-20: 20px; --es-r-28: 28px;

  /* Тени */
  --es-sh-1: 0 1px 2px rgba(11,42,74,.04), 0 2px 8px rgba(11,42,74,.05);
  --es-sh-2: 0 2px 6px rgba(11,42,74,.06), 0 10px 24px rgba(11,42,74,.08);
  --es-sh-3: 0 8px 20px rgba(11,42,74,.10), 0 24px 48px rgba(11,42,74,.10);

  /* Переходы */
  --es-t-fast: 150ms cubic-bezier(.2,.6,.3,1);
  --es-t:      200ms cubic-bezier(.2,.6,.3,1);
  --es-t-slow: 250ms cubic-bezier(.2,.6,.3,1);

  --es-font: "Manrope", "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* -------- 2. База -------- */
html { scroll-behavior: smooth; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: var(--es-font);
  color: var(--es-ink);
  background: var(--es-grad-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* страховка от случайного выноса */
}
h1, h2, h3, h4, .uk-h1, .uk-h2, .uk-h3 { font-family: var(--es-font); color: var(--es-ink); font-weight: 700; letter-spacing: -.02em; }
a { color: var(--es-accent); text-decoration: none; transition: color var(--es-t-fast); }
a:hover { color: var(--es-accent-dk); text-decoration: none; }
img, svg, table { max-width: 100%; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(10,93,175,.45);
  outline-offset: 2px;
  border-radius: var(--es-r-8);
}

.es-muted { color: var(--es-muted); }
.es-accent { color: var(--es-accent); }
.es-container { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 639px) { .es-container { padding: 0 14px; } }

/* -------- 3. Кнопки -------- */
.es-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-weight: 700; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: var(--es-r-12);
  transition: transform var(--es-t-fast), box-shadow var(--es-t), background var(--es-t), color var(--es-t);
  text-align: center;
}
.es-btn:hover { transform: translateY(-1px); }
.es-btn:active { transform: translateY(0); }
.es-btn--primary { background: var(--es-grad-cta); color: #fff; box-shadow: 0 6px 16px rgba(10,93,175,.28); }
.es-btn--primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(10,93,175,.34); }
.es-btn--ghost { background: #fff; color: var(--es-ink); box-shadow: var(--es-sh-1); }
.es-btn--ghost:hover { color: var(--es-accent-dk); box-shadow: var(--es-sh-2); }
.es-btn--line { background: transparent; color: var(--es-ink); border: 1px solid var(--es-line); }
.es-btn--line:hover { border-color: var(--es-accent); color: var(--es-accent-dk); }
.es-btn--sm { padding: 9px 14px; font-size: 13px; border-radius: var(--es-r-8); }
.es-btn--full { width: 100%; }

/* -------- 4. Шапка-капсула -------- */
.es-topline { font-size: 13px; color: var(--es-muted); padding: 10px 0; }
.es-topline a { color: var(--es-muted); }
.es-topline a:hover { color: var(--es-accent-dk); }

.es-headwrap { padding-bottom: 10px; }
.es-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-radius: var(--es-r-28);
  box-shadow: var(--es-sh-1);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: padding var(--es-t-slow), box-shadow var(--es-t-slow), border-radius var(--es-t-slow), background var(--es-t-slow);
}
/* sticky-уменьшение (uk-sticky вешает .uk-sticky-fixed) */
.uk-sticky-fixed .es-header { padding: 6px 12px; box-shadow: var(--es-sh-2); border-radius: var(--es-r-20); }
.uk-sticky-fixed .es-logo__img { height: 30px; }
.uk-sticky-fixed .es-logo__sub { display: none; }
.uk-sticky-fixed .es-header .es-btn { padding: 9px 16px; }

.es-logo { display: flex; align-items: center; gap: 10px; color: var(--es-ink); flex: 0 0 auto; }
.es-logo:hover { color: var(--es-ink); }
/* Логотип-картинка (site/brand/logo.svg, пропорция 2000×355) */
.es-logo__img { height: 40px; width: auto; display: block; transition: height var(--es-t-slow); }
@media (max-width: 959px) { .es-logo__img { height: 34px; } }
@media (max-width: 479px) { .es-logo__img { height: 24px; } }
.es-footer__logo { height: 34px; width: auto; display: block; margin-bottom: 22px; }
.es-logo__sub { font-size: 11px; color: var(--es-muted); line-height: 1.1; }

.es-nav { display: flex; align-items: center; gap: 2px; background: var(--es-bg); border-radius: var(--es-r-28); padding: 4px; }
.es-nav a {
  display: block; padding: 9px 15px; border-radius: var(--es-r-20);
  color: var(--es-ink); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background var(--es-t), color var(--es-t), box-shadow var(--es-t);
}
.es-nav a:hover { background: rgba(255,255,255,.75); color: var(--es-ink); }
.es-nav a.is-active { background: #fff; box-shadow: var(--es-sh-1); color: var(--es-accent-dk); }

.es-phone { font-weight: 800; font-size: 16px; color: var(--es-ink); white-space: nowrap; }
.es-phone:hover { color: var(--es-accent-dk); }
.es-phone__note { display: block; font-size: 11px; font-weight: 500; color: var(--es-muted); }

.es-cart { position: relative; width: 42px; height: 42px; border-radius: var(--es-r-12);
  background: var(--es-accent-lt); color: var(--es-accent-dk);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: background var(--es-t), transform var(--es-t-fast); }
.es-cart:hover { background: #CFE5FB; transform: translateY(-1px); color: var(--es-accent-dk); }
.es-cart__badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--es-warm); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; }

.es-burger { width: 42px; height: 42px; border-radius: var(--es-r-12); background: var(--es-bg); color: var(--es-ink);
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex: 0 0 auto; }

/* Узкие экраны: шапка ужимается, но телефон и корзина остаются */
@media (max-width: 479px) {
  .es-header { gap: 6px; padding: 8px 10px; }
  .es-logo { gap: 7px; min-width: 0; }
  .uk-sticky-fixed .es-logo__img { height: 22px; }
  .es-cart, .es-burger { width: 34px; height: 34px; border-radius: var(--es-r-8); }
  .es-cart__badge { top: -4px; right: -4px; }
  .es-header .uk-margin-small-right { margin-right: 4px !important; }
  .es-header .uk-margin-small-left { margin-left: 4px !important; }
}

/* -------- 5. Секции и карточки -------- */
.es-section { padding: 56px 0; }
.es-section--tight { padding: 36px 0; }
@media (max-width: 639px) { .es-section { padding: 36px 0; } }
.es-section__head { margin-bottom: 26px; }
.es-section__title { font-size: 32px; line-height: 1.15; margin: 0 0 8px; }
@media (max-width: 639px) { .es-section__title { font-size: 24px; } }
.es-section__sub { color: var(--es-muted); margin: 0; font-size: 15px; }

.es-card {
  background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-1);
  padding: 22px; height: 100%;
  transition: transform var(--es-t), box-shadow var(--es-t);
}
.es-card--hover:hover { transform: translateY(-4px); box-shadow: var(--es-sh-3); }
.es-card--flat { box-shadow: none; border: 1px solid var(--es-line); }

/* Плитка категории */
.es-tile {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-1);
  padding: 18px; height: 100%; color: var(--es-ink);
  transition: transform var(--es-t), box-shadow var(--es-t);
}
.es-tile:hover { transform: translateY(-4px); box-shadow: var(--es-sh-3); color: var(--es-ink); }
.es-tile__icon {
  width: 56px; height: 56px; border-radius: var(--es-r-16);
  background: var(--es-accent-lt); color: var(--es-accent-dk);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--es-t), transform var(--es-t);
}
.es-tile:hover .es-tile__icon { background: var(--es-grad-cta); color: #fff; transform: scale(1.04); }
.es-tile__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.es-tile__meta { font-size: 12.5px; color: var(--es-muted); }
.es-tile > span { max-width: 100%; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.es-tile__img { display: block; width: 100%; aspect-ratio: 4/3; border-radius: var(--es-r-16); overflow: hidden; }
.es-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--es-t); }
.es-tile:hover .es-tile__img img { transform: scale(1.04); }
.es-check__img { width: 28px; height: 21px; border-radius: 4px; object-fit: cover; flex: 0 0 auto; vertical-align: middle; margin-right: 2px; }

/* -------- 6. Hero -------- */
.es-hero { padding: 46px 0 18px; }
.es-hero__title { font-size: 56px; line-height: 1.06; margin: 0 0 18px; letter-spacing: -.03em; }
.es-hero__lead { font-size: 18px; color: var(--es-ink-2); max-width: 620px; margin: 0 0 26px; }
@media (max-width: 1439px) { .es-hero__title { font-size: 46px; } }
@media (max-width: 959px)  { .es-hero__title { font-size: 36px; } .es-hero__lead { font-size: 16px; } }
@media (max-width: 639px)  { .es-hero { padding: 26px 0 8px; } .es-hero__title { font-size: 27px; } }

.es-hero__panel {
  background: rgba(255,255,255,.72); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--es-r-28); box-shadow: var(--es-sh-2); padding: 24px;
}
.es-fact { background: #fff; border-radius: var(--es-r-16); box-shadow: var(--es-sh-1); padding: 16px 18px; height: 100%; }
.es-fact__num { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--es-accent-dk); line-height: 1.1; }
.es-fact__txt { font-size: 13px; color: var(--es-muted); margin-top: 4px; }

/* -------- 7. Формы и калькулятор -------- */
.es-field { margin-bottom: 14px; }
.es-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--es-muted); margin-bottom: 6px; }
.es-input, .es-select, .es-textarea {
  width: 100%; box-sizing: border-box; background: #fff;
  border: 1px solid var(--es-line); border-radius: var(--es-r-12);
  padding: 12px 14px; font-size: 15px; font-family: var(--es-font); color: var(--es-ink);
  transition: border-color var(--es-t), box-shadow var(--es-t);
}
.es-textarea { min-height: 110px; resize: vertical; }
.es-input:focus, .es-select:focus, .es-textarea:focus {
  border-color: var(--es-accent); box-shadow: 0 0 0 4px rgba(10,93,175,.14); outline: none;
}
.es-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.es-calc { background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-2); padding: 24px; }
.es-calc__out {
  background: var(--es-accent-lt); border-radius: var(--es-r-16); padding: 18px 20px; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
}
.es-calc__val { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--es-ink); line-height: 1.1; }
.es-calc__lab { font-size: 12.5px; color: var(--es-muted); }
@media (max-width: 639px) { .es-calc__val { font-size: 24px; } }

/* -------- 8. Чипы городов -------- */
.es-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.es-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--es-line); border-radius: var(--es-r-28);
  padding: 8px 15px; font-size: 14px; color: var(--es-ink); white-space: nowrap;
  transition: border-color var(--es-t), box-shadow var(--es-t), transform var(--es-t-fast), color var(--es-t);
}
.es-chip:hover { border-color: var(--es-accent); color: var(--es-accent-dk); box-shadow: var(--es-sh-1); transform: translateY(-1px); }
.es-chip--accent { background: var(--es-accent-lt); border-color: transparent; color: var(--es-accent-dk); font-weight: 700; }

/* -------- 9. Таблицы товаров (на мобильном — карточки) -------- */
.es-tablewrap { background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-1); overflow: hidden; }
.es-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.es-table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--es-muted); font-weight: 700; padding: 14px 16px; background: var(--es-bg);
  white-space: nowrap;
}
.es-table td { padding: 14px 16px; border-top: 1px solid var(--es-line); vertical-align: middle; }
.es-table tbody tr { transition: background var(--es-t-fast); }
.es-table tbody tr:hover { background: #F5F9FE; }
.es-table__name { font-weight: 700; }
.es-table__sub { font-size: 12.5px; color: var(--es-muted); }
.es-price { font-weight: 800; white-space: nowrap; }
.es-price__unit { font-weight: 600; font-size: 12px; color: var(--es-muted); }
.es-stock { font-size: 13px; font-weight: 700; color: var(--es-accent-dk); white-space: nowrap; }
.es-stock--order { color: var(--es-warm); }

.es-qty { display: inline-flex; align-items: center; border: 1px solid var(--es-line); border-radius: var(--es-r-8); overflow: hidden; }
.es-qty button { width: 30px; height: 34px; border: 0; background: #fff; cursor: pointer; color: var(--es-ink); font-size: 16px; line-height: 1; transition: background var(--es-t-fast); }
.es-qty button:hover { background: var(--es-accent-lt); }
.es-qty input { width: 46px; height: 34px; border: 0; text-align: center; font-family: var(--es-font); font-size: 14px; background: #fff; }

@media (max-width: 959px) {
  .es-tablewrap { background: transparent; box-shadow: none; overflow: visible; }
  .es-table, .es-table tbody, .es-table tr, .es-table td { display: block; width: 100%; box-sizing: border-box; }
  .es-table thead { display: none; }
  .es-table tr { background: #fff; border-radius: var(--es-r-16); box-shadow: var(--es-sh-1); margin-bottom: 12px; padding: 6px 4px; }
  .es-table td { border-top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; }
  .es-table td + td { border-top: 1px solid var(--es-line); }
  .es-table td::before {
    content: attr(data-label); flex: 0 0 auto; font-size: 12px; text-transform: uppercase;
    letter-spacing: .03em; color: var(--es-muted); font-weight: 700;
  }
  .es-table td[data-label=""]::before { content: none; }
  .es-table td.es-td--wide { display: block; }
  .es-table td.es-td--wide::before { display: block; margin-bottom: 4px; }
}

/* -------- 10. Фильтры -------- */
.es-filters { background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-1); padding: 18px; }
.es-filter { border-top: 1px solid var(--es-line); padding: 14px 0 4px; }
.es-filter:first-of-type { border-top: 0; }
.es-filter__title { font-weight: 700; font-size: 14.5px; margin: 0 0 10px; }
.es-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 14px; cursor: pointer; transition: color var(--es-t-fast); }
.es-check:hover { color: var(--es-accent-dk); }
.es-check input { accent-color: var(--es-accent); width: 17px; height: 17px; flex: 0 0 auto; }
.es-check__link { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 9px; width: 100%; }
.es-check__count { margin-left: auto; font-size: 12.5px; color: var(--es-muted); }
.es-range { display: flex; align-items: center; gap: 8px; }
.es-range .es-input { padding: 9px 10px; font-size: 14px; }

/* Колонка фильтров: на мобильном раскрывается кнопкой */
@media (max-width: 959px) {
  .es-filters-col.is-collapsed { display: none; }
}

/* -------- 11. Хлебные крошки, пагинация, FAQ -------- */
.es-crumbs { font-size: 13px; color: var(--es-muted); padding: 14px 0 4px; }
.es-crumbs a { color: var(--es-muted); }
.es-crumbs a:hover { color: var(--es-accent-dk); }
.es-crumbs span[aria-current] { color: var(--es-ink); }

.es-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.es-pager a, .es-pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--es-r-12);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--es-ink); font-weight: 700; font-size: 14px; box-shadow: var(--es-sh-1);
  transition: transform var(--es-t-fast), box-shadow var(--es-t), background var(--es-t), color var(--es-t);
}
.es-pager a:hover { transform: translateY(-1px); box-shadow: var(--es-sh-2); color: var(--es-accent-dk); }
.es-pager .is-active { background: var(--es-grad-cta); color: #fff; box-shadow: 0 6px 14px rgba(10,93,175,.26); }

.es-faq .uk-accordion-title {
  background: #fff; border-radius: var(--es-r-16); box-shadow: var(--es-sh-1);
  padding: 18px 54px 18px 20px; font-size: 16px; font-weight: 700; color: var(--es-ink);
  transition: box-shadow var(--es-t), color var(--es-t);
}
.es-faq .uk-accordion-title:hover { box-shadow: var(--es-sh-2); color: var(--es-accent-dk); }
.es-faq .uk-accordion-title::before { margin-right: 6px; }
.es-faq .uk-accordion-content { padding: 4px 20px 6px; color: var(--es-ink-2); font-size: 15px; }
.es-faq .uk-open > .uk-accordion-title { color: var(--es-accent-dk); }

/* -------- 12. CTA-полоса -------- */
.es-cta {
  background: var(--es-grad-cta); color: #fff; border-radius: var(--es-r-28);
  padding: 34px; box-shadow: 0 16px 40px rgba(10,93,175,.24);
}
.es-cta h2, .es-cta h3 { color: #fff; margin-top: 0; }
.es-cta a.es-btn--ghost { color: var(--es-accent-dk); }
@media (max-width: 639px) { .es-cta { padding: 24px 18px; } }

/* -------- 13. SEO-текст и футер -------- */
.es-seo { background: #fff; border-radius: var(--es-r-20); box-shadow: var(--es-sh-1); padding: 26px; color: var(--es-ink-2); font-size: 14.5px; line-height: 1.7; }
.es-seo h2, .es-seo h3 { font-size: 19px; margin: 0 0 10px; }
.es-seo p { margin: 0 0 12px; }

.es-footer { background: var(--es-dark); color: #AFC0D0; margin-top: 56px; padding: 46px 0 26px; }
.es-footer a { color: #AFC0D0; font-size: 14px; }
.es-footer a:hover { color: #fff; }
.es-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.es-footer ul { list-style: none; margin: 0; padding: 0; }
.es-footer li { margin-bottom: 9px; }
.es-footer__seo { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 24px; font-size: 13px; line-height: 1.7; color: #8FA3B6; }
.es-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding-top: 18px; font-size: 13px; color: #8FA3B6; }

/* -------- 14. Прочее -------- */
.es-badge { display: inline-block; background: var(--es-accent-lt); color: var(--es-accent-dk);
  border-radius: var(--es-r-8); padding: 4px 10px; font-size: 12px; font-weight: 700; }
.es-404__code { font-size: 120px; font-weight: 800; letter-spacing: -.05em; line-height: 1;
  background: var(--es-grad-bright); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 639px) { .es-404__code { font-size: 76px; } }

.es-specs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.es-specs td { padding: 11px 0; border-bottom: 1px solid var(--es-line); }
.es-specs td:first-child { color: var(--es-muted); width: 46%; }
.es-specs td:last-child { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* Длинные слова (например «присоединительным») не должны рвать сетку на 320 px */
p, li, h1, h2, h3, h4,
.es-tile__name, .es-table__name, .es-check, .es-filter__title { overflow-wrap: break-word; }

/* --- сообщения формы (добавлено при переносе в MODX) --- */
.es-note { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.es-note--ok { background: #e8f5ec; color: #15602f; border: 1px solid #bfe3ca; }
.es-note--err { background: #fdecec; color: #8a1f1f; border: 1px solid #f4c4c4; }
.es-err { display: block; margin-top: 6px; font-size: 12.5px; color: #c0392b; }

/* --- FAQ (details/summary), 20.09.26 --- */
.es-faq { margin-top: 28px; }
.es-faq__item { border: 1px solid #e6e6e6; border-radius: 10px; padding: 0; margin-bottom: 10px; }
.es-faq__item summary { cursor: pointer; list-style: none; padding: 14px 40px 14px 16px; font-weight: 600; font-size: 15px; position: relative; }
.es-faq__item summary::-webkit-details-marker { display: none; }
.es-faq__item summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; color: #888; }
.es-faq__item[open] summary::after { content: '−'; }
.es-faq__a { padding: 0 16px 14px 16px; font-size: 14.5px; color: #444; }
.es-faq__a p { margin: 0; }

/* --- sticky mobile buy panel, 20.09.26 --- */
@media (max-width: 767px) {
  .es-sticky-buy { position: sticky; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #e6e6e6;
    padding: 10px 14px; z-index: 30; display: flex; gap: 10px; align-items: center; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .es-sticky-buy__price { font-weight: 700; font-size: 16px; white-space: nowrap; }
}
@media (min-width: 768px) {
  .es-sticky-buy { display: none; }
}

/* --- фасетный фильтр v2 (план из кэша, чипсы, "Показать все" без JS), 20.09.26 --- */

/* шапка блока фасетов: заголовок + "Найдено N" */
.es-filter--head .es-filter__found { font-size: 13.5px; color: var(--es-muted); margin: 2px 0 0; }

/* чипсы активных фильтров */
.es-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.es-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--es-accent-lt); color: var(--es-accent-dk);
  border-radius: var(--es-r-8); padding: 6px 10px; font-size: 12.5px; font-weight: 700;
  transition: background var(--es-t-fast), color var(--es-t-fast);
}
.es-chip:hover { background: #CFE5FB; color: var(--es-accent-dk); }
.es-chip--reset { background: transparent; border: 1px solid var(--es-line); color: var(--es-muted); }
.es-chip--reset:hover { border-color: var(--es-accent); color: var(--es-accent-dk); }

/* группа фасета: список значений + "Показать все" через details/summary (без JS) */
.es-facet-list { display: flex; flex-direction: column; }
.es-facet-more { margin-top: 2px; }
.es-facet-more > summary {
  cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; color: var(--es-accent);
  padding: 6px 0; user-select: none;
}
.es-facet-more > summary::-webkit-details-marker { display: none; }
.es-facet-more > summary:hover { color: var(--es-accent-dk); }
.es-facet-more[open] > summary::after { content: ''; }

/* значения с нулевым счётчиком — видны, но приглушены и некликабельны (без <a>) */
.es-check--zero { color: var(--es-muted); opacity: .55; cursor: default; }
.es-check--zero:hover { color: var(--es-muted); }
.es-check__box {
  width: 17px; height: 17px; border: 1.5px solid var(--es-line); border-radius: 4px; flex: 0 0 auto;
}
.es-check.is-active { color: var(--es-accent-dk); font-weight: 700; }

/* поиск по значениям внутри длинной группы (>15 значений) */
.es-filter__search { padding: 8px 10px; font-size: 13px; margin: 2px 0 8px; }

/* панель "Найдено N / сортировка" над таблицей товаров */
.es-sortbar { gap: 12px; flex-wrap: wrap; }
.es-sortbar__found { font-size: 14px; color: var(--es-muted); }
.es-sortbar__sort { margin-left: auto; }
.es-sort-select { width: auto; min-width: 200px; padding: 9px 34px 9px 12px; font-size: 13.5px; }
.es-sortbar__links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
/* select всегда в разметке (доступен и с JS, и без) — таблетки-ссылки нужны только когда JS
   реально нет, поэтому по умолчанию прячем их и полагаемся на <noscript>, который сам решает,
   показывать ли этот блок в DOM. */
noscript .es-sortbar__links { display: flex; }

@media (max-width: 959px) {
  .es-sortbar__sort { margin-left: 0; }
  .es-sort-select { width: 100%; }
}

/* sticky-колонка фильтров на десктопе (uk-sticky, тот же механизм, что у шапки — см. §4) */
.es-filters-col[uk-sticky] { z-index: 10; }
.es-filters-col.uk-active { padding-top: 4px; }

/* Быстрые ссылки на фасетные лендинги (esQuickLinks). Сетка по группам характеристик, чтобы
   20+ групп не растягивали страницу в один столбец на десктопе. */
.es-quicklinks{border-top:1px solid var(--es-line,#e6e9ef);padding-top:26px}
.es-quicklinks__title{font-size:20px;font-weight:700;margin:0 0 16px}
.es-quicklinks__groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px 24px}
.es-quicklinks__label{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;
  color:var(--es-muted,#7a8496);margin:0 0 8px}
.es-quicklinks__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.es-quicklinks__link{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;line-height:1.2;
  padding:5px 10px;border:1px solid var(--es-line,#e6e9ef);border-radius:999px;text-decoration:none;
  color:var(--es-text,#1b2430);background:#fff}
a.es-quicklinks__link:hover{border-color:var(--es-accent,#0b63d6);color:var(--es-accent,#0b63d6)}
.es-quicklinks__link.is-current{background:var(--es-accent,#0b63d6);border-color:var(--es-accent,#0b63d6);color:#fff}
.es-quicklinks__cnt{font-size:11.5px;color:var(--es-muted,#7a8496)}
.es-quicklinks__link.is-current .es-quicklinks__cnt{color:rgba(255,255,255,.75)}
.es-quicklinks__more{margin-top:8px}
.es-quicklinks__more>summary{cursor:pointer;font-size:13px;color:var(--es-accent,#0b63d6);list-style:none}
.es-quicklinks__more>summary::-webkit-details-marker{display:none}
.es-quicklinks__more[open]>summary{margin-bottom:8px}

/* -------- 12. Мега-меню каталога, sticky-обёртка, мобильный поиск (агент A, 23.09.26, п.1/7/8) -------- */

/* sticky на CSS, не на uk-sticky: работало не на всех шаблонах (см. es.header) */
.es-stickywrap { position: sticky; top: 0; z-index: 500; }
.es-stickywrap.is-stuck .es-header { padding: 6px 12px; box-shadow: var(--es-sh-2); border-radius: var(--es-r-20); }
.es-stickywrap.is-stuck .es-logo__img { height: 30px; }
.es-stickywrap.is-stuck .es-logo__sub { display: none; }
.es-stickywrap.is-stuck .es-header .es-btn { padding: 9px 16px; }

/* кнопка «Каталог» в капсуле меню */
.es-nav__cat { position: relative; }
.es-nav__cat-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: var(--es-r-20); border: 0; background: transparent; cursor: pointer;
  color: var(--es-ink); font-size: 14px; font-weight: 700; white-space: nowrap; font-family: var(--es-font);
  transition: background var(--es-t), color var(--es-t);
}
.es-nav__cat-btn:hover, .es-nav__cat-btn[aria-expanded="true"] { background: rgba(255,255,255,.75); }
.es-nav__cat-btn.is-active { background: #fff; box-shadow: var(--es-sh-1); color: var(--es-accent-dk); }

/* мега-меню — выпадающая панель (uk-drop) */
.es-megamenu {
  background: #fff; border-radius: var(--es-r-16); box-shadow: var(--es-sh-3);
  padding: 22px; width: min(920px, 92vw);
}
.es-megamenu__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 22px;
}
@media (max-width: 1279px) { .es-megamenu__grid { grid-template-columns: repeat(2, 1fr); } }
.es-megamenu__col { min-width: 0; }
.es-megamenu__head {
  display: block; font-weight: 800; font-size: 14.5px; color: var(--es-ink);
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--es-line);
}
.es-megamenu__head:hover { color: var(--es-accent-dk); }
.es-megamenu__list { list-style: none; margin: 0; padding: 0; }
.es-megamenu__list li { margin: 0; }
.es-megamenu__list a {
  display: block; padding: 5px 0; font-size: 13.5px; color: var(--es-ink-2);
  white-space: normal; line-height: 1.3;
}
.es-megamenu__list a:hover { color: var(--es-accent-dk); }
.es-megamenu__all { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--es-accent); }
.es-megamenu__foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--es-line); text-align: right; font-size: 13.5px; font-weight: 700; }

/* поиск для мобилы: иконка в шапке + выпадающая строка под шапкой */
.es-search-toggle {
  width: 42px; height: 42px; border-radius: var(--es-r-12); background: var(--es-bg); color: var(--es-ink);
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; flex: 0 0 auto;
}
.es-search-mobile { padding: 10px 0 2px; }
.es-search-mobile form { display: flex; gap: 8px; }
.es-search-mobile .es-input { flex: 1 1 auto; }
.es-search--offcanvas { display: flex; gap: 8px; margin: 4px 0 18px; }
.es-search--offcanvas .es-input { flex: 1 1 auto; }

/* офканвас: «Каталог» и его 6 раскрывающихся разделов на native <details> */
.es-offcanvas-cat > summary, .es-offcanvas-cat details > summary {
  cursor: pointer; list-style: none; color: #fff; font-weight: 700; padding: 10px 0;
}
.es-offcanvas-cat > summary::-webkit-details-marker,
.es-offcanvas-cat details > summary::-webkit-details-marker { display: none; }
.es-offcanvas-cat { border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: 6px; }
.es-offcanvas-cat details { padding-left: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.es-offcanvas-cat details > summary { font-weight: 600; font-size: 14px; color: rgba(255,255,255,.9); }
.es-offcanvas-cat ul.uk-nav a { color: rgba(255,255,255,.75); font-size: 13.5px; padding: 4px 0; }
.es-offcanvas-flat { margin-top: 6px; }

/* 23.09.26: фото товара в карточке и миниатюры в строках списка */
.es-pimg { margin: 16px 0 4px; max-width: 520px; border-radius: 12px; overflow: hidden; background: #1f2226; aspect-ratio: 4 / 3; }
.es-pimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.es-prow { display: flex; align-items: center; gap: 12px; }
.es-prow__img { flex: 0 0 100px; width: 100px; height: 75px; border-radius: 8px; overflow: hidden; background: #1f2226; }
.es-prow__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 639px) { .es-prow__img { flex-basis: 72px; width: 72px; height: 54px; } }

/* GAP 3 (24.09.26): поля «от/до» у числовых фасетов и плавающая кнопка «Показать N» */
.es-range { display: flex; gap: 6px; margin: 4px 0 8px; }
.es-range .es-input { flex: 1 1 0; min-width: 0; padding: 6px 8px; font-size: 13px; }
.es-range__ok { flex: 0 0 auto; padding: 0 10px; border: 1px solid var(--es-border, #e6e9ef); border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; }
.es-range__ok:hover { border-color: var(--es-accent, #0b5cad); }
.es-apply { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 1000; display: flex; gap: 6px; align-items: center; transition: transform .2s ease; max-width: calc(100vw - 32px); }
.es-apply.is-open { transform: translate(-50%, 0); }
.es-apply__btn { display: inline-block; padding: 12px 22px; border-radius: 8px; background: var(--es-accent, #0b5cad); color: #fff !important; font-weight: 600; text-decoration: none !important; box-shadow: 0 6px 20px rgba(0,0,0,.18); white-space: nowrap; }
.es-apply__reset { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); font-size: 20px; line-height: 1; cursor: pointer; }

/* GAP 3 (24.09.26): мастер подбора /podbor/ */
.es-podbor { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 16px; }
.es-podbor__card { display: flex; flex-direction: column; gap: 10px; }
.es-podbor__title { font-size: 20px; margin: 0 0 4px; }
.es-podbor__title .es-muted { font-size: 14px; font-weight: 400; }
.es-podbor__field { display: flex; flex-direction: column; gap: 4px; }
.es-podbor__label { font-size: 13.5px; font-weight: 600; }
.es-podbor .es-range { margin: 0; }
.es-podbor .es-select { width: 100%; max-width: 100%; }
