/* ============================================================
   ЭНЕРГОБАЛАНС — style.css
   Цвета из бренда: зелёный, синий, оранжевый, тёмно-синий
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --primary:      #0C7C3C;
  --primary-dark:  #095e2d;
  --primary-light: #0e9948;
  --secondary:    #0C4A78;
  --secondary-dark:#073A5E;
  --accent:       #F5A623;
  --accent-dark:  #d48a10;
  --dark:         #073A5E;
  --red:          #dc3545;
  --gray:         #6c757d;
  --gray-light:   #f2f4f7;
  --border:       #dde2e8;
  --text:         #1a1a1a;
  --text-light:   #555;
  --white:        #ffffff;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --radius:       10px;
  --radius-sm:    6px;
  --font:         'Montserrat', 'Segoe UI', Arial, sans-serif;
  --transition:   .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--gray-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── NOTICE BAR ── */
.notice-bar {
  background: var(--dark);
  color: rgba(255,255,255,.9);
  text-align: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
}
.notice-bar a { color: var(--accent); font-weight: 600; }
.notice-bar a:hover { color: #fff; }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-top {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -.3px;
}
.logo:hover { color: var(--primary); text-decoration: none; }
.logo img { height: 44px; width: auto; }
.logo-accent { color: var(--accent); }

/* Search */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.header-search input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 9px 40px 9px 16px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
  background: var(--gray-light);
}
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.header-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.header-search button:hover { background: var(--primary-dark); }
.header-search button svg { width: 16px; height: 16px; }

.header-contacts {
  text-align: right;
  line-height: 1.3;
}
.header-contacts a {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  display: block;
}
.header-contacts a:hover { color: var(--primary); text-decoration: none; }
.header-contacts small { color: var(--gray); font-size: 12px; display: block; }
.header-contacts .header-email { font-size: 13px; font-weight: 500; color: var(--text-light); }

.btn-callback {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: var(--font);
  letter-spacing: .2px;
}
.btn-callback:hover { background: var(--accent-dark); transform: translateY(-1px); }

.header-cart {
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: all var(--transition);
  font-family: var(--font);
}
.header-cart:hover { border-color: var(--primary); color: var(--primary); }
.header-cart svg { width: 20px; height: 20px; }

/* ── NAV ── */
.site-nav {
  background: var(--secondary);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.site-nav a {
  display: block;
  padding: 11px 18px;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
  letter-spacing: .2px;
}
.site-nav a:hover, .site-nav a.active {
  background: var(--secondary-dark);
  color: #fff;
  text-decoration: none;
}

/* Burger */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger-btn svg { width: 28px; height: 28px; stroke: var(--dark); }

/* ── LAYOUT ── */
.page-body {
  max-width: 1240px;
  margin: 24px auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.sidebar-title {
  background: var(--secondary);
  color: #fff;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .3px;
}

.cat-group {}
.cat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.cat-group-head:hover { background: var(--gray-light); color: var(--primary); }
.cat-group-head.active { color: var(--primary); }

.cat-arrow { transition: transform .2s; font-size: 10px; color: var(--gray); }
.cat-group.open .cat-arrow { transform: rotate(180deg); }

.cat-subs {
  display: none;
  background: #f8fafb;
  border-bottom: 1px solid var(--border);
}
.cat-group.open .cat-subs { display: block; }

.cat-subs a {
  display: block;
  padding: 8px 18px 8px 32px;
  font-size: 13px;
  color: var(--text-light);
  border-bottom: 1px solid #edf0f4;
  transition: all var(--transition);
}
.cat-subs a:hover, .cat-subs a.active {
  color: var(--primary);
  background: #edf7f1;
  text-decoration: none;
}

/* ── MAIN CONTENT ── */
.main-content { flex: 1; min-width: 0; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a { color: var(--secondary); }
.breadcrumb a:hover { color: var(--primary); }

/* ── PAGE TITLE ── */
.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--dark);
  letter-spacing: -.3px;
}

/* ── PRODUCT GRID ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  box-shadow: 0 6px 24px rgba(12,74,120,.12);
  transform: translateY(-3px);
  border-color: rgba(12,124,60,.2);
}

.product-card-img-wrap {
  position: relative;
  overflow: hidden;
}
.product-card-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--gray-light);
  transition: transform .3s;
}
.product-card:hover .product-card-img { transform: scale(1.03); }

.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}
.badge-hit {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }

.product-card-brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card-specs {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
}
.product-card-specs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-specs .spec-label { color: var(--gray); }

.product-card-price { margin-top: auto; }
.price-old {
  font-size: 12px;
  color: var(--gray);
  text-decoration: line-through;
}
.price-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
}
.price-discount {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.badge-stock { font-size: 11px; margin-top: 4px; font-weight: 500; }
.badge-stock.in-stock { color: var(--primary); }
.badge-stock.out-stock { color: var(--red); }

.btn-buy {
  display: block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--radius);
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: var(--font);
}
.btn-buy:hover { background: var(--primary-dark); }

/* ── CATEGORY BLOCKS ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.cat-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  transition: all .3s ease;
  text-decoration: none;
  background: var(--dark);
}
.cat-card:hover {
  box-shadow: 0 8px 32px rgba(7,58,94,.25);
  text-decoration: none;
  transform: translateY(-3px);
}
.cat-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .6;
  transition: opacity .3s, transform .4s;
}
.cat-card:hover .cat-card-bg { opacity: .4; transform: scale(1.05); }
.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,58,94,.85) 0%, rgba(7,58,94,.3) 60%, transparent 100%);
}
.cat-card-text {
  position: relative;
  z-index: 2;
  padding: 18px;
  width: 100%;
}
.cat-card-text h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; line-height: 1.3; }
.cat-card-text p { font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.4; }

/* ── SECTION HEADING ── */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.3px;
}
.section-heading a { font-size: 13px; color: var(--primary); }

