/* ============================================================
   landing_products.css
   ЄДИНИЙ стиль для універсального шаблону public/landing_products.php.

   Походження:
   - секційні компоненти (hero, flow, compare, process, reading, faq,
     hub, brands-chips, callout) перенесені з
     solar-power-plant-product_style.css — тільки те, що реально
     рендериться шаблоном лендінгу;
   - карусель товарів перенесена з index_style.css (робоча
     transform-система стрічок головної: .strip-carousel / .strip-track /
     .product-card), стара .pcarousel/.pcard ВИДАЛЕНА.

   Самодостатній: залежить лише від токенів глобального styles.css
   (--accent, --accent-dark, --dark, --muted, --bg, --radius, --shadow,
    --shadow-hover, --max-width, --header-height). Нових кольорів не вводить.
   ============================================================ */

/* =========================
   BASE
========================= */
* { margin: 0; padding: 0; }

body { background: var(--bg); color: var(--dark); line-height: 1.7; }

section { width: 100%; padding: 50px 10px; }

.container { width: 100%; max-width: var(--max-width); margin: auto; }

h1, h2, h3 { color: var(--dark); line-height: 1.15; font-weight: 800; }
h1 { font-size: clamp(42px, 6vw, 72px); margin-bottom: 24px; }
h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 22px; }
h3 { font-size: 22px; margin-bottom: 14px; }
p  { color: var(--muted); margin-bottom: 16px; }

ul { list-style: none; padding-left: 0; }
li { margin-bottom: 10px; }

button {
  padding: 12px 24px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 600;
}
button:hover { opacity: .9; }

/* Якірний скрол з урахуванням фіксованого хедера (#products, #form) */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-height, 72px) + 16px); }

/* =========================
   DARK SECTION
========================= */
.section-dark { background: #0f172a; }
.section-dark > .container > .section-heading h2 { color: #fff; }
.section-dark > .container > .section-heading p  { color: rgba(255,255,255,.72); }
.section-dark .section-label { color: rgba(255,255,255,.55); }

/* =========================
   SECTION HEADER
========================= */
.section-heading { margin-bottom: 40px; }
.section-heading.center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

.section-label {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* =========================
   BREADCRUMBS
========================= */
.breadcrumbs { padding: 16px 10px 0; }
.breadcrumbs .container {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 14px; color: var(--muted);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs-current { color: var(--dark); font-weight: 600; }

/* =========================
   HERO
========================= */
.hero {
  overflow: hidden;
  position: relative;
  min-height: 60dvh;
  display: flex;
  align-items: center;
  text-align: center;
  color: #fff;
  isolation: isolate;
}
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p, .hero li, .hero span { color: #cbd5e1; }

.background-image-hero {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  z-index: 0;
}
.hero::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(rgba(15,23,42,.75), rgba(15,23,42,.75));
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }

.hero-label { display: inline-block; font-size: 14px; opacity: .85; margin-bottom: 12px; }
.hero-subtitle { max-width: 850px; margin: 20px auto; color: rgba(255,255,255,.85); }
.hero-list { list-style: none; max-width: 700px; margin: 20px auto; }
.hero-list li {
  background: rgba(255,255,255,.08);
  padding: 12px; border-radius: 10px; margin-bottom: 10px;
  backdrop-filter: blur(6px); text-align: left;
}
.hero-btn {
  padding: 20px 40px;
  font-size: clamp(18px, 2vw, 22px);
  border-radius: 10px; font-weight: 700; min-width: 260px;
  box-shadow: 0 15px 40px rgba(0,195,255,.3);
  transition: all .3s ease;
}
.hero-btn:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,195,255,.5); }

/* =========================================================
   КАРУСЕЛЬ ТОВАРІВ — перенесена робоча система стрічок з ГОЛОВНОЇ
   (index_style.css → .strip-carousel / .strip-track / .product-card).
   Плавний скрол: transition виставляє JS інлайн з !important,
   тому тут його свідомо НЕ задаємо (reduce-motion його не зламає).
   HTML: .pshowcase > .strip-carousel[data-strip] >
         .strip-btn.prev + .strip-viewport > .strip-track > .product-card
   ========================================================= */
.pshowcase .section-heading { margin-bottom: 28px; }

.strip-carousel { position: relative; }

.strip-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.strip-track {
  display: flex;
  gap: 14px;
  padding: 4px 4px 14px;
  will-change: transform;
}

.strip-card {
  flex: 0 0 clamp(190px, 21%, 240px);
  max-width: clamp(190px, 21%, 240px);
  box-sizing: border-box;
  user-select: none;
}
.strip-card img { pointer-events: none; }

/* --- стрілки --- */
.strip-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .15);
  transition: transform .2s, opacity .2s, background .2s;
}
.strip-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-50%) scale(1.06);
}
.strip-btn.prev { left: -10px; }
.strip-btn.next { right: -10px; }
.strip-btn:disabled {
  opacity: .35;
  cursor: default;
  transform: translateY(-50%);
  background: var(--accent);
}
/* Кнопку, приховану через JS (нема куди гортати), ховаємо надійно */
.strip-btn[hidden] { display: none !important; }

