/*
Theme Name: TeploPump WP Theme (hero slider)
Theme URI: https://www.teplopump.com.ua/
Author: TeploPump
Author URI: https://www.teplopump.com.ua/
Description: Лендінг TeploPump з калькулятором підбору та моделями. Додано hero-слайдер на головній.
Version: 1.4.14
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: teplopump
*/
:root{
  --tp-bg:#0a0f12;
  --tp-card:#12181d;
  --tp-txt:#e7ecef;
  --tp-mute:#9fb3c8;
  --tp-accent:#0ea5b7;
  --tp-accent-2:#037771;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#0a0f12;color:var(--tp-txt);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;line-height:1.45}
a{color:var(--tp-accent)}
.header{position:sticky;top:0;z-index:50;background:rgba(10,15,18,.7);backdrop-filter:saturate(140%) blur(8px);border-bottom:1px solid rgba(255,255,255,.06)}
.header-row{max-width:1180px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between}
.tp-wrap{max-width:1180px;margin:0 auto;padding:24px 16px}
.hero .grid-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:center}
.grid{display:grid;gap:16px}
.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:980px){.cols-4{grid-template-columns:repeat(2,1fr)}.hero .grid-hero{grid-template-columns:1fr}}
.card{background:var(--tp-card);border:1px solid rgba(255,255,255,.06);border-radius:14px;padding:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:10px;border:1px solid rgba(255,255,255,.12);text-decoration:none;color:var(--tp-txt);transition:.2s}
.btn:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.25)}
.btn-primary{background:linear-gradient(135deg,var(--tp-accent-2),var(--tp-accent));border:none;color:#001217;font-weight:700}
.btn-ghost{background:transparent}
.badge{background:rgba(255,255,255,.06);border:1px dashed rgba(255,255,255,.12);padding:6px 10px;border-radius:999px;font-size:12px;color:var(--tp-mute)}
.muted{color:var(--tp-mute)}
.brand-card{display:block}
.brand-card .head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.brand-card-logo{width:64px;height:28px;object-fit:contain;filter:grayscale(.1) brightness(1.2)}
.frame{background:#0e151a;border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:8px}
label{font-size:14px;color:var(--tp-mute)}
input,select,textarea{width:100%;padding:10px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#0b1115;color:var(--tp-txt)}
.toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.models .card{padding:12px}
#models-grid{min-height:60px}
.brands-collapsible{position:relative;max-height:420px;overflow:hidden}
.models-collapsible{position:relative}
.brands-fade{position:absolute;left:0;right:0;bottom:0;height:80px;background:linear-gradient(180deg,rgba(10,15,18,0),rgba(10,15,18,1))}
.models-fade{display:none}

/* Safety fallback (shows simplified list if models.js fails) */
.models-fallback{display:none}
.show-fallback #models .toolbar,
.show-fallback #models .models-collapsible,
.show-fallback #models #models-toggle{display:none !important}
.show-fallback #models .models-fallback{display:block !important}
.theme-toggle{background:transparent;border:1px solid rgba(255,255,255,.12);padding:8px 10px;border-radius:10px;color:var(--tp-txt)}
.pulse{width:8px;height:8px;border-radius:999px;background:#fff;display:inline-block;margin-right:8px;animation:pulse 1.5s infinite}
@keyframes pulse{0%{opacity:1}50%{opacity:.2}100%{opacity:1}}
.gallery img{width:100%;height:auto;border-radius:12px;border:1px solid rgba(255,255,255,.06)}
.footer .card a{display:inline-block}

/* Hero slider */
.tp-slider{position:relative;border-radius:18px;overflow:hidden}
.tp-slider__slides{position:relative;aspect-ratio:3/2;background:#0b1416}
.tp-slider__slide{position:absolute;inset:0;opacity:0;transition:opacity .55s ease;display:block}
.tp-slider__slide img{width:100%;height:100%;object-fit:cover;display:block}
.tp-slider__slide.is-active{opacity:1}
.tp-slider__btn{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.35);color:#fff;font-size:26px;line-height:1;cursor:pointer;display:grid;place-items:center;backdrop-filter:blur(6px)}
.tp-slider__btn.prev{left:12px}
.tp-slider__btn.next{right:12px}
.tp-slider__dots{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);display:flex;gap:8px}
.tp-slider__dot{width:10px;height:10px;border-radius:999px;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.12);cursor:pointer}
.tp-slider__dot.is-active{background:#fff}

/* Model card links */
a.card.model-card{display:block;color:inherit;text-decoration:none}
a.card.model-card:hover{transform:translateY(-1px)}


/* Catalog model cards — compact */
#models-grid.grid{gap:12px}
a.card.model-card{padding:12px}
.model-card .model-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.model-card .model-head-left{display:flex;align-items:center;gap:10px;min-width:0}
.model-card .model-thumb{width:48px;height:48px;flex:0 0 48px;object-fit:contain;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);padding:5px}
.model-card .model-title{display:-webkit-box;min-width:0;line-height:1.22;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}

.pill{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);padding:5px 9px;border-radius:999px;font-size:11.5px;color:var(--tp-mute);white-space:nowrap}
.pill-price{color:var(--tp-txt);border-color:rgba(255,255,255,.14)}

.model-card .model-meta{margin-top:6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px 10px;font-size:12px;color:var(--tp-mute)}
.model-card .model-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.model-card .model-meta b{color:var(--tp-txt);font-weight:600}

.model-card .model-specs{margin-top:6px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px 10px;font-size:11.6px;color:var(--tp-mute)}
.model-card .model-specs span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.model-card .model-specs b{color:var(--tp-txt);font-weight:600}

.model-card .model-desc{margin-top:8px;font-size:12.5px;color:var(--tp-mute);line-height:1.38;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

@media (max-width:760px){
  .model-card .model-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .model-card .model-specs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .model-card .model-desc{-webkit-line-clamp:4}
}
@media (max-width:420px){
  a.card.model-card{padding:10px}
  .model-card .model-thumb{width:44px;height:44px;flex-basis:44px;border-radius:10px}
}


/* Model description */
.model-desc{
  margin-top:12px;
  color: var(--tp-mute);
  line-height:1.45;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.model-details{
  margin-top:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:10px 12px;
  background: rgba(255,255,255,.03);
}
.model-details > summary{
  cursor:default;
  list-style:none;
  font-weight:700;
  font-size:18px;
  margin:0 0 8px;
}

.model-details > summary::-webkit-details-marker{display:none}
.model-details[open]{background: rgba(255,255,255,.04)}
.model-details .prose p{margin:0 0 10px;color:var(--tp-txt)}
.model-details .mini-grid{
  margin-top:12px;
  display:grid;
  gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.model-details .mini-card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px;
  background: rgba(0,0,0,.12);
}
@media (max-width:820px){
  .model-details .mini-grid{grid-template-columns:1fr}
}

/* Compact hero image */
.grid-hero .frame img{
  max-height:320px;
  object-fit:contain;
}
@media (max-width:820px){
  .grid-hero{grid-template-columns:1fr}
  .grid-hero .frame img{max-height:260px}
}


/* Catalog card snippet */
.model-snippet{margin-top:8px;color:var(--tp-mute);font-size:13px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.model-details .prose p:last-child{margin-bottom:0}



/* Guides & readability */
.small{font-size:13.5px;line-height:1.55}
@media (max-width:780px){.cols-2,.cols-3{grid-template-columns:1fr}}
@media (max-width:560px){.cols-4{grid-template-columns:1fr}}


/* Guides: visible FAQ */
.faq-item{
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.9);
}
.faq-item summary{cursor:pointer; list-style:none;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary:after{content:"+"; float:right; opacity:.6;}
.faq-item[open] summary:after{content:"–";}


/* === Robust models rendering (pre-rendered fallback) ===
   Default: show fallback cards (static HTML) so catalog is never empty.
   When models.js successfully renders interactive UI, it adds class "models-ok" to <html>.
*/
html:not(.models-ok) #models .toolbar,
html:not(.models-ok) #models .models-collapsible,
html:not(.models-ok) #models #models-toggle{
  display:none !important;
}
html:not(.models-ok) #models .models-fallback{
  display:block !important;
}
html.models-ok #models .models-fallback{
  display:none !important;
}


/* === Conversion: contacts + sticky CTA bar === */
.contact-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
}
@media (max-width:860px){
  .contact-grid{grid-template-columns:1fr}
}
.contact-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.pdf-h2{
  font-weight:800;
  font-size:16px;
  margin:0 0 10px 0;
  letter-spacing:.2px;
}
button.btn{
  cursor:pointer;
  background:transparent;
  font:inherit;
}
button.btn.btn-primary{
  color:#001217;
}

.tp-form-grid{
  display:grid;
  gap:10px 12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (max-width:620px){
  .tp-form-grid{grid-template-columns:1fr}
}
.tp-form-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.tp-lead-result{
  margin-top:10px;
}
.tp-fit{
  margin-top:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px;
  background:rgba(255,255,255,.03);
}
.tp-fit b{display:block;margin-bottom:6px}
.tp-fit ul{margin:0 0 0 18px}
.tp-fit li{margin:4px 0;color:var(--tp-mute)}

/* Sticky mobile CTA bar */
.tp-cta-bar{
  position:fixed;
  left:10px;
  right:10px;
  bottom:10px;
  z-index:9998;
  display:none;
  gap:10px;
  padding:10px;
  border-radius:16px;
  background:rgba(12,18,22,.92);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  backdrop-filter:blur(10px) saturate(140%);
}
.tp-cta-bar a{
  flex:1;
  min-width:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  text-decoration:none;
  color:var(--tp-txt);
  font-weight:700;
  font-size:13px;
  white-space:nowrap;
}
.tp-cta-bar a.tp-cta-primary{
  background:linear-gradient(135deg,var(--tp-accent-2),var(--tp-accent));
  border:none;
  color:#001217;
}
@media (max-width:860px){
  .tp-cta-bar{display:flex}
  body.has-cta{padding-bottom:86px}
}


/* Trust widgets */
.tp-trust{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
.tp-trust-item{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.03);
}
.tp-trust-title{
  font:700 13px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial;
}
.tp-trust-text{
  margin-top:4px;
  color:var(--tp-mute);
  font:500 12px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial;
}
@media (min-width: 860px){
  .tp-trust{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* === Why TeploPump + Object pages === */
.why-grid{gap:14px}
.why-card{position:relative;overflow:hidden}
.why-icon{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(14,165,183,.14);border:1px solid rgba(14,165,183,.22);margin-bottom:10px;
  font-size:20px;
}
.why-card b{display:block;margin-top:2px}
.why-card p{margin:8px 0 0 0}

/* Dark FAQ (details) */
.tp-faq .model-details{margin-top:0}
.tp-faq .model-details > summary{cursor:pointer;position:relative;padding-right:22px}
.tp-faq .model-details > summary:after{content:'+';position:absolute;right:0;top:0;opacity:.7}
.tp-faq .model-details[open] > summary:after{content:'–'}

/* Object index tiles */
.tp-tiles a.card{display:block;text-decoration:none;color:inherit}
.tp-tiles a.card:hover{transform:translateY(-1px)}