/* ── PRODUCT PAGE ── */
.product-page {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.product-gallery { width: 380px; flex-shrink: 0; }
.product-main-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
}
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-thumb {
  width: 68px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}
.product-thumb:hover, .product-thumb.active { border-color: var(--primary); }

.product-info { flex: 1; min-width: 0; }

.product-info h1 { font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 6px; letter-spacing: -.3px; }
.product-meta { font-size: 13px; color: var(--gray); margin-bottom: 16px; }
.product-meta span { margin-right: 16px; }

.product-price-block { margin-bottom: 16px; }
.product-price-old { font-size: 16px; color: var(--gray); text-decoration: line-through; }
.product-price-main { font-size: 32px; font-weight: 800; color: var(--dark); }
.product-savings {
  display: inline-block;
  background: #e8f5e9;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.product-quick-specs {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quick-spec { display: flex; flex-direction: column; }
.quick-spec .qs-label { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.quick-spec .qs-val { font-size: 14px; font-weight: 700; color: var(--text); }

.product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--secondary);
  border: 2px solid var(--secondary);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-secondary:hover { background: var(--secondary); color: #fff; }

.product-stock { font-size: 13px; margin-bottom: 10px; font-weight: 600; }
.product-stock.yes { color: var(--primary); }
.product-stock.no { color: var(--red); }

.delivery-hint {
  background: #edf7f1;
  border: 1px solid rgba(12,124,60,.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--dark);
}
.delivery-hint a { color: var(--primary); font-weight: 600; }

/* CTA block on product page */
.product-cta {
  background: linear-gradient(135deg, var(--secondary), var(--dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}
.product-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.product-cta p { opacity: .9; margin-bottom: 14px; font-size: 14px; }
.product-cta .btn-callback { font-size: 15px; padding: 12px 28px; }

/* ── TABS ── */
.tabs { margin-top: 32px; }
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 11px 22px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: var(--font);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--dark); }

.tab-pane { display: none; padding: 20px 0; }
.tab-pane.active { display: block; }

.description-block p { margin-bottom: 12px; color: var(--text-light); line-height: 1.7; }
.description-block ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.description-block ul li { margin-bottom: 4px; color: var(--text-light); }

/* ── CHART ── */
.chart-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}
.chart-wrapper h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }

