.cat-page{display:grid;grid-template-columns:260px 1fr;gap:32px;padding:40px 0 72px}
.side{position:sticky;top:80px;align-self:start;display:flex;flex-direction:column;gap:4px;max-height:calc(100vh - 100px);overflow:auto}
.side a{padding:10px 14px;border-radius:8px;color:var(--muted)}
.side a:hover{background:var(--bg2);color:var(--text)}
.side a.is-active{background:var(--brand);color:#fff}
.content h1{font-size:40px;font-weight:600;letter-spacing:-.03em;margin-bottom:16px}
.tools{display:flex;align-items:center;gap:16px;margin-bottom:16px}
.tools input{flex:1;padding:12px 16px;border-radius:999px;border:0;background:var(--card);color:var(--text);font:inherit}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px}
.chip{padding:6px 14px;border-radius:999px;border:1px solid var(--line);background:var(--card);font-size:14px;color:var(--muted)}
.chip:hover{border-color:var(--text);color:var(--text)}
.chip.is-active{border-color:var(--text);background:var(--text);color:#fff}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
@media(max-width:1100px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.prod{display:flex;flex-direction:column;background:var(--card);border:0;border-radius:var(--r);overflow:hidden;transition:transform .2s,box-shadow .2s}
.prod:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.12)}
.prod__img{display:grid;place-items:center;height:250px;background:#fafafc;overflow:hidden}
.prod__img svg{width:44px;height:44px;fill:none;stroke:#b7c6de;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.prod__img img{display:block;width:100%;height:100%;object-fit:contain}
.prod__img.has-photo{padding:28px}
.prod__body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px;flex:1}
.prod__name{font-size:18px;line-height:1.3;font-weight:600;letter-spacing:-.01em}
.prod__desc{color:var(--muted);font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.prod__acts{margin-top:auto;padding-top:8px}
.prod__name a{color:inherit}
.prod__name a:hover{text-decoration:underline}
.prod__img a{display:block;width:100%;height:100%}
.btn--sm{padding:8px 18px;font-size:14px}
.empty{color:var(--muted);padding:40px 0}
@media(max-width:860px){.cat-page{grid-template-columns:minmax(0,1fr)}.content{min-width:0}.side{position:static;flex-direction:row;flex-wrap:wrap;max-height:none}}
.hdr-r{display:flex;align-items:center;gap:16px}
@media(max-width:640px){
  .header__in{flex-wrap:wrap;height:auto;padding-block:10px;gap:10px 0}
  .hdr-r{flex-wrap:wrap;gap:8px 10px;width:100%;justify-content:flex-end}
  .content h1{font-size:30px}
}
.cartbadge{font-size:14px;color:var(--muted)}.cartbadge b{color:var(--text)}
.gtile{height:100%;display:flex;flex-direction:column;text-align:left;font:inherit;color:inherit;background:var(--card);border:0;border-radius:var(--r);overflow:hidden;cursor:pointer;padding:0;transition:transform .2s,box-shadow .2s}
.gtile:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.12)}
.gtile__img{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);aspect-ratio:4/3}
.gtile__img span{display:grid;place-items:center;background:#fafafc;padding:14px;min-height:0;overflow:hidden}
.gtile__img .one{grid-column:1/-1;grid-row:1/-1;padding:24px}
.gtile__img img{display:block;width:100%;height:100%;object-fit:contain}
.gtile__body{flex:1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px}
.gtile__name{font-size:16px;font-weight:600;line-height:1.3}
.gtile__n{flex:none;min-width:28px;padding:3px 9px;border-radius:999px;background:var(--bg,#f5f5f7);color:var(--muted);font-size:13px;text-align:center}
.prod__acts{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.add{display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 14px;border-radius:999px;background:var(--brand);color:#fff;border:1px solid var(--brand);font-size:12px;font-weight:600;transition:background .2s,color .2s,border-color .2s}
.add:hover{background:var(--brand-dark);border-color:var(--brand-dark)}
.add.is-added{background:#fff;color:var(--blue)}

/* ---- phone layout: compact header, scrollable pills, two-column product grid ---- */
@media(max-width:640px){
  .header{position:static}
  .header__in{gap:6px 0;padding-block:8px}
  .lang{padding:6px 12px}
  .cartbadge{display:inline-block;padding:7px 0}
  .hdr-r{width:100%;justify-content:space-between;gap:8px}
  .hdr-r .btn--sm{padding:7px 14px;font-size:13px}
  .cat-page{padding:16px 0 48px;gap:16px}
  .side{flex-wrap:nowrap;overflow-x:auto;gap:6px;margin-inline:-16px;padding:2px 16px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .side::-webkit-scrollbar,.chips::-webkit-scrollbar{display:none}
  .side a{flex:none;white-space:nowrap;padding:8px 14px;font-size:14px;background:var(--card)}
  .content h1{font-size:28px;margin-bottom:12px}
  .tools{gap:10px;margin-bottom:12px}
  .tools input{min-width:0;padding:10px 14px}
  .chips{flex-wrap:nowrap;overflow-x:auto;gap:6px;margin:0 -16px 16px;padding:0 16px 4px;scrollbar-width:none}
  .chip{flex:none;white-space:nowrap;font-size:13px;padding:6px 12px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .prod{border-radius:14px}
  .gtile{border-radius:14px}
  .gtile__img span{padding:8px}
  .gtile__body{padding:10px 12px}
  .gtile__name{font-size:14px}
  .prod__img{height:auto;aspect-ratio:1/1;background:#fff}
  .prod__img.has-photo{padding:12px}
  .prod__img svg{width:36px;height:36px}
  .prod__body{padding:10px;gap:8px}
  .prod__name{font-size:13px;line-height:1.3;font-weight:600;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
  .prod__desc{font-size:12px;line-height:1.4;-webkit-line-clamp:2}
  .prod__acts{padding-top:2px}
  .prod__acts{flex-direction:column;align-items:stretch;gap:6px}
  .prod__acts .qty{width:100%;height:34px}
  .prod__acts .qty__btn{flex:none;width:34px}
  .prod__acts .qty__val{flex:1}
  .prod__acts .add{width:100%;height:34px;padding:0 8px;font-size:13px}
}
.cat-intro{color:var(--muted);font-size:15px;line-height:1.55;max-width:760px;margin:-6px 0 20px}
@media(max-width:640px){.cat-intro{font-size:14px;margin:-4px 0 14px}}
