
:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1a1b1f;
  --muted: #6a6f7a;
  --border: rgba(20, 20, 25, 0.10);
  --primary: #2f6bff; /* не копируем озон — просто близкая техно‑синяя */
  --primary2: #204fe0;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,0.07);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{color:inherit; text-decoration:none}
button, input, select, textarea{font:inherit}

.container{
  width:min(1120px, calc(100% - 32px));
  margin:0 auto;
}

.topbar{
  position:sticky; top:0;
  background:rgba(246,247,251,0.86);
  backdrop-filter:saturate(150%) blur(10px);
  border-bottom:1px solid var(--border);
  z-index:50;
}
.nav{
  display:flex; align-items:center; gap:16px;
  padding:14px 0;
}

.nav-spacer{flex:1}
.search{
  flex:1;
  display:flex;
  max-width:520px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 12px;
  gap:8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}
.search input{
  border:0; outline:0; width:100%;
}
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--card);
  gap:8px;
}
.pill.primary{
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
  border:0;
}
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background: rgba(47,107,255,0.12);
  color: var(--primary2);
}
.badge.hot{ background: rgba(245, 158, 11, 0.16); color: #b45309; }
.badge.green{ background: rgba(16,185,129,0.16); color: #047857; }
.badge.gray{ background: rgba(107,114,128,0.16); color: #374151; }

.cart-dot{
  min-width:20px; height:20px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  background: var(--danger);
  color:#fff;
}

.hero{
  padding:26px 0 10px;
}
.hero-card{
  background: linear-gradient(135deg, #ffffff, #eef3ff);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:22px;
  box-shadow: var(--shadow);
}
.hero-card-compact{ padding:20px 22px; }
.hero-main{ display:grid; gap:14px; }
.hero-points{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
.hero-point{
  background: rgba(255,255,255,.86);
  border:1px solid var(--border);
  border-radius: 16px;
  padding:12px 14px;
}
.hero-point-label{ font-size:12px; color:var(--muted); }
.hero-point-value{ font-size:18px; font-weight:900; margin-top:4px; }
.hero h1{
  margin:0;
  font-size:28px;
  line-height:1.15;
}
.hero p{
  margin:10px 0 0;
  color: var(--muted);
  line-height:1.5;
}
.hero-actions{ margin-top:14px; display:flex; gap:10px; flex-wrap:wrap;}
.hero-right{
  margin-left:auto;
  width:min(360px, 35%);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.kpi{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 16px;
  padding:12px 14px;
}
.kpi .t{font-size:12px; color:var(--muted)}
.kpi .v{font-size:18px; font-weight:900; margin-top:4px}

.section-title{
  display:flex; align-items:baseline; justify-content:space-between;
  margin:18px 0 10px;
}
.section-title h2{ margin:0; font-size:18px;}
.section-title .hint{ color:var(--muted); font-size:13px;}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  padding: 10px 0 30px;
  align-items:start;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .hero-points{ grid-template-columns: 1fr; }
}
@media (max-width: 620px){
  .grid{ grid-template-columns: 1fr; }
  .search{ display:none; }
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  display:flex;
  flex-direction:column;
  min-height: 0;
}
.card .img{
  position:relative;
  aspect-ratio: 3/4;
  min-height: 320px;
  background:#fff;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.card .img img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:0;
  background:#fff;
  display:block;
}
.card .content{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
}
.card .title{
  font-weight:800;
  line-height:1.2;
}
.card .meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:4px;
}
.price{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.price .now{ font-size:18px; font-weight:900; }
.price .old{ font-size:12px; color:var(--muted); text-decoration:line-through; }
.row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.small{ font-size:13px; color:var(--muted); }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: var(--card);
  cursor:pointer;
  user-select:none;
}
.btn.primary{
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
}
.btn:disabled{
  opacity:0.55;
  cursor:not-allowed;
}

.page{
  padding:18px 0 40px;
}
.breadcrumbs{ color:var(--muted); font-size:13px; margin-bottom:10px; }
.product{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:16px;
}
@media (max-width: 980px){ .product{ grid-template-columns: 1fr; } }
.panel{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}
.gallery-main{
  border-radius: 14px;
  overflow:hidden;
  border:1px solid var(--border);
}
.gallery-main{display:flex; align-items:center; justify-content:center; background:#f6f8ff; }
.gallery-main img{ width:100%; height:100%; object-fit:contain; padding:18px; display:block; }
.thumbs{
  display:grid;
  grid-template-columns: repeat(8, 1fr);
  gap:8px;
  margin-top:10px;
}
@media (max-width: 760px){ .thumbs{ grid-template-columns: repeat(4, 1fr); } }
.thumb{
  border-radius: 12px;
  overflow:hidden;
  border:1px solid var(--border);
  cursor:pointer;
  opacity:0.9;
}
.thumb.active{ outline: 3px solid rgba(47,107,255,0.35); opacity:1; }
.thumb img{ width:100%; height:70px; object-fit:contain; background:#f6f8ff; display:block; }

.table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
}
.table td{
  padding:10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align:top;
}
.table td:first-child{ color: var(--muted); width:45%; padding-right:12px; }

.footer{
  border-top:1px solid var(--border);
  padding:18px 0 32px;
  color: var(--muted);
  font-size:13px;
}

.notice{
  border:1px dashed rgba(47,107,255,0.35);
  background: rgba(47,107,255,0.06);
  padding:12px 14px;
  border-radius: 14px;
  color: #1f3d8f;
}

.form{
  display:grid;
  gap:10px;
}
.field{ display:grid; gap:6px; }
.field label{ font-size:13px; color:var(--muted); }
.field input, .field textarea, .field select{
  border:1px solid var(--border);
  border-radius: 14px;
  padding:10px 12px;
  outline:0;
  background:#fff;
}
.field textarea{ min-height: 92px; resize:vertical; }

.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 760px){ .split{ grid-template-columns:1fr; } }

.toast{
  position:fixed;
  right:16px;
  bottom:16px;
  background: rgba(20,20,25,0.92);
  color:#fff;
  padding:12px 14px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  z-index:100;
  max-width: 360px;
}

.hr{ height:1px; background:var(--border); margin:14px 0; }

.order-card{
  border:1px solid var(--border);
  border-radius: 16px;
  padding:12px 14px;
  background: #fff;
  display:grid;
  gap:6px;
}
.order-card .top{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap;}
.order-card .id{font-weight:900;}
.order-card .st{color:var(--muted); font-size:13px;}

.catalog-tools{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin:8px 0 10px;
}
.chips{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.chip.active{
  border-color:transparent;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  color:#fff;
}
.sort-wrap{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.sort-wrap select{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
}
.catalog-summary{ margin-bottom:4px; }
.mini-specs{ display:grid; gap:6px; margin-top:4px; }
.mini-spec{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  background:#f8faff;
  border:1px solid rgba(47,107,255,0.08);
  font-size:12px;
}
.mini-spec span{ color:var(--muted); }
.empty-state{ text-align:center; padding:24px; }
.related-grid{ padding-top:0; }
.qty-box{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.qty-box input{
  width:64px;
  text-align:center;
  padding:10px 8px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
}
.qty-box-sm input{ width:54px; }
.bullets-list{ display:grid; gap:8px; }
.bullet-item{
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid var(--border);
}
.cart-layout{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap:14px;
}
.cart-items-wrap{ display:grid; gap:12px; }
.cart-item-row{
  display:grid;
  grid-template-columns: 108px minmax(0, 1fr) 180px;
  gap:14px;
  align-items:center;
}
.cart-item-img{
  width:108px;
  height:144px;
  object-fit:contain;
  background:#fff;
  border-radius:14px;
  border:1px solid var(--border);
  display:block;
  padding:8px;
}
.cart-item-main{ min-width:0; }
.cart-item-side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
}
.cart-item-side .btn{ white-space:nowrap; }
.sticky-summary{
  position:sticky;
  top:86px;
  height:max-content;
}
.summary-row, .summary-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.summary-row.total{ font-size:18px; }
.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(16,185,129,0.14);
  color:#047857;
  font-size:12px;
  font-weight:800;
}
.status-pill.gray{
  background:rgba(107,114,128,0.14);
  color:#374151;
}
.status-stack{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.order-page-card{ margin-top:14px; }
.page-success{ display:grid; gap:14px; }
@media (max-width: 980px){
  .cart-layout{ grid-template-columns: 1fr; }
  .sticky-summary{ position:static; }
}
@media (max-width: 760px){
  .cart-item-row{ grid-template-columns: 1fr; }
  .cart-item-img{ width:100%; max-width:220px; height:auto; aspect-ratio:3/4; }
  .cart-item-side{ align-items:flex-start; }
  .product-buy-row{ flex-direction:column; align-items:stretch; }
  .product-buy-row .btn{ width:100%; }
}


.is-hidden{ display:none !important; }
.field-hint{
  margin-top:6px;
  font-size:12px;
  color: var(--muted);
}

.hp-field{
  position:absolute !important;
  left:-10000px !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}
.stock-hint{ margin-top:-2px; }
.stock-notice{ margin:8px 0 0; }
.stock-notify-form{
  display:grid;
  gap:6px;
  margin-top:4px;
}
.notify-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.notify-row input{ min-width:0; }
@media (max-width: 620px){
  .notify-row{ grid-template-columns:1fr; }
}



.field.is-error input, .field.is-error textarea, .field.is-error select{ border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,.10); }
.field-error{ color:#b91c1c; font-size:12px; line-height:1.35; margin-top:2px; }
.field-hint{ font-size:12px; color:var(--muted); }
@media (max-width: 760px){
  .toast{ left:12px; right:12px; bottom:12px; max-width:none; }
}


.req{ color:#dc2626; font-weight:800; }
.inline-pay-box{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}
.card .img{
  min-height: 340px;
  background:#f8fafc;
}
.card .img img{
  object-fit: cover;
  object-position:center;
}
.card .content{
  gap:8px;
}
.card .title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.card .small{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.mini-specs{ gap:4px; }
.mini-spec{ padding:7px 10px; }
.cart-item-row{
  grid-template-columns: 88px minmax(0, 1fr) 180px;
}
.cart-item-img{
  width:88px;
  height:118px;
  padding:6px;
}
.hero-card-compact{
  padding:16px 18px;
}
.hero-main{
  gap:10px;
}
.hero-actions{ margin-top:10px; }
.hero-points{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero-point{
  padding:10px 12px;
}
.hero-point-value{
  font-size:16px;
}


/* ===== v8 layout / mobile improvements ===== */
.nav{ position:relative; }
.nav-right{ display:flex; align-items:center; gap:12px; min-width:0; }
.nav-toggle{ display:none; width:42px; height:42px; border-radius:14px; border:1px solid var(--border); background:#fff; align-items:center; justify-content:center; flex-direction:column; gap:4px; cursor:pointer; }
.nav-toggle span{ display:block; width:18px; height:2px; border-radius:999px; background:#1f2937; transition:transform .2s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1){ transform:translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

.hero-main{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:16px; align-items:start; }
.hero-copy{ display:grid; gap:8px; }
.hero-points{ display:grid; grid-template-columns:1fr; gap:10px; }
.hero-point-value{ font-size:17px; }

.card .img{ min-height:370px; background:#fff; }
.card .img img{ object-fit:cover; object-position:center; }
.card .content{ height:auto; padding:12px; gap:8px; }
.card .meta{ margin-top:4px; }
.card-summary{ min-height:34px; }
.card .title{ min-height:46px; }
.mini-specs{ gap:4px; }
.mini-spec{ padding:7px 9px; }
.grid{ gap:16px; }

.checkout-layout{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:14px; }
.account-create-box{ border:1px solid var(--border); border-radius:14px; padding:10px 12px; background:#fff; }
.account-create-box summary{ cursor:pointer; font-weight:900; }
.auth-layout{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

.cart-item-row{ grid-template-columns:72px minmax(0,1fr) 170px; gap:12px; align-items:start; }
.cart-item-img{ width:72px; height:96px; object-fit:cover; object-position:center; padding:0; }
.cart-item-main .title{ display:block; font-size:18px; line-height:1.25; }
.cart-item-main .small{ display:block; margin-top:6px; }
.cart-item-side{ gap:6px; }
.cart-item-side .btn{ padding:9px 12px; }
.qty-box.qty-box-sm{ gap:6px; }

@media (max-width:980px){
  .hero-main{ grid-template-columns:1fr; }
  .checkout-layout{ grid-template-columns:1fr; }
  .auth-layout{ grid-template-columns:1fr; }
}

@media (max-width:860px){
  .nav{ gap:10px; }
  .nav-spacer{ display:none; }
  .nav-toggle{ display:inline-flex; margin-left:auto; }
  .nav-right{ display:none; position:absolute; top:calc(100% + 10px); left:0; right:0; padding:12px; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.98); box-shadow:var(--shadow); flex-direction:column; align-items:stretch; z-index:60; }
  .nav-right.is-open{ display:flex; }
  .nav-right .search{ display:flex; max-width:none; width:100%; }
  .nav-right .pill,
  .nav-right #authArea,
  .nav-right #authArea .pill,
  .nav-right #authArea button{ width:100%; justify-content:center; }
  .nav-right #authArea{ display:grid; gap:10px; }
}

@media (max-width:760px){
  .container{ width:min(100% - 20px, 1120px); }
  .hero{ padding:18px 0 8px; }
  .hero-card-compact{ padding:14px; }
  .hero h1{ font-size:24px; }
  .hero-actions{ display:grid; grid-template-columns:1fr; }
  .hero-actions .btn{ width:100%; }
  .grid{ grid-template-columns:1fr; gap:14px; }
  .card .img{ min-height:320px; }
  .cart-layout{ grid-template-columns:1fr; }
  .cart-item-row{ grid-template-columns:72px minmax(0,1fr); gap:12px; }
  .cart-item-side{ grid-column:1 / -1; align-items:stretch; padding-top:6px; }
  .cart-item-side .qty-box,
  .cart-item-side .btn{ width:100%; }
  .cart-item-side .qty-box{ justify-content:flex-start; }
  .sticky-summary{ position:static; }
  .product{ grid-template-columns:1fr; }
  .panel{ padding:14px; }
}

@media (max-width:480px){
  .section-title{ align-items:flex-start; flex-direction:column; gap:4px; }
  .chips{ width:100%; }
  .chip{ flex:1 1 auto; }
  .sort-wrap{ width:100%; }
  .sort-wrap select{ width:100%; }
  .breadcrumbs{ font-size:12px; }
}


/* ===== v10 catalog consistency / contacts / footer ===== */
.grid{align-items:stretch;}
.card{height:100%;}
.card .img{aspect-ratio:3/4; min-height:340px; background:#fff;}
.card .img img{width:100%; height:100%; object-fit:contain; object-position:center; padding:10px; background:#fff;}
.card .content{flex:1; display:grid; grid-template-rows:auto auto auto auto 1fr auto; align-content:start;}
.card .title{min-height:48px;}
.card-summary{min-height:40px;}
.mini-specs{min-height:86px;}
.meta{align-self:end;}
.related-grid .card{height:100%;}

.site-meta-bar{border-bottom:1px solid var(--border); background:#fff;}
.site-meta-inner{display:flex; justify-content:space-between; gap:12px; padding:10px 0; align-items:center; flex-wrap:wrap;}
.site-meta-group{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}
.site-meta-pill,.site-meta-link{display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:8px 12px; border:1px solid var(--border); border-radius:999px; background:#fff; font-size:13px; color:var(--muted);}
.site-meta-link{color:var(--text);}
.site-meta-link:hover{border-color:rgba(47,107,255,.35); color:var(--primary2);}

.site-footer-grid{display:grid; grid-template-columns:auto 1fr; align-items:center; gap:12px 18px;}
.site-footer-links{display:flex; justify-content:flex-end; gap:10px 14px; flex-wrap:wrap;}
.site-footer-links a{color:var(--muted);}
.site-footer-links a:hover{color:var(--primary2);}

.doc-article{display:grid; gap:14px; line-height:1.6;}
.doc-article h1{margin:0; font-size:28px; line-height:1.2;}
.doc-article h2{margin:10px 0 0; font-size:18px;}
.doc-article p,.doc-article li{color:#374151;}
.doc-article ul{margin:0; padding-left:20px; display:grid; gap:8px;}
.doc-meta{display:flex; gap:8px; flex-wrap:wrap;}
.doc-note{padding:12px 14px; border-radius:14px; background:#fffbeb; border:1px solid rgba(245,158,11,.22); color:#92400e;}
.doc-table{width:100%; border-collapse:collapse;}
.doc-table td{padding:10px 0; border-bottom:1px solid var(--border); vertical-align:top;}
.doc-table td:first-child{width:220px; color:var(--muted); padding-right:16px;}

@media (max-width:980px){
  .site-footer-grid{grid-template-columns:1fr;}
  .site-footer-links{justify-content:flex-start;}
}
@media (max-width:760px){
  .card .img{min-height:320px;}
  .card .title{min-height:auto;}
  .card-summary,.mini-specs{min-height:0;}
  .site-meta-inner{padding:8px 0;}
  .site-meta-group,.site-meta-group-contacts{width:100%;}
  .site-meta-pill,.site-meta-link{width:100%; justify-content:flex-start; border-radius:14px;}
  .site-footer-links{display:grid; gap:8px;}
}



.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-text {
  max-width: 100%;
}

.brand-symbol {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #18386f 0%, #234f99 100%);
  border: 1px solid rgba(16, 41, 84, 0.22);
  box-shadow:
    0 8px 18px rgba(17, 38, 79, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* лёгкий блик, без лишних деталей */
.brand-symbol::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 42%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

/* одна жирная яркая молния */
.brand-bolt {
  position: relative;
  display: block;
  width: 18px;
  height: 24px;
  font-size: 0;
  line-height: 0;
  z-index: 1;
  transform: translateY(1px);
}

.brand-bolt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffe08a 0%, #ffc74d 55%, #f5a623 100%);
  clip-path: polygon(
    46% 0%,
    100% 0%,
    66% 38%,
    100% 38%,
    34% 100%,
    48% 58%,
    0% 58%
  );
  filter: drop-shadow(0 0 6px rgba(255, 196, 84, 0.35));
}

.brand-bolt::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 6px;
  height: 11px;
  background: rgba(255,255,255,0.34);
  clip-path: polygon(
    40% 0%,
    100% 0%,
    62% 40%,
    100% 40%,
    0% 100%,
    30% 58%,
    0% 58%
  );
  opacity: 0.7;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-wordmark-main {
  display: block;
  line-height: 1;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: #16345f;
  text-rendering: geometricPrecision;
  font-family: "Inter", "Manrope", "Segoe UI", Arial, sans-serif;
}

.brand-wordmark-boom,
.brand-wordmark-power {
  color: #16345f;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: #16345f;
}

.brand-wordmark-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.15;
  color: #6f7b8d;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.01em;
}

@media (max-width: 980px) {
  .brand-wordmark-sub {
    display: none;
  }

  .brand-wordmark-main {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .brand {
    gap: 10px;
  }

  .brand-symbol {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 12px;
  }

  .brand-bolt {
    width: 16px;
    height: 21px;
  }

  .brand-wordmark-main {
    font-size: 21px;
  }
}

@media (max-width: 420px) {
  .brand-symbol {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }

  .brand-bolt {
    width: 14px;
    height: 18px;
  }

  .brand-wordmark-main {
    font-size: 19px;
  }
}

/* планшеты: делаем полосу компактнее */
@media (max-width: 980px) {
  .site-meta-group .site-meta-pill:last-child {
    display: none;
  }

  .site-meta-inner {
    gap: 8px;
  }

  .site-meta-pill,
  .site-meta-link {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* мобильные: полностью прячем полосу */
@media (max-width: 768px) {
  .site-meta-bar {
    display: none;
  }
}

/* основная липкая шапка */
.topbar {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 300;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(17, 38, 79, 0.08);
  box-shadow: 0 8px 24px rgba(17, 38, 79, 0.06);
}

/* чтобы содержимое не "прыгало" и шапка была аккуратнее */
.topbar .nav,
.topbar .header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
}

/* если есть верхняя инфо-полоска, она не sticky */
.site-meta-bar {
  position: relative;
  z-index: 10;
}

/* мобильная версия */
@media (max-width: 768px) {
  .site-meta-bar {
    display: none;
  }

  .topbar {
    top: 0;
  }

  /* в строке шапки на мобильных оставляем только логотип и бургер */
  .nav > .search,
  .nav > .pill,
  .nav > #authArea,
  .topbar .header-search,
  .topbar .header-actions,
  .topbar .desktop-only {
    display: none !important;
  }

  .topbar .nav,
  .topbar .header-inner {
    min-height: 60px;
  }

  /* а внутри раскрытого меню всё, наоборот, показываем */
  .nav-right {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 36px rgba(17, 38, 79, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    z-index: 500;
  }

  .nav-right.is-open {
    display: flex !important;
  }

  .nav-right .search {
    display: flex !important;
    width: 100%;
    max-width: none;
  }

  .nav-right .pill,
  .nav-right #authArea,
  .nav-right #authArea .pill,
  .nav-right #authArea button {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
  }

  .nav-right #authArea {
    display: grid !important;
    gap: 10px;
  }
  
  body.nav-open {
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

.topbar {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 300;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(17, 38, 79, 0.08);
  box-shadow: 0 8px 24px rgba(17, 38, 79, 0.06);
}


/* ===== final header / breadcrumbs / back-to-top ===== */
:root {
  --topbar-fixed-offset: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-fixed-offset, 72px) + 14px);
}

/* Отдаём управление фиксацией шапки JS, чтобы она корректно работала и на десктопе, и на мобильных */
.topbar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  z-index: 120;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid rgba(17, 38, 79, 0.08);
  box-shadow: 0 6px 18px rgba(17, 38, 79, 0.05);
}

.topbar .container {
  position: relative;
}

.topbar .nav,
.topbar .header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
}

.topbar-placeholder {
  display: none;
  height: 0;
}

body.topbar-fixed .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 320;
}

body.topbar-fixed .topbar-placeholder {
  display: block;
  height: var(--topbar-fixed-offset, 72px);
}

body.topbar-fixed .nav-right.is-open {
  z-index: 540;
}

.site-meta-bar {
  position: relative;
  z-index: 20;
}

/* Хлебные крошки */
.breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumbs .crumb-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 700;
  color: var(--primary2);
  transition: border-color .2s ease, transform .2s ease, color .2s ease;
}

.breadcrumbs .crumb-back:hover {
  border-color: rgba(47, 107, 255, 0.35);
  transform: translateY(-1px);
}

.breadcrumbs .crumb-trail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumbs .crumb-link {
  font-weight: 700;
  color: var(--primary2);
}

.breadcrumbs .crumb-link:hover {
  color: var(--primary);
}

.breadcrumbs .crumb-sep {
  color: #a0a7b4;
}

.breadcrumbs .crumb-current {
  color: var(--muted);
}

/* Кнопка наверх */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(32, 79, 224, 0.28);
  cursor: pointer;
  z-index: 330;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.back-to-top::before {
  content: "↑";
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  filter: brightness(1.03);
}

@media (max-width: 860px) {
  .topbar .nav,
  .topbar .header-inner {
    min-height: 62px;
  }
}

@media (max-width: 768px) {
  .site-meta-bar {
    display: none !important;
  }

  .topbar .nav,
  .topbar .header-inner {
    min-height: 60px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .breadcrumbs {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
  }

  .breadcrumbs .crumb-back {
    min-height: 34px;
    padding: 7px 11px;
  }
}
