/* Адаптив: планшет и телефон */
@media(max-width:1000px){
  .grid,.wide .grid{grid-template-columns:repeat(3,1fr)}
  .layout{grid-template-columns:1fr}
  .prod{grid-template-columns:1fr;gap:28px}
  .gal{position:static}
  .tiles{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:112px;overflow-x:auto;scrollbar-width:none}
  .tiles::-webkit-scrollbar{display:none}
  .ico span{display:none}
  .bctrl{display:none}
  .bn{min-height:320px;padding:36px}
  .bn h2{font-size:36px;max-width:62%}
  .bn::after{font-size:150px;right:5%}
  .filter-toggle{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 16px;margin-bottom:12px;border:1px solid var(--field);border-radius:0;background:#fff;font-size:13px;font-weight:500}
  .filter-toggle .i{width:16px;height:16px}
  .f-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:40}
  .f-overlay.open{display:block}
  .filters{position:fixed;left:0;right:0;bottom:0;top:auto;max-height:85vh;background:#fff;border-radius:0;box-shadow:0 -8px 30px rgba(0,0,0,.18);transform:translateY(110%);transition:transform .3s ease;z-index:50;padding:10px 20px calc(18px + env(safe-area-inset-bottom));overflow-y:auto}
  .filters.open{transform:translateY(0)}
  .filters::before{content:"";display:block;width:40px;height:4px;margin:0 auto;border-radius:0;background:#ddd}
  .fclose{display:grid;place-items:center;margin-left:auto;padding:6px;border:0;background:none}
  .apply{display:block;width:100%;height:52px;margin-top:18px;border:0;border-radius:0;background:var(--ink);color:#fff;font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
}
@media(max-width:600px){
  .grid,.wide .grid{grid-template-columns:repeat(2,1fr);gap:28px 10px}
  .wrap{padding:0 14px}
  .ico,.top .links{display:none}
  .top .wrap{height:32px}
  .promo{padding:8px 12px;font-size:11px}
  .bar{gap:14px;height:60px}
  .logo{font-size:22px}
  .search{height:40px}
  .search button{display:none}
  .cats .wrap{gap:22px;height:44px}
  .banners{margin:14px -14px 0}
  .bn{min-height:260px;padding:24px;justify-content:flex-end}
  .bn em{margin-bottom:8px;font-size:10px}
  .bn h2{font-size:26px;max-width:75%}
  .bn p{font-size:14px;max-width:70%}
  .bn .cta{margin-top:18px;padding:11px 20px;font-size:12px}
  .bn::after{font-size:96px;top:30%;right:6%}
  .tiles{grid-auto-columns:72px;gap:10px;margin-top:20px}
  .tile{aspect-ratio:1;gap:8px;padding:6px 2px;font-size:11px;letter-spacing:0;text-transform:none}
  .tile span{width:28px;height:28px}
  .tile span .i{width:26px;height:26px}
  .head{margin:28px 0 14px}
  .head h1,.head h2{font-size:22px}
  .ph{font-size:52px}
  .fav{top:4px;right:4px}
  .card .pp{font-size:15px}
  .gal{grid-template-columns:1fr;margin:0 -14px}
  .th{display:flex;order:2;gap:8px;padding:0 14px;overflow-x:auto}
  .th div{flex:none;width:64px}
  .gal .ph{font-size:120px}
  .info h1{font-size:20px}
  .cover{height:140px}
  .shophead{margin:-40px 0 20px}
  .shophead .av{width:84px;height:84px;font-size:28px}
  .shophead .btns{min-width:100%}
  .stats{grid-template-columns:repeat(3,1fr)}
  .stats div{padding:14px 12px}
  .stats b{font-size:18px}
  .fcols{grid-template-columns:1fr 1fr}
  .fcols>div:first-child{grid-column:1/-1}
  body{padding-bottom:64px}
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:30;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
  .tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 6px;font-size:10px;color:var(--mute)}
  .tabbar a.on{color:var(--ink)}
}

/* чат на телефоне: поле сообщения занимает всю ширину, отправка — квадратная кнопка со стрелкой */
@media(max-width:600px){
  .ch-form{gap:8px;padding:10px 12px}
  .ch-form textarea{min-width:0;padding:11px 10px;font-size:16px} /* 16px — чтобы iOS не увеличивал страницу при фокусе */
  .ch-form .btn{display:grid;place-items:center;width:48px;height:44px;padding:0}
  .ch-form .btn .ch-sl{display:none}
  .ch-form .btn .i{display:block;width:22px;height:22px}
}

@media(max-width:600px){.tile span .te{font-size:26px}}