/* ── SPECS TABLE ── */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) td { background: var(--gray-light); }
.specs-table td {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.specs-table td:first-child { color: var(--gray); font-weight: 500; width: 40%; }
.specs-table td:last-child { font-weight: 600; }

/* ── SIMILAR PRODUCTS ── */
.similar-section { margin-top: 32px; }
.similar-section h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }

/* ── FILTERS ── */
.filters-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-light); }

/* Sub-category filters */
.sub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.sub-filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.sub-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.sub-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── DELIVERY PAGE ── */
.delivery-page {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
}
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 20px;
  margin: 20px 0;
}
.delivery-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  background: var(--white);
}
.delivery-card:hover { border-color: rgba(12,124,60,.2); box-shadow: var(--shadow); transform: translateY(-2px); }
.delivery-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--gray-light);
}
.delivery-card-body { padding: 18px; }
.delivery-card h3 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.delivery-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ── CHAT WIDGET v2 (live chat) ── */
#chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

#chat-fab {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(12,124,60,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  position: relative;
}
#chat-fab:hover { transform: scale(1.08); background: var(--primary-dark); }
.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Всплывающее приглашение */
#chat-invite {
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 320px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(7,58,94,.25);
  padding: 14px 16px 14px 14px;
  display: none;
  align-items: flex-start;
  gap: 10px;
  animation: inviteIn .3s ease;
  cursor: pointer;
}
@keyframes inviteIn {
  from { opacity: 0; transform: translateY(10px) scale(.95); }
  to { opacity: 1; transform: none; }
}
.chat-invite-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}
.chat-invite-bubble { flex: 1; font-size: 13px; line-height: 1.5; }
.chat-invite-bubble strong { display: block; color: var(--dark); margin-bottom: 2px; font-size: 13px; }
.chat-invite-bubble p { color: var(--text-light); font-size: 12.5px; }
.chat-invite-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.chat-invite-close:hover { color: var(--red); }

#chat-box {
  display: none;
  position: absolute;
  bottom: 78px;
  right: 0;
  width: 340px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(7,58,94,.25);
  overflow: hidden;
  animation: chatIn .25s ease;
  flex-direction: column;
  max-height: 560px;
}
@keyframes chatIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
#chat-box.open { display: flex; }

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}
.chat-header-info { flex: 1; line-height: 1.3; }
.chat-header-info strong { font-size: 14px; font-weight: 700; display: block; }
.chat-header-info small { font-size: 11px; opacity: .85; }
.chat-header-info small::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7ff9a9;
  margin-right: 5px;
  vertical-align: middle;
}
.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: .8;
}
.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafb;
  min-height: 220px;
  max-height: 340px;
}
.chat-msg {
  display: flex;
  margin-bottom: 8px;
}
.chat-msg-admin { justify-content: flex-start; }
.chat-msg-user { justify-content: flex-end; }
.chat-msg span {
  display: inline-block;
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg-admin span {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}
.chat-msg-user span {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 4px;
}

.chat-contact-prompt {
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.ccp-text { font-size: 12px; color: var(--text-light); margin-bottom: 10px; line-height: 1.5; }
.chat-contact-prompt input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 6px;
  font-family: var(--font);
}
.chat-contact-prompt input:focus { outline: none; border-color: var(--primary); }
.ccp-buttons { display: flex; gap: 6px; margin-top: 8px; }
.ccp-save {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.ccp-save:hover { background: var(--primary-dark); }
.ccp-skip {
  background: none;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.ccp-skip:hover { color: var(--text); border-color: var(--gray); }

.chat-form {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
#chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--font);
}
#chat-input:focus { outline: none; border-color: var(--primary); }
.chat-send-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.chat-send-btn:hover { background: var(--primary-dark); }

.chat-note-footer {
  padding: 6px 14px 10px;
  font-size: 10px;
  color: var(--gray);
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--border-light, var(--border));
}
.chat-note-footer a { color: var(--primary); }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  margin-top: 48px;
  padding: 36px 0 16px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 24px;
}
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; font-weight: 700; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 5px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 16px 20px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── HERO ── */
.hero-block {
  background: linear-gradient(135deg, var(--secondary), var(--dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-block::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245,166,35,.2), transparent);
  border-radius: 50%;
}
.hero-block h1 { font-size: 28px; font-weight: 800; margin-bottom: 10px; letter-spacing: -.5px; position: relative; z-index: 1; }
.hero-block p { opacity: .9; margin-bottom: 20px; font-size: 15px; line-height: 1.6; max-width: 600px; position: relative; z-index: 1; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-btns .btn-callback { font-size: 15px; padding: 12px 28px; }
.hero-btns .btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
  border: 1px solid rgba(255,255,255,.2);
  transition: all var(--transition);
}
.hero-btns .btn-ghost:hover { background: rgba(255,255,255,.2); text-decoration: none; }

/* Advantages grid */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.adv-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: all .3s ease;
  background: var(--secondary);
}
.adv-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(7,58,94,.2); }
.adv-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
  transition: opacity .3s, transform .4s;
}
.adv-card:hover .adv-bg { opacity: .35; transform: scale(1.05); }
.adv-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7,58,94,.9) 0%, rgba(7,58,94,.2) 70%, transparent 100%);
}
.adv-content {
  position: relative;
  z-index: 2;
  padding: 16px;
}
.adv-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.adv-desc { font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.4; }

