/**
 * Template gallery cards: fit preview frame to each blueprint PNG.
 * Short / landscape previews (PX-300, PX-500, etc.) no longer sit in a huge
 * card or forced full-page frame.
 */

/* Preview frame hugs each PNG's natural aspect ratio */
.px-template-card__frame {
    height: auto !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
}

.px-template-card__thumb--image {
    height: auto !important;
}

.px-template-card__thumb--image .px-template-card__img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block;
    object-fit: contain;
    object-position: top center;
}

/* Each card keeps its own height — no blank gap above action buttons */
.px-templates-grid {
    align-items: start;
}

.px-template-card {
    height: auto;
    align-self: start;
}

.px-template-card__body {
    flex: 0 0 auto;
}

.px-template-card__desc {
    flex: 0 0 auto;
}

.px-template-card__actions {
    margin-top: 12px;
}
