/* Премьер Айс — B2B-платформа. Айдентика по брендбуку v1.0 */
:root{
  --yellow:#FFD400;        /* жёлтый акцент */
  --yellow-hover:#F0C800;
  --text:#202124;          /* тёмный текст */
  --muted:#8A8F98;         /* неактивный текст */
  --muted2:#5F6670;        /* вторичный текст */
  --tile:#F7F9FA;          /* снежный фон */
  --tile-hover:#EEF2F5;
  --white:#fff;
  --green:#2E9B66;         /* успех / наличие */
  --red:#D63A2F;           /* ошибка / нет в наличии */
  --orange:#FF8A00;        /* акция / промо */
  --blue:#173B57;          /* глубокий синий */
  --ice:#BDEBFF;           /* ледяной голубой */
  --border:#E6EAEF;
  --r-s:8px;               /* кнопки, поля */
  --r-m:12px;              /* карточки, модальные окна */
  --r-l:16px;              /* крупные блоки и баннеры */
  --r-xl:16px;
  --shadow:0 2px 8px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.10);
  --font:"Inter",-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-disp:"Inter",-apple-system,"Segoe UI",Roboto,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font:14px/1.4 var(--font);color:var(--text);background:var(--white)}
button{font:inherit;color:inherit;cursor:pointer;border:none;background:none;padding:0}
input,select,textarea{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
.hidden{display:none!important}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#E3E1DE;border-radius:99px}
::-webkit-scrollbar-track{background:transparent}

/* ================= header ================= */
.hdr{position:sticky;top:0;z-index:60;background:var(--white)}
.hdr-in{max-width:1480px;margin:0 auto;display:flex;align-items:center;gap:14px;padding:12px 24px}
.logo{display:flex;align-items:center;gap:10px;cursor:pointer;flex:0 0 auto}
.logo-mark{width:44px;height:44px;display:flex;align-items:center;justify-content:center}
.logo-mark svg{width:100%;height:100%}
.logo-name{font-family:var(--font-disp);font-size:17px;font-weight:700;line-height:1.15;letter-spacing:-.2px}
.logo-sub{font-size:7.5px;font-weight:700;letter-spacing:2.4px;text-transform:uppercase;color:var(--blue);margin-top:2px}
.addr-chip{display:flex;flex-direction:column;align-items:flex-start;background:var(--tile);border-radius:var(--r-m);padding:7px 14px;line-height:1.25;max-width:300px;text-align:left;transition:background .15s}
.addr-chip:hover{background:var(--tile-hover)}
.addr-pin{display:none}
.addr-text{font-weight:500;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:270px}
.addr-sub{font-size:11.5px;color:var(--muted2)}
.search{flex:1;position:relative;max-width:640px}
.search input{width:100%;background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);padding:11px 38px 11px 40px;outline:none;font-size:14px;transition:border-color .15s}
.search input:hover{border-color:#CBD3DB}
.search input:focus{border-color:var(--yellow);box-shadow:0 0 0 2px rgba(255,212,0,.35)}
.search-ico{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.5}
.search-clear{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:var(--muted);display:none;padding:6px}
.search.has-value .search-clear{display:block}
.hdr-phone{flex:0 0 auto;text-align:right;line-height:1.2}
.hdr-phone-num{display:block;font-weight:700;font-size:15px}
.hdr-phone-sub{font-size:11.5px;color:var(--muted2)}
.addr-chip{cursor:pointer}
.fav-btn{position:relative;flex:0 0 auto;width:44px;height:44px;border-radius:var(--r-m);background:var(--tile);color:#C9CED6;font-size:19px;display:flex;align-items:center;justify-content:center;transition:background .12s,color .12s}
.fav-btn:hover{background:var(--tile-hover);color:var(--red)}
.fav-btn.has{color:var(--red)}
.fav-btn b{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;border-radius:99px;background:var(--red);color:#fff;font-size:11px;font-weight:700;display:none;align-items:center;justify-content:center;padding:0 4px}
.fav-btn.has b{display:flex}
.fav-bar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.pm-fav{position:absolute;top:10px;right:10px;width:40px;height:40px;border-radius:99px;background:var(--white);color:#C9CED6;font-size:19px;display:flex;align-items:center;justify-content:center;transition:color .12s,transform .12s;box-shadow:0 1px 6px rgba(16,24,40,.14);z-index:2}
.pm-fav:hover{color:var(--red)}
.pm-fav.on{color:var(--red)}
.pm-out{color:var(--red);font-weight:600}
/* у админа/аналитика покупательских элементов нет */
body.is-admin .fav-btn,
body.is-admin .pfav,
body.is-admin .pm-fav,
body.is-admin .fav-bar{display:none!important}

/* ================= page grid ================= */
.page{max-width:1480px;margin:0 auto;display:flex;align-items:flex-start;gap:8px;padding:8px 24px 40px}

/* ---- left rail ---- */
.rail{flex:0 0 250px;position:sticky;top:76px;max-height:calc(100vh - 90px);overflow-y:auto;padding:8px 4px 16px 0}
.rail-group{font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);padding:16px 14px 6px}
.rail-item{display:flex;align-items:center;gap:11px;width:100%;text-align:left;padding:9px 14px;border-radius:var(--r-m);font-size:14px;font-weight:500;transition:background .12s}
.rail-item:hover{background:var(--tile)}
.rail-item.active{background:var(--tile);font-weight:700}
.rail-ico{width:26px;height:26px;display:flex;align-items:center;justify-content:center;font-size:17px;background:var(--tile);border-radius:8px;flex:0 0 auto}
.rail-item.active .rail-ico{background:var(--yellow)}
.rail-ico.has-img{background:transparent;overflow:hidden}
.rail-item.active .rail-ico.has-img{background:transparent}
/* PNG-значки категорий: картинка заполняет контейнер, фолбэк-эмодзи центрируется */
.cat-ico-img{width:100%;height:100%;object-fit:cover;display:block}
.cat-ico-emoji{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;line-height:1}
.rail-cnt{margin-left:auto;font-size:12px;color:var(--muted);font-weight:400}

/* ---- main ---- */
.main{flex:1;min-width:0;padding:8px 8px 0 12px}

/* hero (брендбук, стр. 5) */
.hero{position:relative;background:var(--blue);border-radius:var(--r-l);color:#fff;
  padding:38px 40px;margin-bottom:16px;overflow:hidden}
.hero h1{margin:0 0 10px;font-size:27px;font-weight:700;line-height:1.25;letter-spacing:-.3px;max-width:560px;position:relative;z-index:2}
.hero p{margin:0 0 20px;font-size:14.5px;color:#C8DCEC;max-width:480px;position:relative;z-index:2}
.hero-cta{position:relative;z-index:2;padding:13px 26px;font-size:14.5px}
.hero-snow{position:absolute;inset:0;pointer-events:none;color:rgba(189,235,255,.16)}
.hero-snow span{position:absolute;font-size:90px;line-height:1}
.hero-snow span:nth-child(1){right:6%;top:-18px;font-size:130px}
.hero-snow span:nth-child(2){right:26%;bottom:-26px}
.hero-snow span:nth-child(3){right:14%;top:46%;font-size:56px}
.hero-snow span:nth-child(4){left:42%;top:-22px;font-size:64px}

/* преимущества (строка под hero) */
.advantages{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}
.adv{display:flex;align-items:center;gap:11px;background:var(--white);border:1px solid var(--border);border-radius:var(--r-m);padding:12px 14px}
.adv-ico{width:40px;height:40px;border-radius:10px;background:#E9F7FF;display:flex;align-items:center;justify-content:center;font-size:19px;flex:0 0 auto}
.adv b{display:block;font-size:13px;font-weight:600}
.adv span{font-size:11.5px;color:var(--muted2)}

/* banners */
.banners{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:26px}
.banner{position:relative;border-radius:var(--r-xl);padding:20px 22px;text-align:left;min-height:118px;overflow:hidden;transition:transform .15s,box-shadow .15s}
.banner:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.banner-t{font-family:var(--font-disp);font-size:17px;font-weight:700;margin-bottom:6px}
.banner-d{font-size:13px;opacity:.75;max-width:75%}
.banner-e{position:absolute;right:14px;bottom:8px;font-size:44px;font-weight:900;opacity:.9}
.b-yellow{background:linear-gradient(135deg,#FFE45C,#FFD400)}
.b-green{background:linear-gradient(135deg,#E2F5FF,#BDEBFF)}
.b-pink{background:linear-gradient(135deg,#FFE3BF,#FFC98A)}

/* home sections */
.hsec{margin-bottom:30px}
.cat-pills + .hsec{margin-top:24px}  /* зазор над первой секцией = зазору между секциями (16px паддинга плиток + 24px = 40px) */
.hsec-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;cursor:pointer;width:max-content}
.hsec-head h2{margin:0;font-family:var(--font-disp);font-size:19px;font-weight:700;letter-spacing:-.2px;display:flex;align-items:center;gap:8px}
.hsec-ico{width:30px;height:30px;border-radius:9px;overflow:hidden;flex:0 0 auto;display:inline-flex}
.hsec-ico .cat-ico-emoji{font-size:20px}
.hsec-head:hover h2{color:#000;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.hsec-cnt{font-size:14px;color:var(--muted);font-weight:500}
.hsec-arrow{font-size:16px;color:var(--muted)}
.hrow{display:grid;grid-auto-flow:column;grid-auto-columns:188px;gap:12px;overflow-x:auto;padding:4px 2px 10px;scroll-snap-type:x proximity;min-height:368px}
.hrow .pcard{scroll-snap-align:start}

/* ---- list view ---- */
.list-head{display:flex;align-items:baseline;gap:12px;margin:6px 0 14px}
.list-head h1{margin:0;font-family:var(--font-disp);font-size:24px;font-weight:700;letter-spacing:-.3px}
.result-count{color:var(--muted);font-size:14px}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.chip{background:var(--tile);border-radius:99px;padding:8px 15px;font-size:13.5px;font-weight:500;transition:background .12s}
.chip:hover{background:var(--tile-hover)}
.chip.on{background:var(--yellow);font-weight:600}
.chip-select{border:none;outline:none;appearance:auto;padding:8px 10px}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(184px,1fr));gap:14px 12px}
.more-wrap{text-align:center;margin:26px 0 8px}

/* ================= product card (брендбук: белая карта с рамкой) ================= */
.pcard{display:flex;flex-direction:column;position:relative;width:100%;background:var(--white);
  border:1px solid var(--border);border-radius:var(--r-m);padding:10px;
  box-shadow:0 2px 8px rgba(16,24,40,.04);transition:box-shadow .15s,border-color .15s}
.pcard:hover{box-shadow:var(--shadow);border-color:#D6DEE6}
.pimg{position:relative;aspect-ratio:1/1;background:var(--white);border-radius:var(--r-s);display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;margin-bottom:8px;padding:6px}
.pimg img{max-width:100%;max-height:100%;object-fit:contain}
.pimg .noimg{font-size:46px;opacity:.22}
.pfrz{position:absolute;top:2px;right:2px;width:26px;height:26px;border-radius:99px;background:#E9F7FF;color:#2D7FB0;display:flex;align-items:center;justify-content:center;font-size:13px;pointer-events:none}
.pfav{position:absolute;top:4px;right:4px;width:30px;height:30px;border-radius:99px;background:rgba(255,255,255,.92);color:#C9CED6;display:flex;align-items:center;justify-content:center;font-size:16px;z-index:3;box-shadow:0 1px 4px rgba(16,24,40,.12);transition:color .12s,transform .12s}
.pfav:hover{transform:scale(1.1)}
.pfav.on{color:var(--red)}
.pbadges{position:absolute;top:2px;left:2px;display:flex;flex-direction:column;gap:4px;z-index:2;pointer-events:none}
.pbadge{font-size:10.5px;font-weight:700;padding:3px 9px;border-radius:99px;color:#fff;width:max-content}
.pbadge.hit{background:var(--red)}
.pbadge.new{background:var(--orange)}
.pbadge.promo{background:var(--yellow);color:var(--text)}
.pctl{margin-top:9px}
.pbuy{display:flex;gap:8px}
.qstep{display:flex;align-items:center;background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);height:36px;flex:1}
.qstep button{flex:1;height:34px;font-size:16px;font-weight:600;color:var(--muted2)}
.qstep button:hover{color:var(--text)}
.qstep b{min-width:26px;text-align:center;font-size:13.5px}
.pcart{width:44px;height:36px;border-radius:var(--r-s);background:var(--yellow);font-size:16px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background .12s}
.pcart:hover{background:var(--yellow-hover)}
.pstep{display:flex;align-items:center;justify-content:space-between;background:var(--yellow);border-radius:var(--r-s);height:36px;width:100%}
.pstep button{width:40px;height:36px;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pstep button:hover{background:var(--yellow-hover);border-radius:var(--r-s)}
.pstep b{text-align:center;font-size:13px}
.pprice{font-size:16.5px;font-weight:700;letter-spacing:-.2px}
.pprice .pper{font-size:12px;font-weight:500;color:var(--muted2)}
.pname{font-size:13px;line-height:1.35;margin-top:2px;cursor:pointer;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px;font-weight:500}
.pname:hover{color:var(--blue)}
.pmeta{font-size:11.5px;color:var(--muted);margin:3px 0 6px}

/* ================= cart column ================= */
.cartcol{flex:0 0 300px}
.cartcol-sticky{position:sticky;top:76px;min-height:280px;background:var(--white);border:1px solid var(--border);border-radius:var(--r-l);box-shadow:0 2px 8px rgba(16,24,40,.04);display:flex;flex-direction:column;max-height:calc(100vh - 92px);overflow:hidden}
.cartcol-head{display:flex;align-items:center;justify-content:space-between;font-family:var(--font-disp);font-size:17px;font-weight:700;padding:18px 18px 8px}
.cart-clear-mini{font-size:14px;opacity:.5;padding:4px}
.cart-clear-mini:hover{opacity:1}
.cartcol-body{flex:1;overflow-y:auto;padding:4px 12px}
.cart-empty{text-align:center;color:var(--muted2);padding:38px 14px;font-size:13.5px}
.cart-empty .ce-ico{font-size:42px;margin-bottom:8px}
.cline{display:flex;gap:10px;padding:9px 6px;border-radius:var(--r-m);align-items:center}
.cline:hover{background:var(--tile)}
.cline-img{flex:0 0 48px;height:48px;background:var(--tile);border-radius:var(--r-s);display:flex;align-items:center;justify-content:center;overflow:hidden}
.cline-img img{max-width:100%;max-height:100%;object-fit:contain}
.cline-img span{font-size:20px;opacity:.3}
.cline-info{flex:1;min-width:0}
.cline-name{font-size:12px;font-weight:500;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cline-meta{font-size:11px;color:var(--muted);margin-top:2px}
.cline-right{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.cline-sum{font-size:13px;font-weight:700}
.cstep{display:flex;align-items:center;background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);height:26px}
.cstep button{width:24px;height:26px;font-size:14px;font-weight:700}
.cstep b{min-width:22px;text-align:center;font-size:12px}
.cartcol-foot{padding:12px 16px 16px}
.minorder{font-size:12px;border-radius:var(--r-s);padding:8px 12px;margin-bottom:10px;background:var(--tile)}
.minorder.bad{color:var(--muted2)}
.minorder.ok{color:var(--green);font-weight:600}
.minorder .bar{height:5px;background:#E3E8ED;border-radius:99px;margin-top:6px;overflow:hidden}
.minorder .bar i{display:block;height:100%;background:var(--yellow);border-radius:99px}
.minorder.ok .bar i{background:var(--green)}
.totline{display:flex;justify-content:space-between;font-size:12.5px;color:var(--muted2);padding:1.5px 2px}
.totline.grand{font-family:var(--font-disp);font-size:15px;font-weight:700;color:var(--text);padding-top:8px}
.btn-yellow{background:var(--yellow);border-radius:var(--r-s);font-weight:600;padding:12px 18px;transition:background .12s,transform .1s;text-align:center}
.btn-yellow:hover{background:var(--yellow-hover)}
.btn-yellow:active{transform:scale(.98)}
.btn-yellow:disabled{opacity:.45;cursor:not-allowed}
.btn-gray{background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);font-weight:600;padding:10px 18px;transition:background .12s,border-color .12s}
.btn-gray:hover{background:var(--tile);border-color:#CBD3DB}
.btn-big{width:100%;font-size:15px}
.cart-actions{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.cart-dl{font-size:12px;color:var(--muted2);text-decoration:underline;text-align:center;margin-top:8px;width:100%}
.cart-dl:hover{color:var(--text)}

/* ---- floating cart ---- */
.fab-cart{position:fixed;right:18px;bottom:18px;z-index:80;background:var(--yellow);border-radius:18px;padding:13px 20px;display:flex;align-items:center;gap:14px;font-size:15px;font-weight:700;box-shadow:0 6px 24px rgba(33,32,31,.25)}

/* ================= overlays ================= */
.overlay{position:fixed;inset:0;background:rgba(33,32,31,.4);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}
.modal{background:var(--white);border-radius:var(--r-xl);max-width:780px;width:100%;max-height:92vh;overflow-y:auto;position:relative;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.3)}
.x{position:absolute;top:14px;right:14px;width:34px;height:34px;border-radius:12px;background:var(--tile);color:var(--muted2);font-size:14px;display:flex;align-items:center;justify-content:center;z-index:5}
.x:hover{background:var(--tile-hover);color:var(--text)}

/* product modal */
.pm-grid{display:flex;gap:24px}
.pm-img{position:relative;flex:0 0 300px;height:300px;background:var(--tile);border-radius:var(--r-l);display:flex;align-items:center;justify-content:center;padding:14px}
.pm-img img{max-width:100%;max-height:100%;object-fit:contain;mix-blend-mode:multiply}
.pm-img .noimg{font-size:74px;opacity:.2}
.pm-info{flex:1;min-width:0}
.pm-info h2{margin:0 0 4px;font-size:19px;font-weight:800;line-height:1.25;letter-spacing:-.2px;padding-right:30px}
.pm-cat{color:var(--muted);font-size:12.5px;margin-bottom:14px}
.pm-price{font-family:var(--font-disp);font-size:24px;font-weight:700;letter-spacing:-.4px}
.pm-price small{font-size:13px;font-weight:500;color:var(--muted2)}
.pm-portion{font-size:13px;color:var(--muted2);margin:2px 0 14px}
.pm-facts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.pm-fact{background:var(--tile);border-radius:var(--r-s);padding:7px 12px;font-size:12px;line-height:1.3}
.pm-fact b{display:block;font-size:13px}
.pm-buy{display:flex;gap:10px;align-items:center;margin:6px 0 4px}
.pm-buy .pstep{height:46px;border-radius:var(--r-s);width:auto;flex:0 0 auto}
.pm-buy .pstep button{width:42px;height:46px;font-size:19px}
.pm-buy .pstep b{min-width:34px;font-size:15px}
.pm-buy .btn-yellow{flex:1;padding:13px}
.pm-codes{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.6}
.pm-ingredients{margin-top:14px;font-size:12.5px;color:var(--muted2);background:var(--tile);border-radius:var(--r-m);padding:12px 14px}
.pm-ingredients b{color:var(--text)}

/* drawer (mobile cart) */
#cartOverlay{justify-content:flex-end;padding:0}
.drawer{background:var(--white);width:480px;max-width:100%;height:100vh;display:flex;flex-direction:column}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 8px}
.drawer-head h2{margin:0;font-size:19px;font-weight:800}
.drawer-head .x{position:static}
.drawer-body{padding:4px 14px}
.drawer .cartcol-foot{border-top:1px solid var(--tile);background:var(--white)}
.drawer .cline:hover{background:var(--tile)}
.drawer .cline-img{background:var(--tile)}
.drawer .cstep{background:var(--tile);box-shadow:none}
.drawer .minorder{background:var(--tile)}

/* checkout */
.checkout-modal{max-width:640px}
.checkout-modal h2{margin:0 0 18px;font-size:22px;font-weight:800;letter-spacing:-.3px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-grid label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;color:var(--muted2)}
.form-grid input,.form-grid textarea{background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);padding:10px 13px;outline:none;font-weight:400;color:var(--text)}
.form-grid input:focus,.form-grid textarea:focus{border-color:var(--yellow);box-shadow:0 0 0 2px rgba(255,212,0,.3)}
.form-grid input.invalid{border-color:var(--red);box-shadow:0 0 0 2px rgba(214,58,47,.18);background:#fff8f7}
.form-wide{grid-column:1/-1}
.checkout-summary{background:var(--tile);border-radius:var(--r-m);padding:13px 16px;margin:16px 0;font-size:13.5px;line-height:1.5}
.form-note{font-size:11.5px;color:var(--muted);margin:12px 0 0}

/* done */
.done-modal{max-width:440px;text-align:center}
.done-ico{font-size:48px}
.done-modal h2{margin:8px 0 6px;font-size:21px;font-weight:800}
.done-hint{color:var(--muted2);font-size:13px}
.done-actions{display:flex;flex-direction:column;gap:8px;margin-top:18px}

/* empty */
.empty{text-align:center;padding:60px 20px;color:var(--muted2)}
.empty-ico{font-size:46px;margin-bottom:8px}

/* footer (структура как у Я.Лавки) */
.footer{background:var(--white);border-top:1px solid var(--tile);margin-top:36px}
.footer-in{max-width:1480px;margin:0 auto;padding:34px 24px 22px}
.footer-cols{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr 1fr;gap:28px 22px;margin-bottom:26px}
.fcol{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.fcol-h{font-family:var(--font-disp);font-size:12px;font-weight:700;margin-bottom:5px}
.f-link{font-size:12.5px;color:var(--muted2);text-align:left;padding:0;line-height:1.45}
.f-link:hover{color:var(--text)}
.footer-logo{margin-bottom:10px}
.f-phone{font-family:var(--font-disp);font-size:15px;font-weight:700;color:var(--text)}
.f-mut{font-size:11.5px;color:var(--muted);line-height:1.55}
.f-apps{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}
.f-app{display:flex;align-items:center;gap:6px;background:var(--tile);border-radius:10px;padding:7px 11px;font-size:11.5px;font-weight:600;color:var(--muted2)}
.f-app i{font-style:normal;font-size:9.5px;font-weight:700;background:var(--yellow);color:var(--text);border-radius:99px;padding:1px 6px}
.footer-seo{display:flex;flex-wrap:wrap;gap:8px 14px;padding:14px 0 4px;border-top:1px solid var(--tile)}
.footer-seo a{font-size:12.5px;color:var(--muted2);text-decoration:none}
.footer-seo a:hover{color:var(--text);text-decoration:underline}
.footer-bottom{border-top:1px solid var(--tile);padding-top:16px;font-size:11.5px;color:var(--muted);line-height:1.7}
.footer-bottom a{text-decoration:underline}
.footer-bottom a:hover{color:var(--text)}

/* инфо-модалка «Покупателям» */
.info-modal{max-width:640px}
.info-modal h2{font-family:var(--font-disp);font-size:15px;font-weight:700;margin:0 0 10px}
.info-modal section{margin-bottom:22px}
.info-modal section:last-child{margin-bottom:0}
.info-modal li{font-size:13.5px;line-height:1.6;margin-bottom:6px;color:var(--text)}
.info-modal ul,.info-modal ol{margin:0;padding-left:20px}
.info-modal section.flash{animation:infoFlash 1.2s ease}
@keyframes infoFlash{0%{background:var(--ice, #fdf6c8)}100%{background:transparent}}

/* toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--text);color:#fff;padding:12px 22px;border-radius:var(--r-m);font-size:13.5px;z-index:300;box-shadow:0 8px 28px rgba(0,0,0,.3);animation:toastIn .2s ease;max-width:90vw}
@keyframes toastIn{from{opacity:0;transform:translateX(-50%) translateY(8px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}

/* ================= auth / account ================= */
.auth-area{position:relative;flex:0 0 auto}
.auth-login-btn{padding:10px 16px;border-radius:var(--r-m)}
.user-chip{display:flex;align-items:center;gap:7px;background:var(--yellow);border-radius:var(--r-m);padding:10px 14px;font-weight:700;max-width:210px}
.user-chip:hover{background:var(--yellow-hover)}
.user-chip-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-chip-arr{font-size:11px;opacity:.6}
.user-menu{position:absolute;right:0;top:calc(100% + 8px);background:var(--white);border-radius:var(--r-m);box-shadow:var(--shadow);min-width:210px;padding:6px;z-index:90}
.user-menu button{display:block;width:100%;text-align:left;padding:10px 12px;border-radius:10px;font-weight:500}
.user-menu button:hover{background:var(--tile)}

.auth-modal{max-width:480px}
.auth-tabs{display:flex;gap:6px;background:var(--tile);border-radius:var(--r-m);padding:4px;margin-bottom:18px}
.auth-tab{flex:1;padding:10px;border-radius:12px;font-weight:600;color:var(--muted2)}
.auth-tab.on{background:var(--white);color:var(--text);box-shadow:0 1px 4px rgba(33,32,31,.1)}
.auth-form .btn-big{margin-top:14px}
.auth-note{font-size:12.5px;color:var(--muted2);margin:0 0 12px;background:var(--tile);border-radius:var(--r-s);padding:9px 12px}
.org-switch{display:flex;gap:10px;margin-bottom:12px}
.org-switch label{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;background:var(--tile);border-radius:var(--r-m);padding:11px;font-weight:600;cursor:pointer}
.org-switch label:has(input:checked){background:var(--yellow)}
.auth-err{background:#fdecea;color:#a33;border-radius:var(--r-s);padding:9px 12px;font-size:13px;margin-top:12px}

/* checkout authed */
.co-org{background:var(--tile);border-radius:var(--r-m);padding:11px 14px;font-size:13px;line-height:1.5;margin-bottom:12px}
.co-guest-hint{font-size:12.5px;color:var(--muted2);background:var(--tile);border-radius:var(--r-s);padding:9px 12px;margin-bottom:12px}
.linklike{text-decoration:underline;font-weight:600}
.form-grid select{background:var(--white);border:1px solid var(--border);border-radius:var(--r-s);padding:10px 13px;outline:none;font-weight:400;color:var(--text);width:100%}
.co-save-addr{font-weight:400;font-size:12px;color:var(--muted2);display:flex;align-items:center;gap:5px;margin-top:4px}
.co-save-addr i{font-style:normal}

/* account view */
.acc-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin:6px 0 14px}
.acc-head h1{margin:0;font-family:var(--font-disp);font-size:24px;font-weight:700;letter-spacing:-.3px}
.acc-inn{color:var(--muted);font-size:14px}
.acc-tabs{margin-bottom:18px}
.acc-body{min-height:200px}
.acc-muted{color:var(--muted2);font-size:12.5px;line-height:1.5}
.acc-h3{font-size:18px;font-weight:800;margin:22px 0 10px}
.acc-search{max-width:420px;margin-bottom:14px}
.acc-search input{width:100%;background:var(--tile);border:none;border-radius:var(--r-m);padding:11px 14px 11px 38px;outline:none}

.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:18px}
.kpi{background:var(--tile);border-radius:var(--r-l);padding:13px 16px}
.kpi-accent{background:linear-gradient(135deg,#FFF6CC,#FFFDF2);border:1px solid #F2E08A}
.kpi-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.kpi b{display:block;font-family:var(--font-disp);font-size:20px;font-weight:700;letter-spacing:-.3px}
.kpi span{font-size:12px;color:var(--muted2);margin-top:3px;display:block}
.kpi-hint{display:block;font-size:10.5px;color:var(--muted);font-style:normal;margin-top:2px}
.kdelta{font-size:11px;font-weight:700;white-space:nowrap}
.kdelta.up{color:var(--green)}
.kdelta.down{color:var(--red)}
.kdelta.flat{color:var(--muted)}
.dash-section-title{font-family:var(--font-disp);font-weight:700;font-size:15px;margin:24px 0 12px;color:var(--text)}
.dash-section-title:first-child{margin-top:4px}

.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.chart-card{background:var(--white);border:1px solid var(--border);border-radius:var(--r-l);padding:16px 18px;box-shadow:0 1px 4px rgba(16,24,40,.05);margin-bottom:14px}
.chart-card h3{margin:0 0 12px;font-size:14.5px;font-weight:700}
.chart-wide{grid-column:1/-1}
.bars{display:flex;align-items:flex-end;justify-content:center;gap:10px;height:204px;padding:0 2px}
.bar-col{flex:1 1 0;min-width:0;max-width:120px;display:flex;flex-direction:column;align-items:center}
.bar-area{height:172px;width:100%;display:flex;align-items:flex-end;justify-content:center}
.bar-fill{width:62%;max-width:44px;min-height:4px;border-radius:6px 6px 0 0;background:linear-gradient(180deg,#FFE45C,#FFD400);position:relative}
.bar-val{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:600;color:var(--muted2);white-space:nowrap}
.bar-lbl{margin-top:7px;font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-align:center}

/* быстрый повтор (кабинет покупателя) */
.reorder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:10px}
.reorder-item{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--r-m);padding:10px 12px}
.reorder-info{min-width:0}
.reorder-info b{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reorder-info span{font-size:11.5px;color:var(--muted2)}
.reorder-add{padding:8px 13px;white-space:nowrap;flex:0 0 auto}

/* возврат клиентов */
.winback{border-color:#F2E08A;background:#FFFDF5}
.risk-days{color:var(--orange);font-weight:700}
.hbars{display:flex;flex-direction:column;gap:8px}
.hbar-row{display:grid;grid-template-columns:minmax(140px,1.4fr) 2fr minmax(120px,auto);gap:10px;align-items:center;font-size:12px}
.hbar-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hbar-track{background:var(--tile);border-radius:99px;height:12px;overflow:hidden}
.hbar-track i{display:block;height:100%;border-radius:99px}
.hbar-val{color:var(--muted2);text-align:right;white-space:nowrap}
.donut-wrap{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.donut-box{position:relative;width:150px;height:150px;flex:0 0 auto}
.donut{width:100%;height:100%;display:block}
.donut-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}
.donut-center b{font-family:var(--font-disp);font-size:15px;font-weight:700;line-height:1.1}
.donut-center span{font-size:10px;color:var(--muted2)}
.dleg{flex:1;min-width:180px;display:flex;flex-direction:column;gap:5px}
.dleg-row{display:flex;align-items:center;gap:8px;font-size:12px}
.dleg-row i{width:11px;height:11px;border-radius:4px;flex:0 0 auto}
.dleg-row span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* orders history */
.ocard{background:var(--white);border:1px solid var(--tile);border-radius:var(--r-l);margin-bottom:10px;overflow:hidden}
.ocard-head{display:flex;align-items:center;gap:16px;padding:13px 16px;cursor:pointer}
.ocard-head:hover{background:var(--tile)}
.ocard-date{display:block;font-size:11.5px;color:var(--muted)}
.ocard-status{background:#E7F5FE;color:#1D6E9E;border-radius:99px;padding:4px 12px;font-size:12px;font-weight:600}
.ocard-sum{margin-left:auto;text-align:right;font-weight:800}
.ocard-sum small{display:block;font-weight:400;font-size:11px;color:var(--muted)}
.ocard-arr{color:var(--muted);font-size:12px;transition:transform .15s}
.ocard-arr.up{transform:rotate(180deg)}
.ocard-body{padding:0 16px 14px;border-top:1px solid var(--tile)}
.ocard-addr{font-size:12.5px;color:var(--muted2);margin:10px 0;line-height:1.5}
.otable{width:100%;border-collapse:collapse;font-size:12.5px}
.otable th{text-align:left;color:var(--muted);font-weight:600;padding:6px 8px;border-bottom:1px solid var(--tile)}
.otable td{padding:6px 8px;border-bottom:1px solid var(--tile)}
.ocard-tot{margin-top:10px;font-size:13px}
.ocard-actions{display:flex;gap:8px;margin-top:12px}
.ctable tbody tr{cursor:pointer}
.ctable tbody tr:hover{background:var(--tile)}

/* addresses */
.addr-list{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}
.addr-card{display:flex;align-items:center;gap:14px;background:var(--white);border:1px solid var(--tile);border-radius:var(--r-l);padding:13px 16px}
.addr-main{flex:1;min-width:0}
.addr-def{background:var(--yellow);border-radius:99px;font-size:10.5px;font-weight:700;padding:2px 9px;margin-left:8px}
.addr-text2{font-size:12.5px;color:var(--muted2);margin-top:3px}
.addr-btns{display:flex;gap:6px}
.addr-btns .btn-gray{padding:8px 11px}
.addr-form{background:var(--tile);border-radius:var(--r-l);padding:16px 18px;max-width:560px}
.addr-form h3{margin:0 0 12px;font-size:15px}
.addr-form .form-grid input{background:var(--white)}
.addr-form .btn-yellow{margin-top:12px}
.chk-inline{display:flex;align-items:center;gap:7px;font-size:13px;margin-top:10px;cursor:pointer}
.privacy-chk{font-size:11.5px;color:var(--muted2);align-items:flex-start;line-height:1.45;margin:12px 0 0}
.privacy-chk input{margin-top:2px;flex:0 0 auto}
.privacy-chk a{text-decoration:underline;font-weight:600;color:var(--text)}

/* profile */
.prof-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.prof-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:6px 0;border-bottom:1px solid var(--tile)}
.prof-row span{color:var(--muted2)}
.prof-grid .btn-yellow{margin-top:12px}

/* заголовки модалок и карточек — акцидентный шрифт */
.checkout-modal h2,.done-modal h2,.drawer-head h2{font-family:var(--font-disp);font-weight:700;font-size:19px}
.chart-card h3{font-family:var(--font-disp);font-weight:600;font-size:14px}
.acc-h3{font-family:var(--font-disp);font-weight:700;font-size:17px}
.hero-num,.fab-cart b{font-family:var(--font-disp)}

/* ================= мобильная навигация и шторки ================= */
.bottombar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:95;background:var(--white);
  border-top:1px solid var(--tile);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns:repeat(5,1fr)}
.bb-item{display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 2px;border-radius:12px;
  font-size:10.5px;font-weight:600;color:var(--muted2);position:relative}
.bb-item:active{background:var(--tile)}
.bb-item.active{color:var(--text)}
.bb-ico{font-size:20px;line-height:1}
.bb-item.active .bb-ico-wrap{background:var(--yellow)}
.bb-ico-wrap{width:42px;height:26px;border-radius:99px;display:flex;align-items:center;justify-content:center;transition:background .15s}
.bb-badge{position:absolute;top:0;left:calc(50% + 6px);background:var(--red);color:#fff;border-radius:99px;
  font-size:9.5px;font-weight:700;min-width:16px;height:16px;display:flex;align-items:center;justify-content:center;padding:0 4px}

/* шторка категорий (мобильный «Каталог») */
#catSheetOverlay{align-items:flex-end;padding:0}
.cat-sheet{background:var(--white);border-radius:16px 16px 0 0;width:100%;max-height:82vh;overflow-y:auto;padding:18px 16px calc(20px + env(safe-area-inset-bottom))}
.cat-sheet h2{margin:0 0 14px;font-family:var(--font-disp);font-size:18px;font-weight:700}
.cat-sheet .rail-group{padding:12px 2px 8px}
.cat-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.cat-tile{background:var(--tile);border-radius:var(--r-m);padding:12px 10px;text-align:center;display:flex;flex-direction:column;gap:6px;align-items:center}
.cat-tile:active{background:var(--tile-hover)}
.cat-tile .ct-ico{font-size:26px}
.cat-tile .ct-name{font-size:11.5px;font-weight:600;line-height:1.2}
.cat-tile .ct-cnt{font-size:10px;color:var(--muted)}

/* плитки «Популярные категории» (пастельные, как в брендбуке) */
.cat-pills{display:grid;grid-auto-flow:column;grid-auto-columns:84px;gap:10px;overflow-x:auto;padding:2px 2px 16px;-webkit-overflow-scrolling:touch}
.cat-pill{display:flex;flex-direction:column;align-items:center;gap:6px}
.cat-pill .cp-ico{width:66px;height:66px;border-radius:var(--r-l);display:flex;align-items:center;justify-content:center;font-size:28px;border:1px solid rgba(23,59,87,.06);overflow:hidden;transition:transform .12s}
.cat-pills .cat-pill .cp-ico.has-img{background:#fff}
.cat-pill:hover .cp-ico{transform:translateY(-2px)}
.cat-pill:nth-child(6n+1) .cp-ico{background:#FFF6CC}
.cat-pill:nth-child(6n+2) .cp-ico{background:#E9F7FF}
.cat-pill:nth-child(6n+3) .cp-ico{background:#EAF7EF}
.cat-pill:nth-child(6n+4) .cp-ico{background:#FDEEEC}
.cat-pill:nth-child(6n+5) .cp-ico{background:#FFF1E0}
.cat-pill:nth-child(6n+6) .cp-ico{background:#F0F1FB}
.cat-pill span{font-size:10.5px;font-weight:600;text-align:center;line-height:1.2;max-width:84px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text)}

/* ================= широкие экраны ================= */
@media (min-width:1700px){
  .hdr-in,.page,.footer-in{max-width:1860px}
  .rail{flex:0 0 290px}
  .cartcol{flex:0 0 350px}
  .pgrid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:18px 14px}
  .hrow{grid-auto-columns:205px;min-height:380px}  /* карточки шире → резервируем больше высоты */
  .search{max-width:760px}
  body{font-size:14.5px}
}

/* ================= бэк-офис (роль admin) ================= */
/* у админа нет покупательской части */
body.is-admin .cartcol,
body.is-admin .fab-cart,
body.is-admin .bottombar [data-bb="cart"],
body.is-admin .pctl,
body.is-admin #pmBuy { display: none !important; }
body.is-admin .pname { cursor: default; }

.pbadge.out { background: #8A8F98; }
.pout { font-size: 12px; font-weight: 600; color: var(--muted2); background: var(--tile); border-radius: var(--r-s); padding: 9px; text-align: center; margin-top: 9px; }

.cstatus { color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.stk-out { color: var(--red); font-weight: 700; }
.stk-low { color: var(--orange); font-weight: 700; }

.apager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0; font-size: 13px; color: var(--muted2); }
.prod-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.prod-toolbar .acc-search { flex: 1; min-width: 220px; margin: 0; }
.prod-note { background: #FFF9E0; border: 1px solid #F2E08A; border-radius: var(--r-s); padding: 8px 12px; margin-bottom: 12px; }

.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; }
.ptable td, .ptable th { white-space: nowrap; }
.ptable .prow { cursor: pointer; }
.ptable .prow:hover { background: var(--tile); }
.ptable td:nth-child(2), .ptable td b { white-space: normal; }
.pthumb { width: 42px; height: 42px; object-fit: contain; background: var(--tile); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }

.crm-edit { margin-bottom: 16px; }
.crm-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 12px; align-items: end; }
.crm-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted2); }
.crm-row select, .crm-row textarea { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-s); padding: 9px 12px; outline: none; font: inherit; color: var(--text); }
.crm-row .btn-yellow { padding: 10px 18px; }

.pcard-edit { display: flex; gap: 22px; margin-top: 14px; }
.pce-photo { flex: 0 0 240px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pce-img { aspect-ratio: 1/1; background: var(--tile); border: 1px solid var(--border); border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pce-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pce-img .noimg { font-size: 64px; opacity: .25; }
.pce-upl { cursor: pointer; }
.pce-info { flex: 1; min-width: 0; }
.pce-info h2 { font-family: var(--font-disp); font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.pce-flags { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.tgl { display: flex; align-items: center; gap: 7px; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-s); padding: 8px 13px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tgl input { width: 16px; height: 16px; accent-color: var(--yellow); }
.tgl:has(input:checked) { border-color: var(--yellow); background: #FFFBEA; }
.pce-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pce-1c h3 { font-family: var(--font-disp); font-size: 14px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.pce-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--tile); }
.pce-row span { color: var(--muted2); }
.pce-total { border-bottom: none; border-top: 2px solid var(--border); margin-top: 4px; }
.src-ok { font-size: 10.5px; font-weight: 700; color: var(--green); background: #E6F6EC; border-radius: 99px; padding: 2px 8px; }
.src-demo { font-size: 10.5px; font-weight: 700; color: #A05A00; background: #FFF3D6; border-radius: 99px; padding: 2px 8px; }

.api-docs { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.api-docs code, .pce-info code { background: var(--tile); padding: 2px 6px; border-radius: 5px; font-family: ui-monospace, monospace; font-size: 12px; }
.tok-show { margin-top: 12px; background: #FFFBEA; border: 1px solid var(--yellow); border-radius: var(--r-s); padding: 12px; }
.tok-val { display: block; margin-top: 6px; background: var(--text); color: #fff; padding: 10px 12px; border-radius: 8px; word-break: break-all; font-family: ui-monospace, monospace; font-size: 12.5px; }

/* аналитик — только просмотр: прячем элементы редактирования */
body.is-analyst .pce-flags,
body.is-analyst .pce-photo .pce-upl,
body.is-analyst .pce-photo #pceDel,
body.is-analyst .crm-edit { display: none !important; }

.sales-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sales-head h3 { margin: 0; }
.wh-cards .chart-card h3 { margin-bottom: 4px; }
.auth-forgot { display: block; margin: 12px auto 0; font-size: 13px; color: var(--muted2); }
.auth-forgot:hover { color: var(--text); }

/* ================= responsive ================= */
@media (max-width:1280px){
  .cartcol{display:none}
  .fab-cart.has-items{display:flex!important}
}
@media (max-width:980px){
  .rail{display:none}
  .addr-chip{display:none}
  .auth-area{display:none}
  .page{padding:8px 14px 84px}
  .main{padding:4px 0 0}
  .bottombar{display:grid}
  .fab-cart{display:none!important}
  .cat-pills{display:grid}
  .toast{bottom:86px}
  .hdr{box-shadow:0 1px 0 var(--tile)}
  .hdr-in{padding:10px 14px}
}
@media (max-width:640px){
  .hdr-in{flex-wrap:wrap;gap:8px}
  .hdr-phone{display:none}
  .search{order:3;flex:1 1 100%;max-width:none}
  .search input{padding:11px 36px 11px 38px}
  .logo-mark{width:38px;height:38px}
  .banners{grid-template-columns:repeat(3,1fr);gap:8px}
  .banner{min-height:92px;padding:12px;border-radius:18px}
  .banner-t{font-size:11.5px}
  .banner-d{display:none}
  .banner-e{font-size:26px;right:8px;bottom:6px}
  .pgrid{grid-template-columns:repeat(2,1fr);gap:14px 10px}
  .hrow{grid-auto-columns:43vw;min-height:356px}  /* мобильные карточки ниже — резерв как был (CLS на мобиле ок) */
  .hsec-head h2{font-size:14.5px}
  .hsec-ico{width:24px;height:24px;border-radius:7px}
  .list-head h1{font-size:17px}
  .acc-head h1{font-size:16px}
  .pm-grid{flex-direction:column}
  .pm-img{flex:none;height:230px}
  .form-grid{grid-template-columns:1fr}
  .charts-grid{grid-template-columns:1fr}
  .hbar-row{grid-template-columns:1fr;gap:3px}
  .hbar-val{text-align:left}
  .footer-cols{grid-template-columns:1fr 1fr}
  .fcol-brand{grid-column:1/-1}
  .footer{margin-bottom:0;padding-bottom:64px}
  /* модалки — нижние шторки, как в приложении */
  .overlay{align-items:flex-end;padding:0}
  .modal{border-radius:16px 16px 0 0;max-height:92vh;padding:22px 18px calc(22px + env(safe-area-inset-bottom))}
  #cartOverlay .drawer{width:100%;height:auto;max-height:92vh;border-radius:16px 16px 0 0}
  .hero{padding:24px 20px}
  .hero h1{font-size:19px}
  .hero p{font-size:13px}
  .advantages{grid-template-columns:1fr 1fr;gap:8px}
  .adv{padding:10px 11px}
  .kpis{grid-template-columns:repeat(2,1fr);gap:9px}
  .kpi{padding:11px 13px}
  .donut-box{width:130px;height:130px}
  .pcard-edit{flex-direction:column}
  .pce-photo{flex:none}
  .pce-grid{grid-template-columns:1fr}
  .crm-row{grid-template-columns:1fr}
}

/* ================= print ================= */
@media print{
  body>*{display:none!important}
  body>#printArea{display:block!important}
  #printArea{font:12px/1.4 Arial,sans-serif;color:#000}
  #printArea h1{font-size:16px}
  #printArea table{width:100%;border-collapse:collapse;margin-top:10px}
  #printArea th,#printArea td{border:1px solid #888;padding:4px 6px;font-size:11px;text-align:left}
  #printArea .pr-tot{font-weight:700}
}
