/* deye.shop — фирменный стиль Deye Technology (deyeinverter.com) */

:root {
  --blue: #015cbb;          /* основной корпоративный синий */
  --blue-dark: #023881;     /* тёмно-синий (футер, hero) */
  --blue-deep: #1659a8;
  --sky: #0096ff;           /* яркий акцент */
  --orange: #ff5c19;        /* CTA-акцент */
  --ink: #2f2f2f;           /* основной текст */
  --gray: #757575;
  --line: #ebebeb;
  --bg: #f6f6f6;
  --white: #fff;
  --green: #1eaa5c;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(2, 56, 129, .08);
  --shadow-hov: 0 10px 28px rgba(2, 56, 129, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--sky); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- верхняя полоса ---------- */
.topbar { background: var(--blue-dark); color: #cfe0f5; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: #fff; font-weight: 500; }
.topbar .tb-left { display: flex; gap: 18px; }
@media (max-width: 640px) { .topbar .tb-left span.tb-note { display: none; } }

/* ---------- шапка ---------- */
.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header .container { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: 34px; width: auto; }
.logo .logo-sub { font-size: 11px; color: var(--gray); border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.3; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav > a {
  color: var(--ink); font-weight: 500; font-size: 15px; padding: 10px 14px; border-radius: 6px;
}
.nav > a:hover, .nav > a.active { color: var(--blue); background: #eef4fb; }
.cart-btn {
  display: flex; align-items: center; gap: 8px; background: var(--blue); color: #fff !important;
  padding: 10px 18px; border-radius: 8px; font-weight: 500; font-size: 15px; flex-shrink: 0;
}
.cart-btn:hover { background: var(--blue-deep); }
.cart-btn .cart-count {
  background: var(--orange); border-radius: 20px; min-width: 22px; height: 22px; display: none;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700; padding: 0 6px;
}
.cart-btn .cart-count.on { display: flex; }
/* ---------- поиск в шапке ---------- */
.search-box { position: relative; width: 210px; flex-shrink: 1; }
.search-box input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font-size: 14px; font-family: inherit; transition: .12s;
}
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 92, 187, .12); }
.search-drop {
  display: none; position: absolute; top: 44px; right: 0; width: 360px; max-width: 92vw;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-hov);
  max-height: 420px; overflow-y: auto; z-index: 200;
}
.search-drop.on { display: block; }
.search-drop a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.search-drop a:last-child { border-bottom: none; }
.search-drop a:hover, .search-drop a.sel { background: #eef4fb; }
.search-drop img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.search-drop .sr-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.search-drop .sr-price { font-size: 13px; color: var(--blue-dark); font-weight: 700; white-space: nowrap; margin-left: auto; }
.search-drop .sr-empty { padding: 14px; color: var(--gray); font-size: 13.5px; }
@media (max-width: 980px) {
  .header .container { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .search-box { order: 5; width: 100%; }
  .search-drop { left: 0; right: auto; width: 100%; }
}

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.burger span { display: block; width: 24px; height: 2.5px; background: var(--blue-dark); margin: 5px 0; border-radius: 2px; }
@media (max-width: 980px) {
  .burger { display: block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 10px 20px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .logo .logo-sub { display: none; }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 62%, #0473d4 100%); color: #fff; overflow: hidden; }
.hero .container { display: flex; align-items: center; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
.hero-text { max-width: 620px; }
.hero-kicker { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #9cc6f5; font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: 42px; line-height: 1.15; font-weight: 700; margin-bottom: 18px; }
.hero p.lead { font-size: 18px; color: #d7e6f8; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-img { margin-left: auto; flex-shrink: 0; }
.hero-img img { max-height: 360px; width: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
@media (max-width: 900px) {
  .hero h1 { font-size: 30px; }
  .hero-img { display: none; }
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; border-radius: 8px; font-weight: 700; font-size: 15px;
  padding: 13px 26px; font-family: inherit; transition: .15s; text-align: center;
}
.btn-orange { background: var(--orange); color: #fff !important; }
.btn-orange:hover { background: #e64d0e; }
.btn-blue { background: var(--blue); color: #fff !important; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff !important; border: 1px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); }
.btn-line { background: #fff; color: var(--blue) !important; border: 1.5px solid var(--blue); }
.btn-line:hover { background: #eef4fb; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- секции ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.sec-title { font-size: 30px; font-weight: 700; color: var(--blue-dark); position: relative; padding-left: 16px; }
.sec-title::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: var(--orange); }
.sec-link { font-weight: 700; font-size: 15px; white-space: nowrap; }
@media (max-width: 640px) { .sec-title { font-size: 24px; } }

/* ---------- сетка категорий ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; transition: .18s; color: var(--ink);
}
.cat-card:hover { box-shadow: var(--shadow-hov); border-color: #bcd4ef; transform: translateY(-3px); color: var(--ink); }
.cat-card img { height: 110px; width: auto; margin: 0 auto 10px; object-fit: contain; }
.cat-card .cat-name { font-weight: 700; font-size: 16.5px; color: var(--blue-dark); }
.cat-card .cat-count { font-size: 13.5px; color: var(--gray); }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .cat-card { padding: 14px; } .cat-card img { height: 76px; } }

/* ---------- карточки товаров ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.prod-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; transition: .18s; position: relative;
}
.prod-card:hover { box-shadow: var(--shadow-hov); border-color: #bcd4ef; }
.prod-img { height: 168px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.prod-img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.prod-model { font-size: 12.5px; color: var(--gray); letter-spacing: .03em; margin-bottom: 4px; }
.prod-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; margin-bottom: 10px; min-height: 42px; }
.prod-title a { color: var(--ink); }
.prod-title a:hover { color: var(--blue); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 10px; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.stock.out::before { background: #f5a623; }
.stock { color: var(--green); }
.stock.out { color: #c97f0a; }
.prod-price { font-size: 21px; font-weight: 700; color: var(--blue-dark); margin-bottom: 12px; margin-top: auto; }
.prod-actions { display: flex; gap: 8px; }
.prod-actions .btn { flex: 1; }
@media (max-width: 1100px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .prod-grid { grid-template-columns: 1fr; }
  .prod-title { min-height: 0; }
}

/* ---------- преимущества ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat {
  background: #fff; border-radius: var(--radius); padding: 26px 22px; border-top: 4px solid var(--blue);
  box-shadow: var(--shadow);
}
.feat .feat-num { font-size: 30px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.feat h3 { font-size: 17px; margin-bottom: 8px; color: var(--blue-dark); }
.feat p { font-size: 14px; color: var(--gray); }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feat-grid { grid-template-columns: 1fr; } }

/* ---------- CTA-полоса ---------- */
.cta-band { background: linear-gradient(100deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 44px 0; }
.cta-band .container { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: 26px; }
.cta-band p { color: #cfe0f5; }
.cta-band form { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.cta-band input {
  border: none; border-radius: 8px; padding: 13px 16px; font-size: 15px; font-family: inherit; min-width: 190px;
}
@media (max-width: 800px) { .cta-band form { margin-left: 0; } }

/* ---------- хлебные крошки ---------- */
.crumbs { font-size: 13.5px; color: var(--gray); padding: 18px 0 0; }
.crumbs a { color: var(--gray); }
.crumbs a:hover { color: var(--blue); }
.crumbs span.sep { margin: 0 7px; color: #b7b7b7; }

/* ---------- страница категории ---------- */
.page-title { font-size: 32px; color: var(--blue-dark); font-weight: 700; margin: 10px 0 6px; }
.page-sub { color: var(--gray); margin-bottom: 24px; max-width: 760px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 30px; padding: 8px 18px;
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; color: var(--ink); transition: .12s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- карточка товара ---------- */
.product-layout { display: grid; grid-template-columns: minmax(320px, 520px) 1fr; gap: 46px; margin: 26px 0 10px; }
.product-photo {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 30px; min-height: 380px;
}
.product-photo img { max-height: 420px; object-fit: contain; }
.img-note { font-size: 12.5px; color: var(--gray); margin-top: 8px; text-align: center; }
/* ---------- блок «вопрос инженеру» на карточке ---------- */
.ask-block {
  max-width: 900px; margin: 10px auto 0; background: linear-gradient(100deg, #eef4fb 0%, #e3edfa 100%);
  border: 1px solid #cfe0f5; border-radius: var(--radius); padding: 26px 28px;
  display: grid; grid-template-columns: 1fr 340px; gap: 26px; align-items: center;
}
.ask-block h2 { font-size: 21px; color: var(--blue-dark); margin-bottom: 8px; }
.ask-block p { font-size: 14.5px; color: #45566d; }
.ask-form { display: flex; flex-direction: column; gap: 9px; }
.ask-form input {
  border: 1.5px solid #cfe0f5; border-radius: 8px; padding: 11px 14px; font-size: 14.5px;
  font-family: inherit; background: #fff;
}
.ask-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 92, 187, .12); }
.ask-form .msg-ok, .ask-form .msg-err { margin: 4px 0 0; padding: 10px 12px; font-size: 13.5px; }
@media (max-width: 780px) { .ask-block { grid-template-columns: 1fr; padding: 20px; } }

.specs-full { max-width: 900px; margin-left: auto; margin-right: auto; padding-bottom: 30px; }
.specs-full .spec-sec { color: var(--blue-dark); font-size: 17px; margin: 22px 0 6px; }
.specs-full .muted-note { font-size: 12.5px; color: var(--gray); margin-bottom: 8px; }
.product-info h1 { font-size: 27px; line-height: 1.25; color: var(--blue-dark); margin-bottom: 6px; }
.product-info .p-model { color: var(--gray); font-size: 14px; margin-bottom: 16px; }
.price-row { display: flex; align-items: center; gap: 18px; margin: 18px 0; flex-wrap: wrap; }
.price-big { font-size: 34px; font-weight: 700; color: var(--blue-dark); }
.price-note { font-size: 13px; color: var(--gray); }
.buy-row { display: flex; gap: 12px; margin: 20px 0 8px; flex-wrap: wrap; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 42px; border: none; background: #fff; font-size: 19px; cursor: pointer; color: var(--blue); }
.qty button:hover { background: #eef4fb; }
.qty input { width: 52px; border: none; text-align: center; font-size: 16px; font-family: inherit; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; }
.spec-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-table td:first-child { color: var(--gray); width: 46%; }
.spec-table tr:nth-child(odd) { background: #fafbfd; }
.p-desc { margin-top: 18px; color: #444; font-size: 15px; max-width: 760px; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; } .product-photo { min-height: 260px; } }

/* ---------- корзина ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.cart-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray); padding: 10px 12px; border-bottom: 2px solid var(--line); }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table .ct-img img { height: 64px; width: 64px; object-fit: contain; }
.cart-table .ct-name { font-weight: 700; font-size: 14.5px; }
.cart-table .ct-name .m { color: var(--gray); font-weight: 400; font-size: 12.5px; }
.cart-table .ct-price, .cart-table .ct-sum { white-space: nowrap; font-weight: 700; }
.ct-del { background: none; border: none; color: #c0392b; font-size: 20px; cursor: pointer; line-height: 1; }
.cart-summary { display: flex; justify-content: flex-end; align-items: baseline; gap: 16px; font-size: 18px; margin: 10px 0 26px; }
.cart-summary .total { font-size: 28px; font-weight: 700; color: var(--blue-dark); }
.cart-empty { text-align: center; padding: 60px 0; color: var(--gray); }
.cart-empty .big { font-size: 44px; margin-bottom: 10px; }
@media (max-width: 720px) {
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 72px 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cart-table td { border: none; padding: 2px 0; }
}

/* ---------- формы ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--blue-dark); }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px;
  font-size: 15px; font-family: inherit; transition: .12s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(1, 92, 187, .12); }
.form-note { font-size: 12.5px; color: var(--gray); margin-top: 10px; max-width: 720px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.msg-ok { background: #e8f7ef; border: 1px solid #b3e6c9; color: #157347; border-radius: 10px; padding: 18px 20px; margin: 16px 0; display: none; }
.msg-err { background: #fdecea; border: 1px solid #f5c6c0; color: #b02a1e; border-radius: 10px; padding: 18px 20px; margin: 16px 0; display: none; }

/* ---------- текстовые страницы ---------- */
.prose { max-width: 820px; }
.prose h2 { color: var(--blue-dark); font-size: 22px; margin: 28px 0 10px; }
.prose p, .prose li { color: #444; font-size: 15.5px; margin-bottom: 10px; }
.prose ul { padding-left: 22px; }

/* ---------- футер ---------- */
.footer { background: var(--blue-dark); color: #b9cfe9; margin-top: 70px; font-size: 14px; }
.footer .f-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 46px 0 34px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer a { color: #b9cfe9; display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer .f-logo img { height: 30px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer .f-bottom { border-top: 1px solid rgba(255, 255, 255, .14); padding: 16px 0 8px; font-size: 12.5px; color: #8aa6c9; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer .f-legal { padding: 0 0 16px; font-size: 11.5px; color: #6d88ab; line-height: 1.5; }
.footer .f-legal a { display: inline; color: #6d88ab; text-decoration: underline; }
.footer .f-legal a:hover { color: #b9cfe9; }
@media (max-width: 900px) { .footer .f-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer .f-main { grid-template-columns: 1fr; } }

/* ---------- утилиты ---------- */
.badge-cat { display: inline-block; background: #eef4fb; color: var(--blue); font-size: 12.5px; font-weight: 700; border-radius: 6px; padding: 3px 10px; margin-bottom: 10px; }
.hidden { display: none !important; }
