/* Scoped presentation of native KVS category blocks. */
.xnv-category-directory { color:#f5f5f5; margin:24px 0 36px; }
.xnv-category-directory [hidden] { display:none !important; }
.xnv-category-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:26px; }
.xnv-category-toolbar h1 { font-family:inherit; font-size:24px; font-weight:700; line-height:1.3; }
.xnv-category-search { position:relative; flex:0 1 430px; min-width:0; }
/* Keep the search slot in the first layout, before deferred JS enables it. */
.xnv-category-directory .xnv-category-search[hidden] { display:block !important; visibility:hidden; }
.xnv-category-search input { display:block; width:100%; height:46px; padding:0 46px; border:1px solid #333; border-radius:3px; background:#1c1c1c; color:#fff; font:inherit; font-size:16px; appearance:none; }
.xnv-category-search input::placeholder { color:#aaa; opacity:1; }
.xnv-category-search input:focus-visible { outline:2px solid #eee; outline-offset:2px; }
.xnv-category-search > svg { position:absolute; inset-inline-start:15px; top:14px; pointer-events:none; color:#ccc; }
.xnv-category-clear { position:absolute; inset-inline-end:0; top:0; width:44px; height:46px; display:flex; align-items:center; justify-content:center; padding:0; border:0; background:transparent; color:#ddd; cursor:pointer; }
.xnv-category-clear:focus-visible { outline:2px solid #fff; outline-offset:-4px; }
.xnv-category-section { margin-top:28px; }
.xnv-category-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:13px; }
.xnv-category-section h2 { margin:0; color:#f5f5f5; font-size:18px; font-weight:700; line-height:1.4; }
.xnv-category-directory .xnv-category-switch { color:#aaa; font:inherit; font-size:13px; white-space:nowrap; }
.xnv-category-directory .xnv-category-switch:hover { color:#fff; }
.xnv-category-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.xnv-category-directory .xnv-category-card { position:relative; display:block; min-width:0; aspect-ratio:8/5; overflow:hidden; isolation:isolate; background:#202020; border-radius:3px; color:#fff; font:inherit; }
.xnv-category-card::after { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.18) 48%,rgba(0,0,0,.88) 100%); pointer-events:none; }
.xnv-category-card > img { display:block; width:100%; height:100%; object-fit:cover; }
.xnv-category-caption { position:absolute; z-index:2; bottom:0; inset-inline:0; padding:11px 12px; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.6); }
.xnv-category-caption strong { display:block; overflow-wrap:anywhere; font-size:16px; font-weight:700; line-height:1.25; }
.xnv-category-caption > span { display:block; margin-top:3px; color:#ddd; font-size:12px; line-height:1.3; }
.xnv-category-card:focus-visible { outline:2px solid #fff; outline-offset:3px; }
@media (hover:hover) { .xnv-category-card:hover { box-shadow:0 0 0 1px #aaa; } }
.xnv-category-placeholder { display:flex; align-items:center; justify-content:center; height:100%; color:#666; }
.xnv-category-empty { padding:28px 0; color:#bbb; font-size:16px; line-height:1.5; }
.xnv-category-directory .xnv-category-seo { margin-top:30px; color:#999; font-size:14px; line-height:1.6; }
.xnv-category-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1024px) {
    .xnv-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .xnv-category-directory [data-category-featured] .xnv-category-card:nth-child(n+5) { display:none; }
}
@media (max-width:800px) { .xnv-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; } }
@media (max-width:800px) { .xnv-category-directory [data-category-featured] .xnv-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:580px) {
    .xnv-category-directory { margin-top:18px; }
    .xnv-category-toolbar { align-items:stretch; flex-direction:column; gap:14px; margin-bottom:22px; }
    .xnv-category-toolbar h1 { font-size:22px; }
    .xnv-category-search { flex:auto; width:100%; }
    .xnv-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 8px; }
    .xnv-category-section { margin-top:24px; }
    .xnv-category-section h2 { font-size:17px; }
    .xnv-category-caption { padding:9px; }
    .xnv-category-caption strong { font-size:14px; }
    .xnv-category-caption > span { font-size:11px; }
}
