:root {
  --ink: #0d1b2a;
  --ink-soft: #4a5b6b;
  --line: #e3e8ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --brand: #0f9bb5;
  --brand-dark: #0b7b90;
  --accent: #ff8a1e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .06), 0 8px 24px rgba(13, 27, 42, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }

.wrap { max-width: 1760px; margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 40px); }

.topbar { background: var(--ink); color: #cbd5e1; font-size: 12.5px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 20px; }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a:hover { color: #fff; }

.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 60; }
.header-inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo img { height: 38px; width: auto; }
.search { flex: 1; max-width: 560px; display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 14px; font: inherit; outline: none; }
.search button { border: 0; background: var(--brand); color: #fff; width: 46px; display: grid; place-items: center; cursor: pointer; }
.search button:hover { background: var(--brand-dark); }
.burger { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 42px; height: 38px; cursor: pointer; padding: 9px 10px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 3px 0; border-radius: 2px; }

.mainnav { background: var(--ink); position: relative; z-index: 50; }
.nav-root { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: space-between; }
.nav-root > li > a { display: block; color: #e2e8f0; padding: 13px clamp(8px, .95vw, 18px); font-size: clamp(12.5px, .8vw, 14px); font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.nav-root > li:nth-last-child(-n+3) > .dropdown { left: auto; right: 0; }
.nav-root > li:hover > a { background: var(--brand); color: #fff; }
.nav-root > li { position: relative; }
.dropdown { display: none; position: absolute; left: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); box-shadow: var(--shadow); min-width: 560px; padding: 18px 22px; border-radius: 0 0 var(--radius) var(--radius); }
.nav-root li:hover .dropdown { display: block; }
.dropdown-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 6px 32px; }
.dd-title { display: block; font-weight: 650; padding: 6px 0; font-size: 13.5px; }
.dd-title:hover { color: var(--brand); }
.dropdown ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 2px; }
.dropdown ul a { display: block; padding: 3px 0; font-size: 12.8px; color: var(--ink-soft); }
.dropdown ul a:hover { color: var(--brand); }

.hero { background: linear-gradient(135deg, #0d1b2a 0%, #0f4c5c 100%); color: #fff; padding: 64px 0; }
.hero-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; }
.hero-inner.single { grid-template-columns: 1fr; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.hero h1 { font-size: 42px; margin: 12px 0 14px; }
.hero p { color: #cbd5e1; font-size: 16px; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats { display: grid; gap: 14px; }
.hero-stats div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 16px 20px; display: flex; justify-content: space-between; align-items: baseline; }
.hero-stats strong { font-size: 26px; }
.hero-stats span { color: #cbd5e1; font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.page-head .btn-ghost, .wrap .btn-ghost {color: var(--ink);background: #e8ba2f;}
.wrap .btn-ghost:hover { background: var(--bg-soft); }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.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); overflow: hidden; transition: .18s; }
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cfe6ec; }
.cat-card-img { height: 210px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 16px; border-bottom: 1px solid var(--line); }
.cat-card-img img { width: 100%; height: 100%; object-fit: contain; }
.cat-card-img .ph { min-height: 0; height: 100%; }
.cat-card-body { padding: 14px 16px 18px; }
.cat-card-body h3 { font-size: 15px; margin: 0 0 2px; }
.cat-card-body span { font-size: 12.5px; color: var(--ink-soft); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .18s; }
.product-card:hover { box-shadow: var(--shadow); border-color: #cfe6ec; }
.pc-media { position: relative; height: 230px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 16px; border-bottom: 1px solid var(--line); overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 10px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 4px; letter-spacing: .04em; }
.badge-new { left: 10px; background: var(--accent); color: #fff; }
.badge-energy { right: 10px; background: #e6f6f9; color: var(--brand-dark); border: 1px solid #c7e9f0; }
.pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pc-sku { font-size: 11px; color: var(--ink-soft); letter-spacing: .03em; }
.pc-body h3 { font-size: 15.5px; margin: 4px 0 4px; }
.pc-body h3 a:hover { color: var(--brand); }
.pc-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; min-height: 20px; }
.pc-meta { list-style: none; margin: 0 0 12px; padding: 0; font-size: 12px; color: var(--ink-soft); }
.pc-meta li { padding: 1px 0; }
.pc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.pc-price { font-weight: 700; font-size: 15px; }
.pc-link { font-size: 13px; font-weight: 600; color: var(--brand); }
.pc-link:hover { color: var(--brand-dark); }

.ph { width: 100%; height: 100%; min-height: 120px; background: repeating-linear-gradient(45deg, #f1f4f8, #f1f4f8 10px, #e8edf3 10px, #e8edf3 20px); border-radius: 6px; }
.ph.big { min-height: 420px; }

.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 26px 0 30px; }
.page-head.slim { padding: 14px 0; }
.page-head h1 { font-size: 30px; margin: 10px 0 4px; }
.page-head p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.crumbs a:hover { color: var(--brand); }

.layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding-top: 30px; padding-bottom: 60px; align-items: start; }
.sidebar h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 10px; }
.side-tree, .side-tree ul { list-style: none; margin: 0; padding: 0; }
.side-tree > li { border-bottom: 1px solid var(--line); padding: 7px 0; }
.side-tree > li > a { font-weight: 650; font-size: 14px; display: block; padding: 3px 0; }
.side-tree ul a { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); padding: 3px 0 3px 10px; }
.side-tree a:hover { color: var(--brand); }
.side-tree a.current { color: var(--brand); font-weight: 650; }
.side-tree em { font-style: normal; font-size: 11px; opacity: .6; }

