/**
 * PDF Newsletter Grid — shared frontend + editor styles.
 * Intentionally theme-agnostic: no theme classes, easily overridable.
 */

.tomatillo-png-grid {
	display: grid;
	grid-template-columns: repeat( var( --png-cols, 3 ), minmax( 0, 1fr ) );
	gap: 2rem;
	margin: 0;
}

/* Card -------------------------------------------------------------------- */
.tomatillo-png-grid .png-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.08 ), 0 6px 18px rgba( 0, 0, 0, 0.06 );
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tomatillo-png-grid .png-card:hover,
.tomatillo-png-grid .png-card:focus-visible {
	transform: translateY( -4px );
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.1 ), 0 14px 30px rgba( 0, 0, 0, 0.12 );
}

.tomatillo-png-grid .png-card:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

/* Thumbnail --------------------------------------------------------------- */
.tomatillo-png-grid .png-card__media {
	display: block;
	background: #f1f3f4;
	line-height: 0;
}

.tomatillo-png-grid .png-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: top center;
}

.tomatillo-png-grid .png-card__img--fallback {
	object-fit: contain;
}

/* Caption ----------------------------------------------------------------- */
.tomatillo-png-grid .png-card__title {
	display: block;
	padding: 1rem 1rem 1.25rem;
	text-align: center;
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.3;
}

/* Responsive collapse ----------------------------------------------------- */
@media ( max-width: 900px ) {
	.tomatillo-png-grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 1.5rem;
	}
}

@media ( max-width: 600px ) {
	.tomatillo-png-grid {
		grid-template-columns: minmax( 0, 1fr );
		gap: 1.5rem;
	}
}
