.catx{display:grid;grid-template-columns:280px minmax(0,1fr);gap:24px;align-items:stretch}
.catx__tabs{display:flex;flex-direction:column;gap:6px}
.catx__tab{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:12px;padding:12px 14px;border:0;border-radius:16px;background:transparent;font:inherit;color:var(--ink);cursor:pointer;text-align:left;position:relative;transition:background .2s}
.catx__tab:hover{background:var(--bg2)}
.catx__tab.is-on{background:var(--ink);color:#fff}
.catx__ic{width:44px;height:44px;border-radius:12px;background:var(--bg2);display:flex;align-items:center;justify-content:center;transition:background .2s}
.catx__tab.is-on .catx__ic{background:rgba(255,255,255,.12)}
.catx__nm{font-size:16px;font-weight:600}
.catx__n{font-size:13px;color:var(--mute);min-width:20px;text-align:right}
.catx__tab.is-on .catx__n{color:#a1a1a6}
.catx__tab::after{content:"";position:absolute;left:14px;right:14px;bottom:6px;height:2px;border-radius:2px;background:rgba(255,255,255,.5);transform-origin:left;transform:scaleX(0)}
.catx.is-auto .catx__tab.is-on::after{animation:catxbar var(--catx-ms,4500ms) linear forwards}
@keyframes catxbar{to{transform:scaleX(1)}}

.catx__body{background:var(--bg2);border-radius:24px;padding:clamp(20px,3vw,32px);min-height:460px}
.catx__panel{display:flex;flex-direction:column;gap:18px;height:100%;animation:catxIn .35s ease}
.catx__panel[hidden]{display:none}
@keyframes catxIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.catx__head{display:flex;align-items:center;gap:16px}
.catx__big{width:56px;height:56px;border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:center}
.catx__big .ic{width:28px;height:28px}
.catx__head h3{margin:0;font-size:26px;letter-spacing:-.02em}
.catx__head p{margin:2px 0 0;color:var(--mute);font-size:14px}
.catx__subs{display:flex;flex-wrap:wrap;gap:8px}
.catx__subs a{font-size:13px;background:#fff;border:1px solid transparent;border-radius:999px;padding:6px 12px;color:var(--ink);transition:border-color .2s,background .2s}
.catx__subs a:hover{border-color:var(--ink)}
.catx__items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.catx__item{background:#fff;border-radius:16px;padding:10px 10px 14px;display:flex;flex-direction:column;gap:4px;color:inherit;transition:transform .25s,box-shadow .25s}
.catx__item:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(0,0,0,.08)}
.catx__img{aspect-ratio:1;border-radius:12px;overflow:hidden;background:#f3f3f5;display:flex;align-items:center;justify-content:center;margin-bottom:6px}
.catx__img img{width:100%;height:100%;object-fit:cover;mix-blend-mode:multiply}
.catx__noimg{color:var(--mute)}
.catx__noimg .ic{width:36px;height:36px;stroke-width:1.4}
.catx__item b{font-size:14px;line-height:1.3}
.catx__item small{font-size:12px;color:var(--ok);font-weight:600}
.catx__empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;background:#fff;border-radius:16px;padding:40px 20px;color:var(--mute)}
.catx__empty .ic{width:44px;height:44px;stroke-width:1.4}
.catx__empty b{color:var(--ink);font-size:17px}
.catx__cta{margin-top:auto}

@media (max-width:1024px){
  .catx{grid-template-columns:minmax(0,1fr)}
  .catx__tabs{flex-direction:row;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .catx__tab{grid-template-columns:32px auto auto;flex:none;padding:8px 12px;gap:8px;border:1px solid var(--soft)}
  .catx__ic{width:32px;height:32px;border-radius:10px}
  .catx__nm{font-size:14px;white-space:nowrap}
  .catx__body{min-height:0}
  .catx__items{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){.catx__panel{animation:none}.catx.is-auto .catx__tab.is-on::after{animation:none}}

.catx{grid-template-columns:300px minmax(0,1fr);gap:20px}
.catx__tabs{background:var(--bg2);border-radius:24px;padding:10px;gap:4px;justify-content:stretch}
.catx__tab{flex:1;min-height:64px}
.catx__tab:hover{background:#fff}
.catx__tab.is-on{background:var(--ink)}
.catx__ic{background:#fff}
.catx__body{min-height:0;display:flex}
.catx__panel{flex:1;gap:16px;min-width:0}
.catx__head{gap:14px}
.catx__head>div{flex:1;min-width:0}
.catx__head h3{font-size:28px}
.catx__all{align-self:center;white-space:nowrap;font-size:15px;font-weight:600;color:var(--ink);background:#fff;border-radius:999px;padding:9px 16px;transition:background .2s,color .2s}
.catx__all:hover{background:var(--ink);color:#fff}
.catx__subs{flex-wrap:nowrap;overflow-x:auto;gap:6px;padding-bottom:2px;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
.catx__subs::-webkit-scrollbar{display:none}
.catx__subs a{flex:none;font-size:12.5px;padding:5px 11px}
.catx__items{flex:1;align-content:start}
.catx__item{padding:10px 10px 12px;gap:6px}
.catx__img{margin-bottom:4px}
.catx__img .ph{width:100%;height:100%}
.catx__img .ph span{font-size:12px}
.catx__item b{font-size:14px;line-height:1.3;min-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.catx__item small{display:flex;align-items:baseline;gap:4px;margin-top:auto;color:var(--ink);font-size:15px;font-weight:600}
.catx__item small em{font-style:normal;font-size:12px;font-weight:500;color:var(--mute)}
.catx__item small i{font-style:normal;margin-left:auto;font-size:11px;font-weight:600;color:var(--ok);background:#e9f6ee;border-radius:999px;padding:2px 7px}
.catx__empty .btn{margin-top:10px}
@media (max-width:1024px){
  .catx__tabs{background:transparent;padding:0;border-radius:0}
  .catx__tab{flex:none;min-height:0}
  .catx__ic{background:var(--bg2)}
}
@media (max-width:560px){
  .catx__head h3{font-size:22px}
  .catx__all{padding:7px 12px;font-size:13px}
}
.catx__img .ph{display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(135deg,#f3f3f5 0 12px,#ececef 12px 24px);color:var(--mute)}

@media (max-width:1024px){
  .catx{grid-template-columns:minmax(0,1fr)}
  .catx>*{min-width:0}
  .catx__tabs{flex-direction:row;overflow-x:auto;min-width:0}
  .catx__tab{flex:none}
}
