.catalogue{gap:20px;max-width:1440px}
.cat-tools{display:flex;flex-direction:column;gap:12px;min-width:0}
.cat-categories{max-width:100%;overflow-x:auto;align-self:flex-start;white-space:nowrap;scrollbar-width:thin}
.cat-categories button{font-size:1rem;padding:8px 11px;flex:none}
.cat-search-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.cat-search-row>input{flex:1;min-width:190px}
.cat-admin-tools,.cat-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.catalogue input,.catalogue select,.cat-modal input,.cat-modal select,.cat-modal textarea{min-width:0;max-width:100%;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);padding:10px 12px;font:inherit;line-height:1.5}
.cat-check{display:flex;align-items:center;gap:8px;color:var(--muted)}
.cat-check input{width:18px;height:18px;min-height:0;accent-color:var(--brand)}
.cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(290px,100%),1fr));gap:18px;min-width:0}
.cat-card{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--surface);min-width:0}
.cat-product{display:flex;flex-direction:column;text-align:left;padding:0;border:0;width:100%;height:100%;background:transparent;color:var(--ink);font:inherit}
.cat-product:hover{box-shadow:inset 0 0 0 1px var(--brand)}
.cat-art,.cat-detail-art{width:100%;aspect-ratio:2.1;background:var(--surface-2);overflow:hidden;display:grid;place-items:center}
.cat-art img,.cat-detail-art img{width:100%;height:100%;object-fit:contain;display:block}
.cat-image-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--muted);padding:25px;text-align:center;font-size:.85rem}
.cat-image-empty>.ic{width:45px;height:45px;stroke-width:1}
.cat-card-body{padding:16px;display:flex;flex-direction:column;gap:10px;width:100%;min-width:0}
.cat-card-body h2{font-size:1.25rem;overflow-wrap:anywhere}
.cat-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.cat-chips .chip{background:var(--surface-2);color:var(--muted);font-family:var(--f-mono);font-size:.78rem;font-weight:400;border-radius:5px;white-space:normal;overflow-wrap:anywhere}
.cat-chips .chip:before{display:none}
.cat-search-row [data-cat=import] .ic{transform:rotate(-90deg)}
.cat-pagination{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;color:var(--muted)}
.cat-pagination>span{margin-right:auto}
.cat-empty{padding:32px 4px;color:var(--muted);grid-column:1/-1}
.cat-modal{inset:20px;margin:auto;width:min(760px,calc(100% - 30px));height:auto;max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--line);border-radius:15px;background:var(--surface);overflow:auto}
.cat-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:1}
.cat-modal-header h1{font-size:1.6rem;overflow-wrap:anywhere}
.cat-modal-header>button{flex:none;padding:7px 11px;min-height:36px}
.cat-modal-body{padding:20px;display:flex;flex-direction:column;gap:20px;min-width:0}
.cat-modal-body h2{font-size:1rem;margin-bottom:10px}
.cat-detail-art{border:1px solid var(--line);border-radius:12px}
.cat-video{display:block;width:100%;max-height:55dvh;background:var(--surface-2);border-radius:12px}
.cat-prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
.cat-specs{width:100%;border-collapse:collapse;font-size:.9rem;line-height:1.5}
.cat-specs th,.cat-specs td{text-align:left;vertical-align:top;padding:10px 8px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.cat-specs th{font-weight:500;color:var(--muted);width:40%}
.cat-guidance{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.cat-guidance section{border:1px solid var(--line);padding:15px;border-radius:10px}
.cat-guidance .dos h2{color:var(--ok)}
.cat-guidance .donts h2{color:var(--bad)}
.cat-guidance ul{padding-left:18px;margin:0;line-height:1.7;overflow-wrap:anywhere}
.cat-form{display:flex;flex-direction:column;gap:14px}
.cat-form>label,.cat-modal-body>label{display:flex;flex-direction:column;gap:7px;font-weight:500;color:var(--muted)}
.cat-form>label.cat-check{flex-direction:row;align-items:center}
.cat-form textarea{resize:vertical;min-height:90px}
.cat-form fieldset{min-width:0;padding:12px;border:1px solid var(--line);border-radius:10px}
.cat-form legend{color:var(--muted);padding:0 5px}
.cat-product-media{display:grid;gap:8px}
.cat-product-media .cat-pending,.cat-product-form>.cat-pending{overflow-wrap:anywhere}
#cat-spec-fields{display:flex;flex-direction:column;gap:9px;margin-bottom:10px}
.cat-spec-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr) auto;gap:8px;align-items:center}
.cat-spec-row>button{font-size:.75rem;padding:7px;min-height:36px}
.cat-assets{list-style:none;margin:12px 0;padding:0;display:flex;flex-direction:column;gap:8px}
.cat-assets li{display:flex;justify-content:space-between;align-items:center;gap:12px;overflow-wrap:anywhere}
.cat-assets button{flex:none;font-size:.8rem}
.cat-table-scroll{max-width:100%;overflow-x:auto}
.cat-table-scroll table{min-width:420px}
.cat-import-errors{padding-left:20px;color:var(--bad);overflow-wrap:anywhere}
#cat-import-preview{display:flex;flex-direction:column;gap:12px}
.cat-filter-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.cat-filter-row>label:not(.cat-check){display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.85rem}
.cat-filter-row select{padding:6px 8px}
.cat-pending{color:var(--muted);font-size:.85rem;line-height:1.6}
.cat-gallery{display:flex;gap:10px;overflow-x:auto;padding:2px}
.cat-gallery button{display:flex;flex-direction:column;align-items:center;gap:5px;flex:none;width:100px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);padding:6px;color:var(--ink);font:inherit;font-size:.75rem}
.cat-gallery img{display:block;width:86px;height:64px;object-fit:contain}
.cat-resources{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.cat-resources>div{border:1px solid var(--line);border-radius:10px;padding:12px;min-width:0}
.cat-resources h3{font-size:.85rem;font-weight:500;margin-bottom:8px}
.cat-resources .m02-button{max-width:100%;white-space:normal;overflow-wrap:anywhere;margin-top:6px;font-size:.8rem}
.cat-reference-section{margin-top:22px}
.cat-reference-preview{display:block;width:100%;max-height:180px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:var(--surface-2)}
.cat-reference-media{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:14px}
.cat-reference-media li{display:flex;align-items:center;gap:14px;min-width:0;overflow-wrap:anywhere}
.cat-reference-media li>div{min-width:0}
.cat-reference-media img{flex:none;width:90px;height:70px;object-fit:contain;border:1px solid var(--line);border-radius:8px}
.cat-import-warnings{padding-left:20px;color:var(--muted);overflow-wrap:anywhere}
.cat-form [hidden]{display:none}
#cat-training-options{display:flex;flex-direction:column;gap:10px}
#cat-training-options .cat-check{overflow-wrap:anywhere}
#cat-training-options input{flex:none}
@media(max-width:640px){
  .cat-grid{grid-template-columns:1fr}
  .cat-modal{inset:10px;width:calc(100% - 20px);max-height:calc(100dvh - 20px);height:auto}
  .cat-modal-body,.cat-modal-header{padding:16px}
  .cat-modal-header h1{font-size:1.35rem}
  .cat-guidance{grid-template-columns:1fr}
  .cat-spec-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .cat-spec-row>button{grid-column:2;justify-self:end}
  .cat-resources{grid-template-columns:1fr}
  .cat-filter-row{gap:8px}
  .cat-filter-row>label:not(.cat-check){font-size:.72rem;gap:5px}
  .cat-filter-row select{font-size:.72rem;padding:5px 6px}
  .cat-filter-row>.cat-check{font-size:.72rem}
  .catalogue{gap:18px}
  .cat-tools{gap:9px}
  .cat-categories button{font-size:.75rem;padding:4px 9px;line-height:1.3}
  .cat-search-row{gap:9px;flex-wrap:nowrap}
  .cat-search-row>input{min-width:0;width:0;font-size:.75rem;padding:8px 11px;min-height:34px}
  .cat-search-row>.m02-button{font-size:.75rem;padding:7px 10px;min-height:34px;flex:none;gap:5px}
  .cat-search-row>.m02-button .ic{width:15px;height:15px}
  .cat-admin-tools{gap:7px}
  .cat-admin-tools .m02-button{font-size:.72rem;min-height:30px;padding:4px 8px}
  .cat-admin-tools .cat-check{font-size:.7rem;gap:5px}
  .cat-admin-tools .cat-check input{width:14px;height:14px}
  .cat-card-body{padding:12px;gap:9px}
  .cat-card-body h2{font-size:1rem}
  .cat-card-body .mono{font-size:.78rem}
  .cat-chips .chip{font-size:.66rem}
}