/* SEO text block */
.seo-text {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}
.seo-text h2 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  text-align: center;
}
.cta-banner h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.cta-banner p { opacity: .9; margin-bottom: 16px; }

/* Brands bar */
.brands-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 24px;
}
.brand-item {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray);
  opacity: .6;
  transition: opacity var(--transition);
}
.brand-item:hover { opacity: 1; }

/* ── INFO BLOCK ── */
.info-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* ── UTILS ── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-gray { color: var(--gray); font-size: 13px; }

/* Mobile overlay for sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.sidebar-overlay.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .header-search { max-width: 280px; }
  .header-contacts { display: none; }
}

@media (max-width: 900px) {
  .burger-btn { display: flex; }

  .page-body { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    z-index: 200;
    border-radius: 0;
    overflow-y: auto;
    transition: left .3s ease;
  }
  .sidebar.mobile-open { left: 0; }

  .product-gallery { width: 100%; }
  .product-page { gap: 20px; }

  .header-top { gap: 10px; }
  .header-search { order: 10; flex: unset; width: 100%; max-width: 100%; }
  .header-cart { display: none; }
  .btn-callback.desktop-only { display: none; }

  .site-nav .nav-inner { overflow-x: auto; flex-wrap: nowrap; }
  .site-nav a { white-space: nowrap; flex-shrink: 0; }

  .hero-block { padding: 24px 20px; }
  .hero-block h1 { font-size: 22px; }
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .categories-grid { grid-template-columns: 1fr; }
  .product-quick-specs { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  #chat-box { width: 290px; }
  .filters-bar { gap: 8px; }
  .delivery-grid { grid-template-columns: 1fr; }
}

/* ── PRODUCT CARD TWO BUTTONS ── */
.product-card { cursor: default; }
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.product-card-link:hover { text-decoration: none; }
.product-card-buttons {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}
.btn-ask, .btn-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ask {
  background: var(--gray-light);
  color: var(--secondary);
  border-right: 1px solid var(--border);
  border-radius: 0 0 0 var(--radius);
}
.btn-ask:hover { background: #dde6ef; }
.btn-cart {
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}
.btn-cart:hover { background: var(--primary-dark); }
.btn-cart svg, .btn-ask svg { flex-shrink: 0; }

/* Product page big cart button */
.btn-cart-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── CART COUNT BADGE ── */
.header-cart {
  position: relative;
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── CART NOTIFICATION ── */
#cart-notification {
  position: fixed;
  bottom: 90px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s ease;
  pointer-events: none;
  max-width: 360px;
}
#cart-notification.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── CART PAGE ── */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.empty-cart h2 { color: var(--dark); margin-bottom: 8px; }

.cart-items {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 140px; }
.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  display: block;
  margin-bottom: 2px;
}
.cart-item-name:hover { color: var(--primary); }
.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  min-width: 90px;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cart-item-qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-light);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  transition: background var(--transition);
  font-family: var(--font);
}
.cart-item-qty button:hover { background: var(--border); }
.cart-item-qty span {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.cart-item-total {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  min-width: 100px;
  text-align: right;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--red); }

