/**
 * Single project page — linked products left, hero image right.
 */

body.ccp-single-project-page .entry-header,
body.ccp-single-project-page .post-navigation,
body.ccp-single-project-page .entry-content > :not(.ccp-single-project-shell) {
	display: none;
}

.ccp-single-project-shell {
	background: #fafafa;
	padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 6vw, 72px);
}

.ccp-single-project__title {
	margin: 0 0 12px;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	color: #111;
}

.ccp-single-project__intro {
	margin: clamp(24px, 3vw, 32px) 0 0;
	font-size: 16px;
	line-height: 1.65;
	color: #444;
}

.ccp-single-project__layout {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: clamp(24px, 3vw, 40px);
	width: 100%;
}

.ccp-single-project__products {
	flex: 0 1 33.333%;
	max-width: 33.333%;
	min-width: 0;
}

.ccp-single-project__hero {
	flex: 0 1 50%;
	max-width: 50%;
	margin-inline-start: auto;
	min-width: 0;
}

.ccp-single-project__product-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(12px, 2vw, 16px);
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.ccp-single-project__product-item {
	display: flex;
	max-width: 100%;
	border: 0;
	background: transparent;
}

.ccp-single-project__product-btn {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	width: var(--ccp-thumb-scale, 100%);
	max-width: 100%;
	padding: 0;
	border: 1px solid #e8e8e8;
	background: #fff;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

a.ccp-single-project__product-btn {
	text-decoration: none;
	color: inherit;
}

.ccp-single-project__product-btn--static {
	cursor: default;
}

.ccp-single-project__product-btn:hover,
.ccp-single-project__product-btn:focus {
	background: #f7f7f7;
	outline: none;
}

.ccp-single-project__product-btn.is-active {
	background: #111;
	color: #fff;
}

.ccp-single-project__product-btn.is-active .ccp-single-project__product-thumb {
	background: #1a1a1a;
}

.ccp-single-project__product-thumb {
	display: block;
	flex-shrink: 0;
	width: 100%;
	overflow: hidden;
	background: #f0f0f0;
	aspect-ratio: var(--ccp-tile-w, 4) / var(--ccp-tile-h, 3);
}

.ccp-single-project__product-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ccp-single-project__product-thumb--placeholder {
	width: 100%;
	aspect-ratio: var(--ccp-tile-w, 4) / var(--ccp-tile-h, 3);
	background: linear-gradient(135deg, #ececec, #f8f8f8);
}

.ccp-single-project__product-label {
	display: block;
	margin: 0;
	padding: 10px 12px 12px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	color: #111;
}

.ccp-single-project__product-btn.is-active .ccp-single-project__product-label {
	color: #fff;
}

.ccp-single-project__hero-media {
	background: #fff;
	border: 1px solid #e8e8e8;
	overflow: hidden;
}

.ccp-single-project__hero-image {
	display: block;
	width: 100%;
	height: auto;
}

.ccp-single-project__hero-media--placeholder {
	min-height: 420px;
	aspect-ratio: auto;
	background: linear-gradient(135deg, #efefef, #f8f8f8);
}

.ccp-single-project__empty {
	margin: 0;
	padding: 16px;
	background: #fff;
	border: 1px solid #e8e8e8;
	color: #666;
	font-size: 14px;
}

.ccp-single-project__footer {
	margin-top: clamp(24px, 3vw, 32px);
}

.ccp-single-project__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 24px;
	background: #111;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	border-radius: 2px;
	transition: background 0.15s ease;
}

.ccp-single-project__cta:hover,
.ccp-single-project__cta:focus {
	background: #333;
	color: #fff;
}

/* Modal */
.ccp-project-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ccp-project-modal[hidden] {
	display: none;
}

.ccp-project-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ccp-project-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 1100px);
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	padding: 24px;
}

.ccp-project-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #111;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, opacity 0.15s ease;
}

.ccp-project-modal__close:hover,
.ccp-project-modal__close:focus {
	background: transparent;
	color: #555;
	outline: none;
	opacity: 0.75;
}

.ccp-project-modal__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.ccp-project-modal__media {
	background: #f7f7f7;
	overflow: hidden;
}

.ccp-project-modal__image {
	display: block;
	width: 100%;
	height: auto;
}

.ccp-project-modal__placeholder {
	aspect-ratio: 1;
	background: linear-gradient(135deg, #efefef, #f8f8f8);
}

.ccp-project-modal__placeholder[hidden],
.ccp-project-modal__image[hidden] {
	display: none;
}

.ccp-project-modal__title {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 30px);
	line-height: 1.2;
	color: #111;
}

.ccp-project-modal__subtitle {
	margin: 0 0 20px;
	font-size: 15px;
	color: #666;
}

.ccp-project-modal__specs-wrap {
	padding: 4px 0;
}

.ccp-project-modal__specs-wrap h3,
.ccp-project-modal__description {
	margin: 0 0 12px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #111;
}

.ccp-project-modal__specs {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	border: 1px solid #eee;
	border-radius: 4px;
	overflow: hidden;
}

.ccp-project-modal__specs th,
.ccp-project-modal__specs td {
	padding: 14px 18px;
	border-bottom: 1px solid #eee;
	vertical-align: top;
	text-align: left;
}

.ccp-project-modal__specs tr:last-child th,
.ccp-project-modal__specs tr:last-child td {
	border-bottom: 0;
}

.ccp-project-modal__specs th {
	width: 42%;
	padding-right: 24px;
	font-weight: 600;
	color: #333;
	background: #fafafa;
}

.ccp-project-modal__specs td {
	color: #555;
	white-space: pre-line;
	background: #fff;
}

.ccp-project-modal__description {
	margin-top: 20px;
	font-size: 15px;
	line-height: 1.65;
	color: #444;
	text-transform: none;
	letter-spacing: normal;
}

body.ccp-project-modal-open {
	overflow: hidden;
}

@media (max-width: 960px) {
	.ccp-single-project__layout {
		flex-direction: column;
	}

	.ccp-single-project__hero {
		order: -1;
	}

	.ccp-single-project__products,
	.ccp-single-project__hero {
		flex: 1 1 auto;
		max-width: 100%;
		margin-inline-start: 0;
	}

	.ccp-project-modal__layout {
		grid-template-columns: 1fr;
	}

	.ccp-single-project__hero-media--placeholder {
		min-height: 280px;
	}

	.ccp-single-project__product-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-items: start;
		gap: clamp(12px, 3vw, 20px);
	}
}

@media (max-width: 560px) {
	.ccp-single-project__product-list {
		grid-template-columns: 1fr;
		gap: clamp(16px, 4vw, 24px);
	}

	.ccp-project-modal {
		padding: 12px;
	}

	.ccp-project-modal__dialog {
		padding: 18px;
	}
}
