*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #137bc2;
  --red: #da020d;
  --dark: #1c2127;
  --border: #e8e8e8;
  --gray: #f5f5f5;
  --font: 'Roboto', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--dark); background: #fff; font-size: 16px; line-height: 1.5; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
ul { list-style: none; }

.tt-container { max-width: 1480px; margin: 0 auto; padding: 0 40px; }

/* ── TOPBAR ── */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 46px;
  display: flex;
  align-items: center;
}
.topbar .tt-container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.topbar-nav { display: flex; gap: 32px; }
.topbar-nav a { font-size: 14px; color: var(--dark); transition: color .2s; }
.topbar-nav a:hover { color: var(--blue); }
.topbar-nav a.topbar-nav-active { color: var(--blue); font-weight: 500; }
.topbar-phones { display: flex; gap: 24px; }
.topbar-phones a { font-size: 14px; font-weight: 500; color: var(--dark); display: flex; align-items: center; gap: 6px; transition: color .2s; }
.topbar-phones a:hover { color: var(--blue); }

/* ── MAIN HEADER ── */
.site-header {
  background: #fff;
  height: 88px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.site-header .tt-container { display: flex; align-items: center; gap: 20px; width: 100%; }

.sh-logo img { height: 60px; width: auto; }
 div#filterActiveTags {                                                        
   display: flex;                                                               
   gap: 9px;                                                                    
  }  
.sh-catalog {
  display: flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 13px 20px; border-radius: 8px;
  font-size: 16px; font-weight: 500; white-space: nowrap;
  flex-shrink: 0; transition: background .2s;
}
.sh-catalog:hover { background: #0f6aad; }

.sh-search { flex: 1; position: relative; max-width: 680px; }
.sh-search input {
  width: 100%; height: 48px;
  border: 2px solid var(--border); border-radius: 8px;
  padding: 0 52px 0 16px; font-size: 15px; font-family: var(--font);
  color: var(--dark); outline: none; transition: border-color .2s;
}
.sh-search input::placeholder { color: #9ca3af; }
.sh-search input:focus { border-color: var(--blue); }
.sh-search button {
  position: absolute; right: 0; top: 0; height: 100%; width: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); border-radius: 0 8px 8px 0; color: #fff;
}

.sh-actions { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.sh-phones-mob { display: none; } /* скрыт на десктопе, показывается в @media */
.sh-action {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 10px; border-radius: 8px; font-size: 12px; color: var(--dark);
  transition: background .2s, color .2s; position: relative; min-width: 68px;
  background: none; border: none; cursor: pointer; font-family: var(--font);
}
.sh-action:hover { background: var(--gray); color: var(--blue); }
.sh-badge {
  position: absolute; top: 3px; right: 12px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600;
  width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.sh-badge.visible { display: flex; }
.cmp-badge { background: var(--blue); }

/* ── MOBILE TABBAR ── */
.mob-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px; background: #fff;
  border-top: 1px solid var(--border);
  z-index: 300; align-items: stretch;
}
.mob-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; color: var(--blue);
  background: none; border: none; cursor: pointer;
  font-family: var(--font); text-decoration: none;
  position: relative; transition: color .2s;
}
.mob-tab:hover, .mob-tab.mob-tab-catalog { color: var(--blue); }
.mob-tab-badge {
  position: absolute; top: 6px; left: calc(50% + 4px);
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 3px;
  display: none; align-items: center; justify-content: center;
}
.mob-tab-badge.visible { display: flex; }

/* ── АДАПТАЦИЯ МОБИЛЬНАЯ (по Figma) ── */
@media (max-width: 900px) {
  .topbar { display: none; }

  .site-header { height: auto; padding: 10px 0 0; }
  .site-header .tt-container {
    flex-wrap: wrap;
    padding: 0 12px 10px;
    gap: 10px;
    align-items: center;
  }

  /* Строка 1: [каталог] [лого + название] [телефоны столбиком] */
  .sh-catalog { order: 1; padding: 12px 14px; border-radius: 10px; flex-shrink: 0; }
  .sh-catalog span { display: none; }

  .sh-logo { order: 2; flex: 1; }
  .sh-logo img { height: 52px; }

  /* Телефоны показываем из topbar прямо в шапке */
  .sh-phones-mob {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
  }
  .sh-phones-mob a {
    background: #f0f2f5;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
  }
  .sh-phones-mob a:hover { color: var(--blue); }

  /* Строка 2: поиск */
  .sh-search { order: 4; flex: none; width: 100%; max-width: none; }
  .sh-search input { height: 46px; font-size: 15px; border-radius: 10px; border-width: 1.5px; }
  .sh-search button { border-radius: 0 10px 10px 0; }

  .sh-actions { display: none; }
  .mob-tabbar { display: flex; }
  body { padding-bottom: 64px; }
}

@media (max-width: 480px) {
  .site-header .tt-container { padding: 0 10px 10px; }
  .sh-phones-mob a { font-size: 12px; padding: 4px 10px; }
}

/* ── DESKTOP ZOOM ── */
:root { --desktop-zoom: 1; }
@media (min-width: 1441px) and (max-width: 1700px) { :root { --desktop-zoom: 0.9; } }
@media (min-width: 1281px) and (max-width: 1440px) { :root { --desktop-zoom: 0.85; } }
@media (min-width: 1025px) and (max-width: 1280px) { :root { --desktop-zoom: 0.75; } }
body { zoom: var(--desktop-zoom); }

/* ── Поиск dropdown ── */
.sh-search { position: relative; }
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid #e8e8e8; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1); z-index: 500; display: none;
}
.search-dropdown.active { display: block; }

