/* Resource artwork uses a square canvas; uploaded files retain their proportions. */
.resource-cover,
.cover-large,
.resource-card .resource-cover,
.home-grid .resource-cover,
.free-grid .resource-cover,
.home-preview .preview-resource-grid .resource-cover {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    min-height: 0;
}

.resource-card .card-image,
.home-preview .preview-resource-grid .card-image {
    padding: 10px;
}

.uploaded-resource-cover {
    position: relative;
    padding: 0;
}

.uploaded-resource-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery .gallery-main {
    padding: 20px;
}

.thumbnail {
    width: 85px;
    height: 85px;
}

.thumbnail .resource-cover {
    height: 100%;
    aspect-ratio: 1 / 1;
}

.published-cover-strip img {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.resource-list-view .card-image {
    width: 160px;
    height: 160px;
    min-height: 0;
    align-self: start;
}

.resource-list-view .card-image .resource-cover {
    height: 100%;
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.cart-cover .resource-cover {
    height: auto;
    aspect-ratio: 1 / 1;
}

.seller-resource-thumb {
    width: 115px;
    height: 115px;
    object-fit: contain;
}

.seller-cover-strip img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.preview-cover-strip img {
    width: min(100%, 450px);
    height: auto;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.admin-files img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

@media (max-width: 760px) {
    .resource-list-view .card-image {
        width: 110px;
        height: 110px;
    }
}

.published-cover-strip{align-items:flex-start}.preview-thumbnail{position:relative;display:flex;flex-direction:column;width:85px;min-height:85px;flex-shrink:0;border:1px solid var(--line);border-radius:5px;overflow:hidden;background:#f5f4ee;text-align:center;text-decoration:none}.preview-thumbnail img{width:83px;height:83px;object-fit:contain;border:0;border-radius:0}.preview-thumbnail span{display:block;padding:5px 2px;font-size:12px;line-height:1.25;font-weight:700;color:var(--green);background:#edf3ee}.preview-thumbnail:hover,.preview-thumbnail:focus-visible{outline:2px solid var(--green);outline-offset:2px}.published-preview-dialog{width:min(1050px,96vw);max-width:1050px;max-height:94vh}.published-preview-body{padding:0 24px 24px}.published-preview-body>p{margin:14px 0;line-height:1.5}.automatic-preview-option{margin:20px 0 30px;padding:18px;border:1px solid var(--line);border-radius:8px;background:#f6f7f3}.automatic-preview-option small{display:block;margin-top:12px}@media(max-width:650px){.published-preview-body{padding:0 12px 18px}}

.sample-preview-pages{display:grid;gap:24px;padding:20px;background:#f1f1ec}.sample-preview-pages figure{margin:0}.sample-preview-pages figure[hidden]{display:none}.sample-preview-pages img{display:block;width:100%;height:auto;min-height:120px;background:white;box-shadow:0 2px 8px #0002}.sample-preview-pages figcaption{text-align:center;font-size:.875rem;color:var(--muted);padding-top:10px}.published-preview-dialog .dialog-heading{position:sticky;top:0;z-index:1;background:white}.published-preview-dialog .published-preview-body{padding-bottom:24px}



/* Main artwork is stored at 450px and never enlarged beyond that canvas. */
.resource-cover,.cover-large,.resource-card .resource-cover,.home-grid .resource-cover,.free-grid .resource-cover,.home-preview .preview-resource-grid .resource-cover{max-width:450px;max-height:450px;margin-inline:auto}
.uploaded-resource-cover img{max-width:450px;max-height:450px}
.product-gallery .gallery-main .resource-cover{width:min(100%,450px);height:auto;aspect-ratio:1}
.preview-cover-strip img{max-width:450px;max-height:450px}
