/*
Theme Name: ТермопанелиКонструктор
Theme URI: https://slimsink.com
Author: SLIMSINK.COM
Author URI: https://slimsink.com
Description: Тема-конструктор фасадных термопанелей: встроенный 3D-визуализатор фасада (выбор этажности, фактуры и цвета панелей, окон и дверей), расчёт количества панелей и угловых элементов, смета, теплотехнический расчёт. Партнёрские контакты, цены и коллекции редактируются в «Настроить» и в меню темы. Плагины не требуются.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: termopaneli
Tags: custom-colors, custom-logo, custom-menu, featured-images, one-column, two-columns, responsive-layout, translation-ready
*/

/*
 * Стили темы — компактный набор.
 * Основной сложный интерфейс (конструктор) живёт в assets/app/termopaneli.html
 * и полностью изолирован в iframe, поэтому CSS темы его не затрагивает.
 */

:root {
  --tp-bg: #070b14;
  --tp-card: #0c1220;
  --tp-line: rgba(255, 255, 255, 0.10);
  --tp-text: #e8ecf4;
  --tp-muted: #93a0b4;
  --tp-accent: #f59e0b;
  --tp-accent-2: #f97316;
}

/* ——— базовая типографика ——— */
body {
  margin: 0;
  background: var(--tp-bg);
  color: var(--tp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.tp-noscroll { overflow: hidden; }

a { color: var(--tp-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.tp-section { padding: 64px 0; }
.tp-section--alt { background: #0a1120; }

/* ——— шапка ——— */
.tp-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--tp-line);
}
.tp-header__inner { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.tp-header__logo { display: flex; align-items: center; gap: 10px; color: var(--tp-text); }
.tp-header__logo img { max-height: 44px; width: auto; }
.tp-header__name { font-weight: 800; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
.tp-header__name span { color: var(--tp-accent); }
.tp-header__partner { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tp-muted); }
.tp-header__partner b { color: var(--tp-accent); font-weight: 700; }
.tp-header__nav { margin-left: auto; }
.tp-header__nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.tp-header__nav a { color: var(--tp-muted); font-size: 14px; }
.tp-header__nav a:hover, .tp-header__nav .current-menu-item > a { color: var(--tp-text); text-decoration: none; }
.tp-header__cta { white-space: nowrap; }

.tp-btn {
  display: inline-block; padding: 10px 20px; border-radius: 12px;
  background: linear-gradient(180deg, #fbbf24, #f97316);
  color: #0b1220 !important; font-weight: 700; font-size: 14px;
  border: 0; cursor: pointer; transition: transform 0.15s;
}
.tp-btn:hover { transform: translateY(-1px); text-decoration: none !important; }
.tp-btn--ghost { background: rgba(255, 255, 255, 0.06); color: var(--tp-text) !important; border: 1px solid var(--tp-line); }

.tp-phone { font-weight: 700; color: var(--tp-text) !important; white-space: nowrap; font-size: 15px; }

/* ——— hero ——— */
.tp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--tp-line); }
.tp-hero__bg { position: absolute; inset: 0; }
.tp-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.tp-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,20,0.96) 0%, rgba(7,11,20,0.75) 55%, rgba(7,11,20,0.35) 100%); }
.tp-hero__inner { position: relative; padding: 96px 0 84px; max-width: 660px; }
.tp-hero__badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.14); color: var(--tp-accent);
  font-size: 12px; font-weight: 600; border: 1px solid rgba(245, 158, 11, 0.3); margin-bottom: 18px;
}
.tp-hero p { color: #c3ccda; font-size: 1.05rem; max-width: 54ch; }
.tp-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.tp-hero__facts { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; }
.tp-hero__facts div strong { display: block; font-size: 1.5rem; color: var(--tp-accent); }

/* ——— конструктор ——— */
.tp-constructor { border-radius: 20px; overflow: hidden; border: 1px solid var(--tp-line); background: #000; }
.tp-constructor iframe { display: block; width: 100%; border: 0; }
.tp-constructor__bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 10px 14px; background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--tp-line); font-size: 13px; color: var(--tp-muted);
}
.tp-constructor__hint { margin-left: auto; font-size: 12px; }
@media (max-width: 600px) { .tp-constructor__hint { margin-left: 0; } }