/* ── Фикс высоты панелей при zoom ── */
.overlay { height: calc(100vh / var(--desktop-zoom, 1)); }
.cart-panel { height: calc(100vh / var(--desktop-zoom, 1)); }


/* ============ CATALOG PANEL ============ */
/* Кнопка каталога — иконка меняется на крестик */
.sh-catalog .icon-catalog { display: flex; }
.sh-catalog .icon-close   { display: none; }
.sh-catalog.cat-open .icon-catalog { display: none; }
.sh-catalog.cat-open .icon-close   { display: flex; }
.sh-catalog.cat-open { background: #0f6aad; }

/* Wrapper — занимает всю ширину шапки, абс. позиция снизу шапки */

/* Overlay — скрыт */
.cat-panel-overlay { display: none; }

/* Дропдаун под шапкой — fixed, позиция проставляется JS с учётом zoom */
.cat-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1480px;
  clip-path: inset(0 calc(100% - 280px) 0 0 round 14px);
  height: calc(100vh - 35px);
  z-index: 9999;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  overflow: hidden;
}
.cat-panel.active { display: flex; }
.cat-panel.active.has-subs { clip-path: none; }


/* Левая колонка */
.cat-panel-left {
  width: 280px;
  flex-shrink: 0;
  background: #f6f6f6;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;

}


