.catalog-layout {
    display: grid;
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
    margin-top: 36px;
}
.catalog-layout-no-sidebar {
    display: block;
}
.catalog-sidebar,
.catalog-content {
    min-width: 0;
}
.catalog-taxonomy {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    margin: 0;
    padding: 20px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a8bcb0 transparent;
    border: 1px solid var(--line);
    border-radius: var(--corner);
    background: var(--surface);
}
.catalog-taxonomy-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 4px 18px;
}
.catalog-taxonomy-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -.025em;
}
.catalog-taxonomy-header > a {
    flex-shrink: 0;
    color: var(--teal);
    font-size: 12px;
    text-decoration: none;
}
.catalog-taxonomy-header > a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.catalog-category-tree {
    margin: 8px 0 0 8px;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--line);
    list-style: none;
}
.catalog-category-tree[hidden] {
    display: none;
}
.catalog-category-tree-root {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}
.catalog-category-tree-root > .catalog-category-node {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbf8;
}
.catalog-category-node .catalog-category-node {
    margin-top: 3px;
}
.catalog-category-row {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    border-radius: 9px;
}
.catalog-category-link {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 7px 6px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
}
.catalog-category-link > span:first-child {
    min-width: 0;
}
.catalog-category-tree-root > .catalog-category-node > .catalog-category-row > .catalog-category-link {
    font-weight: 650;
}
.catalog-category-link:hover {
    background: var(--mint);
    color: var(--teal);
}
.catalog-category-node.is-selected > .catalog-category-row {
    background: var(--mint);
}
.catalog-category-node.is-selected > .catalog-category-row > .catalog-category-link {
    color: var(--teal);
}
.catalog-category-count {
    flex-shrink: 0;
    min-width: 25px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e8efe9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}
.catalog-category-node.is-selected > .catalog-category-row .catalog-category-count {
    background: var(--teal);
    color: #fff;
}
.catalog-category-toggle {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--teal);
    cursor: pointer;
    transition: background-color .18s, transform .2s var(--ease-out);
}
.catalog-category-toggle:hover {
    background: var(--mint);
}
.catalog-category-toggle svg {
    display: block;
    transition: transform .2s var(--ease-out);
}
.catalog-category-toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}
.catalog-content .catalog-filters {
    margin-top: 0;
}
@media (max-width: 1100px) {
    .catalog-layout {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 24px;
    }
    .catalog-content .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 860px) {
    .catalog-layout {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 28px;
    }
    .catalog-taxonomy {
        position: static;
        max-height: none;
    }
}
@media (max-width: 640px) {
    .catalog-layout {
        gap: 22px;
    }
    .catalog-taxonomy {
        padding: 16px;
        border-radius: 18px;
    }
    .catalog-content .catalog-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .catalog-category-toggle,
    .catalog-category-toggle svg {
        transition: none;
    }
}
/* Catalog navigation: one quiet surface, clear hierarchy. */
.catalog-taxonomy { padding:22px 16px 16px; overflow:visible; max-height:none; border-radius:16px; }
.catalog-taxonomy-header { display:block; margin:0 10px 18px; }
.catalog-taxonomy-header h2 { font-size:18px; line-height:1.35; letter-spacing:-.02em; margin-bottom:14px; }
.catalog-taxonomy-header>a { display:flex; align-items:center; min-height:40px; padding:0 12px; margin:0 -10px; border-radius:8px; font-size:13px; font-weight:600; background:var(--mint); }
.catalog-category-tree-root { gap:0; }
.catalog-category-tree-root>.catalog-category-node { padding:8px 0; border:0; border-top:1px solid var(--line); border-radius:0; background:transparent; }
.catalog-category-row { gap:0; }
.catalog-category-link { min-height:44px; box-sizing:border-box; padding:10px; font-size:13px; line-height:1.5; gap:12px; }
.catalog-category-tree-root>.catalog-category-node>.catalog-category-row>.catalog-category-link { font-size:14px; }
.catalog-category-tree:not(.catalog-category-tree-root) { margin:2px 0 6px 10px; padding-left:8px; }
.catalog-category-node .catalog-category-node { margin:0; }
.catalog-category-count { min-width:0; padding:0; border-radius:0; background:none; font-size:11px; font-variant-numeric:tabular-nums; color:#52675d; }
.catalog-category-node.is-selected>.catalog-category-row .catalog-category-count { background:none; color:var(--teal); }
.catalog-category-toggle { flex-basis:40px; width:40px; height:44px; border-radius:8px; }
.catalog-category-link:focus-visible,.catalog-category-toggle:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
@media(max-width:860px) { .catalog-taxonomy { padding:18px 16px 12px; } .catalog-taxonomy-header { display:flex; align-items:center; margin:0 0 16px; } .catalog-taxonomy-header h2 { margin:0; } .catalog-taxonomy-header>a { margin:0; padding:0 12px; } }
.catalog-cover { display:block; margin-bottom:20px; overflow:hidden; border-radius:12px; background:#edf3ee; }
.catalog-cover img { display:block; width:100%; height:auto; aspect-ratio:8/5; object-fit:contain; }
.catalog-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:24px 0 32px; }
.catalog-gallery figure { margin:0; min-width:0; }
.catalog-gallery figure:first-child { grid-column:1/-1; }
.catalog-gallery img { display:block; width:100%; height:auto; border:1px solid var(--line); border-radius:12px; }
.catalog-gallery figcaption { margin-top:8px; font-size:13px; color:var(--muted); }
@media(max-width:640px) { .catalog-gallery { grid-template-columns:1fr; } }
.catalog-gallery a { cursor:zoom-in; }
.catalog-lightbox { position:fixed; inset:0; box-sizing:border-box; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:20px 28px; border:0; background:rgba(12,27,22,.97); color:#fff; overflow:auto; }
.catalog-lightbox::backdrop { background:rgba(12,27,22,.9); }
.catalog-lightbox[open] { display:flex; flex-direction:column; }
.clb-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-shrink:0; }
.clb-count { color:#e1eee7; font-size:14px; font-variant-numeric:tabular-nums; }
.catalog-lightbox button { display:flex; align-items:center; justify-content:center; flex-shrink:0; width:48px; height:48px; padding:0; border:1px solid #61776c; border-radius:50%; background:#263d32; color:#fff; cursor:pointer; }
.catalog-lightbox button[hidden] { display:none; }
.catalog-lightbox button:hover { background:#3b5748; }
.catalog-lightbox button:focus-visible { outline:2px solid #b0e4ca; outline-offset:4px; }
.catalog-lightbox svg { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.clb-stage { display:flex; align-items:center; justify-content:center; gap:20px; flex:1; min-height:0; padding:16px 0; }
.clb-image { display:block; min-width:0; max-width:calc(100% - 136px); max-height:calc(100dvh - 190px); object-fit:contain; }
.clb-caption { margin:0 auto; max-width:75ch; text-align:center; color:#fff; font-size:14px; line-height:1.6; flex-shrink:0; }
.clb-status { text-align:center; font-size:13px; color:#d6e8dd; margin:8px 0 0; }
.clb-status:empty { display:none; }
@media(max-width:640px) { .catalog-lightbox { padding:12px 12px 24px; } .clb-stage { position:relative; gap:0; } .clb-image { max-width:100%; max-height:calc(100dvh - 180px); } .clb-prev,.clb-next { position:absolute; top:50%; z-index:1; } .clb-prev { left:0; } .clb-next { right:0; } .catalog-lightbox .clb-prev,.catalog-lightbox .clb-next { background:rgba(22,46,33,.85); } }
