:root {
  --thermocom-red: #c40000;
  --thermocom-red-dark: #970000;
  --thermocom-ink: #242424;
  --thermocom-muted: #686868;
  --thermocom-line: #dedede;
  --thermocom-soft: #f5f5f5;
}

.thermocom-catalog-tools {
  width: 100%; margin: 0 0 28px; padding: 24px; border: 1px solid var(--thermocom-line);
  border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.055); color: var(--thermocom-ink);
}
.thermocom-tools-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.thermocom-tools-heading h2, .thermocom-modal-head h2 { margin: 3px 0 6px; font-size: clamp(22px,2vw,30px); line-height: 1.18; color: var(--thermocom-ink); }
.thermocom-tools-heading p { max-width: 780px; margin: 0; color: var(--thermocom-muted); font-size: 15px; }
.thermocom-eyebrow { display: block; color: var(--thermocom-red); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.thermocom-filter-toggle { min-width: 120px; border: 1px solid var(--thermocom-red); border-radius: 8px; padding: 10px 14px; background: #fff; color: var(--thermocom-red); font-weight: 750; cursor: pointer; }
.thermocom-active-badge { display: inline-grid; min-width: 20px; height: 20px; place-items: center; margin-left: 5px; border-radius: 999px; background: var(--thermocom-red); color: #fff; font-size: 11px; }
.thermocom-filter-body { margin-top: 20px; }
.thermocom-search-row { display: grid; grid-template-columns: minmax(220px,1fr) auto; align-items: end; gap: 14px; margin-bottom: 16px; }
.thermocom-search-row label > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.thermocom-search { width: 100%; min-height: 44px; padding: 9px 13px; border: 1px solid #bcbcbc; border-radius: 8px; background: #fff; }
.thermocom-search:focus { border-color: var(--thermocom-red); outline: 3px solid rgba(196,0,0,.12); }
.thermocom-clear { min-height: 44px; padding: 9px 14px; border: 0; background: transparent; color: var(--thermocom-red); font-weight: 700; cursor: pointer; }
.thermocom-clear:disabled { opacity: .38; cursor: default; }
.thermocom-filter-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.thermocom-filter-group { position: relative; border: 1px solid var(--thermocom-line); border-radius: 8px; background: #fff; }
.thermocom-filter-group summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 12px; cursor: pointer; font-size: 14px; font-weight: 750; list-style: none; }
.thermocom-filter-group summary::-webkit-details-marker { display: none; }
.thermocom-filter-group summary:after { content: '+'; color: var(--thermocom-red); font-size: 20px; font-weight: 500; }
.thermocom-filter-group[open] summary:after { content: '−'; }
.thermocom-group-count:not(:empty) { min-width: 20px; height: 20px; margin-left: auto; border-radius: 999px; background: var(--thermocom-red); color: #fff; text-align: center; font-size: 11px; line-height: 20px; }
.thermocom-filter-options { position: absolute; z-index: 25; top: calc(100% + 5px); left: -1px; width: calc(100% + 2px); max-height: 270px; overflow: auto; padding: 8px; border: 1px solid var(--thermocom-line); border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.15); }
.thermocom-filter-options label { display: flex; align-items: flex-start; gap: 9px; padding: 8px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1.3; }
.thermocom-filter-options label:hover { background: var(--thermocom-soft); }
.thermocom-filter-options input { width: 17px; height: 17px; margin: 0; accent-color: var(--thermocom-red); flex: 0 0 auto; }
.thermocom-results-line { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--thermocom-line); color: var(--thermocom-muted); font-size: 13px; }
.thermocom-results-line strong { color: var(--thermocom-ink); }

.thermocom-filter-card { position: relative !important; }
.thermocom-filter-hidden { display: none !important; }
.thermocom-compare-check { position: absolute; z-index: 12; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 9px; border: 1px solid rgba(0,0,0,.13); border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 3px 10px rgba(0,0,0,.09); color: #333; font-size: 12px; font-weight: 750; cursor: pointer; backdrop-filter: blur(5px); }
.thermocom-compare-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--thermocom-red); }
.thermocom-filter-enabled .woocommerce-pagination { display: none !important; }

.thermocom-compare-bar { position: fixed; z-index: 99990; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; width: min(820px,calc(100% - 28px)); align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-radius: 12px; background: #242424; color: #fff; box-shadow: 0 12px 38px rgba(0,0,0,.3); }
.thermocom-compare-bar[hidden] { display: none; }
.thermocom-compare-bar > div:first-child { display: flex; flex-direction: column; }
.thermocom-compare-summary { color: #d5d5d5; font-size: 12px; }
.thermocom-compare-actions { display: flex; align-items: center; gap: 8px; }
.thermocom-compare-actions button, .thermocom-quote-selected { border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 750; cursor: pointer; text-decoration: none; }
.thermocom-compare-clear { background: transparent; color: #fff; }
.thermocom-compare-open, .thermocom-quote-selected { background: var(--thermocom-red); color: #fff !important; }
.thermocom-compare-open:disabled { opacity: .45; cursor: default; }
.thermocom-compare-bar.is-warning { background: #6f2500; }
.thermocom-has-comparison { padding-bottom: 92px; }

.thermocom-compare-modal { position: fixed; z-index: 100000; inset: 0; }
.thermocom-compare-modal[hidden] { display: none; }
.thermocom-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); }
.thermocom-modal-dialog { position: absolute; inset: 4vh 3vw; display: flex; flex-direction: column; max-width: 1180px; margin: auto; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.thermocom-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--thermocom-line); }
.thermocom-modal-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--thermocom-soft); color: #333; font-size: 28px; line-height: 1; cursor: pointer; }
.thermocom-compare-table-wrap { flex: 1; overflow: auto; }
.thermocom-compare-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.thermocom-compare-table th, .thermocom-compare-table td { padding: 13px 15px; border-right: 1px solid var(--thermocom-line); border-bottom: 1px solid var(--thermocom-line); text-align: left; vertical-align: top; font-size: 13px; }
.thermocom-compare-table thead th { position: sticky; z-index: 2; top: 0; background: #fff; }
.thermocom-compare-table th:first-child { width: 185px; background: #fafafa; font-weight: 800; }
.thermocom-compare-table thead th:not(:first-child) { text-align: center; }
.thermocom-compare-table img { display: block; width: 100px; height: 86px; margin: 0 auto 8px; object-fit: contain; }
.thermocom-compare-table a { display: block; color: var(--thermocom-red); font-weight: 800; text-decoration: none; }
.thermocom-compare-table small { display: block; margin-top: 4px; color: var(--thermocom-muted); font-weight: 400; line-height: 1.3; }
.thermocom-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 24px; border-top: 1px solid var(--thermocom-line); background: #fafafa; }
.thermocom-modal-footer p { margin: 0; color: var(--thermocom-muted); font-size: 13px; }
.thermocom-modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .thermocom-filter-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .thermocom-catalog-tools { padding: 18px; border-radius: 10px; }
  .thermocom-tools-heading { display: block; }
  .thermocom-filter-toggle { width: 100%; margin-top: 16px; }
  .thermocom-filter-body[hidden] { display: none; }
  .thermocom-search-row, .thermocom-filter-groups { grid-template-columns: 1fr; }
  .thermocom-clear { justify-self: start; padding-left: 0; }
  .thermocom-filter-options { position: static; width: auto; max-height: 230px; margin: 0 8px 8px; border: 0; border-top: 1px solid var(--thermocom-line); border-radius: 0; box-shadow: none; }
  .thermocom-results-line { display: block; }
  .thermocom-results-line span { display: block; margin-top: 4px; }
  .thermocom-compare-bar { bottom: 8px; padding: 11px 12px; }
  .thermocom-compare-actions { gap: 4px; }
  .thermocom-compare-actions button { padding: 9px 10px; font-size: 12px; }
  .thermocom-modal-dialog { inset: 2vh 8px; }
  .thermocom-modal-head { padding: 16px; }
  .thermocom-modal-footer { display: block; padding: 12px 16px; }
  .thermocom-quote-selected { display: block; margin-top: 10px; text-align: center; }
  .thermocom-compare-check span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
}

