/* My Gallery Plugin (Pro) - Frontend Styles */

.th-my-gallery {
	--thmg-columns: 4;
	--thmg-gap: 10px;

	display: grid;
	grid-template-columns: repeat(var(--thmg-columns), minmax(0, 1fr));
	gap: var(--thmg-gap);

	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.th-my-gallery *,
.th-my-gallery *::before,
.th-my-gallery *::after {
	box-sizing: border-box;
}

.th-my-gallery__item {
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: 10px;
	background: #f4f4f4;
	text-decoration: none;
	outline: none;
	transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.th-my-gallery__item:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.th-my-gallery__item:focus-visible {
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.35), 0 10px 22px rgba(0, 0, 0, 0.12);
}

.th-my-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Empty state */
.th-my-gallery__empty {
	margin: 0;
	padding: 14px 16px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.03);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
	.th-my-gallery {
		grid-template-columns: repeat(min(3, var(--thmg-columns)), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.th-my-gallery {
		grid-template-columns: repeat(min(2, var(--thmg-columns)), minmax(0, 1fr));
		--thmg-gap: max(8px, var(--thmg-gap));
	}
}