/* ——— сетки и карточки ——— */
.tp-grid { display: grid; gap: 22px; }
.tp-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tp-grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.tp-card { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--tp-line); border-radius: 16px; overflow: hidden; }
.tp-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #131a2a; }
.tp-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.tp-card:hover .tp-card__img img { transform: scale(1.05); }
.tp-card__body { padding: 16px 18px 20px; }
.tp-card__meta { font-size: 12px; color: var(--tp-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.tp-card p { color: var(--tp-muted); font-size: 14.5px; margin: 0; }

/* ——— контент страницы / записи ——— */
.tp-content { background: #080d18; border: 1px solid var(--tp-line); border-radius: 18px; padding: 34px; }
.tp-content p, .tp-content li { color: #cbd4e1; }
.tp-content a { text-decoration: underline; }
.tp-content img { border-radius: 12px; }
blockquote { border-left: 3px solid var(--tp-accent); margin: 1.5em 0; padding: 0.4em 1.2em; color: var(--tp-muted); }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--tp-line); padding: 9px 12px; text-align: left; }
th { background: rgba(255, 255, 255, 0.05); }

/* ——— формы ——— */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.32); border: 1px solid var(--tp-line);
  color: var(--tp-text); font-size: 15px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(245, 158, 11, 0.6); }
::placeholder { color: #5c6879; }

/* ——— пагинация / комментарии ——— */
.tp-pagination, .tp-comments { margin-top: 40px; }
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-links a, .nav-links span {
  padding: 8px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--tp-line); color: var(--tp-muted); font-size: 14px;
}
.nav-links .current { color: var(--tp-accent); border-color: rgba(245, 158, 11, 0.4); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border: 1px solid var(--tp-line); border-radius: 14px; padding: 18px; margin-bottom: 14px; background: rgba(255, 255, 255, 0.02); }
.comment-reply-link { font-size: 13px; }
.children { list-style: none; padding-left: 20px; }

/* ——— виджеты / сайдбар ——— */
.tp-sidebar .widget { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--tp-line); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.tp-sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.tp-sidebar .widget li + li { border-top: 1px solid var(--tp-line); margin-top: 8px; padding-top: 8px; }
.tp-sidebar a { color: var(--tp-muted); }
.tp-sidebar a:hover { color: var(--tp-accent); }

/* ——— футер ——— */
.tp-footer { border-top: 1px solid var(--tp-line); background: #05080f; margin-top: 40px; }
.tp-footer__inner { display: grid; gap: 30px; padding: 52px 0 30px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tp-footer h4 { color: var(--tp-text); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.tp-footer a, .tp-footer li { color: var(--tp-muted); font-size: 14px; }
.tp-footer ul { list-style: none; padding: 0; margin: 0; }
.tp-footer li + li { margin-top: 8px; }
.tp-footer__bar { border-top: 1px solid var(--tp-line); padding: 18px 0; text-align: center; font-size: 12.5px; color: #5c6879; }
.tp-footer__bar b { color: var(--tp-accent); }

/* ——— утилиты ——— */
.tp-lead { color: var(--tp-muted); max-width: 68ch; }
.tp-center { text-align: center; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.alignleft { float: left; margin: 0 22px 14px 0; }
.alignright { float: right; margin: 0 0 14px 22px; }
.aligncenter { margin: 0 auto 14px; }
.sticky, .bypostauthor { display: block; }

@media (max-width: 782px) {
  .tp-section { padding: 44px 0; }
  .tp-header__inner { flex-wrap: wrap; }
  .tp-header__nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .tp-header__nav ul { gap: 16px; }
  .tp-hero__inner { padding: 60px 0 54px; }
  .tp-content { padding: 22px; }
}