.subcats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.subcat { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 40px; padding: 8px 20px 8px 8px; font-size: 14.5px; font-weight: 600; background: #fff; transition: .15s; }
.subcat img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: var(--bg-soft); padding: 3px; }
.subcat em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ink-soft); background: var(--bg-soft); border-radius: 20px; padding: 2px 9px; }
.subcat:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow); }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 13px; color: var(--ink-soft); }
.toolbar select { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; margin-left: 6px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.empty { padding: 40px; text-align: center; color: var(--ink-soft); background: var(--bg-soft); border-radius: var(--radius); }

.product-top { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding-top: 30px; padding-bottom: 30px; }
.gallery-main { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; height: 480px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-caption { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin: 8px 0 0; min-height: 18px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.gallery-thumb { width: 74px; height: 74px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 6px; cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--brand); }

.pi-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.pi-brand { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.product-info h1 { font-size: 31px; margin: 6px 0 6px; }
.pi-sub { color: var(--ink-soft); font-size: 15px; margin: 0; }
.energy { width: 74px; height: auto; flex: none; }
.pi-ids { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; color: var(--ink-soft); margin: 16px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pi-ids strong { color: var(--ink); }
.pi-bullets { margin: 0 0 18px; padding-left: 18px; font-size: 14px; }
.pi-bullets li { padding: 2px 0; }
.pi-variants { margin-bottom: 20px; }
.pi-variants .label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 30px; padding: 5px 14px 5px 6px; font-size: 13px; }
.swatch i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.swatch.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
a.swatch:hover { border-color: var(--brand); }

.pi-buy { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.pi-price .amount { font-size: 26px; font-weight: 800; display: block; }
.pi-price .old { text-decoration: line-through; color: var(--ink-soft); font-size: 15px; margin-right: 8px; }
.pi-price small { display: block; color: var(--ink-soft); font-size: 11.5px; margin-top: 2px; }
.pi-actions { display: flex; gap: 10px; }

.pi-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin-top: 22px; }
.pi-quick div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pi-quick span { color: var(--ink-soft); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-top: 20px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 14.5px; padding: 12px 18px; cursor: pointer; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brand); }
.panel { display: none; padding: 28px 0 50px; }
.panel.active { display: block; }

.spec-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 40px; }
.spec-group h3 { font-size: 15px; margin: 14px 0 6px; color: var(--brand-dark); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th { text-align: left; font-weight: 500; color: var(--ink-soft); padding: 7px 0; border-bottom: 1px solid var(--line); width: 55%; }
.spec-table td { text-align: right; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

.prose { max-width: 820px; font-size: 15px; color: #26374a; }
.prose p { margin: 0 0 14px; }
.prose .lead { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.prose ul { padding-left: 20px; }
.cat-intro { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }

.doc-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.doc-list a { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px; font-size: 13.5px; font-weight: 500; background: #fff; }
.doc-list a:hover { border-color: var(--brand); color: var(--brand); }

.site-footer { background: var(--ink); color: #b6c2ce; margin-top: 0; padding: 52px 0 0; font-size: 13.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.footer-logo { height: 34px; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 20px; display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: #8b9aa8; flex-wrap: wrap; }

@media (min-width: 1500px) {
  .cat-grid, .product-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1160px) {
  .burger { display: block; margin-left: auto; }
  .mainnav { display: none; }
  .mainnav.open { display: block; }
  .nav-root { flex-direction: column; }
  .nav-root > li > a { font-size: 14px; padding: 12px 4px; }
  .dropdown { display: none !important; }
}

@media (max-width: 1080px) {
  .cat-grid, .product-grid { grid-template-columns: repeat(3, 1fr); }
  .doc-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .header-inner { height: auto; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 12px; }
  .search { order: 3; max-width: none; flex: 1 1 100%; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .product-top { grid-template-columns: 1fr; gap: 26px; }
  .spec-groups { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .cat-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pc-media { height: 170px; }
  .cat-card-img { height: 150px; }
  .gallery-main { height: 320px; }
  .doc-list { grid-template-columns: 1fr; }
  .pi-quick { grid-template-columns: 1fr; }
  .topbar-inner span { display: none; }
}

.page-head.slim .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-edit { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; border-radius: 7px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.admin-edit:hover { background: var(--brand); }
.only-admin { background: #eef3f7; color: var(--ink-soft); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }

.export-link { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; border-radius: 7px; padding: 8px 15px; font-size: 12.5px; font-weight: 600; }
.export-link:hover { background: var(--brand); }
.head-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }


/* VAT display switch */
.vat-switch { display:inline-flex; border:1px solid rgba(255,255,255,.35); border-radius:999px; overflow:hidden; margin-left:14px; }
.vat-switch a { padding:2px 10px; font-size:11px; line-height:18px; text-decoration:none; opacity:.75; }
.vat-switch a.on { background:rgba(255,255,255,.9); color:#12181f; opacity:1; font-weight:600; }
.pi-price .vat-line { display:block; font-weight:600; opacity:.85; }
