/* Карточка товара (книга) — в стиле каталога шаблонов и корзины (shablony.css / korzina.css). */

.pdp-page {
	min-height: 0;
}

.pdp-auth {
	display: flex;
	gap: 18px;
}

.pdp-auth a[hidden] {
	display: none;
}

/* ---------- Верхний блок: галерея + информация ---------- */
.pdp {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	gap: 44px;
	margin-top: 30px;
	align-items: start;
}

/* Блок галереи — постоянной высоты: обложка (вертикальная) и фото (горизонтальное) вписываются внутрь,
   поэтому при переключении ничего не прыгает */
.pdp-main {
	background: var(--card-bg);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 34px;
	height: 520px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pdp-main img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 30px 50px -26px rgba(0, 0, 0, 0.95);
	transition: opacity 0.25s ease;
}

.pdp-main img.switching {
	opacity: 0;
}

.pdp-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}

.pdp-thumb {
	width: 72px;
	height: 72px;
	padding: 0;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: var(--card-bg);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.pdp-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pdp-thumb:hover,
.pdp-thumb.active {
	border-color: rgba(255, 255, 255, 0.7);
}

.pdp-tag {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 9px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(18, 19, 23, 0.6);
	color: #eef1f4;
	font-family: "SF Pro Display";
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.pdp-title {
	color: white;
	font-family: "Vetrino";
	font-size: 40px;
	font-weight: 400;
	line-height: 1.12;
	margin: 18px 0 10px;
}

.pdp-sub {
	color: #b9c0c9;
	font-family: "SF Pro Display";
	font-size: 17px;
	line-height: 1.45;
	margin: -4px 0 12px;
}

.pdp-author {
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 14px;
}

.pdp-author b {
	color: #dfe4ea;
	font-weight: 500;
}

.pdp-lead {
	color: #a8a8a8;
	font-family: "SF Pro Display";
	font-size: 16px;
	line-height: 1.7;
	margin: 20px 0 24px;
}

.pdp-buy {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	padding: 20px 0;
	border-top: 1px solid var(--line-soft);
	border-bottom: 1px solid var(--line-soft);
}

.pdp-price {
	font-size: 36px;
}

.pdp-price::after {
	content: "электронная книга";
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 12px;
	font-weight: 400;
	margin-top: 3px;
}

.pdp-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.pdp-cart {
	padding: 13px 30px;
	font-size: 16px;
	white-space: nowrap;
}

.pdp-preview {
	color: #c3cbd4;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 11px;
	padding: 13px 18px;
	font-family: "SF Pro Display";
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.3s ease;
}

.pdp-preview:hover {
	color: white;
}

.pdp-notes {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pdp-notes li {
	position: relative;
	padding-left: 18px;
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 13.5px;
	line-height: 1.5;
}

.pdp-notes li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--plat-3);
	opacity: 0.7;
}

/* ---------- Подробности ---------- */
.pdp-details {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 24px;
	margin-top: 40px;
	align-items: start;
}

.pdp-col {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.pdp-card {
	position: static;
}

.pdp-text {
	color: #9c9c9c;
	font-family: "SF Pro Display";
	font-size: 15px;
	line-height: 1.7;
	margin: 0 0 14px;
}

.pdp-text:last-child {
	margin-bottom: 0;
}

.pdp-toc {
	list-style: none;
	counter-reset: ch;
	margin: 0;
	padding: 0;
}

.pdp-toc li {
	counter-increment: ch;
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 3px 10px;
	padding: 13px 0;
	border-top: 1px solid var(--line-soft);
}

.pdp-toc li:first-child {
	border-top: none;
	padding-top: 0;
}

.pdp-toc li::before {
	content: counter(ch, decimal-leading-zero);
	grid-row: 1 / span 2;
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 13px;
	padding-top: 2px;
}

.pdp-toc b {
	color: #eef1f4;
	font-family: "SF Pro Display";
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
}

.pdp-toc span {
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 13.5px;
	line-height: 1.5;
}

.pdp-card .order-row {
	padding: 11px 0;
}

.pdp-card .order-row span {
	color: #7f858d;
}

.pdp-author-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.pdp-author-row img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center 20%;
	filter: grayscale(0.2);
}

.pdp-author-name {
	color: white;
	font-family: "SF Pro Display";
	font-size: 15px;
	font-weight: 500;
}

.pdp-author-sub {
	color: #7f858d;
	font-family: "SF Pro Display";
	font-size: 13px;
	margin-top: 3px;
}

/* ---------- Бесплатный фрагмент ---------- */
.shop-modal {
	position: fixed;
	inset: 0;
	z-index: 70;
	background-color: rgba(0, 0, 0, 0.8);
	overflow: auto;
	padding: 36px 16px 48px;
}

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

.shop-modal-box {
	max-width: 820px;
	margin: 0 auto;
}

.shop-modal-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.shop-modal-title {
	color: white;
	font-family: "SF Pro Display";
	font-size: 18px;
	font-weight: 500;
}

.shop-modal-close {
	width: 38px;
	height: 38px;
	border: 1px solid #2f2f2f;
	border-radius: 8px;
	background-color: #202020;
	color: white;
	font-family: "SF Pro Display";
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: border 0.4s ease;
}

.shop-modal-close:hover {
	border: 1px solid white;
}

.paper-foot-note {
	color: #6c6c6c;
	font-family: "SF Pro Display";
	font-size: 14px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
	.pdp {
		grid-template-columns: 1fr;
		gap: 28px;
	}
	.pdp-main {
		height: 420px;
		padding: 24px;
	}
	.pdp-details {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.pdp-title {
		font-size: 30px;
	}
	.pdp-buy {
		flex-direction: column;
		align-items: flex-start;
	}
	.pdp-buttons {
		width: 100%;
	}
	.pdp-cart {
		flex: 1;
	}
	.pdp-auth {
		gap: 12px;
	}
}