.cart-summary {
  margin-top: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.cart-total {
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 20px;
}
.cart-total strong { font-size: 24px; }
.cart-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-outline-danger {
  background: none;
  border: 2px solid var(--red);
  color: var(--red);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.btn-outline-danger:hover { background: var(--red); color: #fff; }

/* ── CHECKOUT PAGE ── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: flex-start;
}
.checkout-form-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.checkout-form-block h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
}
.form-group input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.checkout-agree {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-light);
}
.checkout-agree input { margin-right: 6px; }
.checkout-agree a { color: var(--primary); }

.checkout-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.checkout-summary h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
}
.checkout-items { margin-bottom: 16px; }
.checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-total {
  font-size: 18px;
  color: var(--dark);
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  .cart-item { gap: 10px; }
  .cart-item-img { width: 60px; height: 45px; }
  .cart-item-price { display: none; }
}
@media (max-width: 600px) {
  .product-card-buttons { flex-direction: column; }
  .btn-ask { border-right: none; border-bottom: 1px solid var(--border); border-radius: 0; }
  .btn-cart { border-radius: 0 0 var(--radius) var(--radius); }
}

/* ── LOGO: only image, no text ── */
.logo { font-size: 0; flex-shrink: 0; }
.logo img { height: 56px; width: auto; min-width: 120px; object-fit: contain; }

/* ── Header email ── */
.header-email { font-size: 13px; font-weight: 500; color: var(--text-light); display: block; }

/* ── MOBILE BOTTOM NAV ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 101;
  padding: 6px 0 env(safe-area-inset-bottom, 4px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--gray);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}
.mob-nav-item:hover, .mob-nav-item.active { color: var(--primary); text-decoration: none; }
.mob-nav-item svg { width: 22px; height: 22px; }
.mob-cart-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── MOBILE IMPROVEMENTS ── */
@media (max-width: 900px) {
  /* Bottom nav visible */
  .mobile-bottom-nav { display: flex; }
  
  /* Pad bottom for fixed nav */
  body { padding-bottom: 64px; }
  
  /* Hide chat FAB on mobile — use bottom nav instead */
  #chat-fab { bottom: 72px; }
  
  /* Header compact */
  .notice-bar { font-size: 12px; padding: 5px 12px; }
  .header-top { padding: 8px 12px; gap: 8px; }
  .logo img { height: 44px; min-width: 100px; }
  
  /* Search full width below */
  .header-search { order: 10; flex: unset; width: 100%; max-width: 100%; margin-top: 4px; }
  .header-search input { padding: 10px 40px 10px 14px; font-size: 15px; }
  
  .header-contacts { display: none; }
  .header-cart { padding: 6px 10px; }
  .btn-callback.desktop-only { display: none; }
  
  /* Nav horizontal scroll */
  .site-nav { overflow: hidden; }
  .site-nav .nav-inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav .nav-inner::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; flex-shrink: 0; padding: 10px 14px; font-size: 12px; }
  
  /* Sidebar drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    z-index: 200;
    border-radius: 0;
    overflow-y: auto;
    transition: left .3s ease;
  }
  .sidebar.mobile-open { left: 0; }
  
  .page-body { flex-direction: column; padding: 0 12px; margin: 16px auto; gap: 16px; }
  
  /* Hero compact */
  .hero-block { padding: 24px 18px; border-radius: 12px; }
  .hero-block h1 { font-size: 20px; }
  .hero-block p { font-size: 14px; }
  .hero-btns { flex-direction: column; gap: 8px; }
  .hero-btns .btn-callback, .hero-btns .btn-ghost { width: 100%; text-align: center; padding: 12px; }
  
  /* Advantages 2 col on mobile */
  .advantages-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .adv-card { min-height: 140px; }
  
  /* Categories full width */
  .categories-grid { grid-template-columns: 1fr; gap: 10px; }
  .cat-card { min-height: 120px; }
  .cat-card { padding: 0; }
  
  /* Products 2 col */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-img { height: 140px; }
  .product-card-body { padding: 10px; }
  .product-card-name { font-size: 13px; }
  .product-card-specs { display: none; }
  .price-main { font-size: 16px; }
  
  /* Product page */
  .product-page { gap: 16px; }
  .product-gallery { width: 100%; }
  .product-info h1 { font-size: 20px; }
  .product-price-main { font-size: 26px; }
  .product-quick-specs { grid-template-columns: 1fr; }
  .product-actions { flex-direction: column; }
  .product-actions button { width: 100%; }
  
  /* Delivery */
  .delivery-grid { grid-template-columns: 1fr; }
  .delivery-page { padding: 20px 16px; }
  
  /* Cart */
  .cart-item { gap: 8px; padding: 12px; }
  .cart-item-img { width: 56px; height: 42px; }
  .cart-item-price { display: none; }
  .cart-item-total { font-size: 14px; min-width: 70px; }
  .cart-buttons { flex-direction: column; }
  .cart-buttons a, .cart-buttons button { width: 100%; text-align: center; }
  
  /* Checkout */
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
  
  /* Section headings */
  .section-heading h2 { font-size: 18px; }
  .page-title { font-size: 20px; }
  
  /* Footer compact */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .site-footer { padding-bottom: 72px; }
  
  /* Filters */
  .filters-bar { flex-direction: column; gap: 8px; align-items: stretch; }
  .sub-filters { gap: 4px; }
  .sub-filter-btn { padding: 6px 12px; font-size: 12px; }
}

@media (max-width: 400px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .product-card-body { padding: 8px; }
  .product-card-name { font-size: 12px; }
  .price-main { font-size: 14px; }
  .btn-ask, .btn-cart { font-size: 11px; padding: 8px 4px; }
}

/* ── CHAT MOBILE ── */
@media (max-width: 500px) {
  #chat-widget { bottom: 78px; right: 14px; }
  #chat-box {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 14px 14px 0 0;
    height: 85vh;
  }
  #chat-invite { width: calc(100vw - 28px); right: 14px; bottom: 74px; }
  .chat-messages { min-height: unset; max-height: unset; flex: 1; }
  #chat-fab { width: 52px; height: 52px; }
}

/* ========================================
   GLOBAL MOBILE FIXES (final polish)
   ======================================== */
@media (max-width: 900px) {
  /* Фиксируем что body и все страницы не съезжают */
  body { overflow-x: hidden; }
  .page-body { display: block; }
  .main-content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    overflow-x: hidden;
  }

  /* Sidebar скрываем на мобилке */
  .sidebar { display: none; }
  .sidebar.mobile-open { display: block; }

  /* Breadcrumb компактнее */
  .breadcrumb { font-size: 12px; padding: 10px 0; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 500px) {
  .main-content { padding-left: 10px; padding-right: 10px; }
}

/* ── LEAD POPUP ── */
.lead-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-popup.open { display: flex; }

.lp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 30, 56, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lpFade .25s ease;
}
@keyframes lpFade { from { opacity: 0; } to { opacity: 1; } }