/* --- картка товару (як на головній) --- */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 18px;
  text-decoration: none;
  color: var(--dark);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.product-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}
.product-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-sku { font-size: 12px; color: var(--muted); }

.product-stock {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.product-stock.in  { color: #0a7d3c; background: rgba(16, 185, 129, .12); }
.product-stock.out { color: #92600a; background: rgba(245, 158, 11, .14); }

.product-price {
  margin-top: auto;
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
}
.product-price-usd {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

/* Картки лишаються білими і в .section-dark — тому вміст ЯВНО прибитий до
   тих самих кольорів, що й у світлій секції. Без цього правила темної
   секції перефарбовують текст усередині білої картки у світло-сірий,
   і одна й та сама картка виглядає по-різному в сусідніх каруселях
   (вони чергуються: $dark = !$dark у landing_products.php). */
.section-dark .product-card,
.section-dark .product-card span { color: var(--dark); }

.section-dark .product-name,
.section-dark .product-price { color: var(--dark); }

.section-dark .product-sku,
.section-dark .product-price-usd { color: var(--muted); }

.section-dark .product-stock.in  { color: #0a7d3c; background: rgba(16, 185, 129, .12); }
.section-dark .product-stock.out { color: #92600a; background: rgba(245, 158, 11, .14); }

.section-dark .callout-box p { margin-bottom: 0; max-width: 640px; color: #fff; }

/* Центрований лінк «Дивитись усі» під каруселлю */
.strip-more { text-align: center; margin-top: 28px; }

/* =========================
   CALLOUT
========================= */
.callout-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; background: rgba(0,195,255,.06); border-left: 4px solid var(--accent);
  border-radius: 14px; padding: 24px 28px;
}
.callout-box p { margin-bottom: 0; max-width: 640px; color: var(--dark); }


.callout-link {
  flex: 0 0 auto; display: inline-block; white-space: nowrap;
  background: var(--accent); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: 10px; text-decoration: none; transition: transform .2s;
}
.callout-link:hover { transform: translateY(-2px); }

/* =========================
   ЯК ПРАЦЮЄ — flow-інфографіка
========================= */
.flow {
  display: flex;
  flex-wrap: nowrap;
  counter-reset: flow;
  margin-top: 10px;
}
.flow-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 78px 12px 0;
}
.flow-step::before {
  counter-increment: flow;
  content: counter(flow);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(0,195,255,.35);
}
.flow-step::after {
  content: "";
  position: absolute;
  top: 27px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: rgba(0,195,255,.35);
  z-index: 1;
}
.flow-step:last-child::after { display: none; }

.flow-step h3 { font-size: 16px; margin-bottom: 6px; color: var(--dark); }
.flow-step p  { font-size: 13px; color: var(--muted); margin-bottom: 0; }

.section-dark .flow-step h3 { color: #fff; }
.section-dark .flow-step p  { color: rgba(255,255,255,.72); }

/* =========================
   ПОРІВНЯЛЬНА ТАБЛИЦЯ
========================= */
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(15,23,42,.08);
  font-size: 15px;
  color: var(--dark);
}
.compare-table thead th {
  background: #0f172a;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td:first-child,
.compare-table th:first-child {
  font-weight: 600;
  color: var(--dark);
  background: var(--bg);
}
.compare-table thead th:first-child { background: #0f172a; color: #fff; }

.cmp-yes { color: var(--accent-dark); font-weight: 700; }
.cmp-no  { color: #94a3b8; }

.compare-table tfoot td {
  padding: 16px 12px;
  background: #fff;
  border-bottom: none;
  border-top: 1px solid rgba(15,23,42,.08);
  vertical-align: top;
}
.compare-table tfoot td:first-child { background: var(--bg); }
.compare-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform .2s, background .2s;
}
a.compare-cta { background: var(--accent); color: #fff; }
a.compare-cta:hover { transform: translateY(-2px); }

/* =========================
   ЯК ОБРАТИ — process cards (темний текст навіть у .section-dark)
========================= */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.process-card { background: #fff; border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow); text-align: center; }
.process-card span { display: block; font-size: 30px; font-weight: 800; color: var(--accent); opacity: .5; margin-bottom: 10px; }
.process-card h3, .section-dark .process-card h3 { color: var(--dark); font-size: 17px; margin-bottom: 8px; }
.process-card p,  .section-dark .process-card p  { color: var(--muted); font-size: 14px; margin-bottom: 0; }

/* =========================
   БРЕНДИ — chips
========================= */
.brands-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.brand-chip {
  display: inline-block;
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.brand-chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

/* =========================
   ЧИТАЙТЕ ТАКОЖ — list (темна секція)
========================= */
.reading-list { border-top: 1px solid rgba(255,255,255,.12); }
.reading-list li { margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.reading-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 4px; text-decoration: none; color: inherit;
  transition: padding-left .2s, background-color .2s;
}
.reading-list a:hover { padding-left: 14px; background: rgba(255,255,255,.04); }
.reading-list-title { flex: 0 0 auto; min-width: 260px; font-weight: 700; color: #fff; }
.reading-list-desc  { flex: 1; color: #cbd5e1; font-size: 14px; }
.reading-list-arrow { flex: 0 0 auto; color: var(--accent); font-size: 20px; transition: transform .2s; }
.reading-list a:hover .reading-list-arrow { transform: translateX(4px); }

/* =========================
   FAQ — accordion (темна секція)
========================= */
.faq-list { border-top: 1px solid rgba(255,255,255,.12); }
.faq-item {
  background: none; padding: 0; border-radius: 0; margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,.12); cursor: pointer;
}
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; padding: 22px 4px;
  font-size: 17px; font-weight: 700; color: #fff; text-align: left;
  font-family: inherit; cursor: pointer; margin-bottom: 0;
}
.faq-question:hover { opacity: 1; }
.faq-icon { flex: 0 0 auto; font-size: 22px; font-weight: 400; color: var(--accent); transition: transform .25s; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 4px; transition: max-height .3s ease, padding .3s ease; }
.faq-item.active .faq-answer { max-height: 260px; padding-bottom: 22px; }
.faq-answer p { color: #cbd5e1; margin-bottom: 0; }

/* =========================
   ДИВІТЬСЯ ТАКОЖ — hub cards
========================= */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.hub-card {
  display: flex; align-items: flex-start; gap: 16px; padding: 28px 24px;
  border-radius: 16px; background: #fff; border: 1px solid rgba(15,23,42,.08);
  text-decoration: none; color: var(--dark); box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
}
.hub-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .35s ease; transform-origin: left;
}
.hub-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.hub-card:hover::before { transform: scaleX(1); }
.hub-card-body { flex: 1; }
.hub-card-body h3 { color: var(--dark); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.hub-card-body p  { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.hub-arrow { color: var(--accent); font-size: 20px; flex-shrink: 0; align-self: center; transition: transform .3s ease; }
.hub-card:hover .hub-arrow { transform: translateX(4px); }

/* =========================
   EXTRA HTML (адмінський блок)
========================= */
.lp-extra p { color: var(--dark); margin-bottom: 0; }
.lp-extra strong { color: var(--dark); }

/* =========================
   SEO-ТЕКСТ (landing_products.seo_content)
   Перенесено з index_style.css (.seo-text): читабельна типографіка
   другорядного тексту, а не «текст для роботів» дрібним сірим.
   Селектори по нащадках, бо HTML приходить із БД без класів.
========================= */
.lp-seo {
  padding: 50px 0;
  background: #fff;
  border-top: 1px solid #eef1f6;
}

.lp-seo-container { max-width: 900px; }

.lp-seo p,
.lp-seo li {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 14px;
}

.lp-seo ul { margin: 0 0 14px; padding-left: 20px; list-style: disc; }
.lp-seo li { margin-bottom: 8px; }

.lp-seo h2 {
  font-size: 26px;
  color: var(--dark);
  margin-bottom: 16px;
}

.lp-seo h3 {
  font-size: 19px;
  color: var(--dark);
  margin: 26px 0 10px;
}

.lp-seo a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lp-seo a:hover { text-decoration: none; }

/* =========================
   CONTACT FORM overrides
========================= */
.contact-form-section h1,
.contact-form-section h2,
.contact-form-section h3 { color: #fff; background: linear-gradient(135deg,#0f172a,#111827); }
.contact-form-title h2 { color: #fff; }
.section-dark.contact-form-section h2,
.section-dark.contact-form-section h1,
.section-dark.contact-form-section h3 { color: #fff !important; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .strip-card { flex-basis: clamp(180px, 26%, 230px); max-width: clamp(180px, 26%, 230px); }
}
@media (max-width: 992px) {
  section { padding: 40px 0; }
  .container { padding: 0 16px; }
}
@media (max-width: 980px) {
  .strip-card { flex-basis: clamp(170px, 42%, 220px); max-width: clamp(170px, 42%, 220px); }
  /* На тач-екранах прокрутка свайпом — стрілки ховаємо (як на головній) */
  .strip-btn { display: none; }
}
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  p  { font-size: 15px; }
  .hero-btn { min-width: auto; width: 100%; padding: 16px; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { padding: 20px 18px; }
  .callout-box { flex-direction: column; align-items: flex-start; }

  /* мобільний flow — вертикальний timeline */
  .flow { flex-direction: column; }
  .flow-step {
    text-align: left;
    padding: 4px 0 26px 72px;
    min-height: 54px;
  }
  .flow-step::before { left: 0; transform: none; }
  .flow-step::after {
    top: 54px;
    left: 27px;
    width: 3px;
    height: 100%;
  }
}
@media (max-width: 560px) {
  .strip-card { flex-basis: clamp(160px, 62%, 200px); max-width: clamp(160px, 62%, 200px); }
}
@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .hero-list li { font-size: 14px; }
}