.plm-project-lots,
.plm-project-lots * {
	box-sizing: border-box;
}

.plm-project-lots {
	--plm-columns: 3;
	--plm-image-width: 360px;
	--plm-image-height: 260px;
	--plm-grid-gap: 24px;
	color: #111827;
	margin: 32px 0;
}

.plm-heading {
	font-size: clamp(1.65rem, 2.5vw, 2.35rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin: 0 0 22px;
}

.plm-toolbar {
	align-items: center;
	display: flex;
	gap: 16px;
	justify-content: flex-end;
	margin-bottom: 22px;
}

.plm-filter-label {
	font-weight: 700;
}

.plm-select-wrap {
	position: relative;
}

.plm-select-wrap::after {
	border-color: #111827 transparent transparent;
	border-style: solid;
	border-width: 6px 5px 0;
	content: "";
	pointer-events: none;
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.plm-lot-filter {
	appearance: none;
	background: #fff;
	border: 1px solid #d8e0ec;
	border-radius: 999px;
	box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
	color: #111827;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	max-width: 100%;
	min-width: 210px;
	padding: 12px 44px 12px 18px;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.plm-lot-filter:hover {
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
	transform: translateY(-1px);
}

.plm-lot-filter:focus-visible {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 14px 32px rgba(15, 23, 42, 0.12);
	outline: none;
}

.plm-results-wrap {
	position: relative;
}

.plm-results {
	opacity: 1;
	transform: scale(1);
	transform-origin: center top;
	transition: opacity 220ms ease, transform 220ms ease;
}

.plm-results.is-fading {
	opacity: 0;
	transform: scale(0.95);
}

.plm-results.is-revealing {
	animation: plm-fade-zoom 320ms ease both;
}

.plm-lots-groups {
	display: grid;
	gap: calc(var(--plm-grid-gap) * 1.4);
}

.plm-lot-group {
	display: grid;
	gap: 16px;
}

.plm-lot-group-title {
	font-size: clamp(1.1rem, 1.8vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.25;
	margin: 0;
}

.plm-gallery {
	display: grid;
	gap: var(--plm-grid-gap);
	grid-template-columns: repeat(var(--plm-lot-columns, var(--plm-columns)), minmax(0, 1fr));
}

.plm-lot-card {
	animation: plm-rise 360ms ease both;
	background: #fff;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 22px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
	margin: 0;
	overflow: hidden;
	transition: box-shadow 220ms ease, transform 220ms ease;
}

.plm-lot-card:hover {
	box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
	transform: translateY(-3px);
}

.plm-lightbox-trigger {
	appearance: none;
	background: transparent;
	border: 0;
	cursor: zoom-in;
	display: block;
	margin: 0;
	padding: 0;
	text-align: inherit;
	width: 100%;
}

.plm-lightbox-trigger:focus-visible {
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2) inset;
	outline: none;
}

.plm-image-shell {
	background: linear-gradient(135deg, #f8fafc, #eef2f7);
	display: block;
	height: var(--plm-image-height);
	max-width: var(--plm-image-width);
	overflow: hidden;
	width: 100%;
}

.plm-view-single .plm-image-shell {
	max-width: none;
}

.plm-lot-image {
	display: block;
	height: 100%;
	object-fit: var(--plm-object-fit, cover);
	transition: transform 260ms ease;
	width: 100%;
}

.plm-lot-card:hover .plm-lot-image {
	transform: scale(1.035);
}

.plm-loader {
	align-items: center;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(226, 232, 240, 0.9);
	border-radius: 999px;
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
	display: inline-flex;
	font-weight: 800;
	gap: 10px;
	left: 50%;
	padding: 10px 16px;
	position: absolute;
	top: 18px;
	transform: translateX(-50%);
	z-index: 4;
}

.plm-loader[hidden],
.plm-skeleton[hidden] {
	display: none !important;
}

.plm-spinner {
	animation: plm-spin 800ms linear infinite;
	border: 3px solid #dbeafe;
	border-radius: 50%;
	border-top-color: #2563eb;
	height: 18px;
	width: 18px;
}

.plm-skeleton {
	display: grid;
	gap: var(--plm-grid-gap);
	grid-template-columns: repeat(var(--plm-columns), minmax(0, 1fr));
	inset: 0;
	position: absolute;
	z-index: 3;
}

.plm-skeleton span {
	animation: plm-pulse 900ms ease-in-out infinite alternate;
	background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
	border-radius: 22px;
	height: var(--plm-image-height);
}

.plm-error,
.plm-empty {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 14px;
	color: #9a3412;
	font-weight: 700;
	padding: 14px 16px;
}

.plm-lightbox-open {
	overflow: hidden;
}

.plm-lightbox {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 24px;
	position: fixed;
	transition: opacity 180ms ease;
	z-index: 999999;
}

.plm-lightbox[hidden] {
	display: none !important;
}

.plm-lightbox.is-open {
	opacity: 1;
}

.plm-lightbox-backdrop {
	background: rgba(2, 6, 23, 0.86);
	inset: 0;
	position: absolute;
}

.plm-lightbox-panel {
	align-items: center;
	display: flex;
	justify-content: center;
	max-height: 92vh;
	max-width: min(1120px, 94vw);
	position: relative;
	transform: scale(0.96);
	transition: transform 180ms ease;
	width: 100%;
	z-index: 1;
}

.plm-lightbox.is-open .plm-lightbox-panel {
	transform: scale(1);
}

.plm-lightbox-image {
	background: #0f172a;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
	display: block;
	max-height: 86vh;
	max-width: 100%;
	object-fit: contain;
	opacity: 1;
	transition: opacity 140ms ease, transform 140ms ease;
}

.plm-lightbox.is-switching .plm-lightbox-image {
	opacity: 0;
	transform: scale(0.98);
}

.plm-lightbox-close,
.plm-lightbox-nav {
	align-items: center;
	background: rgba(255, 255, 255, 0.94);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
	color: #111827;
	cursor: pointer;
	display: inline-flex;
	font-weight: 900;
	justify-content: center;
	position: absolute;
	transition: background 160ms ease, transform 160ms ease;
	z-index: 2;
}

.plm-lightbox-close:hover,
.plm-lightbox-nav:hover {
	background: #fff;
	transform: scale(1.04);
}

.plm-lightbox-close:focus-visible,
.plm-lightbox-nav:focus-visible {
	box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.35), 0 14px 32px rgba(0, 0, 0, 0.26);
	outline: none;
}

.plm-lightbox-close {
	font-size: 28px;
	height: 44px;
	right: 12px;
	top: 12px;
	width: 44px;
}

.plm-lightbox-nav {
	font-size: 46px;
	height: 56px;
	top: 50%;
	transform: translateY(-50%);
	width: 56px;
}

.plm-lightbox-nav:hover {
	transform: translateY(-50%) scale(1.04);
}

.plm-lightbox-prev {
	left: 12px;
}

.plm-lightbox-next {
	right: 12px;
}

.plm-lightbox-caption {
	background: rgba(15, 23, 42, 0.72);
	border-radius: 999px;
	bottom: 12px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	left: 50%;
	max-width: calc(100% - 32px);
	overflow: hidden;
	padding: 8px 14px;
	position: absolute;
	text-overflow: ellipsis;
	transform: translateX(-50%);
	white-space: nowrap;
	z-index: 2;
}

@keyframes plm-spin {
	to { transform: rotate(360deg); }
}

@keyframes plm-pulse {
	from { opacity: 0.55; }
	to { opacity: 1; }
}

@keyframes plm-fade-zoom {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes plm-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
	.plm-gallery,
	.plm-skeleton {
		grid-template-columns: repeat(min(var(--plm-lot-columns, var(--plm-columns)), 2), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.plm-project-lots {
		--plm-grid-gap: min(var(--plm-grid-gap), 16px);
	}

	.plm-toolbar {
		align-items: stretch;
		flex-direction: column;
		justify-content: flex-start;
	}

	.plm-lot-filter,
	.plm-select-wrap {
		width: 100%;
	}

	.plm-gallery,
	.plm-skeleton {
		grid-template-columns: 1fr;
	}

	.plm-image-shell {
		max-width: none;
	}

	.plm-loader {
		max-width: calc(100% - 28px);
		white-space: nowrap;
	}

	.plm-lightbox {
		padding: 12px;
	}

	.plm-lightbox-panel {
		max-height: 94vh;
		max-width: 96vw;
	}

	.plm-lightbox-image {
		max-height: 84vh;
	}

	.plm-lightbox-close {
		height: 40px;
		right: 8px;
		top: 8px;
		width: 40px;
	}

	.plm-lightbox-nav {
		font-size: 34px;
		height: 44px;
		width: 44px;
	}

	.plm-lightbox-prev {
		left: 8px;
	}

	.plm-lightbox-next {
		right: 8px;
	}
}
