.painting-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.painting-list-row{display:grid;grid-template-columns:72px minmax(0,1fr) 170px 190px;gap:22px;align-items:center;min-height:108px;padding:14px 0;border-bottom:1px solid var(--line)}
.painting-list-row[hidden],.gallery-empty[hidden]{display:none!important}
.painting-list-row .gallery-product-image{width:72px;height:80px;aspect-ratio:auto;padding:4px;border-radius:5px;background:var(--paper)}
.painting-list-row .gallery-product-image img{width:100%;height:100%;object-fit:contain}
.painting-list-row h3{margin:0;font-size:1.5rem;line-height:1.2;font-weight:600;overflow-wrap:anywhere}
.painting-list-row .product-title-link:hover{text-decoration:underline;text-underline-offset:4px}
.painting-list-row p{margin:0;font-size:.85rem;line-height:1.5}
.painting-list-dimensions{color:var(--muted)}
.painting-list-artist{display:block;margin-top:2px;font-family:Inter,system-ui,sans-serif;font-size:.85rem;font-weight:500;line-height:1.4;color:var(--muted)}
.painting-list-price{text-align:right;font-weight:600}
.painting-list-commerce{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right}
.painting-list-commerce .card-prints-from{margin:0;color:var(--muted)}
.painting-list-commerce .card-buy-row{justify-content:flex-end;width:100%}
.painting-list-commerce .card-buy-row>:first-child{flex:0 1 auto;text-align:right}
.painting-gallery-page .gallery-filter{gap:14px 24px;margin:24px 0 18px}
.gallery-sort select{max-width:100%;min-height:44px;padding:8px 34px 8px 12px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--ink);font:inherit;cursor:pointer}
.painting-gallery-page #gallery-result-count{margin-left:auto}
.painting-gallery-page #gallery-size-note{flex-basis:100%;margin:-4px 0 0;color:var(--muted);font-size:.75rem}
.painting-list a:focus-visible,.gallery-filter select:focus-visible,.gallery-filter input:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.gallery-empty{padding:24px 0;color:var(--muted)}
@media(max-width:760px){
  .painting-list-row{grid-template-columns:64px minmax(0,1fr) auto;gap:5px 16px;padding:14px 0;min-height:100px}
  .painting-list-row .gallery-product-image{grid-row:1/4;width:64px;height:76px}
  .painting-list-row h3{grid-column:2/4;font-size:1.3rem}
  .painting-list-dimensions{grid-column:2/4}
  .painting-list-price{grid-column:2/4;text-align:left}
  .painting-list-commerce{grid-column:2/4;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:12px;text-align:left}
  .painting-list-commerce .card-buy-row{flex:1 1 auto;min-width:0;justify-content:flex-start}
  .painting-list-commerce .card-buy-row>:first-child{flex:1 1 auto;text-align:left}
  .painting-list-row p{font-size:.8rem}
  .painting-gallery-page .gallery-filter{gap:12px 20px}
  .gallery-sort{flex-basis:100%}
  .gallery-sort select{flex:1;min-width:0}
}
/* Reserve the carousel and filter space before viewer.js runs (avoids layout shift on /gallery/). */
.gallery-viewer-reserve{display:none}
.js-gallery .gallery-viewer-reserve{display:block;height:calc(clamp(170px,30vw,420px) + 160.5px);margin:16px 0 28px}
.js-gallery .painting-gallery-page .gallery-filter[hidden]{display:flex!important}
@media(max-width:640px){.js-gallery .gallery-viewer-reserve{height:328.5px}}
