/* ================= Ноготок — базовый стиль витрины и админки ================= */

:root{
  --bg:#ffffff;
  --ink:#101010;
  --ink-2:#4a4a4a;
  --muted:#8d8a87;
  --line:#e8e5e2;
  --surface:#f6f3f1;
  --surface-2:#efeae6;
  --accent:#d4145a;
  --accent-dark:#a90f47;
  --sale:#e11d2e;
  --ok:#1a8f4c;
  --radius:4px;
  --shadow:0 18px 50px rgba(16,16,16,.14);
  --header-h:118px;
  --font:'Inter','Helvetica Neue',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;max-width:100%;overflow-x:clip;overscroll-behavior-x:none}
body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--bg);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;background:none;border:none;padding:0}
h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.02em}
.wrap{width:100%;max-width:1560px;margin:0 auto;padding:0 40px}
.hidden{display:none !important}
.scroll-lock{overflow:hidden}

/* ------------------------------------------------------------------ шапка */
.topbar{background:var(--ink);color:#fff;font-size:12px;letter-spacing:.03em}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;height:36px;gap:24px}
.topbar-left{display:flex;gap:26px;align-items:center;color:#cfcbc7}
.topbar a:hover{color:#fff}
.topbar-right{display:flex;gap:26px;align-items:center}
.topbar b{font-weight:600;letter-spacing:.06em}

.header{position:sticky;top:0;z-index:60;background:#fff;border-bottom:1px solid var(--line)}
.header-main{display:flex;align-items:center;gap:28px;height:74px}
.burger{display:flex;align-items:center;gap:10px;font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:600}
.burger-icon{width:18px;display:flex;flex-direction:column;gap:4px}
.burger-icon i{height:1.5px;background:var(--ink);display:block}
.logo{display:flex;flex-direction:column;line-height:1;margin-right:6px}
.logo-name{font-size:26px;font-weight:800;letter-spacing:.26em;text-transform:uppercase}
.logo-sub{font-size:9px;letter-spacing:.24em;text-transform:uppercase;color:var(--muted);margin-top:6px}
.search{flex:1;position:relative;max-width:760px}
.search input{
  width:100%;height:44px;border:1px solid var(--line);border-radius:var(--radius);
  padding:0 44px 0 16px;background:var(--surface);transition:.18s;
}
.search input:focus{outline:none;border-color:var(--ink);background:#fff}
.search-btn{position:absolute;right:6px;top:6px;width:32px;height:32px;display:grid;place-items:center;opacity:.6}
.header-actions{display:flex;gap:26px;align-items:center;margin-left:auto}
.action{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2);position:relative}
.action:hover{color:var(--ink)}
.action svg{width:22px;height:22px}
.badge-count{
  position:absolute;top:-6px;right:2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;
  background:var(--accent);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center;letter-spacing:0;
}
.navbar{border-top:1px solid var(--line)}
.navbar .wrap{display:flex;gap:30px;height:46px;align-items:center;overflow-x:auto;scrollbar-width:none}
.navbar .wrap::-webkit-scrollbar{display:none}
.navbar a{
  font-size:11.5px;letter-spacing:.11em;text-transform:uppercase;font-weight:500;
  white-space:nowrap;color:var(--ink-2);padding:4px 0;border-bottom:2px solid transparent;
}
.navbar a:hover,.navbar a.is-active{color:var(--ink);border-color:var(--accent)}
.navbar a.accent{color:var(--accent);font-weight:700}

/* --------------------------------------------------------------- каталог-меню */
.megamenu{
  position:fixed;left:0;right:0;bottom:0;top:var(--header-h);background:rgba(16,16,16,.35);z-index:55;display:none;
}
.megamenu.open{display:block}
.megamenu-panel{
  background:#fff;width:390px;max-width:92vw;height:100%;overflow-y:auto;
  padding:0 0 40px;box-shadow:var(--shadow);
}
.megamenu-grid{display:block}
.ctree-head{
  font-size:12px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;
  padding:20px 22px 14px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2;
}
.ctree-empty{padding:26px 22px;color:var(--muted);font-size:13px}

.ctree{list-style:none;margin:0;padding:0}
.ctree .ctree-row{display:flex;align-items:stretch;border-bottom:1px solid var(--line)}
.ctree .ctree-row a{
  flex:1;min-width:0;padding:14px 8px 14px 22px;font-size:14px;line-height:1.35;
  display:flex;align-items:center;gap:8px;transition:.14s;
}
.ctree .ctree-row a small{color:var(--muted);font-size:11.5px;font-weight:600}
.ctree .ctree-row a:hover{color:var(--accent)}
.ctree > li.on > .ctree-row > a{color:var(--accent);font-weight:600}
.ctree-toggle{
  width:52px;flex:none;font-size:22px;line-height:1;color:var(--muted);
  display:grid;place-items:center;transition:transform .2s,color .14s;
}
.ctree-toggle:hover{color:var(--ink)}
.ctree li.open > .ctree-row > .ctree-toggle{transform:rotate(90deg);color:var(--ink)}
.ctree-sub{list-style:none;margin:0;padding:4px 0 10px;background:var(--surface)}
.ctree-sub.hidden{display:none}
.ctree-sub li a{
  display:flex;justify-content:space-between;gap:10px;padding:10px 22px 10px 38px;
  font-size:13px;color:var(--ink-2);
}
.ctree-sub li a:hover{color:var(--accent)}
.ctree-sub li.on a{color:var(--accent);font-weight:600}
.ctree-sub li a small{color:var(--muted);font-size:11.5px}
.megamenu-item{
  display:flex;align-items:center;gap:12px;padding:16px 18px;border:1px solid var(--line);border-radius:var(--radius);
  font-size:13px;font-weight:500;transition:.16s;background:#fff;
}
.megamenu-item:hover{border-color:var(--ink);transform:translateY(-2px)}
.megamenu-item .tx{flex:1;min-width:0}
.megamenu-item .tx small{display:block;color:var(--muted);font-size:11px;margin-top:3px;font-weight:400}
.megamenu-item .arr{color:var(--muted);font-size:20px;line-height:1;flex:none}
.megamenu-head{
  grid-column:1/-1;display:flex;align-items:center;gap:16px;padding:0 4px 14px;margin-bottom:4px;
  border-bottom:1px solid var(--line);
}
.megamenu-head button{font-size:13px;color:var(--muted)}
.megamenu-head button:hover{color:var(--ink)}
.megamenu-head b{font-size:13px;letter-spacing:.12em;text-transform:uppercase}
.megamenu-item span.ic{
  width:38px;height:38px;border-radius:50%;background:var(--surface);display:grid;place-items:center;font-size:15px;flex:none;
}

/* ------------------------------------------------------------------- баннер */
.hero{position:relative;margin-top:8px;overflow:hidden}
.hero-track{display:flex;transition:transform .6s cubic-bezier(.4,0,.2,1)}
.hero-slide{min-width:100%;height:420px;display:flex;align-items:center;padding:0 72px;background-size:cover;background-position:center}
.hero-slide h1{font-size:48px;line-height:1.04;max-width:600px;font-weight:700;letter-spacing:-.03em}
.hero-slide p{font-size:16px;color:var(--ink-2);margin:18px 0 30px;max-width:460px}
.hero-dots{position:absolute;bottom:22px;left:72px;display:flex;gap:8px}
.hero-dots button{width:26px;height:3px;background:rgba(16,16,16,.25)}
.hero-dots button.on{background:var(--ink)}
.hero-arrow{
  position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;
  background:rgba(255,255,255,.85);display:grid;place-items:center;font-size:18px;transition:.16s;
}
.hero-arrow:hover{background:#fff;box-shadow:var(--shadow)}
.hero-arrow.prev{left:22px}
.hero-arrow.next{right:22px}

/* -------------------------------------------------------------- общие блоки */
.section{padding:56px 0 8px}
.section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:26px;gap:20px}
.section-head h2{font-size:30px;font-weight:700}
.section-head a{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--line);padding-bottom:2px}
.section-head a:hover{color:var(--ink);border-color:var(--ink)}

.tiles{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.tile{
  background:var(--surface);border-radius:var(--radius);padding:26px 22px;min-height:150px;
  display:flex;flex-direction:column;justify-content:space-between;transition:.18s;
}
.tile:hover{background:var(--surface-2);transform:translateY(-3px)}
.tile .ic{font-size:22px;opacity:.5}
.tile b{font-size:15px;font-weight:600;line-height:1.25}
.tile small{color:var(--muted);font-size:12px;display:block;margin-top:4px}

/* -------------------------------------------------------------- карточка товара */
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px 6px}
.grid.rail{grid-auto-flow:column;grid-auto-columns:minmax(240px,1fr);grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:10px}
.grid.rail::-webkit-scrollbar{height:3px}
.grid.rail::-webkit-scrollbar-thumb{background:var(--line)}
.card{position:relative;padding:14px;border-radius:var(--radius);transition:.18s;scroll-snap-align:start;background:#fff}
.card:hover{box-shadow:var(--shadow);z-index:2}
.card-media{position:relative;aspect-ratio:1/1;background:var(--surface);border-radius:var(--radius);overflow:hidden;display:grid;place-items:center}
.card-media img{width:100%;height:100%;object-fit:cover}
.ph{width:100%;height:100%;display:grid;place-items:center;text-align:center;padding:18px;background:
  linear-gradient(140deg,#f7f3f1 0%,#efe9e6 55%,#e9e2df 100%);}
.ph span{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#b3a9a4;font-weight:600;line-height:1.5}
.ph em{display:block;font-style:normal;font-size:30px;font-weight:800;color:#d8cdc7;margin-bottom:8px;letter-spacing:.04em}
.card-badges{position:absolute;top:10px;left:10px;display:flex;flex-direction:column;gap:5px;z-index:2}
.chip{font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;padding:4px 8px;border-radius:2px;background:var(--ink);color:#fff}
.chip.sale{background:var(--sale)}
.chip.new{background:var(--ok)}
.chip.hit{background:var(--accent)}
.chip.out{background:#a5a09c}
.card-brand{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:14px 0 6px;font-weight:600}
.card-title{font-size:13px;line-height:1.35;height:36px;overflow:hidden;color:var(--ink-2)}
.card-prices{display:flex;align-items:baseline;gap:9px;margin-top:12px}
.price{font-size:17px;font-weight:700;letter-spacing:-.01em}
.price.red{color:var(--sale)}
.price-old{font-size:12.5px;color:var(--muted);text-decoration:line-through}
.card-buy{
  margin-top:12px;width:100%;height:40px;border-radius:var(--radius);background:var(--ink);color:#fff;
  font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;transition:.16s;
}
.card-buy:hover{background:var(--accent)}
.card-buy.added{background:var(--ok)}
.card-ctl{margin-top:12px}
.card-ctl .card-buy{margin-top:0}
.card-qty{
  height:40px;display:flex;align-items:center;justify-content:space-between;
  border:1px solid var(--ink);border-radius:var(--radius);background:#fff;overflow:hidden;
}
.card-qty button{
  width:42px;height:100%;font-size:18px;line-height:1;font-weight:500;color:var(--ink);
  display:grid;place-items:center;transition:.14s;
}
.card-qty button:hover{background:var(--surface)}
.card-qty span{
  font-size:13px;font-weight:600;flex:1;text-align:center;white-space:nowrap;
}
.card-buy[disabled]{background:var(--surface-2);color:var(--muted);cursor:not-allowed}

/* ------------------------------------------------------------------ каталог */
.catalog{display:grid;grid-template-columns:250px 1fr;gap:40px;padding:28px 0 60px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:28px 0 50px}
.two-col>*{min-width:0}
.contact-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px}
.catalog>*,.product>*,.grid>*,.tiles>*,.usp>*,.footer-grid>*{min-width:0}
.crumbs{font-size:12px;color:var(--muted);padding:18px 0 6px;display:flex;gap:8px;flex-wrap:wrap}
.crumbs a:hover{color:var(--ink)}
.page-title{font-size:34px;font-weight:700;margin:6px 0 4px}
.page-sub{color:var(--muted);font-size:13px;margin-bottom:6px}
.subcats{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 4px}
.subcats a{
  display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border:1px solid var(--line);
  border-radius:20px;font-size:13px;background:#fff;transition:.16s;
}
.subcats a:hover{border-color:var(--ink)}
.subcats a.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.subcats a b{font-weight:600;color:var(--muted);font-size:11.5px}
.subcats a.on b{color:rgba(255,255,255,.7)}
.filters ul.checks{gap:11px}
.filters ul.checks .check{font-size:13px}
.filters li.sub a{padding-left:14px;font-size:12.5px;color:var(--muted)}
.filters li.sub a:hover,.filters li.sub a.on{color:var(--accent)}
/* ------------------------------------------------- панель фильтров */
.filters-back{display:none}
.filters-head{display:none}
.filters-foot{display:none}
.fgroup + .fgroup{margin-top:4px}
.finput{
  width:100%;height:42px;border:1px solid var(--line);border-radius:var(--radius);
  padding:0 12px;background:#fff;font-size:13px;
}
.finput:focus{outline:none;border-color:var(--ink)}
.more-link{font-size:12px;color:var(--ink-2);border-bottom:1px dashed var(--line);margin-top:10px;padding-bottom:1px}
.more-link:hover{color:var(--accent);border-color:var(--accent)}
.checks li.hidden{display:none}

.range{padding:2px 2px 0}
.range-vals{display:flex;justify-content:space-between;margin-bottom:14px}
.range-vals span{font-size:11.5px;font-weight:600;background:var(--surface);padding:4px 9px;border-radius:3px}
.range-track{position:relative;height:26px}
.range-track::before{content:'';position:absolute;top:11px;left:0;right:0;height:3px;background:var(--line);border-radius:3px}
.range-fill{position:absolute;top:11px;height:3px;background:var(--ink);border-radius:3px}
.range-track input[type=range]{
  position:absolute;top:0;left:0;width:100%;height:26px;margin:0;background:none;
  -webkit-appearance:none;appearance:none;pointer-events:none;
}
.range-track input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;
  border:2px solid var(--ink);cursor:pointer;pointer-events:auto;
}
.range-track input[type=range]::-moz-range-thumb{
  width:18px;height:18px;border-radius:50%;background:#fff;border:2px solid var(--ink);
  cursor:pointer;pointer-events:auto;
}

.filters .ctree{margin:0 -18px}
.filters .ctree .ctree-row a{padding:11px 8px 11px 18px;font-size:13px}
.filters .ctree-toggle{width:44px;font-size:19px}
.filters .ctree-sub li a{padding:9px 18px 9px 32px;font-size:12.5px}
.filters .ctree.flat .ctree-row{border-bottom:1px solid var(--line)}
.filters h4{font-size:11px;letter-spacing:.12em;text-transform:uppercase;margin:26px 0 12px;color:var(--muted)}
.filters ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.filters li a{font-size:13px;color:var(--ink-2);display:flex;justify-content:space-between;gap:8px}
.filters li a:hover,.filters li a.on{color:var(--accent);font-weight:600}
.filters li small{color:var(--muted)}
.price-row{display:flex;gap:8px}
.price-row input{width:100%;height:38px;border:1px solid var(--line);border-radius:var(--radius);padding:0 10px;background:#fff}
.check{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--ink-2);cursor:pointer}
.check input{width:16px;height:16px;accent-color:var(--accent)}
.btn.filter-toggle{display:none;margin:6px 0 18px}
.filter-toggle .n{background:var(--accent);color:#fff;border-radius:20px;padding:1px 7px;font-size:10px;margin-left:8px}
.toolbar{display:flex;align-items:center;gap:14px;margin:18px 0;flex-wrap:wrap}
.toolbar .count{margin-left:auto}
.btn.filter-toggle{margin:0}
.toolbar select{height:38px;border:1px solid var(--line);border-radius:var(--radius);padding:0 32px 0 12px;background:#fff}
.count{color:var(--muted);font-size:13px}
.empty{padding:70px 0;text-align:center;color:var(--muted)}
.empty b{display:block;font-size:18px;color:var(--ink);margin-bottom:8px}

/* --------------------------------------------------------------- товар */
.product{display:grid;grid-template-columns:1.1fr .9fr;gap:56px;padding:22px 0 70px}
.gallery-main{aspect-ratio:1/1;background:var(--surface);border-radius:var(--radius);overflow:hidden;display:grid;place-items:center}
.gallery-main img{width:100%;height:100%;object-fit:cover}
.thumbs{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.thumbs button{width:74px;height:74px;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.thumbs button.on{border-color:var(--ink)}
.thumbs img{width:100%;height:100%;object-fit:cover}
.p-brand{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-weight:600}
.p-title{font-size:30px;font-weight:700;margin:10px 0 12px;line-height:1.18}
.p-sku{font-size:12px;color:var(--muted)}
.p-price-box{display:flex;align-items:baseline;gap:14px;margin:26px 0 6px}
.p-price{font-size:32px;font-weight:800;letter-spacing:-.02em}
.p-old{font-size:16px;color:var(--muted);text-decoration:line-through}
.p-econ{font-size:12px;color:var(--sale);font-weight:600}
.stock{display:flex;align-items:center;gap:8px;font-size:13px;margin:14px 0 24px;color:var(--ok)}
.stock.no{color:var(--muted)}
.stock i{width:7px;height:7px;border-radius:50%;background:currentColor;display:block}
.buy-row{display:flex;gap:12px;align-items:center;margin-bottom:26px}
.qty{display:flex;align-items:center;border:1px solid var(--line);border-radius:var(--radius);height:52px}
.qty button{width:44px;height:100%;font-size:18px;color:var(--ink-2)}
.qty span{width:38px;text-align:center;font-weight:600}
.btn{
  height:52px;padding:0 34px;border-radius:var(--radius);background:var(--ink);color:#fff;font-weight:600;
  font-size:12px;letter-spacing:.12em;text-transform:uppercase;transition:.16s;display:inline-flex;align-items:center;justify-content:center;gap:10px;
}
.btn:hover{background:var(--accent)}
.btn.wide{width:100%}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--ink)}
.btn.ghost:hover{background:var(--ink);color:#fff}
.btn.wa{background:#25D366}
.btn.wa:hover{background:#1da851}
.btn.sm{height:40px;padding:0 18px;font-size:11px}
.btn[disabled]{background:var(--surface-2);color:var(--muted);cursor:not-allowed}
.p-info{border-top:1px solid var(--line);padding-top:22px;display:flex;flex-direction:column;gap:14px}
.p-info div{display:flex;gap:12px;font-size:13px;color:var(--ink-2)}
.p-info b{flex:none;width:120px;color:var(--ink);font-weight:600}
.p-wrap{max-width:860px;padding-bottom:34px}
.p-desc{margin-top:34px}
.p-desc h3{font-size:18px;margin-bottom:12px}
.p-desc p{color:var(--ink-2);white-space:pre-wrap}
.spec-table{width:100%;border-collapse:collapse;margin-top:14px;font-size:13px}
.spec-table td{padding:11px 0;border-bottom:1px solid var(--line);color:var(--ink-2)}
.spec-table td:first-child{color:var(--muted);width:45%}

/* -------------------------------------------------------------- корзина */
.drawer-back{position:fixed;inset:0;background:rgba(16,16,16,.4);z-index:80;opacity:0;pointer-events:none;transition:.25s}
.drawer-back.open{opacity:1;pointer-events:auto}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:460px;max-width:100vw;background:#fff;z-index:81;
  transform:translateX(100%);transition:transform .3s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column;
}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:22px 26px;border-bottom:1px solid var(--line)}
.drawer-head h3{font-size:19px}
.drawer-body{flex:1;overflow:auto;padding:8px 26px}
.drawer-foot{border-top:1px solid var(--line);padding:20px 26px 26px;background:#fff}
.cart-line{display:flex;gap:14px;padding:18px 0;border-bottom:1px solid var(--line)}
.cart-line .pic{width:78px;height:78px;flex:none;border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.cart-line .pic img{width:100%;height:100%;object-fit:cover}
.cart-line .nm{font-size:13px;line-height:1.35;margin-bottom:6px}
.cart-line .br{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
.cart-line .row{display:flex;align-items:center;justify-content:space-between;margin-top:10px}
.mini-qty{display:flex;align-items:center;border:1px solid var(--line);border-radius:var(--radius);height:32px}
.mini-qty button{width:30px;height:100%}
.mini-qty span{width:30px;text-align:center;font-size:13px;font-weight:600}
.rm{color:var(--muted);font-size:12px}
.rm:hover{color:var(--sale)}
.sum-row{display:flex;justify-content:space-between;margin-bottom:10px;font-size:13px;color:var(--ink-2)}
.sum-row.total{font-size:20px;font-weight:700;color:var(--ink);margin:14px 0 18px}
.note{font-size:11.5px;color:var(--muted);margin-top:12px;text-align:center;line-height:1.5}

/* ------------------------------------------------------------ оформление */
.field{margin-bottom:16px}
.field label{display:block;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:7px}
.field input,.field textarea,.field select{
  width:100%;height:48px;border:1px solid var(--line);border-radius:var(--radius);padding:0 14px;background:#fff;transition:.16s;
}
.field textarea{height:90px;padding:12px 14px;resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--ink)}
.field.err input,.field.err textarea{border-color:var(--sale)}
.field .msg{font-size:11.5px;color:var(--sale);margin-top:6px;display:none}
.field.err .msg{display:block}

.modal-back{position:fixed;inset:0;background:rgba(16,16,16,.5);z-index:90;display:none;align-items:center;justify-content:center;padding:24px}
.modal-back.open{display:flex}
.modal{background:#fff;border-radius:var(--radius);width:100%;max-width:540px;max-height:92vh;overflow:auto;padding:34px}
.modal h3{font-size:24px;margin-bottom:6px}
.modal .lead{color:var(--muted);font-size:13px;margin-bottom:24px}
.ok-icon{width:64px;height:64px;border-radius:50%;background:#e8f6ee;color:var(--ok);display:grid;place-items:center;font-size:30px;margin:0 auto 18px}

/* ------------------------------------------------------------------ футер */
.usp{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:60px 0 10px}
.usp div{background:var(--surface);border-radius:var(--radius);padding:26px}
.usp b{display:block;font-size:14px;margin-bottom:8px}
.usp p{margin:0;color:var(--muted);font-size:12.5px;line-height:1.55}
.footer{margin-top:70px;border-top:1px solid var(--line);padding:52px 0 40px;background:#fff}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:40px}
.footer h5{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:0 0 16px;font-weight:600}
.footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:13px;color:var(--ink-2)}
.footer ul a:hover{color:var(--accent)}
.footer-bottom{display:flex;justify-content:space-between;gap:20px;margin-top:44px;padding-top:22px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);flex-wrap:wrap}
.contact-line{font-size:15px;font-weight:600;margin-bottom:6px}

.toast{
  position:fixed;left:50%;bottom:34px;transform:translate(-50%,20px);background:var(--ink);color:#fff;
  padding:14px 24px;border-radius:var(--radius);font-size:13px;z-index:200;opacity:0;pointer-events:none;transition:.25s;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ------------------------------------------------------------- адаптив */
@media (max-width:1280px){
  .wrap{padding:0 24px}
  .grid,.tiles,.megamenu-grid{grid-template-columns:repeat(4,1fr)}
  .hero-slide{padding:0 48px}
  .hero-dots{left:48px}
}

@media (max-width:1024px){
  .grid,.tiles,.megamenu-grid{grid-template-columns:repeat(3,1fr)}
  .topbar .wrap{gap:16px}
  .topbar-left,.topbar-right{white-space:nowrap}
  #tb-address{display:none}
  .header-main{gap:18px}
  .logo-name{font-size:22px;letter-spacing:.2em}
  .product{gap:32px}
  .hero-slide{height:340px;padding:0 32px}
  .hero-slide h1{font-size:34px}
  .hero-dots{left:32px}
  .usp,.footer-grid{grid-template-columns:repeat(2,1fr)}
  .section{padding:44px 0 8px}
  .section-head h2{font-size:25px}
}

/* планшет в портрете и телефон: фильтры прячем за кнопку */
@media (max-width:900px){
  .catalog{grid-template-columns:1fr;gap:0}
  .two-col{grid-template-columns:1fr;gap:22px;padding:16px 0 34px}
  .btn.filter-toggle{display:inline-flex}
  .filters{
    position:fixed;top:0;left:0;bottom:0;width:340px;max-width:88vw;z-index:85;background:#fff;
    display:flex;flex-direction:column;transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow:var(--shadow);padding:0;margin:0;border:0;
  }
  .filters.is-open{transform:none}
  .filters-back{display:block;position:fixed;inset:0;background:rgba(16,16,16,.4);z-index:84;
    opacity:0;pointer-events:none;transition:.25s}
  .filters-back.on{opacity:1;pointer-events:auto}
  .filters-head{display:flex;align-items:center;justify-content:space-between;padding:18px;
    border-bottom:1px solid var(--line);flex:none}
  .filters-head b{font-size:12px;letter-spacing:.14em;text-transform:uppercase}
  .filters-head button{font-size:26px;line-height:1;color:var(--ink-2)}
  .filters-body{flex:1;overflow-y:auto;padding:4px 18px 20px}
  .filters-foot{display:flex;gap:10px;padding:14px 18px calc(16px + env(safe-area-inset-bottom));
    border-top:1px solid var(--line);background:#fff;flex:none}
  .filters-foot .btn{flex:1;height:48px}
  .filters .ctree{margin:0 -18px}
.filters .ctree .ctree-row a{padding:11px 8px 11px 18px;font-size:13px}
.filters .ctree-toggle{width:44px;font-size:19px}
.filters .ctree-sub li a{padding:9px 18px 9px 32px;font-size:12.5px}
.filters .ctree.flat .ctree-row{border-bottom:1px solid var(--line)}
.filters h4{margin-top:22px}
}

@media (max-width:720px){
  .wrap{padding:0 14px}
  .grid,.tiles,.megamenu-grid{grid-template-columns:repeat(2,1fr);gap:6px 4px}

  /* шапка */
  .topbar{font-size:11px}
  .topbar .wrap{gap:10px;height:32px}
  .topbar-left{gap:12px}
  #tb-address,#tb-hours{display:none}
  .topbar-right a[href="#/delivery"],.topbar-right a[href="#/contacts"]{display:none}
  .header-main{flex-wrap:wrap;height:auto;gap:14px;padding:11px 0}
  .logo-name{font-size:19px;letter-spacing:.18em}
  .logo-sub{display:none}
  .burger span.txt{display:none}
  .burger-icon{width:20px}
  .action span{display:none}
  .action svg{width:24px;height:24px}
  .header-actions{gap:20px}
  .search{order:9;flex-basis:100%;max-width:none;margin-bottom:2px}
  .search input{height:42px}
  .navbar .wrap{height:42px;gap:22px}
  .megamenu-panel{width:100%;max-width:100%;min-height:100%;padding:0 0 30px}
  .megamenu-item{padding:13px 14px;font-size:12.5px}
  .megamenu-item span.ic{width:32px;height:32px;font-size:13px}

  /* баннер */
  .hero{margin-top:0}
  .hero-arrow{display:none}
  .hero-slide{height:auto;min-height:250px;padding:30px 20px 34px}
  .hero-slide h1{font-size:25px}
  .hero-slide p{font-size:14px;margin:12px 0 22px}
  .hero-slide .btn{height:46px;padding:0 24px}
  .hero-dots{position:static;margin-top:0;padding:14px 20px 0;justify-content:center}

  /* блоки и заголовки */
  .section{padding:34px 0 4px}
  .section-head{margin-bottom:16px}
  .section-head h2{font-size:21px}
  .section-head a{font-size:11px}
  .tile{min-height:120px;padding:18px 16px}
  .tile b{font-size:13.5px}
  .grid.rail{grid-auto-columns:minmax(160px,66vw)}

  /* карточка товара в списке */
  .card{padding:8px}
  .card-brand{margin:10px 0 5px;font-size:10px}
  .card-title{font-size:12.5px;height:34px}
  .price{font-size:15.5px}
  .card-buy{height:44px;margin-top:10px}
  .chip{font-size:9px;padding:3px 6px}

  /* каталог */
  .subcats{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:14px -14px 0;padding:0 14px 4px}
  .subcats::-webkit-scrollbar{display:none}
  .subcats a{white-space:nowrap;flex:none}
  .crumbs{font-size:11.5px;padding:14px 0 4px}
  .page-title{font-size:23px}
  .page-sub{font-size:12.5px}
  .filters.is-open{display:block;padding:2px 16px 20px}
  .toolbar{gap:10px;margin:14px 0}
  .toolbar .btn.filter-toggle{flex:1;height:44px}
  .toolbar select{flex:1;min-width:0;height:44px}
  .toolbar .count{width:100%;order:3;margin-left:0;font-size:12px}

  /* страница товара */
  .product{grid-template-columns:1fr;padding:14px 0 40px;gap:24px}
  .p-title{font-size:21px;margin:8px 0 10px}
  .p-price{font-size:26px}
  .p-price-box{margin:20px 0 4px}
  .buy-row{gap:10px}
  .qty{height:50px}
  .qty button{width:40px}
  .btn{height:50px;padding:0 22px}
  .thumbs button{width:62px;height:62px}
  .p-info b{width:96px}
  .p-info div{font-size:12.5px}
  .p-wrap{padding-bottom:20px}
  .spec-table td{padding:9px 0;font-size:12.5px}

  /* корзина и оформление */
  .drawer{width:100%}
  .drawer-head{padding:16px 16px}
  .drawer-body{padding:4px 16px}
  .drawer-foot{padding:16px 16px calc(18px + env(safe-area-inset-bottom))}
  .cart-line .pic{width:66px;height:66px}
  .modal-back{padding:0;align-items:flex-end}
  .modal{padding:22px 16px calc(24px + env(safe-area-inset-bottom));max-width:none;max-height:92vh;border-radius:12px 12px 0 0}
  .field input,.field select{height:50px}
  .modal h3{font-size:20px}

  .contact-actions .btn{width:100%}

  /* поля ввода 16px, иначе телефон приближает страницу при нажатии на поле */
  input,select,textarea,.search input,.field input,.field textarea,.field select,
  .toolbar select,.price-row input{font-size:16px}
  .search input{height:46px}
  .card-qty{height:44px}
  .card-qty button{width:44px}

  /* низ страницы */
  .usp{padding:34px 0 0;gap:8px}
  .usp div{padding:20px}
  .footer{margin-top:44px;padding:34px 0 28px}
  .footer-grid{grid-template-columns:1fr;gap:28px}
  .footer-bottom{margin-top:28px;font-size:11.5px;gap:10px}
  .toast{left:14px;right:14px;bottom:16px;transform:translateY(16px);text-align:center}
  .toast.show{transform:translateY(0)}
}

/* совсем узкие телефоны */
@media (max-width:380px){
  .logo-name{font-size:17px;letter-spacing:.14em}
  .header-actions{gap:16px}
  .card-title{font-size:12px}
  .price{font-size:15px}
  .hero-slide h1{font-size:23px}
  .filters.is-open{padding:2px 13px 18px}
}
