#productList{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important}#productList .hc-product-card{appearance:none;display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;padding:6px!important;margin:0!important;border:1px solid #dfe5ed!important;border-radius:13px!important;background:#fff!important;text-align:left!important;overflow:hidden!important;box-shadow:0 2px 7px rgba(15,23,42,.04)!important;transition:.15s}#productList .hc-product-card:hover{transform:translateY(-2px);border-color:#6659e8!important;box-shadow:0 8px 22px rgba(72,61,180,.12)!important}.hc-product-preview{height:92px;width:100%;display:grid;place-items:center;position:relative;overflow:hidden;border-radius:9px;background:linear-gradient(145deg,#f8fafc,#edf1f6);border:1px solid #edf0f4}.hc-product-preview img{width:100%!important;height:100%!important;object-fit:contain!important;padding:5px}.hc-product-fallback{position:absolute;inset:0;place-items:center;font-size:28px;color:#6258dc;background:#f1f3ff}.hc-model-badge{position:absolute!important;top:5px!important;right:5px!important;z-index:2;padding:3px 6px!important;border-radius:99px!important;background:#171a20dd!important;color:#fff!important;font-size:7px!important}.hc-card-name{display:block;margin:7px 2px 0;font-size:10px;font-weight:800;color:#273348;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hc-card-meta{display:block;margin:2px;font-size:8px;color:#8994a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hc-card-action{display:flex;gap:4px;align-items:center;margin:6px 2px 1px;padding-top:6px;border-top:1px solid #eef1f5;font-size:8px;font-weight:750;color:#5b55d9}.hc-library-empty{grid-column:1/-1;min-height:145px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px;border:1px dashed #d7dde7;border-radius:13px;background:#fafbfd;padding:18px;color:#8a95a6}.hc-library-empty i{font-size:25px;color:#756ce8}.hc-library-empty strong{font-size:10px;color:#455166}.hc-library-empty span{font-size:8px}#materialList{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important}#materialList .material-card{display:flex!important;align-items:flex-end!important;position:relative!important;width:100%!important;height:92px!important;min-width:0!important;margin:0!important;padding:7px!important;border:1px solid #dfe5ed!important;border-radius:13px!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;overflow:hidden!important;box-shadow:inset 0 0 0 1px #ffffff55,0 2px 7px #0f172a0a!important;transition:.15s}#materialList .material-card:before{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(15,23,42,.72));pointer-events:none}#materialList .material-card:hover{transform:translateY(-2px);border-color:#6659e8!important;box-shadow:0 8px 22px rgba(72,61,180,.14)!important}#materialList .material-card small{position:relative;z-index:1;display:block!important;width:100%;font-size:9px!important;font-weight:800!important;line-height:1.2!important;color:#fff!important;text-shadow:0 1px 3px #000!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cat-pane[data-pane="products"],.cat-pane[data-pane="materials"]{padding:14px 12px 18px!important;overflow-x:hidden!important}.cat-pane[data-pane="products"]>h6,.cat-pane[data-pane="materials"]>h6{font-size:12px!important;font-weight:850!important;margin-bottom:4px!important}.cat-pane[data-pane="products"]>small,.cat-pane[data-pane="materials"]>small{font-size:9px!important;line-height:1.5!important;margin-bottom:12px!important}.theme-dark #productList .hc-product-card{background:#222832!important;border-color:#39414d!important}.theme-dark .hc-card-name{color:#f2f4f7}.theme-dark .hc-product-preview{background:#282f39}@media(max-width:420px){#productList,#materialList{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hc-product-preview,#materialList .material-card{height:80px!important}}
.hc-library-loading{grid-column:1/-1;min-height:150px;display:flex;flex-direction:column;gap:9px;align-items:center;justify-content:center;color:#7b8798;font-size:9px}
.hc-scope-badge{position:absolute;left:5px;top:5px;z-index:3;border-radius:99px;padding:3px 6px;background:rgba(255,255,255,.92);border:1px solid rgba(203,213,225,.9);color:#526071;font-size:6.5px;font-weight:850;letter-spacing:.035em;box-shadow:0 2px 6px rgba(15,23,42,.08)}
.hc-scope-badge.private{background:#4f46e5;color:#fff;border-color:#4f46e5}
.hc-material-swatch{position:relative!important}
.theme-dark .hc-scope-badge{background:rgba(31,41,55,.92);border-color:#4b5563;color:#e5e7eb}.theme-dark .hc-scope-badge.private{background:#6366f1;border-color:#6366f1;color:#fff}

/* Spacevia v8.8.1 professional two-column Product & Material UI */
#productList,#materialList{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:start!important}
#productList .hc-product-card,#materialList .hc-material-card{width:100%!important;min-width:0!important;border:1px solid #dfe5ed!important;border-radius:14px!important;background:#fff!important;overflow:hidden!important;box-shadow:0 3px 10px rgba(15,23,42,.045)!important}
#productList .hc-product-card{padding:7px!important}
.hc-product-preview{height:98px!important;background:linear-gradient(145deg,#fbfcfe,#eef2f7)!important}
.hc-product-preview img,.hc-product-preview canvas{width:100%!important;height:100%!important;object-fit:contain!important;border-radius:8px!important}
.hc-product-canvas{display:block;background:linear-gradient(145deg,#fbfcfe,#eef2f7)}
#materialList .hc-material-card{display:flex!important;flex-direction:column!important;align-items:stretch!important;height:auto!important;min-height:140px!important;padding:7px!important;text-align:left!important}
#materialList .hc-material-swatch{display:block!important;position:relative!important;height:90px!important;border-radius:9px!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;border:1px solid #edf0f4!important;overflow:hidden!important}
.hc-scope-badge{position:absolute!important;left:5px!important;top:5px!important;z-index:4!important;background:rgba(255,255,255,.94)!important;color:#44506a!important;border:1px solid #dde3ec!important;border-radius:999px!important;padding:3px 6px!important;font-size:7px!important;font-weight:800!important}
.hc-scope-badge.private{background:#5b57df!important;color:#fff!important;border-color:#5b57df!important}
.theme-dark #productList .hc-product-card,.theme-dark #materialList .hc-material-card{background:#222832!important;border-color:#39414d!important}
@media(max-width:380px){#productList,#materialList{gap:7px!important}.hc-product-preview,#materialList .hc-material-swatch{height:80px!important}}


/* =====================================================================
   SPACEVIA v8.8.2 — MATERIAL LIBRARY VISUAL POLISH
   UI ONLY. No material behaviour, drag/drop, PBR or rendering changes.
   ===================================================================== */

/* Lock the material library into a clean, compact two-column grid. */
.cat-pane[data-pane="materials"] #materialList{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    width:100%!important;
    padding:0!important;
    margin:0!important;
    align-items:start!important;
    overflow:visible!important;
}

/* Fully neutralize legacy .material-card layout rules. */
.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card{
    appearance:none!important;
    -webkit-appearance:none!important;
    position:relative!important;
    display:grid!important;
    grid-template-rows:88px auto auto auto!important;
    align-items:stretch!important;
    align-content:start!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    padding:7px!important;
    margin:0!important;
    gap:0!important;

    border:1px solid #dde4ee!important;
    border-radius:14px!important;
    background:#ffffff!important;
    background-image:none!important;

    box-shadow:
        0 2px 5px rgba(15,23,42,.025),
        0 7px 18px rgba(15,23,42,.045)!important;

    overflow:hidden!important;
    text-align:left!important;
    color:#1f2937!important;
    cursor:pointer!important;

    transform:none!important;
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease!important;
}

/* Disable the old full-card dark gradient overlay. */
.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card::before,
.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card::after{
    content:none!important;
    display:none!important;
}

/* Premium compact texture preview. */
.cat-pane[data-pane="materials"] #materialList .hc-material-swatch{
    position:relative!important;
    display:block!important;

    width:100%!important;
    height:88px!important;
    min-height:88px!important;
    max-height:88px!important;

    margin:0!important;
    padding:0!important;

    border:1px solid #e5e9f0!important;
    border-radius:10px!important;

    background-position:center!important;
    background-size:cover!important;
    background-repeat:no-repeat!important;

    overflow:hidden!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)!important;
}

/* Soft texture readability layer — preview remains fully visible. */
.cat-pane[data-pane="materials"] #materialList .hc-material-swatch::after{
    content:""!important;
    display:block!important;
    position:absolute!important;
    inset:0!important;
    pointer-events:none!important;
    background:
      linear-gradient(180deg,rgba(255,255,255,.08),transparent 42%,rgba(15,23,42,.035))!important;
}

/* Common / My Material pill. */
.cat-pane[data-pane="materials"] #materialList .hc-material-swatch .hc-scope-badge{
    position:absolute!important;
    z-index:5!important;
    left:7px!important;
    top:7px!important;

    display:inline-flex!important;
    width:auto!important;
    max-width:calc(100% - 14px)!important;
    height:20px!important;
    align-items:center!important;

    margin:0!important;
    padding:0 7px!important;

    border:1px solid rgba(218,224,234,.95)!important;
    border-radius:999px!important;

    background:rgba(255,255,255,.92)!important;
    backdrop-filter:blur(7px)!important;
    -webkit-backdrop-filter:blur(7px)!important;

    color:#475467!important;
    font-size:7px!important;
    line-height:18px!important;
    font-weight:800!important;
    letter-spacing:.02em!important;
    white-space:nowrap!important;

    box-shadow:0 2px 6px rgba(15,23,42,.07)!important;
}

.cat-pane[data-pane="materials"] #materialList .hc-material-swatch .hc-scope-badge.private{
    color:#fff!important;
    background:#5b57df!important;
    border-color:#5b57df!important;
}

/* Material name. */
.cat-pane[data-pane="materials"] #materialList .hc-card-name{
    display:block!important;
    position:static!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;

    margin:8px 1px 0!important;
    padding:0!important;

    border:0!important;
    background:transparent!important;
    box-shadow:none!important;

    color:#20293a!important;
    text-shadow:none!important;

    font-size:10px!important;
    line-height:1.25!important;
    font-weight:800!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}

/* Category such as Wood / Stone / Fabric. */
.cat-pane[data-pane="materials"] #materialList .hc-card-meta{
    display:block!important;
    position:static!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;

    margin:3px 1px 0!important;
    padding:0!important;

    border:0!important;
    background:transparent!important;
    box-shadow:none!important;

    color:#8a95a6!important;
    text-shadow:none!important;

    font-size:8px!important;
    line-height:1.2!important;
    font-weight:600!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}

/* Compact Apply row — no oversized box. */
.cat-pane[data-pane="materials"] #materialList .hc-card-action{
    display:flex!important;
    position:static!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;

    margin:8px 0 0!important;
    padding:7px 1px 1px!important;

    border:0!important;
    border-top:1px solid #edf1f5!important;
    border-radius:0!important;

    background:transparent!important;
    box-shadow:none!important;

    color:#5953d8!important;
    text-shadow:none!important;

    font-size:8px!important;
    line-height:1!important;
    font-weight:800!important;
}

.cat-pane[data-pane="materials"] #materialList .hc-card-action i{
    font-size:10px!important;
    line-height:1!important;
}

/* Hover/focus states suitable for desktop mouse use. */
.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card:hover{
    transform:translateY(-2px)!important;
    border-color:#7669ea!important;
    box-shadow:
        0 5px 12px rgba(15,23,42,.05),
        0 12px 26px rgba(91,83,216,.12)!important;
}

.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card:focus-visible{
    outline:0!important;
    border-color:#6659e8!important;
    box-shadow:
        0 0 0 3px rgba(102,89,232,.13),
        0 10px 24px rgba(15,23,42,.08)!important;
}

.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card:active{
    transform:translateY(0)!important;
}

/* Preserve clean visuals while dragging. */
.cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card.is-dragging{
    opacity:.55!important;
    transform:scale(.98)!important;
}

/* Dark mode. */
.theme-dark .cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card{
    background:#202630!important;
    border-color:#38414d!important;
    box-shadow:0 5px 18px rgba(0,0,0,.16)!important;
}

.theme-dark .cat-pane[data-pane="materials"] #materialList .hc-material-swatch{
    border-color:#39424e!important;
}