.cat-panel-left::-webkit-scrollbar { width: 4px; }
.cat-panel-left::-webkit-scrollbar-track { background: transparent; }
.cat-panel-left::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.cat-panel-left::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.cat-panel-right::-webkit-scrollbar { width: 4px; }
.cat-panel-right::-webkit-scrollbar-track { background: transparent; }
.cat-panel-right::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.cat-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #1c2127;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
  transition: background .12s;
  text-decoration: none;
}
.cat-panel-item:hover,
.cat-panel-item.active { background: #fff; }
.cat-panel-item-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: #137bc3;
  display: flex; align-items: center; justify-content: center;
}
.cat-panel-item-icon svg { width: 22px; height: 22px; fill: #137bc3; }
.cat-panel-item-name { flex: 1; }
.cat-panel-item-arrow { flex-shrink: 0; color: #9ca3af; display: flex; align-items: center; }
.cat-panel-item-arrow svg { width: 7px; height: 12px; }

/* Правая колонка */
.cat-panel-right {
  flex: 1;
  overflow-y: auto;
  padding: 24px 40px 48px 40px;
  display: none;
}
.cat-panel-right.has-subs {
  display: block;
  background: #fff;

  border-radius: 0 14px 14px 0;
  border-left: none;
}
.cat-panel-right-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 60px;
  align-content: flex-start;
}
.cat-panel-group {
  width: 284px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cat-panel-group-title {
  font-family: 'Roboto', sans-serif;
  font-size: 16px; font-weight: 500; line-height: 22px;
  color: #1c2127;
}
.cat-panel-group-subs {
  display: flex; flex-direction: column; gap: 12px;
}
.cat-panel-sub-link {
  font-family: 'Roboto', sans-serif;
  font-size: 16px; font-weight: 400; line-height: 22px;
  color: #1c2127; text-decoration: none;
}
.cat-panel-sub-link:hover { color: #137bc3; }
.cat-panel-sub-link.all { color: #137bc3; margin-top: 2px; }
.cat-panel-sub-link.all:hover { text-decoration: underline; }

/* ---- MOBILE CATALOG SIDEBAR ---- */
.mob-cat-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 9997;
}
.mob-cat-overlay.active { display: block; }

.mob-cat-sidebar {
  position: fixed; top: 0; left: -100%; width: 85vw; max-width: 340px;
  height: 100vh; background: #fff; z-index: 9998;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
  transition: left .28s ease; overflow: hidden;
}
.mob-cat-sidebar.active { left: 0; }

.mob-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #e8e8e8; flex-shrink: 0;
}
.mob-cat-head-title { font-size: 16px; font-weight: 600; color: #1c2127; }
.mob-cat-close {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 22px; line-height: 1; padding: 2px 6px;
}

.mob-cat-screen {
  flex: 1; overflow-y: auto;
  position: absolute; inset: 57px 0 0 0;
  transition: transform .25s ease;
}
.mob-cat-screen-1 { transform: translateX(0); }
.mob-cat-screen-2 { transform: translateX(100%); }
.mob-cat-sidebar.show-subs .mob-cat-screen-1 { transform: translateX(-100%); }
.mob-cat-sidebar.show-subs .mob-cat-screen-2 { transform: translateX(0); }

.mob-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #f0f0f0;
  font-size: 15px; color: #1c2127; cursor: pointer;
  background: none; border-left: none; border-right: none; border-top: none;
  text-align: left; width: 100%;
}
.mob-cat-item:hover { background: #f6f6f6; }
.mob-cat-item-arrow { width: 7px; height: 12px; color: #9ca3af; flex-shrink: 0; }

.mob-cat-back {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; background: #137bc2; color: #fff;
  font-size: 15px; font-weight: 500; cursor: pointer;
  border: none; width: 100%; flex-shrink: 0;
  position: sticky; top: 0; z-index: 2;
}
.mob-cat-back svg { width: 18px; height: 18px; }

.mob-cat-sub-link {
  display: block; padding: 13px 18px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px; color: #1c2127; text-decoration: none;
}
.mob-cat-sub-link:hover { color: #137bc2; }
.mob-cat-sub-link.all { color: #137bc2; font-weight: 500; border-bottom: none; }

@media (max-width: 900px) {
  .cat-panel, .cat-panel-wrapper { display: none !important; }
}

/* Кнопка закрытия панели */
.cat-panel-close-btn {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: #9ca3af; padding: 6px;
  display: flex; align-items: center; gap: 6px;
  font-family: "Roboto", sans-serif; font-size: 14px;
  z-index: 2; transition: color .15s;
}
.cat-panel-close-btn:hover { color: #1c2127; }
.cat-panel-close-btn svg { width: 18px; height: 18px; }

/* ====== COMPARE TABLE ====== */
.cmp-head { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid #e8e8e8; flex-shrink: 0; }
.cmp-head-title { font-size: 18px; font-weight: 600; color: #1c2127; }
.cmp-body { flex: 1; overflow-y: auto; padding: 0; }
.cmp-loading, .cmp-empty { padding: 48px; text-align: center; color: #9ca3af; font-size: 15px; }

.cmp-toggle-wrap { padding: 14px 24px; border-bottom: 1px solid #f0f0f0; }
.cmp-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px;
  color: #555; cursor: pointer; user-select: none; }
.cmp-toggle input { accent-color: var(--blue, #137bc3); width: 16px; height: 16px; cursor: pointer; }

.cmp-tbl-wrap { overflow-x: auto; }
.cmp-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }

/* Шапка товаров */
.cmp-th-label { width: 160px; min-width: 120px; padding: 16px 12px;
  background: #f8f9fa; border-bottom: 2px solid #e8e8e8; font-size: 12px; }
.cmp-th-prod { padding: 16px 12px; text-align: center; background: #f8f9fa;
  border-bottom: 2px solid #e8e8e8; border-left: 1px solid #efefef; vertical-align: top; position: relative; }
.cmp-remove { position: absolute; top: 8px; right: 8px; background: none; border: none;
  cursor: pointer; font-size: 18px; color: #bbb; line-height: 1; padding: 2px 6px; }
.cmp-remove:hover { color: #da020d; }
.cmp-prod-img { width: 100px; height: 100px; object-fit: contain; display: block; margin: 0 auto 10px; }
.cmp-prod-name { font-size: 13px; line-height: 1.4; font-weight: 500; }
.cmp-prod-name a { color: #1c2127; text-decoration: none; }
.cmp-prod-name a:hover { color: var(--blue, #137bc3); }

/* Строки */
.cmp-row { border-bottom: 1px solid #f0f0f0; }
.cmp-row:hover { background: #fafafa; }
.cmp-row-same { background: #fafafa; }
.cmp-row-same .cmp-cell { color: #aaa; }
.cmp-row-price { background: #f0f7ff; }

.cmp-row-label { padding: 12px 12px; font-size: 13px; color: #555; font-weight: 500;
  width: 160px; vertical-align: middle; }
.cmp-unit { font-weight: 400; color: #9ca3af; }

.cmp-cell { padding: 12px 12px; font-size: 14px; text-align: center;
  border-left: 1px solid #f0f0f0; vertical-align: middle; transition: background .15s; }
.cmp-empty-cell { color: #ccc; }

/* Подсветки */
.cmp-best { background: #f0fdf4 !important; color: #15803d; font-weight: 600; }
.cmp-best::after { content: ' ✓'; font-size: 11px; opacity: .7; }
.cmp-diff { background: #fffbeb; color: #92400e; }

/* Цена в строке */
.cmp-price-val { display: block; font-size: 17px; font-weight: 700;
  color: #1c2127; margin-bottom: 8px; }
.cmp-row-price .cmp-best .cmp-price-val { color: #15803d; }
.cmp-add { display: block; width: 100%; padding: 7px 0; background: var(--blue, #137bc3);
  color: #fff; border: none; border-radius: 6px; font-size: 12px; cursor: pointer;
  transition: background .15s; }
.cmp-add:hover { background: #0f6aad; }

@media (max-width: 600px) {
  #cmpPanel { width: 100vw; }
  .cmp-th-label, .cmp-row-label { width: 90px; min-width: 90px; font-size: 11px; padding: 8px 6px; }
  .cmp-cell, .cmp-th-prod { padding: 8px 6px; font-size: 12px; }
  .cmp-prod-img { width: 64px; height: 64px; }
}

/* ===== INFO PAGES ===== */
.info-page { padding: 48px 0 80px; }
.info-page h1 { font-size: 32px; font-weight: 700; color: #1c2127; margin-bottom: 36px; }
.info-page h2 { font-size: 20px; font-weight: 600; color: #1c2127; margin: 36px 0 16px; }
.info-page h3 { font-size: 16px; font-weight: 600; color: #1c2127; margin: 24px 0 10px; }
.info-page p  { font-size: 15px; line-height: 1.7; color: #374151; margin-bottom: 14px; }
.info-page ul { margin: 0 0 16px 0; padding-left: 20px; }
.info-page ul li { font-size: 15px; line-height: 1.7; color: #374151; margin-bottom: 6px; }
.info-page ol { margin: 0 0 16px 0; padding-left: 20px; }
.info-page ol li { font-size: 15px; line-height: 1.7; color: #374151; margin-bottom: 6px; }
.info-page .info-cards { display: flex; gap: 20px; flex-wrap: wrap; margin: 24px 0 32px; }
.info-page .info-card {
  flex: 1; min-width: 200px;
  background: #f6f8fb; border-radius: 12px; padding: 22px 24px;
}
.info-page .info-card-title { font-size: 14px; color: #6b7280; margin-bottom: 8px; }
.info-page .info-card-value { font-size: 17px; font-weight: 600; color: #1c2127; }
.info-faq { margin: 0 0 12px; border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; }
.info-faq summary {
  padding: 16px 20px; font-size: 15px; font-weight: 500; color: #1c2127;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.info-faq summary::-webkit-details-marker { display: none; }
.info-faq summary::after { content: "+"; font-size: 20px; color: #9ca3af; flex-shrink: 0; }
.info-faq[open] summary::after { content: "−"; }
.info-faq[open] summary { background: #f6f8fb; }
.info-faq .faq-body { padding: 4px 20px 18px; font-size: 15px; line-height: 1.7; color: #374151; }
.info-faq .faq-body ul { margin: 8px 0 0; }

/* ===== ARTICLES ===== */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 24px; margin-top: 24px; }
.article-card { border: 1px solid #e8e8e8; border-radius: 14px; overflow: hidden; background: #fff; transition: box-shadow .15s; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.article-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.article-card-img { aspect-ratio: 16/9; overflow: hidden; background: #f6f6f6; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card-cat { font-size: 12px; font-weight: 500; color: #137bc2; text-transform: uppercase; letter-spacing: .04em; }
.article-card-title { font-size: 17px; font-weight: 600; color: #1c2127; line-height: 1.4; }
.article-card-excerpt { font-size: 14px; color: #6b7280; line-height: 1.6; flex: 1; }
.article-card-date { font-size: 13px; color: #9ca3af; margin-top: 4px; }
.article-detail { max-width: 760px; margin: 0 auto; padding: 40px 0 80px; }
.article-detail h1 { font-size: 30px; font-weight: 700; color: #1c2127; line-height: 1.3; margin-bottom: 16px; }
.article-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; font-size: 14px; color: #9ca3af; }
.article-meta-cat { color: #137bc2; font-weight: 500; }
.article-detail-img { border-radius: 14px; overflow: hidden; margin-bottom: 32px; }
.article-detail-img img { width: 100%; max-height: 420px; object-fit: cover; }
.article-body h2 { font-size: 20px; font-weight: 600; color: #1c2127; margin: 32px 0 12px; }
.article-body p { font-size: 16px; line-height: 1.75; color: #374151; margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 0 0 16px 0; padding-left: 20px; }
.article-body li { font-size: 16px; line-height: 1.75; color: #374151; margin-bottom: 6px; }
.article-body strong { color: #1c2127; }
.articles-back { display: inline-flex; align-items: center; gap: 8px; color: #137bc2; font-size: 14px; text-decoration: none; margin-bottom: 24px; }
.articles-back:hover { text-decoration: underline; }
.articles-related { margin-top: 56px; padding-top: 32px; border-top: 1px solid #e8e8e8; }
.articles-related-title { font-size: 18px; font-weight: 600; color: #1c2127; margin-bottom: 20px; }
@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; gap: 16px; }
  .article-detail h1 { font-size: 22px; }
}
