/* =========================================================
   project-detail.css — стили страницы «Карточка проекта»
   Зависит от глобального /assets/css/styles.css
   ========================================================= */

/* ===================== 0) ЛОКАЛЬНЫЕ ОТСТУПЫ/ТЕКСТЫ/КНОПКИ ===================== */
.header + main.section {
	padding-top: 4px;
}

.section-title--left {
	text-align: left;
}

.section-sub--left {
	text-align: left;
	color: var(--muted);
}

.btn--ghost {
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--line);
	padding: 10px 14px;
	border-radius: 10px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(17, 25, 40, 0.04);
	transition: background-color 0.25s, color 0.25s, border-color 0.25s,
		box-shadow 0.25s, transform 0.05s;
}

.back-link {
	display: inline-block;
}

.project-detail {
	padding-top: 1px;
}

/* Make gap between header and back button smaller */
.project-detail > p:first-child {
	margin-top: 4px;
}

.btn--ghost:is(:hover, :focus-visible, :active) {
	background: var(--blue, #2563eb);
	color: #fff;
	border-color: var(--blue, #2563eb);
}

.btn--ghost:active {
	transform: translateY(1px);
	box-shadow: 0 1px 4px rgba(17, 25, 40, 0.08) inset;
}

/* ===== MEDIA 0) ЛОКАЛЬНЫЕ ===== */
@media (max-width: 540px) {
	.header + main.section {
		padding-top: 1px;
	}
}

/* ===================== 1) ДВУХКОЛОНОЧНАЯ СЕТКА СТРАНИЦЫ ===================== */
.pd-grid {
	display: grid;
	gap: clamp(24px, 4vw, 48px);
	grid-template-columns: 1.1fr 1fr;
	align-items: start;
}

/* Блок-описание на всю ширину */
.pd-grid > .pd-disclaimer {
	grid-column: 1 / -1;
	margin-top: 12px;
}

/* ===== MEDIA 1) Сетка ===== */
@media (max-width: 920px) {
	.pd-grid {
		grid-template-columns: 1fr;
	}
}

/* ===================== 2) ГАЛЕРЕЯ ПРОЕКТА ===================== */
.pd-gallery {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.pd-main {
	width: 100%;
	max-width: 800px;
	height: 300px;
	border-radius: 12px;
	border: 1px solid var(--line);
	overflow: hidden; /* обрезаем все лишнее */
	display: flex;
	align-items: center; /* вертикальный центр */
	justify-content: center; /* горизонтальный центр */
	background: #fff; /* на случай прозрачных участков */
	cursor: zoom-in;
}

.pd-thumbs {
	width: 100%;
	max-width: 800px;
}

.pd-main img {
	width: auto;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.5s ease, opacity 0.3s ease;
}

.pd-main img:hover {
	transform: scale(1.01); /* плавное увеличение */
}

/* Превью */
.pd-thumbs {
	display: flex;
	gap: 12px;
	margin-top: 14px;
	padding-bottom: 6px;
	justify-content: flex-start;
	overflow-x: auto;
	overflow-y: visible; /* позволяем вылезать при hover */
}

.pd-thumbs .slide {
	flex: 0 0 auto;
	margin: 0 5px; /* немного пространства вокруг */
	overflow: visible;
}

.pd-thumbs::-webkit-scrollbar {
	height: 6px;
}

.pd-thumbs::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.pd-thumbs img {
	flex: 0 0 auto;
	width: 120px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	border: 2px solid var(--line);
	background: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-thumbs img:hover {
	box-shadow: 0 4px 3px rgba(0, 0, 0, 0.15);
}

.pd-thumbs img.active {
	border-color: var(--blue, #2563eb);
}

/* ===== MEDIA 2) Галерея ===== */
@media (max-width: 768px) {
	.pd-thumbs img {
		width: 90px;
		height: 60px;
	}
}

@media (max-width: 560px) {
	.pd-thumbs img {
		width: 80px;
		height: 54px;
	}
	.pd-main img {
		max-height: 50vh; /* уменьшаем главное изображение на мобильных */
	}
}

/* ===================== 3) ПРАВАЯ КОЛОНКА: ИНФО/ЦЕНЫ/ДЕЙСТВИЯ ===================== */
.pd-info {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pd-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;

	list-style: none; /* убираем маркеры */
	margin: 0; /* убираем отступ сверху/снизу */
	padding: 0; /* убираем padding-left */
}

.spec {
	width: 48%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #fff;
	min-width: 0;
}

.spec img {
	width: 18px;
	height: 18px;
	opacity: 0.9;
}

.spec span {
	color: var(--muted);
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.spec strong {
	margin-left: auto;
	flex: 0 0 auto;
	white-space: nowrap;
}

.pd-pricebox {
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--bg);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pd-pricebox__title {
	font-weight: 800;
	color: var(--heading);
}

.pd-pricebox__value {
	font-size: 1.375rem;
	font-weight: 800;
}

.pd-variants {
	margin: 6px 0 4px;
	border: 0;
	padding: 0;
}

.chip2 {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 6px 8px 0 0;
	padding: 8px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	cursor: pointer;
	background: #fff;
	font-weight: 600;
	font-size: 0.875rem;
	user-select: none;
}

.chip2 input {
	appearance: none;
	width: 14px;
	height: 14px;
	border: 2px solid #9ab5cc;
	border-radius: 50%;
}

.chip2 input:checked {
	background: var(--blue);
	border-color: var(--blue);
}

.pd-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: #fff;
	font-weight: 800;
	font-size: 1.25rem;
	line-height: 1;
	box-shadow: 0 4px 12px rgba(17, 25, 40, 0.08);
}

.proj-nav {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

/* ===== MEDIA 3) Инфо ===== */
@media (max-width: 540px) {
	.pd-actions {
		gap: 10px;
	}
	.icon-btn {
		width: 36px;
		height: 36px;
	}
	.pd-pricebox {
		padding: 14px;
	}
}

/* ===================== Блок «Важно о стоимости» ===================== */
.pd-disclaimer {
	padding: 20px 24px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	margin-top: 24px;
	box-shadow: 0 4px 12px rgba(17, 25, 40, 0.05);
	transition: box-shadow 0.25s;
}

.pd-disclaimer:hover {
	box-shadow: 0 8px 24px rgba(17, 25, 40, 0.1);
}

.pd-disclaimer__title {
	display: inline-block;
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--heading);
	cursor: pointer;
	transition: color 0.2s, text-decoration 0.2s;
	text-decoration: none;
}

.pd-disclaimer__title:hover {
	color: var(--blue, #2563eb);
	text-decoration: underline;
}

.pd-disclaimer__list {
	margin-top: 12px;
	margin-bottom: 12px;
	padding-left: 20px;
	list-style-type: disc;
}

.pd-disclaimer__cta {
	margin-top: 16px;
	font-weight: 600;
}

.pd-disclaimer__cta .js-open-order {
	color: var(--blue, #2563eb);
	text-decoration: none;
	font-weight: 700;
	transition: color 0.2s, text-decoration 0.2s;
}

.pd-disclaimer__cta .js-open-order:hover {
	text-decoration: underline;
	color: var(--blue-dark, #1e40af);
}

/* ===== MEDIA: мобильные ===== */
@media (max-width: 560px) {
	.pd-disclaimer {
		padding: 16px 16px;
	}
	.pd-disclaimer__title {
		font-size: 1.125rem;
	}
}
