/* Catalogue: one component layer, isolated from shared Admin/public form controls. */
.catalogue-main{
    --cat-paper:#f8f4ed;--cat-surface:#fcfaf5;--cat-stripe:#f6f1e8;
    --cat-green:#2c645b;--cat-ink:#203b35;--cat-muted:#617369;--cat-line:#ded7cb;
    direction:inherit;background:var(--cat-paper);padding-block-end:64px;
}
.catalogue-main .wrap{width:calc(100% - 48px);max-width:1296px;margin-inline:auto;min-width:0}
.catalogue-main [hidden]{display:none!important}
.catalogue-main .sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.catalogue-main button{font-family:inherit;cursor:pointer}
.catalogue-main button:focus-visible,.cat-table-scroll:focus-visible{outline:2px solid var(--cat-green);outline-offset:3px}
.cat-icon-button{display:inline-grid;place-items:center;flex:none;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:4px;color:var(--cat-green);background:transparent;font:inherit;font-size:22px}
.cat-icon-button:hover{background:#2c645b0d}
.cat-year-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;height:44px;margin:0;padding:6px 0;border:0;border-radius:0;background:transparent;color:var(--cat-ink);font:inherit;font-size:15px;text-align:start}
.cat-year-trigger svg{width:19px;height:19px;color:var(--cat-green)}
.cat-year-trigger:focus-visible{outline:0!important}
.cat-results{margin-block-start:32px}
.cat-results-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.cat-view-toggle{display:flex;gap:3px;padding:4px;border:1px solid var(--cat-line);border-radius:6px;background:#f1ebe1}
.cat-view-toggle button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 14px;border:0;border-radius:3px;background:transparent;color:var(--cat-muted);font:inherit;font-size:13px;line-height:1.6}
.cat-view-toggle button[aria-pressed=true]{background:var(--cat-green);color:#fff}
.cat-view-toggle svg{width:17px;height:17px}
.cat-sort{position:relative;min-width:190px}
.public-page-content .catalogue-main .cat-sort>select{
    appearance:none;display:block;box-sizing:border-box;width:100%;min-width:0;max-width:240px;height:48px;min-height:48px;
    margin:0;padding:10px 14px;padding-inline-end:40px;border:1px solid #ccd6ce;border-radius:6px;
    background:var(--cat-surface);background-image:none;color:var(--cat-green);font:inherit;font-size:14px;line-height:1.6;box-shadow:none;text-overflow:ellipsis;cursor:pointer;
}
.cat-sort>.cat-select-arrow{position:absolute;inset-inline-end:14px;top:15px;width:18px;height:18px;pointer-events:none;color:var(--cat-green)}
.cat-select-arrow svg{display:block;width:100%;height:100%}
.cat-results-hint{font-size:12px;line-height:1.8;color:var(--cat-muted);margin-block:0 12px}
.cat-scroll-hint{display:none;font-size:12px;color:var(--cat-muted);margin-block:0 12px}
.cat-active-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-block-end:14px}
.cat-chip{display:inline-flex;align-items:center;gap:10px;min-height:34px;padding:5px 10px;border:1px solid #d6ded3;border-radius:4px;background:#e7ece4;color:var(--cat-green);font:inherit;font-size:12px}
.cat-chip>span:last-child{font-size:18px;line-height:1}
.cat-books-table{min-width:1200px}
.cat-col-title{width:24%}.cat-col-author{width:13%}.cat-col-category{width:16%}.cat-col-country{width:6%}
.cat-col-publisher{width:17%}.cat-col-year{width:6%}.cat-col-price{width:8%}.cat-col-hall{width:5%}.cat-col-stand{width:5%}
.cat-books-table tbody tr{cursor:pointer}
/* Clicking a row opens details; retain table semantics and a visible keyboard focus. */
.cat-books-table tbody tr:focus-visible{outline:2px solid var(--cat-green);outline-offset:-2px}
.cat-books-table tbody tr:focus-visible>*{box-shadow:inset 0 2px var(--cat-green),inset 0 -2px var(--cat-green)}
.cat-book-title{display:block;color:var(--cat-ink);font-weight:600;font-size:15px;line-height:1.85}
.cat-book-subtitle{display:block;color:var(--cat-muted);font-size:12px;margin-block-start:4px}
.public-page-content .cat-books-table .cat-category-text{display:table-cell;color:var(--cat-muted);font-size:13px;line-height:1.85;white-space:normal;overflow-wrap:anywhere}
.cat-books-table :is(.cat-col-year,.cat-col-price,.cat-col-hall,.cat-col-stand),
.cat-books-table thead th:nth-child(n+6),.cat-books-table .cat-code-cell,.cat-books-table .cat-price-cell{text-align:center}
.cat-books-table .cat-code-cell{white-space:nowrap;color:var(--cat-green);font-variant-numeric:tabular-nums}
.cat-price{display:inline-flex;align-items:baseline;gap:5px;white-space:nowrap;color:var(--cat-green);font-variant-numeric:tabular-nums;font-weight:500}
.cat-price small{font-size:11px;font-weight:400;color:var(--cat-muted)}







.cat-after-table{font-size:12px;line-height:1.8;color:var(--cat-muted);margin-block-start:16px}
.cat-empty{text-align:center;padding:52px 24px}
.cat-empty h3{font-size:24px;font-weight:500;color:var(--cat-green)}
.cat-empty p{font-size:14px;line-height:1.8;color:var(--cat-muted);margin:10px 0 20px}

.cat-error{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:20px;border:1px solid #d8bcb3;border-radius:6px;background:#fff7f4;color:#8f3027;margin-block-end:18px;font-size:14px}
.cat-error button{font:inherit;padding:8px 14px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit}
.cat-busy{opacity:.5;pointer-events:none}

/* Covers use the supplied unavailable-cover asset when no trusted image exists. */
.cat-table-panel.is-cards{overflow:visible;border:0;background:transparent}
.cat-books-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;direction:inherit}
.cat-book-card{min-width:0;overflow:hidden}
.cat-book-card:focus-within{outline:2px solid var(--cat-green);outline-offset:3px}
.cat-card-media{position:relative;aspect-ratio:5/7;overflow:hidden;background:#e4d8c5}
.cat-card-cover-button{display:block;width:100%;height:100%;padding:0;border:0;background:transparent}
.cat-card-cover{display:block;width:100%;height:100%;object-fit:contain}
.cat-favourite{position:absolute;inset-inline-end:12px;top:12px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #ffffffcf;border-radius:5px;background:#fffaf3f5;color:#c9382a;font:inherit;font-size:23px}
.cat-favourite[aria-pressed=true]{background:#c9382a;border-color:#c9382a;color:#fff}
.cat-card-category{position:absolute;inset-inline-start:12px;bottom:12px;max-width:calc(100% - 24px);padding:4px 9px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-radius:3px;background:#faf7eff2;color:var(--cat-green);font-size:11px;pointer-events:none}
.cat-card-copy{padding:18px;direction:inherit}
.cat-card-copy h3{font-size:17px;line-height:1.7;font-weight:600;min-height:58px;margin:0 0 6px}
.cat-card-copy h3 button{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding:0;border:0;background:transparent;color:var(--cat-ink);font:inherit;line-height:inherit;text-align:start}
.cat-card-author{font-size:13px;color:var(--cat-muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.cat-card-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-block-start:16px;font-size:13px}
.cat-card-country{color:var(--cat-muted)}
.cat-card-bottom{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:12px 18px;border-block-start:1px solid var(--cat-line);background:#f8f4ec;color:var(--cat-muted);font-size:12px}
.cat-card-bottom button{min-height:32px;padding:0;border:0;background:transparent;color:var(--cat-green);font:inherit;font-size:12px}
/* Native dialogs retain modal focus management and Escape support. */
html.cat-modal-open{overflow:hidden;scrollbar-gutter:stable}
.cat-dialog{
    --cat-paper:#f8f4ed;--cat-green:#2c645b;--cat-ink:#203b35;--cat-muted:#617369;--cat-line:#ded7cb;
    direction:inherit;max-width:calc(100% - 32px);max-height:calc(100dvh - 32px);
    border:1px solid var(--cat-line);border-radius:4px;background:var(--cat-paper);color:var(--cat-ink);font:inherit;overflow:auto;overscroll-behavior:contain;
}
.cat-dialog::backdrop{background:#142e2999;backdrop-filter:blur(3px)}
/* A native modal has both block insets set by the UA. Auto height stretches it;
   fit-content keeps the panel at its actual content height, centred by its margins. */
.cat-dialog{box-sizing:border-box;width:1040px;height:fit-content;min-height:0;margin:auto;padding:0;box-shadow:0 18px 80px #142e2940}
.cat-dialog-close{position:absolute;left:14px;right:auto;top:14px;z-index:2}
.cat-dialog-close svg{display:block;width:20px;height:20px;stroke-width:1.8}
/* Demo composition without its QR column: cover, editorial details, then one location/price strip. */
.cat-dialog-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:24px 32px;padding:46px 34px 30px}
.cat-dialog-cover-wrap{align-self:start;padding-block-start:10px}
.cat-dialog-cover{display:block;width:190px;height:269px;object-fit:contain;box-shadow:5px 9px 20px #203b3521}
.cat-dialog-information{min-width:0}
.cat-dialog-kicker{display:flex;align-items:center;gap:9px;font-size:10px;line-height:1.7;color:var(--cat-muted);margin-block-end:14px}
.cat-dialog-kicker::before{content:"";flex:none;width:6px;height:6px;background:#c9382a;transform:rotate(45deg)}
.cat-dialog h2{margin:0;font-size:29px;line-height:1.6;font-weight:500;color:var(--cat-green);overflow-wrap:anywhere}
.cat-dialog .cat-dialog-author{margin:6px 0 16px;font-size:14px;line-height:1.7;color:var(--cat-muted)}
.cat-dialog .cat-dialog-category{display:table;max-width:100%;margin:0 0 20px;padding:4px 9px;border:1px solid #dce4d8;border-radius:2px;background:#eaf0e7;color:var(--cat-green);font-size:11px;line-height:1.8;overflow-wrap:anywhere}
.cat-dialog .cat-dialog-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 24px;margin:0}
.cat-dialog-facts>div{min-width:0}
.cat-dialog-facts dt{margin:0 0 3px;font-size:11px;line-height:1.7;color:var(--cat-muted)}
.cat-dialog-facts dd{direction:inherit;text-align:start;margin:0;font-size:13px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cat-dialog-facts dd>bdi{unicode-bidi:isolate}
.cat-dialog-bottom{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:24px;padding-block-start:20px;border-block-start:1px solid var(--cat-line)}
.cat-dialog-location{display:flex;align-items:center;gap:12px;min-width:0;font-size:14px;line-height:1.8;color:var(--cat-green)}
.cat-dialog-location>svg{flex:none;width:23px;height:23px}
.cat-dialog-location small{display:block;margin-block-end:3px;font-size:10px;line-height:1.7;color:var(--cat-muted)}
.cat-dialog-price{display:flex;align-items:baseline;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px;flex:none;font-size:24px}
.cat-dialog-price .cat-price small{font-size:11px}
.cat-dialog-old-price{color:var(--cat-muted);font-size:13px}
.cat-dialog-old-price .cat-price{color:inherit}
.cat-dialog-loading{padding:64px 28px;text-align:center}
.cat-dialog-loading p{margin-block:12px 20px;color:var(--cat-muted)}
.cat-dialog button:focus-visible,.cat-year-popover button:focus-visible{outline:2px solid var(--cat-green);outline-offset:2px}
/* Non-modal top-layer calendar, positioned against the year field by catalogue.js. */
.cat-year-popover{position:fixed;inset:auto;z-index:10070;box-sizing:border-box;width:320px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);height:auto;margin:0;padding:16px;border:1px solid var(--cat-line);border-radius:6px;background:var(--cat-surface);color:var(--cat-ink);font:inherit;text-align:start;overflow:auto;overscroll-behavior:contain;box-shadow:0 10px 30px #203b3526}
.cat-year-popover::backdrop{background:none;backdrop-filter:none;pointer-events:none}
.cat-year-popover h2{font-size:16px;font-weight:600;line-height:1.6;margin:0 0 12px;color:var(--cat-green)}
.cat-year-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-block-end:12px;font-size:13px}
.cat-year-heading [data-year-range]{direction:ltr;unicode-bidi:isolate}
.cat-year-heading button,.cat-year-actions button{font:inherit;min-height:36px;padding:6px 10px;border:1px solid var(--cat-line);border-radius:4px;background:transparent;color:var(--cat-green);cursor:pointer}
.cat-year-heading button{width:32px;min-height:32px;padding:0;font-size:20px;line-height:1}
.cat-year-heading button:disabled{opacity:.35;cursor:default}
.cat-year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.cat-year-grid button{min-height:38px;padding:6px;border:1px solid var(--cat-line);border-radius:4px;background:var(--cat-paper);color:var(--cat-green);font:inherit;font-size:14px;cursor:pointer}
.cat-year-grid button:hover,.cat-year-heading button:hover:not(:disabled),.cat-year-actions button:hover{border-color:var(--cat-green)}
.cat-year-grid button[aria-pressed=true]{background:var(--cat-green);color:#fff}
.cat-year-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-block-start:12px;font-size:13px}

@media(max-width:1100px){
    
    
    .cat-books-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
}
@media(max-width:900px){
    
    .cat-results-controls{justify-content:flex-start}
}
@media(max-width:700px){
    .catalogue-main{padding-block-end:40px}.catalogue-main .wrap{width:calc(100% - 32px)}
    
    
    
    
    
    
    .cat-results-controls{width:100%;justify-content:space-between;gap:10px}
    .cat-view-toggle button{padding-inline:10px}.cat-sort{min-width:0;flex:1;max-width:220px}
    .cat-scroll-hint{display:block}
    
    .cat-books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
    .cat-card-copy{padding:14px}.cat-card-copy h3{font-size:15px;min-height:52px}
    .cat-card-author,.cat-card-meta{font-size:12px}.cat-card-bottom{padding:10px 14px;font-size:11px}
    .cat-dialog-layout{grid-template-columns:minmax(0,1fr);padding:46px 24px 26px;gap:22px}
    .cat-dialog-cover-wrap{display:flex;justify-content:center}.cat-dialog-cover{width:130px;height:182px}
    .cat-dialog h2{font-size:25px}.cat-dialog .cat-dialog-facts{gap:14px 16px}
    .cat-dialog-bottom{align-items:flex-start;flex-wrap:wrap;gap:16px}.cat-dialog-location{gap:8px;font-size:12px}
    .cat-dialog-price{margin-inline-start:auto;font-size:21px}
}
@media(max-width:440px){
    
    .cat-results-controls{align-items:stretch;flex-direction:column}.cat-sort{width:100%;max-width:none}
    .public-page-content .catalogue-main .cat-sort>select{max-width:none}
    .cat-view-toggle{align-self:flex-start}
    .cat-card-meta{align-items:start;flex-direction:column;gap:6px}
    .cat-card-category{font-size:10px}.cat-card-bottom{align-items:start;flex-direction:column}
}
@media(prefers-reduced-motion:reduce){.catalogue-main *{transition:none!important;scroll-behavior:auto}}
@media(forced-colors:active){
    .cat-view-toggle,.cat-table-panel{border-color:ButtonText}
    .cat-view-toggle button[aria-pressed=true]{border:1px solid Highlight}
}

