/* Polish catalogue viewer only; original files, thumbnail grid and typography families retained. */
#catalogue-viewer{width:min(1200px,calc(100vw - 24px));max-width:1200px;height:auto;max-height:calc(100dvh - 24px);padding:16px;overflow:auto;overscroll-behavior:contain}
#catalogue-viewer[open]{display:block}
#catalogue-viewer .viewer-toolbar{position:sticky;top:-16px;z-index:2;background:#f6f6f3;padding:4px 0 8px;margin:0}
#catalogue-viewer #title{font-size:28px!important;line-height:1.15!important;min-height:0;margin:4px 0 12px!important}
#catalogue-viewer #large{width:100%;height:calc(100dvh - 150px);min-height:280px;max-height:900px;max-width:100%;object-fit:contain;margin:0;background:#e8e9e5;border-radius:8px}
#catalogue-viewer .catalogue-load-status:empty{display:none}
#catalogue-viewer #model-description{font-size:14px;line-height:1.5;max-height:none;overflow:visible;max-width:none;margin:16px 0 12px}
#catalogue-viewer .viewer-navigation{display:inline-flex;width:auto;gap:8px;margin:0 8px 8px 0;vertical-align:middle}
#catalogue-viewer .viewer-navigation button,#catalogue-viewer #ask-front,#catalogue-viewer #close{min-height:44px;width:auto;font-size:14px!important;line-height:1.4;padding:8px 16px;border-radius:24px}
#catalogue-viewer #ask-front{display:inline-flex;vertical-align:middle;margin:0 0 8px}
#catalogue-viewer .viewer-links{margin-top:4px;gap:8px 16px;justify-content:flex-start}
#catalogue-viewer .viewer-links a,#catalogue-viewer #detailview{min-height:44px;font-size:13px;padding:8px 0}
@media(max-width:600px){
 #catalogue-viewer{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:12px}
 #catalogue-viewer .viewer-toolbar{top:-12px}
 #catalogue-viewer #title{font-size:24px!important}
 #catalogue-viewer #large{height:auto;max-height:calc(100dvh - 180px);min-height:0}
 #catalogue-viewer .viewer-navigation{display:flex;justify-content:center;margin:12px 0 8px}
 #catalogue-viewer #ask-front{margin-bottom:4px}
}
@media(max-height:500px){#catalogue-viewer #large{min-height:220px;height:70dvh}}
/* Keep desktop controls available alongside one another below the image. */
@media(min-width:601px) and (min-height:600px){
 #catalogue-viewer{height:calc(100dvh - 24px)}
 #catalogue-viewer[open]{display:grid;grid-template-columns:1fr auto;grid-template-rows:44px auto minmax(280px,1fr) auto 44px 44px;gap:8px}
 #catalogue-viewer .viewer-toolbar,#catalogue-viewer #title,#catalogue-viewer #large,#catalogue-viewer #model-description,#catalogue-viewer .viewer-links{grid-column:1/-1}
 #catalogue-viewer .viewer-toolbar{position:static;padding:0}
 #catalogue-viewer #title{margin:0!important}
 #catalogue-viewer #large{height:100%;min-height:0}
 #catalogue-viewer #model-description{margin:0}
 #catalogue-viewer .viewer-navigation{margin:0}
 #catalogue-viewer #ask-front{margin:0}
 #catalogue-viewer .viewer-links{margin:0}
 #catalogue-viewer .catalogue-load-status:not(:empty){position:absolute;top:120px;left:24px}
}

