body.models-3d-page {
	background-image: url("../../img/core-img/thumbs/3d-models.jpeg");
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
	background-color: #111;
}

body.models-3d-page nav a,
body.models-3d-page footer {
	color: #f6d0e5;
	text-shadow: 0 6px 10px rgba(0, 0, 0, 0.85);
}

body.models-3d-page main {
	width: 100%;
	padding: 3% 6%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.design-scroll-shell {
	width: 100%;
	max-width: 100%;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.design-scroll-header h1 {
	font-family: "Michroma", sans-serif;
	font-size: 220%;
	color: #ffffff;
	margin-bottom: 0.8rem;
}

.design-scroll-header p {
	color: rgba(255, 255, 255, 0.92);
	max-width: 76ch;
	margin-bottom: 1.2rem;
}

.design-scroll-stack {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	max-height: 72vh;
	overflow-y: auto;
	padding-right: 0.35rem;
}

.design-scroll-stack::-webkit-scrollbar {
	width: .55rem;
}

.design-scroll-stack::-webkit-scrollbar-thumb {
	background: rgba(255, 184, 143, 0.55);
	border-radius: 999px;
}


.gallery-item {
	display: block;
	border-radius: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(0, 0, 0, 0.25);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}

.gallery-item-trigger {
	position: relative;
	padding: 0;
	cursor: pointer;
	transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.gallery-item-trigger::after {
	content: attr(data-popup-title);
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.55rem 0.8rem;
	font-family: "Michroma", sans-serif;
	font-size: 1rem;
	line-height: 1.35;
	letter-spacing: 0.03em;
	color: rgba(255, 244, 236, 0.97);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88));
	transform: translateY(100%);
	transition: transform 220ms ease;
	pointer-events: none;
	text-align: left;
}

.gallery-item-trigger:hover,
.gallery-item-trigger:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(255, 233, 221, 0.75);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	outline: none;
}

.gallery-item-trigger:hover::after,
.gallery-item-trigger:focus-visible::after {
	transform: translateY(0);
}

.gallery-item img {
	width: 100%;
	height: 21rem;
	object-fit: cover;
	display: block;
}

.gallery-item video {
	width: 100%;
	height: 21rem;
	object-fit: cover;
	display: block;
}

.model-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 260ms ease;
	z-index: 80;
}

.model-popup-overlay.is-visible {
	opacity: 1;
}

.model-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	width: min(62rem, 94vw);
	height: min(86vh, 56rem);
	display: flex;
	flex-direction: column;
	padding: 1rem;
	border-radius: 1.1rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: linear-gradient(145deg, rgba(39, 18, 12, 0.66), rgba(8, 8, 8, 0.62));
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 24px 46px rgba(0, 0, 0, 0.45);
	transform: translate(-50%, calc(-50% + 2.4rem));
	opacity: 0;
	pointer-events: none;
	transition: transform 280ms ease, opacity 280ms ease;
	z-index: 90;
}

.model-popup.is-open {
	transform: translate(-50%, -50%);
	opacity: 1;
	pointer-events: auto;
}

.model-popup-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.8rem;
	padding-bottom: 0.7rem;
}

.model-popup-title {
	margin: 0;
	font-family: "Michroma", sans-serif;
	font-size: clamp(1rem, 2.4vw, 1.4rem);
	color: #fff;
}

.model-popup-body {
	margin-top: 0.8rem;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 0.25rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.model-popup-body::-webkit-scrollbar {
	width: .55rem;
}

.model-popup-body::-webkit-scrollbar-thumb {
	background: rgba(255, 184, 143, 0.55);
	border-radius: 999px;
}

.model-popup-body {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 184, 143, 0.55) transparent;
}

.model-popup-media-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
}

.model-popup-featured-media {
	margin: 0;
	width: 100%;
	display: block;
	flex: 0 0 auto;
	min-height: 12rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.24);
	background: rgba(0, 0, 0, 0.24);
	overflow: hidden;
}

.model-popup-featured-media img {
	width: 100%;
	height: clamp(16rem, 56vh, 34rem);
	object-fit: cover;
	display: block;
}

.model-popup-block {
	margin: 0;
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(0, 0, 0, 0.28);
	overflow: hidden;
}

.model-popup-block img,
.model-popup-block video {
	width: 100%;
	height: 100%;
	max-height: 28rem;
	object-fit: cover;
	display: block;
}

.model-popup-text-stack {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-bottom: 0.25rem;
}

.model-popup-text {
	margin: 0;
	padding: 0.9rem;
	font-family: "Michroma", sans-serif;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.55;
	font-size: 0.95rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(0, 0, 0, 0.24);
}

body.models-3d-page.popup-open {
	overflow: hidden;
}

@media (max-width: 760px) {
	.design-scroll-shell {
		max-width: 100%;
		padding: 0;
	}

	.design-scroll-stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-height: none;
		overflow: visible;
	}

	.gallery-item img {
		height: 12rem;
	}

	.gallery-item video {
		height: 12rem;
	}

	.model-popup {
		width: min(42rem, 95vw);
		height: min(88vh, 50rem);
		padding: 0.85rem;
	}

	.model-popup-block img,
	.model-popup-block video {
		max-height: 16rem;
	}

	.model-popup-featured-media img {
		height: clamp(13rem, 42vh, 22rem);
	}

}