.lp-window {
  position: relative;
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: lpIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes lpIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: none; }
}

.lp-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--dark);
  cursor: pointer;
  z-index: 2;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-close:hover { background: #fff; transform: rotate(90deg); }

.lp-image {
  position: relative;
  background:
    linear-gradient(135deg, rgba(7,58,94,.65), rgba(12,124,60,.65)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'><defs><linearGradient id='sky' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffd97a'/><stop offset='0.6' stop-color='%23ff9966'/><stop offset='1' stop-color='%23c47d68'/></linearGradient><linearGradient id='roof' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23223a55'/><stop offset='1' stop-color='%23172a3f'/></linearGradient><pattern id='panels' x='0' y='0' width='28' height='18' patternUnits='userSpaceOnUse'><rect width='28' height='18' fill='%231e3a5f'/><line x1='0' y1='0' x2='28' y2='0' stroke='%23335b8a' stroke-width='1.2'/><line x1='0' y1='9' x2='28' y2='9' stroke='%23335b8a' stroke-width='0.8'/><line x1='14' y1='0' x2='14' y2='18' stroke='%23335b8a' stroke-width='0.8'/></pattern></defs><rect width='400' height='600' fill='url(%23sky)'/><circle cx='320' cy='130' r='48' fill='%23ffeaa0' opacity='0.85'/><circle cx='320' cy='130' r='34' fill='%23fffceb' opacity='0.95'/><polygon points='0,420 70,360 100,380 100,600 0,600' fill='%2378a878'/><polygon points='100,380 200,310 280,360 280,600 100,600' fill='%23eee'/><rect x='100' y='380' width='180' height='220' fill='%23faf7f0'/><polygon points='100,380 200,310 280,360' fill='url(%23roof)'/><polygon points='115,375 200,316 280,360' fill='url(%23panels)' opacity='0.92'/><rect x='160' y='460' width='40' height='80' fill='%23223a55'/><rect x='220' y='470' width='40' height='40' fill='%2378b5e8' opacity='0.7'/><rect x='130' y='470' width='30' height='30' fill='%2378b5e8' opacity='0.7'/><polygon points='280,360 360,330 400,370 400,600 280,600' fill='%23dcdcd0'/><polygon points='280,360 360,330 400,370' fill='%231f3147'/><polygon points='290,358 360,335 400,370' fill='url(%23panels)' opacity='0.92'/><rect x='0' y='570' width='400' height='30' fill='%23476d2c'/></svg>") center/cover;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.lp-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,58,94,.85), transparent 60%);
}
.lp-image-badge {
  position: relative;
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 1;
}
.lp-badge-icon {
  font-size: 26px;
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-image-badge strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.lp-image-badge small {
  display: block;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 3px;
}

.lp-content {
  padding: 32px 32px 28px;
  overflow-y: auto;
}
.lp-eyebrow {
  display: inline-block;
  background: #edf7f1;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.lp-content h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.3px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.lp-sub {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 16px;
}
.lp-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}
.lp-benefits li {
  font-size: 13px;
  color: var(--text);
  padding: 4px 0 4px 22px;
  position: relative;
  line-height: 1.4;
}
.lp-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 4px;
  color: var(--primary);
  font-weight: 800;
}

.lp-form { display: flex; flex-direction: column; gap: 8px; }
.lp-form input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color .15s;
}
.lp-form input:focus { outline: none; border-color: var(--primary); }
.lp-submit {
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  color: #1a1a1a;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  margin-top: 4px;
}
.lp-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245,166,35,.35); }
.lp-submit:disabled { opacity: .6; cursor: wait; }
.lp-note {
  font-size: 11px;
  color: var(--gray);
  text-align: center;
  margin-top: 6px;
  line-height: 1.4;
}
.lp-note a { color: var(--primary); }

