/* EcoElectro — базові стилі. Один файл, без зовнішніх залежностей. */

:root {
  --blue: #1479bd;
  --blue-dark: #0f5c92;
  --green: #6cbf3f;
  --green-dark: #55a02e;
  --ink: #16232e;
  --muted: #5b6b78;
  --line: #e2e9ee;
  --bg: #ffffff;
  --bg-soft: #f5f9fc;
  --radius: 10px;
  --wrap: 1120px;
  --shadow: 0 1px 3px rgba(22, 35, 46, .06), 0 8px 24px rgba(22, 35, 46, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  flex-wrap: wrap;
}

.logo img { width: 190px; }

.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }

.nav a {
  color: var(--ink);
  font-size: .97rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--blue); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--green); }

.header-phone {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.header-phone:hover { color: var(--blue); text-decoration: none; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }

/* Головна дія — «Замовити». М'яке «дихання» тінню, без стрибків. */
.btn-order {
  background: var(--green);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 15px 30px;
  box-shadow: 0 4px 16px rgba(108, 191, 63, .45);
  animation: order-glow 2.8s ease-in-out infinite;
}
.btn-order:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(108, 191, 63, .6);
  animation: none;
}
@keyframes order-glow {
  0%, 100% { box-shadow: 0 4px 16px rgba(108, 191, 63, .40); }
  50%      { box-shadow: 0 4px 24px rgba(108, 191, 63, .78); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-order { animation: none; }
}

.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Головний банер ---------- */

.hero {
  background: linear-gradient(135deg, #eef7fd 0%, #f2fbee 100%);
  border-bottom: 1px solid var(--line);
  padding: 68px 0 72px;
}
.hero h1 { max-width: 18ch; }
.hero .lead { font-size: 1.18rem; margin-bottom: 1.8em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.since {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* ---------- Секції ---------- */

.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 36px; }

/* ---------- Сітки й картки ---------- */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .96rem; }
.card .card-foot { margin-top: auto; padding-top: 16px; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.9; }

.price {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}

.specs { list-style: none; padding: 0; margin: 0 0 4px; }
.specs li {
  font-size: .93rem;
  color: var(--muted);
  padding: 7px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.specs li span:last-child { color: var(--ink); font-weight: 500; text-align: right; }

/* ---------- Переваги ---------- */

.features { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .96rem; margin: 0; }
.feature-mark {
  width: 34px; height: 3px; border-radius: 2px;
  background: var(--green); margin-bottom: 14px;
}

/* ---------- Калькулятор комплекту ---------- */

.section-calculator { background: #fff; }
.calculator {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  align-items: start;
}
.calc-form, .calc-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}
.calc-table { overflow-x: auto; }
.calc-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 1.55fr) minmax(90px, .75fr) minmax(70px, .55fr) minmax(130px, .85fr) 30px;
  align-items: center;
  min-width: 610px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.calc-row-head {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 2px solid var(--line);
}
.calc-row input, .calc-row select, .calc-hours input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #cbd8e1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
}
.calc-row input:focus, .calc-row select:focus, .calc-hours input:focus {
  outline: 2px solid rgba(20, 121, 189, .22);
  border-color: var(--blue);
}
.calc-remove {
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  color: var(--muted); background: var(--bg-soft);
  font-size: 1.25rem; line-height: 1;
  cursor: pointer;
}
.calc-remove:hover { color: #b3261e; background: #fff0ef; }
.calc-actions { padding: 18px 0 4px; }
.calc-actions .btn { padding: 9px 16px; font-size: .92rem; }
.calc-hours {
  display: flex; gap: 18px; align-items: center; justify-content: space-between;
  padding: 18px 0 8px; font-weight: 600;
}
.calc-hours input { max-width: 130px; }
.calc-hint, .calc-disclaimer { color: var(--muted); font-size: .88rem; }
.calc-hint { margin: 12px 0 0; }
.calc-disclaimer { margin: 18px 0 0; }
.calc-result { background: linear-gradient(135deg, #f2f9fd 0%, #f4fbed 100%); }
.calc-result h3 { margin-bottom: 18px; }
.calc-metrics { display: grid; gap: 10px; }
.calc-metrics > div {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid rgba(22, 35, 46, .12);
}
.calc-metrics span { color: var(--muted); font-size: .9rem; }
.calc-metrics strong { color: var(--blue-dark); white-space: nowrap; }
#calc-recommendations { margin-top: 22px; }
#calc-recommendations h4 { margin: 0 0 10px; font-size: 1rem; }
.calc-product {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid rgba(22, 35, 46, .12);
  color: var(--ink);
}
.calc-product:hover { text-decoration: none; color: var(--blue-dark); }
.calc-product strong, .calc-product small { display: block; }
.calc-product strong { font-size: .92rem; line-height: 1.35; }
.calc-product small { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.calc-product b { color: var(--blue-dark); white-space: nowrap; font-size: .9rem; }
.calc-product-out { opacity: .62; }
.calc-empty { font-size: .9rem; }
.calc-empty p { color: var(--muted); margin: 7px 0 0; }
.p-stock {
  color: var(--green-dark);
  font-size: .86rem;
  font-weight: 600;
  margin: -4px 0 14px;
}
.p-stock-out, .stock-out { color: #a34a42; }
.stock-out::before { background: #c85b50 !important; }

/* ---------- Заклик до дії ---------- */

.cta {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 44px;
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); max-width: 54ch; margin: 0 auto 1.4em; }
.cta .btn-green { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }

/* ---------- Хлібні крихти ---------- */

.crumbs { font-size: .9rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span { padding: 0 6px; }

/* ---------- Контакти ---------- */

.contact-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact-list a { font-size: 1.1rem; font-weight: 600; }

.req { font-size: .95rem; }
.req dt { font-weight: 600; color: var(--muted); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .03em; }
.req dd { margin: 0 0 14px; }

/* ---------- Підвал ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  padding: 48px 0 32px;
  font-size: .93rem;
  margin-top: 64px;
}
.site-footer a { color: rgba(255, 255, 255, .88); }
.site-footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase;
  letter-spacing: .05em; margin: 0 0 14px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-bottom {
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .88rem; color: rgba(255, 255, 255, .55);
}
.site-footer .logo-foot { filter: brightness(0) invert(1); width: 165px; opacity: .92; margin-bottom: 14px; }

/* ---------- Дрібне ---------- */

.note {
  background: #fffbe9;
  border: 1px solid #f0e2b0;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: .95rem;
  color: #6b5a20;
}

/* ---------- Картка товару в каталозі ---------- */

.p-card { padding: 0; overflow: hidden; }
.p-card .p-thumb {
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: block;
}
.p-card .p-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.p-card .p-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.p-card h3 { font-size: 1rem; line-height: 1.4; margin-bottom: 10px; }
.p-card h3 a { color: var(--ink); }
.p-card h3 a:hover { color: var(--blue); text-decoration: none; }
.p-card .p-sku { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.p-card .p-price {
  display: inline-block;
  align-self: flex-start;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--blue-dark);
  background: linear-gradient(180deg, #eff8fd 0%, #e4f2fb 100%);
  border: 1px solid #cbe4f6;
  border-radius: 8px;
  padding: 7px 15px;
  margin-bottom: 16px;
}
.p-card .p-price small { font-size: .95rem; font-weight: 600; color: var(--blue); }
.p-card .p-foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.p-card .p-foot .btn { padding: 11px 20px; font-size: .95rem; }
.p-card .p-foot .btn-order { padding: 12px 22px; }

/* ---------- Сторінка товару ---------- */

.product-top {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.gallery-main {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button {
  width: 74px; height: 74px; padding: 5px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer;
}
.gallery-thumbs button:hover { border-color: var(--blue); }
.gallery-thumbs button[aria-current="true"] { border-color: var(--green); border-width: 2px; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.buy-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  background: #fff;
}
.buy-box .p-sku { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }

.price-wrap {
  background: linear-gradient(135deg, #eff8fd 0%, #f1fbe9 100%);
  border: 1px solid #cbe4f6;
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  margin-bottom: 20px;
}
.buy-box .big-price {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--blue-dark);
  line-height: 1.1;
  margin-bottom: 8px;
}
.buy-box .big-price small { font-size: 1.15rem; font-weight: 600; color: var(--blue); }
.buy-box .stock {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .92rem; font-weight: 600; color: var(--green-dark);
}
.buy-box .stock::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}
.buy-box .btn { width: 100%; text-align: center; margin-bottom: 10px; }
.buy-box .bb-note { font-size: .88rem; color: var(--muted); margin: 14px 0 0; }

.prod-section { margin-top: 52px; }
.prod-section h2 { font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--line); }
.prod-section p { max-width: 74ch; }

.bullets { list-style: none; padding: 0; margin: 0; }
.bullets li { padding: 7px 0 7px 26px; position: relative; color: var(--ink); }
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}

.spec-table { width: 100%; border-collapse: collapse; max-width: 760px; }
.spec-table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 52%; padding-right: 20px; }
.spec-table td:last-child { font-weight: 500; }

@media (max-width: 860px) {
  .product-top { grid-template-columns: 1fr; gap: 28px; }
  .calculator { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header .wrap { min-height: 64px; padding-block: 10px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 16px; }
  .hero { padding: 44px 0 48px; }
  .section { padding: 46px 0; }
  .cta { padding: 32px 22px; }
  .buy-box { padding: 20px; }
  .buy-box .big-price { font-size: 1.8rem; }
  .calc-form, .calc-result { padding: 18px; }
  .calc-hours { align-items: flex-start; flex-direction: column; gap: 8px; }
  .calc-hours input { max-width: none; }
}
