:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --ink:#0f172a;
  --muted:#475569;
  --line:#e2e8f0;
  --brand:#16a34a;
  --brand2:#2563eb;
  --radius:18px;
  --shadow:0 10px 30px rgba(15,23,42,.10);
  --shadow2:0 18px 50px rgba(2,6,23,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body.no-scroll{overflow:hidden}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 480px at 95% 0%, rgba(22,163,74,.10), transparent 55%),
    var(--bg);
  line-height:1.55;
}
a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
.wrap{max-width:1200px;margin:0 auto;padding:0 16px}

.header{
  position:sticky;top:0;z-index:50;
  background:rgba(244,247,251,.88);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
}
.header__inner{
  display:flex;align-items:center;gap:14px;
  padding:12px 0;
}
.logo{display:flex;align-items:center;gap:10px;font-weight:950;letter-spacing:-.02em}
.logo .mark{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  color:#fff;font-size:16px;
  background:linear-gradient(135deg,var(--brand),var(--brand2));
  box-shadow:var(--shadow);
}
.logo .txt{line-height:1.1}
.logo .txt b{display:block;font-size:14px}
.logo .txt span{display:block;font-size:12px;color:var(--muted);font-weight:700}

.header__actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.header__phone{font-weight:900;color:var(--ink)}
.header__phone small{display:block;font-size:12px;color:var(--muted);font-weight:700}

.burger{
  display:none;
  height:40px;
  min-width:92px;
  padding:0 12px 0 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  box-shadow:var(--shadow);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--ink);
  font-weight:950;
  line-height:1;
  white-space:nowrap;
}
.burger__icon{display:flex;flex-direction:column;gap:4px}
.burger__icon span{display:block;width:18px;height:2px;background:var(--ink);border-radius:10px}
.burger__label{font-size:12px;font-weight:950;text-transform:lowercase}
.burger:focus{outline:3px solid rgba(37,99,235,.25)}

.nav{border-top:1px solid var(--line)}
.nav__inner{display:flex;gap:10px;flex-wrap:wrap;padding:10px 0}
.nav a{
  padding:9px 12px;border-radius:999px;
  color:var(--muted);
  font-weight:850;
  border:1px solid transparent;
}
.nav a:hover{background:rgba(15,23,42,.05);text-decoration:none;color:var(--ink)}
.nav a.is-active{background:rgba(37,99,235,.10);border-color:rgba(37,99,235,.20);color:var(--ink)}

.main{padding:18px 0 40px}

.hero{
  background:linear-gradient(135deg, rgba(22,163,74,.95), rgba(37,99,235,.92));
  border-radius:28px;color:#fff;
  box-shadow:var(--shadow2);
  overflow:hidden;
}
.hero .inner{
  padding:26px 22px;
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:16px;
  align-items:center;
}
.hero h1{margin:0 0 10px;font-size:36px;line-height:1.12;letter-spacing:-.03em}
.hero p{margin:0 0 14px;color:rgba(255,255,255,.88)}
.hero .cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.kpi{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:18px;padding:12px}
.kpi b{display:block;font-size:16px}
.kpi span{display:block;font-size:12px;color:rgba(255,255,255,.86);font-weight:700;margin-top:2px}

.h2{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:18px 0 12px}
.h2 h2{margin:0;font-size:22px;letter-spacing:-.02em}
.muted{color:var(--muted);font-weight:700}
.small{font-size:12px;color:var(--muted);font-weight:700}