.lp-success { text-align: center; padding: 30px 0; }
.lp-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-weight: 800;
}
.lp-success h3 { font-size: 18px; color: var(--dark); margin-bottom: 6px; font-weight: 800; }
.lp-success p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

@media (max-width: 700px) {
  .lp-window {
    grid-template-columns: 1fr;
    max-height: 95vh;
    border-radius: 14px;
  }
  .lp-image {
    min-height: 160px;
    max-height: 180px;
    align-items: flex-end;
    padding: 16px;
  }
  .lp-content { padding: 22px 22px 20px; }
  .lp-content h2 { font-size: 19px; }
  .lp-image-badge { padding: 10px 14px; }
  .lp-image-badge strong { font-size: 14px; }
}
@media (max-width: 400px) {
  .lead-popup { padding: 0; }
  .lp-window { max-height: 100vh; border-radius: 0; }
  .lp-image { min-height: 130px; max-height: 140px; }
}

/* ── SKELETONS (loading placeholders) ── */
.skel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.skel-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaed 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s infinite;
}
.skel-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaed 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s infinite;
}
.skel-line-sm { width: 50%; height: 10px; }
.skel-line-md { width: 75%; }
.skel-line-price { width: 35%; height: 18px; margin-top: 12px; }
@keyframes skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel-img, .skel-line { animation: none; }
}

/* ── Страницы без сайдбара: центрировать main-content ── */
body[data-page="calculator"] .main-content,
body[data-page="about"] .main-content,
body[data-page="delivery"] .main-content,
body[data-page="cart"] .main-content,
body[data-page="checkout"] .main-content,
body[data-page="privacy"] .main-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
}
