/* ============================================================
   tp-catalog/catalog.css — каталог ТСС на tehps.ru (v2.1.0, цвета ГК ТСС)
   Стиль: фирменный синий ГК ТСС #0a66b7 / slate
   ============================================================ */

/* ---------- общие заголовки каталога ---------- */
.tp-catalog-h2 {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 6px 0 18px 0 !important;
}

/* ---------- сетка категорий (плитки как на tss.ru: номер+имя сверху, фото, счётчик+стрелка) ---------- */
.tp-cat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 0 30px 0 !important;
}
@media (max-width: 1200px) { .tp-cat-grid { grid-template-columns: repeat(3, minmax(0,1fr)) !important; } }
@media (max-width: 780px)  { .tp-cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; } }
@media (max-width: 480px)  { .tp-cat-grid { grid-template-columns: 1fr !important; } }
.tp-cat-card {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px 16px 14px !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
  min-height: 210px !important;
}
.tp-cat-card:hover {
  transform: translateY(-3px) !important;
  border-color: #cfe3f7 !important;
  box-shadow: 0 10px 24px rgba(10, 102, 183, 0.13) !important;
}
.tp-cat-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 46px !important;
  margin-bottom: 8px !important;
}
.tp-cat-name {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.3 !important;
}
.tp-cat-card:hover .tp-cat-name { color: #005EE9 !important; }
.tp-cat-num {
  flex: 0 0 auto !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  color: #cbd5e1 !important;
  letter-spacing: .5px !important;
}
.tp-cat-card:hover .tp-cat-num { color: #005EE9 !important; }
.tp-cat-icon {
  font-size: 1.7rem !important;
  line-height: 1 !important;
  width: 46px !important;
  height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #e8f1fb !important;
  border-radius: 10px !important;
}
.tp-cat-foot {
  margin-top: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.tp-cat-count {
  font-size: .82rem !important;
  color: #64748b !important;
}

/* ---------- двухколоночная раскладка (фильтры + товары) ---------- */
.tp-catalog-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 24px !important;
}
@media (min-width: 993px) {
  .tp-catalog-grid { grid-template-columns: 272px minmax(0, 1fr) !important; align-items: start !important; }
  .tp-catalog-right { min-width: 0 !important; }
}
.tp-filter-panel { position: relative; }
@media (min-width: 993px) {
  .tp-filter-panel { position: sticky !important; top: 90px !important; }
}

/* ---------- панель фильтров ---------- */
.tp-filter-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 18px 16px 14px 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  font-size: .9rem !important;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.tp-filter-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
}
.tp-filter-title {
  font-weight: 800 !important;
  font-size: 1rem !important;
  color: #0f172a !important;
}
.tp-filter-toggle { display: none !important; }

.tp-f-group {
  border-top: 1px solid #f1f5f9 !important;
  padding: 12px 0 6px 0 !important;
  margin-top: 8px !important;
}
.tp-f-gtitle {
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: .88rem !important;
  margin-bottom: 8px !important;
}
.tp-f-nums {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}
.tp-f-nums input {
  width: 100% !important;
  height: 38px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 0 10px !important;
  font-size: .9rem !important;
  background: #f8fafc !important;
}
.tp-f-nums input:focus { border-color: #0a66b7 !important; outline: none !important; background: #fff !important; }
.tp-f-nums span { color: #94a3b8 !important; }

.tp-f-chips { display: flex !important; flex-direction: column !important; gap: 4px !important; }
.tp-f-item {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  cursor: pointer !important;
  padding: 4px 0 !important;
  user-select: none !important;
}
.tp-f-item input { position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; }
.tp-f-box {
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 5px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  transition: background .12s ease, border-color .12s ease !important;
  background: #fff !important;
}
.tp-f-item.is-checked .tp-f-box,
.tp-f-item input:checked + .tp-f-box {
  background: #0a66b7 !important;
  border-color: #0a66b7 !important;
}
.tp-f-item input:checked + .tp-f-box::after {
  content: "" !important;
  position: absolute !important;
  left: 5px !important;
  top: 2px !important;
  width: 5px !important;
  height: 9px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}
.tp-f-lbl { color: #334155 !important; line-height: 1.3 !important; }
.tp-f-item:hover .tp-f-lbl { color: #0f172a !important; }
.tp-f-count {
  margin-left: auto !important;
  font-size: .78rem !important;
  color: #94a3b8 !important;
  background: #f1f5f9 !important;
  border-radius: 10px !important;
  padding: 1px 8px !important;
}
.tp-f-item.is-checked .tp-f-count { background: #e8f1fb !important; color: #0a66b7 !important; }
.tp-f-more {
  background: none !important;
  border: none !important;
  color: #0a66b7 !important;
  font-weight: 600 !important;
  font-size: .85rem !important;
  padding: 4px 0 !important;
  cursor: pointer !important;
}
.tp-f-more:hover { text-decoration: underline !important; }
.tp-f-list.is-expanded .tp-f-more-item[style*="display:none"],
.tp-f-list.is-expanded .tp-f-more-item[style*="display: none"] { display: block !important; }

.tp-f-actions {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  border-top: 1px solid #f1f5f9 !important;
  padding-top: 14px !important;
  margin-top: 12px !important;
}
.tp-f-apply {
  flex: 1 !important;
  background: #0a66b7 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 9px !important;
  padding: 11px 16px !important;
  cursor: pointer !important;
  font-size: .92rem !important;
}
.tp-f-apply:hover { background: #085a9e !important; }
.tp-f-reset {
  color: #64748b !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  font-size: .88rem !important;
}
.tp-f-reset:hover { color: #0f172a !important; }

/* мобильный тоггл панели */
@media (max-width: 992px) {
  .tp-filter-panel { margin-bottom: 6px !important; }
  .tp-filter-toggle {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px !important;
  }
  .tp-filter-toggle span {
    width: 20px !important;
    height: 2px !important;
    background: #64748b !important;
    display: block !important;
  }
  .tp-filter-panel.is-collapsed .tp-f-group,
  .tp-filter-panel.is-collapsed .tp-f-actions { display: none !important; }
}

/* ---------- бейджи ---------- */
.tp-stock-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  margin: 0 0 6px 0 !important;
  white-space: nowrap !important;
}
.tp-stock-badge.ok {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0 !important;
}
.tp-stock-badge.order {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}
.tp-stock-badge.ok::before {
  content: "" !important;
  width: 7px !important; height: 7px !important;
  border-radius: 50% !important;
  background: #16a34a !important;
}
.tp-stock-badge.order::before {
  content: "" !important;
  width: 7px !important; height: 7px !important;
  border-radius: 50% !important;
  background: #d97706 !important;
}
.tp-kw-chip {
  display: inline-block !important;
  background: #e8f1fb !important;
  border: 1px solid #cfe3f7 !important;
  color: #0a66b7 !important;
  font-size: .8rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  margin: 0 0 6px 4px !important;
}
.tp-sku-chip {
  display: inline-block !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  margin: 0 0 6px 4px !important;
}

/* ---------- карточки товара в сетке архива ---------- */
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-bottom: 22px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
  overflow: hidden !important;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-3px) !important;
  border-color: #cfe3f7 !important;
  box-shadow: 0 10px 24px rgba(10, 102, 183, 0.10) !important;
}
.woocommerce ul.products li.product img {
  border-radius: 8px !important;
  object-fit: cover !important;
  height: 200px !important;
  width: 100% !important;
  margin-bottom: 10px !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: .95rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  padding: 0 0 6px 0 !important;
  min-height: 3.4em !important;
}
.woocommerce ul.products li.product .price {
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: #005EE9 !important;
  margin: 2px 0 8px 0 !important;
}
.woocommerce ul.products li.product .price .tp-price-request {
  font-size: .9rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
}
.woocommerce ul.products li.product .button {
  margin-top: auto !important;
  background: #f1f5f9 !important;
  color: #0a66b7 !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  text-align: center !important;
}
.woocommerce ul.products li.product .button:hover {
  background: #0a66b7 !important;
  color: #fff !important;
  border-color: #0a66b7 !important;
}
.woocommerce ul.products li.product .onsale { display: none !important; }
.woocommerce ul.products li.product .star-rating { display: none !important; }

/* ---------- single product ---------- */
.woocommerce div.product .tp-single-badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  margin: 4px 0 12px 0 !important;
}
.woocommerce div.product .tp-single-badges .tp-stock-badge,
.woocommerce div.product .tp-single-badges .tp-sku-chip,
.woocommerce div.product .tp-single-badges .tp-kw-chip { margin: 0 !important; }

.woocommerce div.product div.price {
  color: #0a66b7 !important;
  font-size: 1.7rem !important;
  font-weight: 800 !important;
  margin: 6px 0 14px 0 !important;
}
.woocommerce div.product div.price .tp-price-request {
  font-size: 1.05rem !important;
  color: #64748b !important;
  font-weight: 700 !important;
}

.tp-cta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 6px 0 10px 0 !important;
}
.tp-btn-buy,
.tp-btn-quick {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px 26px !important;
  border-radius: 9px !important;
  font-weight: 800 !important;
  font-size: .95rem !important;
  letter-spacing: .3px !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease !important;
}
.tp-btn-buy {
  background: #0a66b7 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(10, 102, 183, 0.28) !important;
}
.tp-btn-buy:hover { background: #085a9e !important; color: #fff !important; }
.tp-btn-quick {
  background: #ffffff !important;
  color: #0a66b7 !important;
  border: 2px solid #cfe3f7 !important;
}
.tp-btn-quick:hover { background: #e8f1fb !important; }

.tp-contact-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  align-items: center !important;
  margin: 4px 0 8px 0 !important;
}
.tp-mini-contact {
  font-weight: 700 !important;
  color: #0f172a !important;
  text-decoration: none !important;
  font-size: .95rem !important;
}
.tp-mini-contact:hover { color: #0a66b7 !important; }
.tp-mini-contact.tp-wa { color: #16a34a !important; }
.tp-ask-link {
  display: inline-block !important;
  font-weight: 600 !important;
  color: #0a66b7 !important;
  text-decoration: none !important;
  font-size: .9rem !important;
  margin-bottom: 8px !important;
}
.tp-ask-link:hover { text-decoration: underline !important; }

/* ---------- табы карточки (как у tss.ru) ---------- */
.tp-tabs {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  margin-top: 30px !important;
  overflow: hidden !important;
}
.tp-tabs-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 8px 8px 0 8px !important;
}
.tp-tab-btn {
  background: none !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 12px 18px !important;
  font-weight: 700 !important;
  font-size: .95rem !important;
  color: #64748b !important;
  cursor: pointer !important;
}
.tp-tab-btn:hover { color: #0f172a !important; }
.tp-tab-btn.is-active {
  color: #0a66b7 !important;
  border-bottom-color: #0a66b7 !important;
  background: #fff !important;
}
.tp-tab-pane { display: none !important; padding: 24px !important; }
.tp-tab-pane.is-active { display: block !important; }
.tp-tab-pane h2 {
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 16px 0 !important;
}

/* таблица характеристик в табе */
.tp-specs-table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
}
.tp-specs-table th,
.tp-specs-table td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: top !important;
  text-align: left !important;
}
.tp-specs-table th {
  width: 42% !important;
  font-weight: 600 !important;
  color: #64748b !important;
  font-size: .88rem !important;
}
.tp-specs-table td {
  color: #0f172a !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
}
.tp-specs-table tr:nth-child(even) th { background: #f8fafc !important; }
.tp-specs-table tr:nth-child(even) td { background: #f8fafc !important; }
.tp-specs-table td a,
.tp-cert-link a {
  color: #0a66b7 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}
.tp-cert-link { margin: 14px 0 0 0 !important; font-size: .9rem !important; }

/* гарантия */
.tp-garant-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 16px !important;
}
.tp-garant-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 18px !important;
  display: flex !important;
  gap: 14px !important;
}
.tp-garant-ico { font-size: 1.6rem !important; line-height: 1 !important; }
.tp-garant-card b { color: #0f172a !important; display: block !important; margin-bottom: 6px !important; }
.tp-garant-card p { color: #475569 !important; font-size: .88rem !important; line-height: 1.5 !important; margin: 0 !important; }

/* ---------- модальное окно быстрого заказа ---------- */
.tp-modal-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}
.tp-modal-wrap[hidden] { display: none !important; }
.tp-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.55) !important;
}
.tp-modal {
  position: relative !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  max-width: 460px !important;
  width: 100% !important;
  padding: 26px 24px !important;
  max-height: calc(100vh - 32px) !important;
  overflow-y: auto !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25) !important;
}
.tp-modal h3 {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 6px 0 !important;
}
.tp-modal-sub { color: #64748b !important; font-size: .88rem !important; margin: 0 0 16px 0 !important; }
.tp-modal-close {
  position: absolute !important;
  top: 12px !important;
  right: 14px !important;
  background: #f1f5f9 !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 1.1rem !important;
  color: #475569 !important;
  cursor: pointer !important;
  line-height: 1 !important;
}
.tp-modal-close:hover { background: #e2e8f0 !important; }
.tp-mfield { margin-bottom: 12px !important; }
.tp-mfield label {
  display: block !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  color: #334155 !important;
  margin-bottom: 5px !important;
}
.tp-mfield input,
.tp-mfield textarea {
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: .92rem !important;
  background: #f8fafc !important;
}
.tp-mfield input:focus,
.tp-mfield textarea:focus { border-color: #0a66b7 !important; outline: none !important; background: #fff !important; }
.tp-m-submit { width: 100% !important; margin-top: 4px !important; }
.tp-m-status { font-weight: 700 !important; text-align: center !important; margin-top: 10px !important; font-size: .9rem !important; }
.tp-m-privacy { font-size: .76rem !important; color: #94a3b8 !important; margin-top: 10px !important; text-align: center !important; }
.tp-m-privacy a { color: #64748b !important; }

/* ---------- убираем Woo-шум ---------- */
.woocommerce div.product .product_meta { display: none !important; }
.woocommerce div.product .woocommerce-product-details__short-description { display: none !important; }
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info { border-color: #0a66b7 !important; }

/* пагинация */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #0a66b7 !important;
  color: #fff !important;
  border-color: #0a66b7 !important;
}
.woocommerce nav.woocommerce-pagination ul li a:hover { background: #e8f1fb !important; }

/* результат фильтрации: счётчик найденного */
.tp-found-info { font-size: .9rem !important; color: #64748b !important; margin: 0 0 14px 0 !important; }

/* ---------- мобильная версия ---------- */
@media (max-width: 768px) {
  .tp-cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .tp-cat-card { padding: 14px 12px !important; }
  .tp-cat-icon { font-size: 1.3rem !important; width: 38px !important; height: 38px !important; }
  .tp-cat-name { font-size: .9rem !important; }
  .tp-cta-row { flex-direction: column !important; }
  .tp-btn-buy, .tp-btn-quick { width: 100% !important; }
  .woocommerce ul.products li.product img { height: 170px !important; }
  .woocommerce ul.products[class*=columns-] li.product {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }
  .tp-tab-pane { padding: 16px !important; }
  .tp-specs-table th, .tp-specs-table td { display: block !important; width: 100% !important; }
  .tp-specs-table tr { display: block !important; border-bottom: 1px solid #f1f5f9 !important; }
  .tp-specs-table tr:nth-child(even) { background: transparent !important; }
  .tp-modal { padding: 20px 16px !important; }
}

/* ============================================================
   v2.1.0 — новые блоки: крошки, фото-плитки, карточки ТСС,
   сравнение, поиск в шапке, PDF-каталоги, форма прайса
   ============================================================ */

/* ---------- хлебные крошки (TSS-стиль) ---------- */
.tp-breadcrumbs {
  font-size: .84rem !important;
  color: #64748b !important;
  margin: 0 0 16px 0 !important;
  line-height: 1.5 !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}
.tp-breadcrumbs a { color: #64748b !important; text-decoration: none !important; }
.tp-breadcrumbs a:hover { color: #0a66b7 !important; text-decoration: underline !important; }
.tp-bc-sep { margin: 0 7px !important; color: #cbd5e1 !important; }
.tp-bc-cur { color: #0f172a !important; font-weight: 600 !important; }

/* ---------- плитка с фото: имя+номер сверху, фото в центре, счётчик+стрелка снизу ---------- */
.tp-cat-card.has-photo { padding: 14px 16px 12px !important; overflow: hidden !important; }
.tp-cat-photo {
  display: block !important;
  width: 100% !important;
  height: 150px !important;
  overflow: hidden !important;
  background: #f1f5f9 !important;
  border-radius: 8px !important;
}
.tp-cat-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .25s ease !important;
}
.tp-cat-card.has-photo:hover .tp-cat-photo img { transform: scale(1.05) !important; }
.tp-cat-arrow {
  flex: 0 0 auto !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #005EE9 !important;
  background: #eaf1fd !important;
  transition: all .18s ease !important;
}
.tp-cat-arrow svg { display: block !important; }
.tp-cat-card:hover .tp-cat-arrow { background: #005EE9 !important; color: #fff !important; }
.tp-cat-card.has-photo:hover { border-color: #0a66b7 !important; }
.tp-cat-card:not(.has-photo) .tp-cat-photo { display: none !important; }

/* ---------- карточка товара в сетке: стиль ТСС ---------- */
.woocommerce ul.products li.product .tp-card-meta {
  font-size: .82rem !important;
  color: #475569 !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.45 !important;
}
.woocommerce ul.products li.product .tp-card-meta div { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
.woocommerce ul.products li.product .tp-card-meta span { color: #94a3b8 !important; }
.woocommerce ul.products li.product .tp-card-meta b { color: #0f172a !important; font-weight: 700 !important; }
.woocommerce ul.products li.product .price { font-size: 1.3rem !important; }

/* ---------- артикул в карточке (как у ТСС) ---------- */
.woocommerce ul.products li.product .tp-card-sku {
  font-size: .82rem !important;
  color: #334155 !important;
}
.woocommerce ul.products li.product .tp-card-sku b { color: #0f172a !important; font-weight: 700 !important; }

/* кнопка Сравнить на карточке */
.tp-compare-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  width: 100% !important;
  margin-top: 8px !important;
  padding: 9px 12px !important;
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: .85rem !important;
  cursor: pointer !important;
  transition: all .15s ease !important;
}
.tp-compare-btn:hover { color: #0a66b7 !important; border-color: #cfe3f7 !important; background: #f8fbfe !important; }
.tp-compare-btn.is-added { background: #e8f1fb !important; color: #0a66b7 !important; border-color: #0a66b7 !important; font-weight: 700 !important; }
.tp-compare-btn.is-shake { animation: tp-shake .35s ease !important; }
@keyframes tp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* СРАВНИТЬ на карточке товара */
.tp-btn-compare {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 14px 20px !important;
  background: #ffffff !important;
  color: #0a66b7 !important;
  border: 2px solid #cfe3f7 !important;
  border-radius: 9px !important;
  font-weight: 800 !important;
  font-size: .95rem !important;
  letter-spacing: .3px !important;
  cursor: pointer !important;
  transition: all .15s ease !important;
}
.tp-btn-compare:hover { background: #e8f1fb !important; }
.tp-btn-compare.is-added { background: #0a66b7 !important; color: #fff !important; border-color: #0a66b7 !important; }

/* ---------- страница сравнения ---------- */
.tp-compare-note { font-size: .85rem !important; color: #64748b !important; margin: 0 0 16px 0 !important; }
.tp-compare-scroll { overflow-x: auto !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; background: #fff !important; }
.tp-compare-table {
  display: table !important;
  border-collapse: collapse !important;
  width: 100% !important;
  min-width: 640px !important;
  table-layout: fixed !important;
  font-size: .9rem !important;
}
.tp-compare-table thead th.tp-cmp-attr, .tp-compare-table tbody th { width: 180px !important; }
.tp-compare-table th, .tp-compare-table td { word-wrap: break-word !important; overflow-wrap: break-word !important; white-space: normal !important; }
.tp-compare-table thead th {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-right: 1px solid #f1f5f9 !important;
  padding: 16px 14px !important;
  vertical-align: top !important;
  text-align: left !important;
  min-width: 190px !important;
}
.tp-compare-table thead th.tp-cmp-attr { min-width: 150px !important; width: 22% !important; font-weight: 700 !important; color: #0f172a !important; }
.tp-compare-table tbody th {
  background: #f8fafc !important;
  font-weight: 600 !important;
  color: #64748b !important;
  font-size: .85rem !important;
  text-align: left !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
}
.tp-compare-table tbody td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #0f172a !important;
  vertical-align: top !important;
}
.tp-cmp-head { display: flex !important; flex-direction: column !important; gap: 8px !important; position: relative !important; }
.tp-cmp-img img { width: 150px !important; max-width: 150px !important; height: 110px !important; object-fit: contain !important; }
.tp-cmp-title { font-weight: 700 !important; color: #0f172a !important; text-decoration: none !important; font-size: .9rem !important; line-height: 1.35 !important; }
.tp-cmp-title:hover { color: #0a66b7 !important; }
.tp-cmp-remove {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 26px !important;
  height: 26px !important;
  background: #f1f5f9 !important;
  border-radius: 50% !important;
  color: #64748b !important;
  font-size: 1rem !important;
  line-height: 26px !important;
  text-align: center !important;
  text-decoration: none !important;
}
.tp-cmp-remove:hover { background: #fee2e2 !important; color: #dc2626 !important; }
.tp-cmp-price { color: #0a66b7 !important; font-weight: 800 !important; font-size: 1rem !important; }
.tp-cmp-dash { color: #cbd5e1 !important; }

.tp-compare-empty {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 48px 24px !important;
  text-align: center !important;
  max-width: 640px !important;
  margin: 24px auto !important;
}
.tp-compare-empty h2 { font-size: 1.3rem !important; font-weight: 800 !important; color: #0f172a !important; margin: 12px 0 8px 0 !important; }
.tp-compare-empty p { color: #64748b !important; margin: 0 0 20px 0 !important; }
.tp-compare-empty .tp-btn-buy { display: inline-flex !important; }
.tp-cpe-ico {
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto !important;
  background: #e8f1fb !important;
  border-radius: 50% !important;
  font-size: 1.8rem !important;
  color: #0a66b7 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ---------- PDF-каталоги ТСС ---------- */
.tp-pdf-strip { margin: 34px 0 10px 0 !important; }
.tp-pdf-head { text-align: center !important; max-width: 720px !important; margin: 0 auto 22px auto !important; }
.tp-pdf-head h2 { font-size: 1.45rem !important; font-weight: 800 !important; color: #0f172a !important; margin: 8px 0 !important; }
.tp-pdf-head p { color: #64748b !important; font-size: .95rem !important; margin: 0 !important; }
.tp-pdf-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 14px !important;
}
.tp-pdf-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 18px 16px !important;
  text-decoration: none !important;
  transition: all .18s ease !important;
}
.tp-pdf-card:hover { border-color: #0a66b7 !important; box-shadow: 0 8px 20px rgba(10, 102, 183, 0.12) !important; transform: translateY(-3px) !important; }
.tp-pdf-ico { color: #0a66b7 !important; line-height: 1 !important; }
.tp-pdf-name { font-weight: 700 !important; color: #0f172a !important; font-size: .92rem !important; line-height: 1.35 !important; }
.tp-pdf-link { color: #0a66b7 !important; font-weight: 600 !important; font-size: .84rem !important; margin-top: auto !important; }

/* ---------- форма прайса для менеджеров ---------- */
.tp-price-box { max-width: 620px !important; margin: 30px auto !important; }
.tp-price-box-in {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 34px 32px !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06) !important;
  text-align: center !important;
}
.tp-price-box-in h2 { font-size: 1.4rem !important; font-weight: 800 !important; color: #0f172a !important; margin: 14px 0 8px 0 !important; }
.tp-price-box-in p { color: #64748b !important; font-size: .94rem !important; line-height: 1.55 !important; margin: 0 0 20px 0 !important; }
.tp-price-form { display: flex !important; flex-direction: column !important; gap: 12px !important; max-width: 340px !important; margin: 0 auto !important; text-align: left !important; }
.tp-price-form label { font-size: .85rem !important; font-weight: 700 !important; color: #334155 !important; }
.tp-price-form input[type="password"] {
  border: 1px solid #e2e8f0 !important;
  border-radius: 9px !important;
  padding: 12px 14px !important;
  font-size: 1rem !important;
  background: #f8fafc !important;
  width: 100% !important;
}
.tp-price-form input[type="password"]:focus { border-color: #0a66b7 !important; outline: none !important; background: #fff !important; }
.tp-price-form .tp-btn-buy { width: 100% !important; }
.tp-price-err { background: #fef2f2 !important; color: #dc2626 !important; border: 1px solid #fecaca !important; border-radius: 9px !important; padding: 10px 14px !important; font-weight: 600 !important; font-size: .88rem !important; margin: 0 0 12px 0 !important; }
.tp-price-hint { font-size: .8rem !important; color: #94a3b8 !important; margin: 14px 0 0 0 !important; }

/* ---------- single product: раскладка и порядок ---------- */
.woocommerce-breadcrumb { width: 100% !important; }
@media (min-width: 993px) {
  .woocommerce div.product { position: relative !important; }
  .woocommerce div.product .images, .woocommerce div.product .woocommerce-product-gallery {
    position: relative !important;
    float: left !important;
    width: 48% !important;
  }
  .woocommerce div.product .summary, .woocommerce div.product .entry-summary {
    position: relative !important;
    float: right !important;
    width: 48% !important;
    top: 0 !important;
    margin-top: 0 !important;
  }
  .woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related.products, .woocommerce div.product .tp-tabs {
    clear: both !important;
    width: 100% !important;
  }
}

/* ---------- мобильная адаптация новых блоков ---------- */
@media (max-width: 768px) {
  .tp-header-search { width: 100% !important; }
  .tp-cat-photo { height: 110px !important; }
  .tp-compare-table thead th { min-width: 150px !important; }
  .tp-cb-inner { padding: 10px 14px !important; gap: 10px !important; }
  .tp-cb-go { padding: 9px 16px !important; }
  .tp-price-box-in { padding: 24px 18px !important; }
  .tp-pdf-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .tp-pdf-grid { grid-template-columns: 1fr !important; }
}

/* Astra сжимает контент архива-магазина до 50% — растягиваем на всю ширину */
body.post-type-archive-product #primary.content-area {
  width: 100% !important;
  max-width: 1160px !important;
  float: none !important;
  margin: 0 auto !important;
}
body.post-type-archive-product #secondary { display: none !important; }

/* дубль крошек на поиске (Astra + Rank Math) */
body.search .rank-math-breadcrumb { display: none !important; }

/* ============================================================
   Компактные карточки товаров «Популярные ДЭС» (2026-11-10, T3)
   ============================================================ */
.tp-pop-grid li.product { padding: 12px !important; margin-bottom: 14px !important; }
.tp-pop-grid li.product .astra-shop-thumbnail-wrap { margin-bottom: 6px !important; }
.tp-pop-grid li.product .astra-shop-thumbnail-wrap > a { display: block; position: relative; }
.tp-pop-grid li.product img { height: 150px !important; width: auto !important; max-width: 100% !important; object-fit: contain !important; margin: 0 auto !important; }
.tp-pop-grid li.product .tp-card-meta {
  position: static !important; display: flex !important; flex-wrap: wrap !important; gap: 4px 14px !important;
  padding: 6px 8px !important; margin: 0 !important; background: transparent !important; border: none !important;
  font-size: 12.5px !important; opacity: 1 !important; visibility: visible !important;
}
.tp-pop-grid li.product .tp-card-meta div { display: inline-block !important; white-space: nowrap !important; }
.tp-pop-grid li.product .woocommerce-loop-product__title {
  font-size: 14.5px !important; line-height: 1.32 !important; font-weight: 700 !important;
  min-height: 0 !important; margin: 4px 0 6px !important; display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important;
}
.tp-pop-grid li.product .price { font-size: 1.08rem !important; margin: 0 0 10px !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap { margin-bottom: 0 !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap .button,
.tp-pop-grid li.product a.button.product_type_simple {
  height: 40px !important; padding: 0 16px !important; font-size: 13.5px !important;
  display: inline-flex !important; align-items: center !important; width: auto !important;
}
.tp-pop-grid li.product .button.product_type_simple { background: #0a66b7 !important; color: #fff !important; border-radius: 8px !important; font-weight: 700 !important; }
.tp-pop-grid li.product .button.product_type_simple:hover { background: #085a9e !important; }
.tp-pop-grid li.product .tp-compare-btn { height: 40px !important; padding: 0 14px !important; font-size: 13.5px !important; width: auto !important; border-radius: 8px !important; }
/* действия в одну строку: Подробнее + Сравнить */
.tp-pop-grid li.product .tp-card-actions-row { display: flex !important; gap: 8px !important; align-items: stretch !important; }
.tp-pop-grid li.product .tp-stock-badge, .tp-pop-grid li.product .tp-kw-chip { font-size: 11.5px !important; padding: 3px 9px !important; }
/* мобильные: чуть ниже картинка */
@media (max-width: 768px) {
  .tp-pop-grid li.product img { height: 120px !important; }
}

/* выравнивание кнопок по низу карточки + в одну строку */
.tp-pop-grid li.product { display: flex !important; flex-direction: column !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap { flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; margin-bottom: 8px !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap .ast-woo-product-category { font-size: 12px !important; margin-bottom: 2px !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap .ast-loop-product__link { flex: 0 0 auto !important; }
.tp-pop-grid li.product .astra-shop-summary-wrap .price { margin-top: auto !important; padding-top: 8px !important; }
.tp-pop-grid li.product > .tp-compare-btn { margin: 0 !important; width: 100% !important; }