.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(max-width:1024px){.grid{grid-template-columns:repeat(3,1fr)} .hero .inner{grid-template-columns:1fr}}
@media(max-width:820px){
  .grid2{grid-template-columns:1fr}

  /* mobile/tablet: show burger and keep it safely inside the header */
  .burger{display:flex;margin-right:24px}
  .header__phone{display:none}

  /* mobile nav as overlay */
  .nav{display:none;position:fixed;inset:0;z-index:80;background:rgba(2,6,23,.45);padding:76px 14px 14px}
  .nav.is-open{display:block}
  .nav__inner{
    background:#fff;border:1px solid var(--line);border-radius:18px;
    padding:10px;box-shadow:var(--shadow2);
    height:100%;overflow:auto;
    flex-direction:column;align-items:stretch
  }
  .nav a{border:1px solid var(--line);background:#fff}
}
@media(max-width:720px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .hero h1{font-size:30px}
}
@media(max-width:440px){
  .grid{grid-template-columns:1fr}
  .hero .inner{padding:20px 16px}
  .hero h1{font-size:26px}
}

@media(max-width:520px){
  .header__inner{flex-wrap:wrap}
  .header__actions{margin-left:0;width:100%;justify-content:space-between}
  .logo .txt span{display:none}
  .btn.small{padding:10px 12px}
}

.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.card.pad{padding:16px}

.card .img{aspect-ratio:3/2;background:#fff;border-bottom:1px solid var(--line);display:grid;place-items:center}
.card .img img{width:100%;height:100%;object-fit:cover}
.card .pad{padding:14px 14px 16px;display:flex;flex-direction:column;gap:10px;min-height:170px}
.badges{display:flex;gap:8px;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--muted);font-weight:850;font-size:12px}
.badge.hot{background:rgba(22,163,74,.10);border-color:rgba(22,163,74,.22);color:#14532d}
.badge.sale{background:rgba(249,115,22,.12);border-color:rgba(249,115,22,.22);color:#9a3412}

.title{margin:0;font-size:16px;line-height:1.25;letter-spacing:-.02em;font-weight:950}
.title a:hover{text-decoration:none}
.clamp2{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.price{display:flex;align-items:baseline;gap:10px}
.price .now{font-size:18px;font-weight:950}
.price .old{color:var(--muted);text-decoration:line-through;font-weight:800}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid transparent;
  font-weight:950;
  cursor:pointer;
  user-select:none;
}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:var(--shadow)}
.btn.light{background:#fff;border-color:var(--line);color:var(--ink)}
.btn.primary:hover,.btn.light:hover{filter:brightness(.98);text-decoration:none}
.btn.small{padding:10px 12px;border-radius:12px;font-size:14px}

.form-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.input{width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--line);background:#fff;font-weight:800}
select.input{padding:12px}
textarea.input{min-height:96px;resize:vertical}
.two-col{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;align-items:start}
@media(max-width:900px){.two-col{grid-template-columns:1fr}}

.chips{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.chip{padding:8px 10px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--muted);font-weight:850;font-size:12px}

.notice{border:1px dashed rgba(37,99,235,.35);background:rgba(37,99,235,.06);border-radius:18px;padding:12px;color:#1e40af;font-weight:800}
.notice.green{border-color:rgba(22,163,74,.35);background:rgba(22,163,74,.06);color:#14532d}

.footer{
  margin-top:26px;
  border-top:1px solid var(--line);
  background:#fff;
}
.footer__grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:16px;padding:20px 0}
@media(max-width:900px){.footer__grid{grid-template-columns:1fr}}
.footer__title{font-weight:950;margin:0 0 8px;letter-spacing:-.01em}
.footer a{color:var(--ink);font-weight:850}
.footer__bottom{padding:14px 0;border-top:1px solid var(--line);color:var(--muted);font-weight:700}

/* Catalog cards legacy helpers */
.card .body{padding:14px 14px 16px;display:flex;flex-direction:column;gap:10px;min-height:170px}
.meta{font-size:12px;color:var(--muted);font-weight:750}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:auto}
.actions form{margin:0}

/* Product page */
.product{background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow2);overflow:hidden}
.product .pwrap{padding:16px}
.sub{margin:0 0 12px;color:var(--muted);font-weight:750}
.pimg{border-radius:24px;overflow:hidden;border:1px solid var(--line);background:#fff}
.pimg img{width:100%;height:auto;display:block}
.qty{width:110px;max-width:45vw}
.field{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.note{border:1px solid rgba(15,23,42,.10);background:rgba(255,255,255,.75);border-radius:18px;padding:12px;color:var(--muted);font-weight:750}


.btn.ghost{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.22);color:#fff}
.btn.ghost:hover{background:rgba(255,255,255,.16);text-decoration:none}

.hero a:hover{text-decoration:none}

@media(max-width:360px){
  .header__actions{gap:8px}
  .btn.small{padding:9px 10px;border-radius:12px}
  .logo .txt span{display:none}
}

.section{margin-top:18px}
@media(max-width:520px){
  .kpis{grid-template-columns:1fr}
}


/* v3 premium blocks */
.hero--premium .badge{background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.22)}
.hero--opt .badge{background:rgba(37,99,235,.12);border-color:rgba(37,99,235,.22)}

.uspbar{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.usp{background:rgba(255,255,255,.75);border:1px solid var(--line);border-radius:16px;padding:12px 12px;box-shadow:var(--shadow)}
.usp b{display:block;font-size:14px}
.usp span{display:block;color:var(--muted);font-size:13px;margin-top:2px}

.heroCard{background:rgba(255,255,255,.82);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow2);padding:16px}
.heroCard__title{font-weight:950;font-size:14px;letter-spacing:.2px}
.heroCard__grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.qbtn{display:block;text-decoration:none;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 12px;font-weight:800}
.qbtn:hover{border-color:rgba(37,99,235,.35);box-shadow:0 10px 25px rgba(2,6,23,.08)}

.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.tiles--3{grid-template-columns:repeat(3,1fr)}
@media(max-width:1024px){.tiles{grid-template-columns:repeat(2,1fr)} .uspbar{grid-template-columns:1fr;}}
@media(max-width:440px){.tiles{grid-template-columns:1fr} .heroCard__grid{grid-template-columns:1fr}}

.tile{display:block;text-decoration:none;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:20px;padding:14px 14px;box-shadow:var(--shadow)}
.tile:hover{border-color:rgba(22,163,74,.28);box-shadow:0 18px 45px rgba(2,6,23,.10)}
.tile__title{font-weight:950;font-size:15px}
.tile__text{color:var(--muted);font-size:13px;margin-top:6px;line-height:1.45}
.tile__meta{margin-top:10px;font-size:12px;color:var(--muted)}
.tile--plain{cursor:default}
.tile--plain:hover{border-color:var(--line);box-shadow:var(--shadow)}

.pills{display:flex;flex-wrap:wrap;gap:10px}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--ink);text-decoration:none;font-weight:900}
.pill:hover{border-color:rgba(37,99,235,.35);box-shadow:0 10px 25px rgba(2,6,23,.08)}
.pill--ghost{background:transparent}

.pgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:1024px){.pgrid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.pgrid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:440px){.pgrid{grid-template-columns:1fr}}
.pcard{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column}
.pcard .img{display:block;aspect-ratio:4/3;background:linear-gradient(135deg, rgba(37,99,235,.08), rgba(22,163,74,.08))}
.pcard img{width:100%;height:100%;object-fit:cover;display:block}
.pcard .body{padding:12px 12px 12px}
.pcard .title{display:block;text-decoration:none;color:var(--ink);font-weight:950;line-height:1.25;margin-top:8px}
.pcard .title:hover{text-decoration:underline}
.pcard .topline{display:flex;gap:8px;align-items:center;justify-content:space-between}
.pcard .row{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:10px}
.pcard .price b{font-size:16px}
.pcard .price s{display:block;color:var(--muted);font-size:12px}
.pcard .addform{margin:0}

.chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;border:1px solid rgba(2,6,23,.12);background:rgba(2,6,23,.04);padding:5px 10px;font-weight:900;font-size:12px;white-space:nowrap}
.chip.premium{background:rgba(22,163,74,.10);border-color:rgba(22,163,74,.25)}
.chip.hot{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.25)}