.theme-dark .cat-pane[data-pane="materials"] #materialList .hc-card-name{
    color:#f2f4f7!important;
}

.theme-dark .cat-pane[data-pane="materials"] #materialList .hc-card-meta{
    color:#98a2b3!important;
}

.theme-dark .cat-pane[data-pane="materials"] #materialList .hc-card-action{
    color:#aaa4ff!important;
    border-top-color:#343d48!important;
}

.theme-dark .cat-pane[data-pane="materials"] #materialList .hc-material-swatch .hc-scope-badge:not(.private){
    background:rgba(31,41,55,.92)!important;
    color:#e5e7eb!important;
    border-color:#4b5563!important;
}

/* Narrow catalogue panel still remains two columns, with smaller previews. */
@media(max-width:420px){
    .cat-pane[data-pane="materials"] #materialList{
        gap:7px!important;
    }

    .cat-pane[data-pane="materials"] #materialList > button.material-card.hc-material-card{
        grid-template-rows:76px auto auto auto!important;
        padding:6px!important;
        border-radius:12px!important;
    }

    .cat-pane[data-pane="materials"] #materialList .hc-material-swatch{
        height:76px!important;
        min-height:76px!important;
        max-height:76px!important;
        border-radius:8px!important;
    }

    .cat-pane[data-pane="materials"] #materialList .hc-card-name{
        margin-top:7px!important;
        font-size:9px!important;
    }

    .cat-pane[data-pane="materials"] #materialList .hc-card-meta,
    .cat-pane[data-pane="materials"] #materialList .hc-card-action{
        font-size:7.5px!important;
    }
}