.cases{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media(max-width:1024px){.cases{grid-template-columns:repeat(2,1fr)}}
@media(max-width:440px){.cases{grid-template-columns:1fr}}
.case{background:#fff;border:1px solid var(--line);border-radius:20px;padding:14px;box-shadow:var(--shadow)}
.case__title{font-weight:950}
.case__text{margin-top:6px;color:var(--muted);font-size:13px;line-height:1.45}
.case__meta{margin-top:10px;color:var(--muted);font-size:12px}

.ctaRow{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}

/* OPT form */
.steps{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(max-width:720px){.steps{grid-template-columns:1fr}}
.step{background:#fff;border:1px solid var(--line);border-radius:18px;padding:12px 12px;box-shadow:var(--shadow);color:var(--ink)}
.step b{display:inline-block;width:26px;height:26px;border-radius:10px;background:rgba(37,99,235,.10);text-align:center;line-height:26px;margin-right:8px}

.form2{display:grid;grid-template-columns:2fr 1fr;gap:14px}
@media(max-width:1024px){.form2{grid-template-columns:1fr}}
.formBox{position:relative;background:#fff;border:1px solid var(--line);border-radius:22px;padding:14px;box-shadow:var(--shadow)}
.formBox label{display:block;font-weight:900;font-size:13px;margin-top:10px}
.formBox input,.formBox textarea{margin-top:6px;width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--line);outline:none;font:inherit}
.formBox input:focus,.formBox textarea:focus{border-color:rgba(37,99,235,.35);box-shadow:0 0 0 4px rgba(37,99,235,.10)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:720px){.row2{grid-template-columns:1fr}}
.asideBox{background:rgba(255,255,255,.70);border:1px solid var(--line);border-radius:22px;padding:14px;box-shadow:var(--shadow)}
.asideTitle{font-weight:950;margin-bottom:8px}
.ul{margin:0;padding-left:18px;color:var(--muted)}
.ul li{margin:6px 0}

/* Cart */
.notice{border:1px solid var(--line);background:#fff;border-radius:16px;padding:10px 12px;margin:10px 0;box-shadow:var(--shadow);font-weight:800}
.notice.ok{border-color:rgba(22,163,74,.25);background:rgba(22,163,74,.08)}
.notice.err{border-color:rgba(239,68,68,.25);background:rgba(239,68,68,.08)}

.cartLayout{display:grid;grid-template-columns:2fr 1fr;gap:14px;align-items:start}
@media(max-width:1024px){.cartLayout{grid-template-columns:1fr}}
.cartItems{display:grid;gap:12px}
.cartRow{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:12px}
@media(max-width:520px){.cartRow{grid-template-columns:90px 1fr}}
.cartRow__img{display:block;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:rgba(2,6,23,.03)}
.cartRow__img img{width:100%;height:100%;object-fit:cover;display:block}
.cartRow__top{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.cartRow__title{color:var(--ink);text-decoration:none;font-weight:950;line-height:1.25}
.cartRow__title:hover{text-decoration:underline}
.cartRow__remove{color:#b91c1c;text-decoration:none;font-weight:900;font-size:13px}
.cartRow__remove:hover{text-decoration:underline}
.cartRow__meta{margin-top:6px}
.cartRow__controls{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;margin-top:10px;flex-wrap:wrap}
.qtyCtl{display:flex;align-items:center;gap:8px}
.qbtn2{width:40px;height:40px;border-radius:14px;border:1px solid var(--line);background:#fff;font-weight:950;font-size:18px;cursor:pointer}
.qbtn2:hover{box-shadow:0 10px 25px rgba(2,6,23,.08)}
.qtyCtl .qty{width:84px;text-align:center;padding:10px 10px;border-radius:14px;border:1px solid var(--line);font-weight:950}
.cartRow__sum .sum{font-weight:950;font-size:18px;margin-top:2px}
.cartSide .sideCard{background:#fff;border:1px solid var(--line);border-radius:22px;padding:14px;box-shadow:var(--shadow2);position:sticky;top:16px}
@media(max-width:1024px){.cartSide .sideCard{position:static}}
.sideTitle{font-weight:950;font-size:16px;margin-bottom:10px}
.sideLine{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed rgba(2,6,23,.12)}
.promoBox input{padding:12px 12px;border-radius:14px;border:1px solid var(--line)}
.sideTotal{display:flex;justify-content:space-between;gap:10px;align-items:baseline;padding-top:10px;margin-top:8px}
.sideTotal b{font-size:22px}
.sideActions{margin-top:10px}
.linkDanger{color:#b91c1c;font-weight:900;text-decoration:none}
.linkDanger:hover{text-decoration:underline}


/* brand logo */
.logo__img{height:72px;width:auto;display:block;border-radius:14px;border:1px solid rgba(0,0,0,.08);background:#fff;padding:6px;box-shadow:0 8px 22px rgba(0,0,0,.14)}
@media(max-width:560px){.logo__img{height:72px;width:auto;display:block;border-radius:14px;border:1px solid rgba(0,0,0,.08);background:#fff;padding:6px;box-shadow:0 8px 22px rgba(0,0,0,.14)}}


/* checkout ukryvpiter */
.page-head{margin:14px 0 14px}
.page-head h1{margin:0;font-size:32px;line-height:1.12}
.page-head p{margin:8px 0 0;color:var(--muted);max-width:820px}

.card__head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.card__head h2{margin:0;font-size:16px}
.card__body{padding:14px 16px}

.checkout-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:start;margin:12px 0 26px}
@media(max-width:980px){.checkout-grid{grid-template-columns:1fr}}
.order-summary{position:sticky;top:92px}
@media(max-width:980px){.order-summary{position:static;top:auto}}

.order-items{display:grid;gap:10px;margin-top:2px}
.order-item{display:flex;gap:10px;align-items:flex-start;justify-content:space-between;border:1px solid var(--line);background:#fff;border-radius:16px;padding:12px}
.order-item .left{display:flex;gap:10px;align-items:flex-start}
.order-item img{width:56px;height:56px;border-radius:12px;object-fit:cover;border:1px solid var(--line);background:#fff}
.order-item .t{font-weight:800;line-height:1.2}
.order-item .m{color:var(--muted);font-size:12px;margin-top:2px}
.order-item .r{font-weight:900;white-space:nowrap}

.summary{margin-top:12px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px}
.summary .row{display:flex;justify-content:space-between;gap:10px;padding:6px 0;color:var(--muted)}
.summary .row strong{color:var(--ink)}
.summary .total{padding-top:10px;margin-top:8px;border-top:1px dashed var(--line);color:var(--ink);font-weight:900;font-size:18px}
.summary .hint{margin-top:10px;font-size:12px;color:var(--muted);line-height:1.35}

.summary-actions{margin-top:12px;display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:560px){.summary-actions .btn{width:100%;justify-content:center}}

.form-compact{display:grid;gap:10px}
.form-compact .row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:560px){.form-compact .row2{grid-template-columns:1fr}}
.form-compact label{font-size:12px;color:var(--muted);font-weight:700}
.form-compact input,.form-compact select,.form-compact textarea{width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--ink);font-size:16px}
.form-compact textarea{min-height:86px;resize:vertical}
.form-compact .hint{font-size:12px;color:var(--muted);line-height:1.35;margin-top:6px}
.form-compact .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
@media(max-width:560px){.form-compact .actions .btn{width:100%;justify-content:center}}

.check{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:#fff}
.check input{margin-top:3px}
.check span{font-size:13px;color:var(--muted);line-height:1.35}
.check a{color:var(--ink);text-decoration:underline}
@media(max-width:420px){.logo__img{height:56px;padding:5px}}


/* --- FIX v4: logo readable + no white badge --- */
.logo__img{
  height:96px;
  width:auto;
  max-width:360px;
  display:block;
  background:transparent !important;
  padding:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  object-fit:contain;
}
@media(max-width:720px){
  .logo__img{height:86px;max-width:320px}
}
@media(max-width:560px){
  .logo__img{height:78px;max-width:300px}
}
@media(max-width:420px){
  .logo__img{height:72px;max-width:280px}
}

/* Make header layout stable on mobile so burger always clickable */
@media(max-width:560px){
  .header__inner{flex-wrap:wrap}
  .logo{flex:1 1 100%}
  .header__actions{width:100%;margin-left:0;gap:10px}
  .header__phone{display:none}
}

/* Ensure burger is always on top and tap-friendly */
.burger{position:relative;z-index:90;-webkit-tap-highlight-color:transparent}


/* --- FIX v5: logo no frames + readable --- */
.logo{padding:0 !important;background:transparent !important;border:0 !important;box-shadow:none !important}
.logo:focus,.logo:focus-visible{outline:none !important}
.logo__img{
  height:96px;
  width:auto;
  max-width:380px;
  display:block;
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  object-fit:contain;
}
@media(max-width:720px){.logo__img{height:86px;max-width:340px}}
@media(max-width:560px){.logo__img{height:78px;max-width:320px}}
@media(max-width:420px){.logo__img{height:72px;max-width:300px}}

/* --- FIX v5: mobile menu dropdown (vertical list) --- */
@media(max-width:560px){
  .nav{display:none;position:static;inset:auto;background:transparent;padding:0;box-shadow:none;border:0}
  .nav.is-open{display:block}
  .nav__inner{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:10px;
    margin:10px 0 0;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:16px;
  }
  .nav__inner a{
    display:block;
    padding:12px 10px;
    border-radius:12px;
    font-weight:800;
  }
  .nav__inner a:not(:last-child){
    border-bottom:1px solid var(--line);
    border-radius:0;
  }
  .header__inner{flex-wrap:wrap}
  .logo{flex:1 1 100%}
  .header__actions{width:100%;margin-left:0;gap:10px}
  .header__phone{display:none}
  .burger{position:relative;z-index:90}
}


/* --- FIX v7: ultra thin header, logo overhang --- */
/* Шапка тонкая, логотип может выходить вверх/вниз (как у брендов) */
.header{
  padding:0 !important;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:80;
  overflow:visible;
}
.header__inner{
  min-height:54px;
  padding:4px 0 !important;
  gap:12px;
  align-items:center;
}

/* Убираем "вторую строку" рядом с логотипом, чтобы не раздувало высоту */
.logo .txt span{display:none !important}

/* Лого крупное + выходит за шапку, но кликабельное */
.logo{position:relative;display:flex;align-items:center;gap:10px;padding:0 !important;background:transparent !important;border:0 !important;box-shadow:none !important}
.logo__img{
  height:92px !important;
  width:auto !important;
  max-width:420px !important;
  margin:-18px 0 !important;  /* вот это делает "вылезание" */
  background:transparent !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  object-fit:contain;
}

/* Десктоп: чуть компактнее кнопки */
.header__actions{gap:10px}
.header__actions .btn.small{padding:10px 12px}

/* Мобилка: одна тонкая строка (лого + бургер). Меню раскрывается списком ниже. */
@media(max-width:560px){
  /* Чуть уже хедер на мобиле (но лого всё равно может \"вылезать\") */
  .header__inner{min-height:46px;padding:1px 0 !important;flex-wrap:nowrap;position:relative;display:flex;align-items:center}

  /* Правая часть (телефон + бургер) — всё ВНУТРИ хедера, без absolute */
  .header__actions{
    flex:1 1 auto;
    width:auto;
    margin-left:10px;
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    justify-content:flex-end;
  }
  .header__actions .btn{display:none}

  /* Телефон по центру между логотипом и кнопкой меню (красивый бейдж) */
  .header__phone{
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto;                 /* центрируем внутри оставшегося пространства */
    padding:8px 12px;
    border:1px solid rgba(0,0,0,.14);
    border-radius:999px;
    background:rgba(255,255,255,.78);
    -webkit-backdrop-filter:saturate(180%) blur(8px);
    backdrop-filter:saturate(180%) blur(8px);
    box-shadow:0 1px 0 rgba(0,0,0,.04);
    font-weight:850;
    font-size:13px;
    line-height:1;
    letter-spacing:.2px;
    white-space:nowrap;
    max-width:190px;
    overflow:hidden;
    text-overflow:ellipsis;
    /* смещаем влево (по просьбе) */
    transform: translateX(-28px);
  }
  .header__phone small{display:none}

  /* Бургер справа, внутри хедера — чуть меньше, левее от правого края.
     Иконка (3 полоски) — справа от слова "меню". */
  /* Сильный отступ от правой границы (двигаем кнопку заметно влево) */
  .burger{display:flex;min-width:auto;height:32px;padding:0 8px;border-radius:9px;margin-right:calc(24px + env(safe-area-inset-right));flex-direction:row-reverse;gap:8px}

  /* Чуть компактнее иконка и подпись на мобиле */
  .burger__icon{gap:3px}
  .burger__icon span{width:16px}
  .burger__label{font-size:11px}

  /* Лого как было (крупное, с вылетом), без искусственного отступа вправо */
  .logo{padding-right:0 !important}
  .logo__img{
    height:110px !important;
    max-width:380px !important;
    /* сместить лого чуть левее и на пару px ниже */
    margin:-24px 0 -24px -10px !important;
  }
}
@media(max-width:420px){

  .logo__img{height:102px !important;max-width:360px !important;margin:-22px 0 -22px -10px !important}
}


/* --- FIX v8: desktop nav inline with logo --- */
/* Делаем меню (подкатегории) в один ряд с логотипом на ПК */
@media(min-width:901px){
  .header__inner{position:relative}
  /* Навигация как "встроенная" в верхнюю строку */
  .nav{
    display:block !important;
    position:absolute;
    left:190px;      /* старт после логотипа */
    right:320px;     /* место под телефон/корзину */
    top:50%;
    transform:translateY(-50%);
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
  }
  .nav > .wrap{max-width:none !important;padding:0 !important}
  .nav__inner{
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    padding:0 !important;
    margin:0 !important;
    flex-direction:row !important;
    justify-content:center;
    gap:22px;
    flex-wrap:nowrap;
  }
  .nav__inner a{
    padding:8px 0 !important;
    border:0 !important;
    border-radius:0 !important;
    font-weight:800;
    white-space:nowrap;
  }
  /* чтобы не было "второй строки" и лишней высоты */
  .nav.is-open{display:block}
}

/* Если экран не очень широкий — делаем меню прокручиваемым по горизонтали */
@media(min-width:901px) and (max-width:1180px){
  .nav__inner{justify-content:flex-start;overflow:auto;-webkit-overflow-scrolling:touch}
  .nav__inner::-webkit-scrollbar{height:0}
  .nav{left:170px;right:250px}
}

/* Лого больше на ПК, шапка всё равно тонкая за счёт вылета */
@media(min-width:901px){
  .logo__img{
    height:108px !important;
    max-width:520px !important;
    margin:-22px 0 !important;
  }
}


/* === PREMIUM v11: typography + layout polish === */
:root{
  /* softer text palette */
  --ink2: rgba(15,23,42,.94);
  --text: rgba(15,23,42,.82);
  --text2: rgba(15,23,42,.66);
  --line2: rgba(226,232,240,.85);
  --shadowSoft: 0 10px 28px rgba(15,23,42,.08);
  --shadowHover: 0 18px 44px rgba(2,6,23,.12);
}

/* Base typography */
body{
  color: var(--ink2);
  font-weight: 500;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p, li{color: var(--text)}
.muted{color: var(--text2) !important; font-weight: 600 !important}
.small{color: var(--text2) !important; font-weight: 600 !important}
strong{font-weight: 750 !important}

/* Headings: less “чернющий” + аккуратнее веса */
h1,h2,h3,.title{color: var(--ink2)}
h1{font-weight: 850}
h2{font-weight: 850}
.title{font-weight: 800 !important}

/* Links: без подчёркивания “по умолчанию”, только мягкий акцент */
a:hover{text-decoration:none}
a:focus-visible{outline:3px solid rgba(37,99,235,.25); outline-offset:2px; border-radius:10px}

/* FIX: Header actions (phone/cart) must stay clickable.
   On some desktop widths the absolutely-positioned nav row may overlap the right actions area with a
   transparent box, which blocks clicks on the cart button.
*/
@media(min-width:901px){
  .header__actions{position:relative; z-index:95}
  .nav{z-index:90; pointer-events:none}
  .nav a{pointer-events:auto}
}

/* Buttons: меньше жирности, больше “премиум” */
.btn{
  font-weight: 750 !important;
  letter-spacing: .01em;
  border-color: var(--line2);
}
.btn.light{background: rgba(255,255,255,.9) !important}
.btn.primary{box-shadow: var(--shadowSoft) !important}
.btn:hover{transform: translateY(-1px)}
.btn:active{transform: translateY(0)}

/* Badges / chips: компактнее и спокойнее */
.badge, .chip{
  font-weight: 650 !important;
  color: var(--text2) !important;
  border: 1px solid var(--line2) !important;
  background: rgba(255,255,255,.82) !important;
}
.pill{font-weight: 750 !important}

/* Cards: мягче тени + больше воздуха */
.card, .tile, .case, .usp, .heroCard{
  border-color: var(--line2) !important;
  box-shadow: var(--shadowSoft) !important;
}
.card:hover, .tile:hover, .case:hover{
  box-shadow: var(--shadowHover) !important;
}
.card .body, .tile .body{padding: 16px !important}

/* Sections: визуально “дороже” и структурнее */
.section{margin-top: 22px !important}
.h2{margin: 22px 0 14px !important; position:relative; padding-bottom:12px}
.h2 h2{margin:0}
.h2:after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:1px;
  background: linear-gradient(90deg, rgba(226,232,240,.0), rgba(226,232,240,.85), rgba(226,232,240,.0));
}

/* Grid spacing */
.grid, .tiles, .pgrid, .cases{gap: 16px !important}

/* Desktop asymmetry without overlap */
@media(min-width:901px){
  .grid > *, .tiles > *, .pgrid > *, .cases > *{
    --off: 0px;
    transform: translateY(var(--off));
    transition: transform .16s ease, box-shadow .22s ease, border-color .22s ease;
    will-change: transform;
  }
  .grid > *:hover, .tiles > *:hover, .pgrid > *:hover, .cases > *:hover{
    transform: translateY(calc(var(--off) - 4px));
  }
  .grid > *:nth-child(3n+2), .tiles > *:nth-child(3n+2), .pgrid > *:nth-child(3n+2), .cases > *:nth-child(3n+2){--off: 8px}
  .grid > *:nth-child(3n), .tiles > *:nth-child(3n), .pgrid > *:nth-child(3n), .cases > *:nth-child(3n){--off: -4px}
}

/* Mobile: disable offsets to keep everything aligned */
@media(max-width:900px){
  .grid > *, .tiles > *, .pgrid > *, .cases > *{transform:none !important}
}

/* Header readability tweaks (no layout changes) */
.header__phone{color: var(--ink2)}
.header__phone small{color: var(--text2) !important; font-weight: 600 !important}


/* --- v12: manufacturer blocks + picker --- */
.features{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}
@media(max-width:1000px){.features{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.features{grid-template-columns:1fr}}
.feature{
  background:rgba(255,255,255,.78);
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
.feature__icon{
  width:34px;height:34px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(37,99,235,.10);
  color:var(--ink);
  margin-bottom:10px;
}
.feature__title{font-weight:900;letter-spacing:-.01em}
.feature__text{margin-top:6px;color:var(--muted);line-height:1.45;font-size:14px}

.callout{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--line);
  background:linear-gradient(120deg, rgba(22,163,74,.10), rgba(37,99,235,.08));
}
.callout__title{font-weight:950;font-size:18px;letter-spacing:-.02em}
.callout__actions{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:700px){.callout{flex-direction:column;align-items:flex-start}.callout__actions{width:100%}}

.picker__tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.ptab{
  appearance:none;border:1px solid var(--line);
  background:rgba(255,255,255,.72);
  color:var(--ink);
  padding:9px 12px;
  border-radius:999px;
  font-weight:850;
  cursor:pointer;
  transition:transform .08s ease, background .15s ease, border-color .15s ease;
}
.ptab:hover{background:#fff;transform:translateY(-1px)}
.ptab.is-active{background:#fff;border-color:rgba(0,0,0,.20)}
@media(max-width:560px){
  .picker__tabs{flex-wrap:nowrap;overflow:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .picker__tabs::-webkit-scrollbar{height:0}
}

.picker__panel{margin-top:14px}
.picker__head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
}
.picker__title{font-weight:950;font-size:20px;letter-spacing:-.02em}
.picker__meta{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.picker__cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:14px;
}
@media(max-width:980px){.picker__cards{grid-template-columns:1fr}}
.pcard{
  display:block;
  padding:14px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  text-decoration:none;
  box-shadow:0 12px 30px rgba(2,6,23,.06);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.pcard:hover{transform:translateY(-2px);box-shadow:0 18px 46px rgba(2,6,23,.10);border-color:rgba(0,0,0,.16)}
.pcard__top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.pcard__title{font-weight:950;letter-spacing:-.01em}
.pcard__meta{font-size:12px;color:var(--muted);border:1px solid var(--line);padding:5px 8px;border-radius:999px;background:#fff}
.pcard__text{margin-top:8px;color:var(--muted);line-height:1.45}
.pcard__cta{margin-top:10px;font-weight:900;color:var(--brand2)}
.picker__foot{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.picker__actions{display:flex;gap:10px;flex-wrap:wrap}


/* v12: softer default text */
.main p{color:var(--muted);line-height:1.55}
.main .title,.main h1,.main h2,.main h3{color:var(--ink)}


/* --- FIX v13: pro typography + UX --- */
/* Softer text (less black), premium readability */
body{color:#334155 !important; font-weight:500; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale}
p,li{color:#334155}
.muted{color:#64748b !important}
b,strong{color:var(--ink); font-weight:800}
h1,h2,h3{color:var(--ink)}
h1{letter-spacing:-.02em}
h2{letter-spacing:-.01em}
a{color:inherit}
a:hover{color:var(--ink)}

/* Section rhythm */
.section{padding:18px 0}
@media(max-width:720px){.section{padding:20px 0}}

/* Premium cards */
.card,.feature,.heroCard,.note{
  border:1px solid rgba(226,232,240,.9);
  box-shadow:0 10px 28px rgba(2,6,23,.06);
}
.card:hover{transform:translateY(-2px); box-shadow:0 18px 42px rgba(2,6,23,.08)}
.card{transition:transform .12s ease, box-shadow .18s ease, border-color .18s ease}
.card .title{color:var(--ink); font-weight:900}

/* Asymmetric grids (desktop only, safe) */
@media(min-width:980px){
  .features{gap:16px}
  .features .feature:nth-child(2){transform:translateY(6px)}
  .features .feature:nth-child(3){transform:translateY(-4px)}
  .grid .card:nth-child(3n+2){transform:translateY(6px)}
  .grid .card:nth-child(3n){transform:translateY(-4px)}
}

/* Pro search (catalog + hero) */
.searchbar{
  display:flex; gap:10px; align-items:center;
  padding:12px 12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 28px rgba(2,6,23,.06);
}
.searchbar input{
  flex:1 1 auto;
  border:0; outline:0;
  background:transparent;
  font-size:15px;
  color:var(--ink);
}
.searchbar .kbd{
  font-size:12px;
  color:#64748b;
  border:1px solid rgba(226,232,240,.9);
  border-radius:10px;
  padding:6px 8px;
  background:#fff;
}
.suggest{
  position:relative;
}
.suggest__list{
  position:absolute;
  left:0; right:0; top:calc(100% + 8px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 18px 50px rgba(2,6,23,.10);
  overflow:hidden;
  z-index:50;
  display:none;
}
.suggest__list.is-open{display:block}
.suggest__item{
  display:flex; gap:12px; align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(226,232,240,.7);
  cursor:pointer;
}
.suggest__item:last-child{border-bottom:0}
.suggest__item:hover{background:#f8fafc}
.suggest__thumb{
  width:44px; height:44px; border-radius:12px; overflow:hidden; flex:0 0 44px;
  border:1px solid rgba(226,232,240,.9);
  background:#f8fafc;
}
.suggest__thumb img{width:100%;height:100%;object-fit:cover}
.suggest__name{font-weight:900; color:var(--ink); font-size:13px; line-height:1.15}
.suggest__meta{font-size:12px; color:#64748b; margin-top:2px}

/* Product spec + sticky buy (mobile) */
.spec{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,.78);
}
.spec__title{font-weight:950;color:var(--ink); margin:0 0 10px}
.spec__grid{display:grid;grid-template-columns:1fr 1fr; gap:10px}
.spec__item{padding:10px 10px; border:1px solid rgba(226,232,240,.9); border-radius:14px; background:#fff}
.spec__k{font-size:12px;color:#64748b}
.spec__v{font-weight:900;color:var(--ink); margin-top:2px}
@media(max-width:560px){.spec__grid{grid-template-columns:1fr}}

.stickybuy{
  position:fixed; left:10px; right:10px; bottom:10px;
  z-index:60;
  display:none;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:18px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.92);
  box-shadow:0 18px 50px rgba(2,6,23,.14);
  backdrop-filter:saturate(140%) blur(10px);
}
.stickybuy__price{min-width:120px}
.stickybuy__now{font-weight:950;color:var(--ink); font-size:16px; line-height:1}
.stickybuy__sub{font-size:12px;color:#64748b;margin-top:3px}
.stickybuy .btn{flex:1 1 auto}
@media(max-width:900px){
  .stickybuy{display:flex}
  body.has-mobilebar .stickybuy{bottom:72px} /* not to collide with mobile bar */
}

/* Mobile bottom action bar */
.mobilebar{
  position:fixed; left:10px; right:10px; bottom:10px;
  z-index:70;
  display:none;
  gap:10px;
  padding:10px;
  border-radius:18px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.92);
  box-shadow:0 18px 50px rgba(2,6,23,.14);
  backdrop-filter:saturate(140%) blur(10px);
}
.mobilebar a{
  flex:1 1 0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 10px;
  border-radius:16px;
  border:1px solid rgba(226,232,240,.9);
  background:#fff;
  font-weight:900;
  text-decoration:none;
  color:var(--ink);
}
.mobilebar a span{font-size:12px;color:#64748b;font-weight:800}
.mobilebar a:hover{background:#f8fafc}
@media(max-width:900px){
  .mobilebar{display:flex}
}

@media(max-width:1024px){
  /* по запросу: на мобиле убираем липкие нижние кнопки */
  .stickybuy, .mobilebar{display:none !important}
  body.has-mobilebar{padding-bottom:0 !important}
}


/* v14: home hero tweaks (bigger badge, less "black" feel, tighter blocks) */
.home .hero{
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(22,163,74,.28), transparent 60%),
    radial-gradient(820px 480px at 92% 55%, rgba(37,99,235,.28), transparent 58%),
    linear-gradient(135deg, rgba(16,185,129,.10), rgba(59,130,246,.10));
  color: var(--ink);
}
.home .hero .inner{padding:22px 20px;gap:14px}
.home .hero .badge{
  font-size:13px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(15,23,42,.10);
  color:rgba(15,23,42,.68);
  font-weight:900;
}
.home .hero h1{
  margin:6px 0 8px;
  color:rgba(15,23,42,.86);
  font-weight:900;
  letter-spacing:-.03em;
}
.home .hero p{
  margin:0 0 12px;
  color:rgba(15,23,42,.68);
  font-weight:650;
}
.home .hero .cta{gap:8px}
.home .hero .btn.light{
  background:rgba(255,255,255,.86);
  border-color:rgba(15,23,42,.10);
  color:rgba(15,23,42,.88);
}
.home .uspbar{gap:10px;margin-top:12px}
.home .usp{padding:10px 12px}
.home .usp b{font-size:13px}
.home .usp span{font-size:12.5px}

.home .heroCard{padding:14px;background:rgba(255,255,255,.84)}
.home .heroCard__title{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(15,23,42,.06);
  color:rgba(15,23,42,.66);
  font-weight:950;
  font-size:13px;
  letter-spacing:.15px;
}
.home .heroCard__grid{gap:10px;margin-top:10px}
.home .qbtn{padding:11px 12px}

.home .section{margin-top:8px}
.home .h2{margin:10px 0 8px}
.home .grid{gap:12px}

.home .section + .section{margin-top:10px}

.home .h2 h2{margin:0}
.home .h2 .muted{margin-bottom:2px}

.home .section .grid{margin:0}



/* v18: ULTRA compact rhythm on home (remove big vertical gaps) */
.home .section{padding:10px 0 !important; margin-top:0 !important}
.home .sectionHeader{margin:0 0 6px !important}
.home .h2{margin:6px 0 6px !important}
.home .grid{gap:12px !important}
.home .picker{padding:8px 0 !important}
.home .productsRail{margin-top:8px !important}
.home .quickSizes{margin-top:6px !important}
.home .hero{margin-bottom:6px !important}
/* tighten within picker block */
.home .picker .tabs{margin:0 0 10px !important}
.home .picker .pickerCard{padding:14px !important}


/* v18: make homepage sections tight (remove big vertical gaps) */
.home .section{
  padding:12px 0 !important;
  margin-top:0 !important;
}
@media(max-width:720px){
  .home .section{padding:10px 0 !important;}
}
.home .section + .section{margin-top:0 !important;}
.home .h2{margin:8px 0 6px !important;}
.home .h2 .muted{margin:0 !important;}
/* tighten common blocks inside sections */
.home .chips{margin:6px 0 10px !important;}
.home .grid{gap:12px !important;}

/* --- Product page: related blocks grid should not force 4 tiny columns inside narrow right column --- */
#p-related .grid{
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}
#p-related .card .body{min-height:auto !important;}
#p-related .actions{flex-direction:column;align-items:stretch;}
#p-related .actions .btn{width:100%;justify-content:center;}
#p-related .card .title{
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
#p-related .card .meta{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}




/* === Product gallery arrows + variants === */
.pimg.sc-gallery{position:relative; overflow:hidden;}
.pimg.sc-gallery img{display:block; width:100%; height:auto; border-radius:16px;}
.sc-gbtn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border-radius:999px;
  border:0; cursor:pointer;
  background:rgba(15,23,42,.55);
  color:#fff; font-size:28px; line-height:42px;
  display:flex; align-items:center; justify-content:center;
  -webkit-tap-highlight-color:transparent;
}
.sc-gbtn:hover{background:rgba(15,23,42,.75);}
.sc-gprev{left:10px;}
.sc-gnext{right:10px;}
.sc-gcount{
  position:absolute; left:50%; bottom:10px; transform:translateX(-50%);
  background:rgba(15,23,42,.55); color:#fff;
  font-size:12px; padding:4px 8px; border-radius:999px;
}
@media (max-width:640px){
  .sc-gbtn{width:38px;height:38px;font-size:24px;line-height:38px;}
}

.variants .variant-row{display:flex; gap:10px; align-items:flex-start; margin:8px 0;}
.variants .variant-label{min-width:64px; font-weight:800;}
.variants .variant-select{width:100%; padding:10px 12px; border-radius:12px; border:1px solid rgba(15,23,42,.12); background:#fff;}
.variants .variant-colors{display:flex; gap:8px; flex-wrap:wrap;}
.variants .chip{display:inline-flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid rgba(15,23,42,.12); border-radius:999px; cursor:pointer; user-select:none; background:#fff;}
.variants .chip input{accent-color:#0f172a;}


/* ================================
   MOBILE ADAPT v62 (Header layout)
   Цель: нормальная адаптация под телефоны/планшеты,
   чтобы лого/телефон/кнопка меню всегда были ВНУТРИ хедера
   и ничего не вылезало за границы экрана.
   ================================ */

@media (max-width:1024px){
  /* safe-area для iPhone (notch) + стабильные отступы в шапке */
  .header .wrap{
    padding-left:calc(16px + env(safe-area-inset-left));
    padding-right:calc(16px + env(safe-area-inset-right));
  }

  /* Переводим верхнюю строку на GRID: [лого] [телефон] [меню] */
  .header__inner{
    display:grid !important;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap !important;
    min-height:46px;
    padding:2px 0 !important;
    overflow:visible;
  }

  /* "Разворачиваем" .header__actions, чтобы дети участвовали в grid */
  .header__actions{
    display:contents !important;
    margin-left:0 !important;
    width:auto !important;
  }

  /* На мобиле прячем корзину (она раздувает хедер и ломает ширину) */
  .header__actions .btn.small{display:none !important;}

  .logo{grid-column:1;z-index:2;}

  /* Лого крупное, но всё равно остаётся в пределах (за счёт grid) */
  .logo__img{
    height:106px !important;
    max-width:380px !important;
    margin:-22px 0 -22px -10px !important;
  }

  /* Телефон — по центру между лого и меню, в аккуратной рамке */
  .header__phone{
    grid-column:2;
    justify-self:center;
    display:flex !important;
    align-items:center;
    justify-content:center;
    min-width:0;
    max-width:min(240px, calc(100vw - 220px));
    padding:8px 12px;
    border:1px solid rgba(0,0,0,.14);
    border-radius:999px;
    background:rgba(255,255,255,.78);
    -webkit-backdrop-filter:saturate(180%) blur(8px);
    backdrop-filter:saturate(180%) blur(8px);
    box-shadow:0 1px 0 rgba(0,0,0,.04);
    font-weight:900;
    font-size:14px;
    line-height:1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .header__phone small{display:none !important;}

  /* Кнопка меню — справа, гарантированно внутри экрана. Иконка справа от текста */
  .burger{
    grid-column:3;
    justify-self:end;
    display:flex !important;
    flex-direction:row-reverse;
    gap:8px;
    min-width:auto;
    height:34px;
    padding:0 10px;
    border-radius:10px;
    margin-right:14px !important; /* сильный отступ от правой границы (двигаем влево) */
  }
  .burger__icon{gap:3px;}
  .burger__icon span{width:16px;}
  .burger__label{font-size:11px;font-weight:950;}

  /* Меню (категории) на мобиле — оверлей, чтобы не ломало вёрстку */
  .nav{
    display:none;
    position:fixed;
    inset:0;
    z-index:79;/* ниже бургера (z-index:90) */
    background:rgba(2,6,23,.45);
    padding:calc(64px + env(safe-area-inset-top)) 14px 14px;
  }
  .nav.is-open{display:block;}
  .nav__inner{
    height:100%;
    overflow:auto;
    flex-direction:column;
    align-items:stretch;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:10px;
    box-shadow:var(--shadow2);
  }
  .nav a{border:1px solid var(--line);background:#fff;}
}



/* ================================
   MOBILE MENU FIX v65
   На маленьких телефонах используем "дропдаун" (position:static),
   чтобы меню раскрывалось стабильно и не ломалось в некоторых браузерах.
   ================================ */
@media (max-width:560px){
  .nav{
    display:none !important;
    position:static !important;
    inset:auto !important;
    background:transparent !important;
    padding:0 !important;
    z-index:auto !important;
    border-top:1px solid var(--line) !important;
  }
  .nav.is-open{display:block !important;}

  .nav__inner{
    flex-direction:column !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    gap:0 !important;
    padding:10px !important;
    margin:10px 0 0 !important;
    background:var(--card) !important;
    border:1px solid var(--line) !important;
    border-radius:16px !important;
    box-shadow:var(--shadow) !important;
    height:auto !important;
    overflow:visible !important;
  }

  .nav__inner a{
    display:block !important;
    width:100% !important;
    padding:12px 10px !important;
    border-radius:12px !important;
    font-weight:800 !important;
    border:0 !important;
    background:transparent !important;
  }
  .nav__inner a:not(:last-child){
    border-bottom:1px solid var(--line) !important;
    border-radius:0 !important;
  }
}
@media (max-width:420px){
  .logo__img{height:100px !important;max-width:340px !important;margin:-20px 0 -20px -10px !important;}
  .header__phone{max-width:min(190px, calc(100vw - 200px));font-size:13px;padding:7px 10px;}
  .burger{margin-right:12px !important;height:32px;padding:0 9px;}
}


/* SEO landing blocks */
.seo-block{margin-top:16px}
.seo-block__title{margin:0 0 10px}
.seo-block__text p{margin:0 0 10px; color:var(--muted); line-height:1.55}
.seo-table{width:100%; border-collapse:separate; border-spacing:0; overflow:hidden; border:1px solid rgba(226,232,240,.9); border-radius:14px; background:#fff}
.seo-table th,.seo-table td{padding:10px 12px; border-bottom:1px solid rgba(226,232,240,.9); vertical-align:top}
.seo-table th{width:36%; color:#64748b; font-weight:900; text-align:left}
.seo-table tr:last-child th,.seo-table tr:last-child td{border-bottom:none}
.faq{margin-top:6px}
.faq-item{border:1px solid rgba(226,232,240,.9); border-radius:14px; padding:10px 12px; background:#fff; margin-top:10px}
.faq-item summary{cursor:pointer; font-weight:950; color:var(--ink); outline:none}
.faq-item div{margin-top:8px; color:var(--muted); line-height:1.55}


/* Qty controls + calculators */
.qtybox{display:flex;align-items:center;gap:8px}
.qtybtn{width:38px;height:38px;border-radius:14px;border:1px solid rgba(226,232,240,.9);background:#fff;font-weight:950;color:var(--ink);cursor:pointer}
.qtybtn:active{transform:translateY(1px)}
.qtyunit{font-size:13px;color:#64748b;font-weight:900;white-space:nowrap}
.calcbox{margin-top:10px;padding:12px;border:1px solid rgba(226,232,240,.9);border-radius:16px;background:rgba(255,255,255,.92)}
.calcbox__row{display:flex;justify-content:space-between;gap:12px;margin-top:6px}
.calcbox__k{color:#64748b;font-size:12px;font-weight:900}
.calcbox__v{color:var(--ink);font-weight:950}
@media(max-width:560px){.qtybtn{width:40px;height:40px}}


/* Requisites table (commercial factors) */
.table{width:100%;border-collapse:collapse;margin-top:10px}
.table td{padding:10px 12px;border-top:1px solid rgba(0,0,0,.08);vertical-align:top}
.table tr:first-child td{border-top:0}
.req-card .table td:first-child{width:38%;color:rgba(0,0,0,.65)}
@media (max-width: 640px){
  .req-card .table td:first-child{width:46%}
}


/* Region switcher */
.header__regions{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:12px;opacity:.9}
.header__regions .region{color:inherit;text-decoration:none;border-bottom:1px dashed rgba(0,0,0,.25)}
.header__regions .region.is-active{font-weight:800;border-bottom-color:transparent}
.header__regions .dot{opacity:.6}
@media (max-width:1024px){
  .header__regions{font-size:11px;gap:6px}
}

.header__contact{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
/* --- Mobile UX pack v66: scroll lock for overlay nav --- */
body.nav-open{overflow:hidden;touch-action:none}
html,body{overflow-x:hidden}
.content, .prose, .seo, .card, .section, .main{overflow-wrap:anywhere;word-break:break-word}
/* --- Mobile tables as cards (price/spec/SEO tables) --- */
@media(max-width:720px){
  table{display:block;width:100%;border-collapse:separate;border-spacing:0}
  table tbody{display:block}
  table tr{display:block;margin:0 0 10px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}
  table th, table td{display:block;width:100%;padding:10px 12px;border:0}
  table th{font-weight:950;background:rgba(15,23,42,.04);color:var(--ink)}
  table td{color:var(--ink)}
}


/* =========================================================
   Mobile 360 pack v67
   Цель: «как приложение» на маленьких телефонах (360–390px)
   без поломки старых правок (идём только оверрайдами в конце)
   ========================================================= */

/* Make taps feel native */
.btn, .burger, .nav a, .chip, .pill, .qbtn, .qbtn2, .qtybtn{touch-action:manipulation}

/* A few pages have <main> headings outside .wrap — normalize via CSS */
.main > h1, .main > h2{
  max-width:1200px;
  margin-left:auto;
  margin-right:auto;
  padding-left:16px;
  padding-right:16px;
}

@media(max-width:420px){
  /* global rhythm */
  .wrap{padding-left:12px;padding-right:12px}
  .main{padding:14px 0 32px}
  .main > h1, .main > h2{padding-left:12px;padding-right:12px}

  /* typography */
  h1{font-size:24px;line-height:1.18;margin:10px 0 10px}
  .h2 h2{font-size:18px}
  .muted,.small{font-size:12px}

  /* no iOS zoom */
  input, select, textarea{font-size:16px}

  /* chips/search */
  .chip{padding:7px 10px;font-size:12px}
  .searchbar{padding:10px 10px;gap:8px;border-radius:14px}
  .searchbar .kbd{padding:5px 7px;border-radius:9px}

  /* buttons */
  .btn{min-height:44px;padding:12px 12px;border-radius:14px}
  .btn.small{min-height:40px}

  /* cards/catalog */
  .card .body, .card .pad{padding:12px !important}
  .card .body{min-height:0 !important}
  .card .img{aspect-ratio:4/3}
  .price .now{font-size:17px}
  .price .old{font-size:12px}
  .actions{gap:10px}

  /* header: keep it clean on 360–390 */
  .header__regions{display:none !important}
  .header__phone{transform:none !important;max-width:calc(100vw - 170px);padding:7px 10px;font-size:12.5px}
  .burger{margin-right:10px !important;height:34px}
  .logo__img{height:96px !important;max-width:320px !important;margin:-22px 0 -22px -8px !important}

  /* product page */
  .product{border-radius:22px}
  .product .pwrap{padding:12px}
  #p-title{font-size:22px;line-height:1.14;margin:0 0 8px}
  .sub{font-size:12px}
  .variants .variant-row{flex-direction:column;gap:6px}
  .variants .variant-label{min-width:0}
  #cartForm{flex-direction:column;align-items:stretch;gap:10px}
  #cartForm .qtybox{width:100%;justify-content:space-between}
  #cartForm .qty{width:96px;max-width:none}
  #cartForm .btn{width:100%;justify-content:center}
  #cartForm .btn.light{opacity:.98}
  .note{padding:10px;border-radius:16px}

  /* cart/checkout small polish */
  .cartRow{grid-template-columns:84px 1fr}
  .qbtn2{width:42px;height:42px}
  .order-item img{width:48px;height:48px}
}

@media(max-width:360px){
  .wrap{padding-left:10px;padding-right:10px}
  .main > h1, .main > h2{padding-left:10px;padding-right:10px}

  /* header ultra narrow */
  .header__phone{max-width:calc(100vw - 150px);padding:6px 9px;font-size:12px}
  .burger{min-width:40px;padding:0 10px;gap:0}
  .burger__label{display:none}
  .logo__img{height:92px !important;max-width:300px !important;margin:-20px 0 -20px -8px !important}

  /* catalog actions stack */
  .actions{display:grid;grid-template-columns:1fr;gap:10px}
  .actions .btn{width:100%}
}
