/**
 * Каталог пептидов /peptidy/ (parts/peptidy/*): каталог и рубрики, карточка, страница товара.
 * FAQ — компонент .br-faq (homepage-faq.css). Точки: 1199, 991, 767.
 */

.pep-page,
.pep-text,
.pep-others {
	--pep-green: var(--primary, #208d79);
	--pep-soft: #e8f4f1;
	--pep-panel: #f4f6f5;
	--pep-line: #e3e8e6;
	--pep-text: #1a1a1a;
	--pep-muted: #6b6b6b;
	--pep-gap: 24px;
	color: var(--pep-text);
	font-family: var(--ff, "Manrope", sans-serif);
}

.pep-page,
.pep-page section,
.pep-text,
.pep-faq,
.pep-others {
	margin: 0;
}

/* Снизу отступ даёт подвал (margin-top 80px), свой не добавляем */
.pep-page {
	padding: 16px 0 0;
}

.pep-page + .pep-text,
.pep-faq + .pep-others,
.pep-page + .pep-others {
	padding-top: 64px;
}

/* У товара вопросы идут сразу за текстом */
.pep-page + .pep-faq {
	padding-top: 8px;
}

.pep-page .yoast-breadcrumbs {
	margin: 0 0 16px;
}

.pep-title {
	margin: 0 0 12px;
	font-size: clamp(30px, 3vw, 44px);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-transform: none;
}

.pep-lead a,
.pep-text a {
	color: var(--pep-green);
	text-decoration: none;
}

.pep-lead a:hover,
.pep-text a:hover {
	text-decoration: underline;
}

.pep-lead {
	max-width: 760px;
	margin: 0 0 24px;
	color: var(--pep-muted);
	font-size: 16px;
	line-height: 1.5;
}

/* Преимущества */
.pep-perks {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--pep-gap);
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.pep-perk {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	column-gap: 14px;
	align-items: center;
	padding: 18px;
	border-radius: 20px;
	background: var(--pep-panel);
}

.pep-perk__icon {
	grid-row: span 2;
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	padding: 12px;
	border-radius: 50%;
	background: #fff;
	color: var(--pep-green);
}

.pep-perk__title {
	align-self: end;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
}

.pep-perk__text {
	align-self: start;
	margin: 4px 0 0;
	color: var(--pep-muted);
	font-size: 14px;
	line-height: 1.4;
}

/* Рубрики */
.pep-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.pep-cat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--pep-panel);
	color: var(--pep-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.pep-cat:hover {
	background: var(--pep-soft);
	color: var(--pep-green);
}

.pep-cat[aria-current] {
	background: var(--pep-green);
	color: #fff;
}

.pep-cat__count {
	color: inherit;
	font-size: 13px;
	opacity: 0.6;
}

/* Количество и сортировка */
.pep-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.pep-toolbar__count {
	margin: 0;
	color: var(--pep-muted);
	font-size: 15px;
}

.pep-sort {
	position: relative;
}

.pep-sort summary {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	color: var(--pep-text);
	font-size: 15px;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.pep-sort summary::-webkit-details-marker {
	display: none;
}

.pep-sort summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin: 0 2px 3px 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.pep-sort[open] summary::after {
	margin-bottom: -3px;
	transform: rotate(-135deg);
}

.pep-sort__list {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 5;
	min-width: 180px;
	margin: 4px 0 0;
	padding: 8px 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(17, 24, 28, 0.14);
	list-style: none;
}

.pep-sort__list a {
	display: block;
	padding: 8px 16px;
	color: var(--pep-text);
	font-size: 15px;
	text-decoration: none;
}

.pep-sort__list a:hover,
.pep-sort__list a[aria-current] {
	color: var(--pep-green);
}

/* Сетка и карточка */
.pep-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--pep-gap);
}

.pep-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--pep-line);
	border-radius: 20px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.2s, border-color 0.2s;
}

.pep-card:hover {
	border-color: transparent;
	box-shadow: 0 12px 32px rgba(17, 24, 28, 0.1);
}

.pep-card__img {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--pep-panel);
	overflow: hidden;
}

.pep-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mix-blend-mode: multiply;
	transition: transform 0.4s ease;
}

.pep-card:hover .pep-card__img img {
	transform: scale(1.03);
}

.pep-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 16px;
	color: var(--pep-muted);
	font-size: 14px;
	text-align: center;
}

.pep-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 16px 18px 18px;
}

.pep-card__term {
	margin: 0 0 8px;
	color: var(--pep-green);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

/* Цена и «В наличии» в одну строку, на узкой карточке — переносом */
.pep-card__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 10px;
	margin-bottom: 6px;
}

.pep-stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: var(--pep-green);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.pep-stock svg {
	flex: none;
}

.pep-card__price {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.pep-card__name {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}

.pep-card__name a {
	color: inherit;
	text-decoration: none;
}

.pep-card__name a:hover {
	color: var(--pep-green);
}

.pep-card__dose {
	color: var(--pep-muted);
	font-weight: 500;
	white-space: nowrap;
}

.pep-card__label,
.pep-product__label {
	margin: 0 0 8px;
	color: var(--pep-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

.pep-card .pep-variants {
	margin-bottom: 16px;
}

/* Объёмы */
.pep-variants {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pep-variant {
	min-height: 32px;
	padding: 4px 12px;
	border: 1px solid var(--pep-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pep-text);
	font: 500 14px/1.2 var(--ff, "Manrope", sans-serif);
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.pep-variant:hover {
	border-color: var(--pep-green);
}

.pep-variant[aria-pressed="true"] {
	border-color: var(--pep-green);
	background: var(--pep-soft);
	color: var(--pep-green);
	font-weight: 700;
}

/* Кнопка заказа */
.pep-page .btn.pep-buy {
	min-height: 44px;
	padding: 0 20px;
	font-size: 15px;
	font-weight: 600;
}

.pep-card .btn.pep-buy {
	width: 100%;
	margin-top: auto;
}

/* Страница товара */
.pep-product {
	display: grid;
	grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
	margin-bottom: 56px;
}

.pep-gallery__main {
	aspect-ratio: 1 / 1;
	border-radius: 24px;
	background: #f7f7f8;
	overflow: hidden;
}

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

.pep-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.pep-gallery__thumb {
	width: 72px;
	height: 72px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 12px;
	background: #f7f7f8;
	overflow: hidden;
	cursor: pointer;
}

.pep-gallery__thumb[aria-pressed="true"] {
	border-color: var(--pep-green);
}

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

.pep-product__term {
	display: inline-block;
	margin-bottom: 12px;
	color: var(--pep-green);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.pep-product__title {
	margin-bottom: 16px;
}

.pep-product__priceline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin-bottom: 24px;
}

.pep-product__priceline .pep-stock {
	font-size: 15px;
}

.pep-product__price {
	margin: 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
}

.pep-product .pep-variant {
	min-height: 40px;
	padding: 6px 16px;
	font-size: 15px;
}

.pep-page .btn.pep-product__buy {
	width: 100%;
	max-width: 360px;
	min-height: 56px;
	margin-top: 24px;
	font-size: 17px;
}

.pep-product__note {
	max-width: 420px;
	margin: 12px 0 0;
	color: var(--pep-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pep-specs {
	margin: 28px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--pep-line);
}

.pep-specs div {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 16px;
	padding: 6px 0;
	font-size: 15px;
	line-height: 1.4;
}

.pep-specs dt {
	color: var(--pep-muted);
}

.pep-specs dd {
	margin: 0;
}

/* Текст товара (редактор) и справка сбоку */
.pep-details {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	align-items: start;
	margin-bottom: 56px;
}

.pep-content {
	max-width: 820px;
}

.pep-content h2 {
	margin: 36px 0 14px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

.pep-content h2:first-child {
	margin-top: 0;
}

.pep-content p,
.pep-content li {
	color: #333;
	font-size: 16px;
	line-height: 1.6;
}

.pep-content p {
	margin: 0 0 12px;
}

.pep-content ul {
	margin: 0;
	padding-left: 22px;
}

.pep-content li {
	list-style: disc;
}

.pep-content li::marker {
	color: var(--pep-green);
}

.pep-content li + li {
	margin-top: 6px;
}

.pep-table {
	width: 100%;
	border: 1px solid var(--pep-line);
	border-radius: 16px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.5;
}

.pep-table th,
.pep-table td {
	padding: 12px 16px;
	border-top: 1px solid var(--pep-line);
	text-align: left;
	vertical-align: top;
}

.pep-table tr:first-child > * {
	border-top: 0;
}

.pep-table tbody th {
	width: 32%;
	background: var(--pep-panel);
	font-weight: 600;
}

.pep-table thead th {
	background: var(--pep-soft);
	color: var(--pep-green);
	font-size: 14px;
	font-weight: 700;
}

.pep-table thead + tbody tr:first-child > * {
	border-top: 1px solid var(--pep-line);
}

.pep-content .pep-sources li {
	color: var(--pep-muted);
	font-size: 14px;
}

.pep-content .pep-table + p,
.pep-content .pep-table + h2 {
	margin-top: 32px;
}

.pep-content .pep-content__note {
	margin: 32px 0 0;
	padding: 14px 18px;
	border-radius: 14px;
	background: var(--pep-soft);
	font-size: 14px;
	line-height: 1.5;
}

.pep-about {
	display: grid;
	gap: 12px;
}

.pep-about__item {
	margin: 0;
	padding: 20px 22px;
	border-radius: 20px;
	background: var(--pep-panel);
}

.pep-about__item h2 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: none;
}

.pep-about__item p {
	margin: 0;
	color: #3d3d3d;
	font-size: 14px;
	line-height: 1.55;
}

.pep-others__title,
.pep-text__title {
	margin: 0 0 24px;
	font-size: clamp(24px, 2.4vw, 32px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-transform: none;
}

/* Текст о пептидах и FAQ под каталогом */
.pep-text {
	padding: 0 0 56px;
}

.pep-text p {
	max-width: 820px;
	margin: 0 0 14px;
	color: #333;
	font-size: 16px;
	line-height: 1.6;
}

.pep-faq {
	padding-bottom: 0;
}

@media (max-width: 1199px) {
	.pep-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pep-product {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 32px;
	}

	.pep-details {
		grid-template-columns: minmax(0, 1fr) 280px;
		gap: 32px;
	}
}

@media (max-width: 991px) {
	.pep-perks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pep-details {
		grid-template-columns: minmax(0, 1fr);
	}

	.pep-about {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.pep-page {
		--pep-gap: 12px;
	}

	.pep-page + .pep-text,
	.pep-faq + .pep-others,
	.pep-page + .pep-others {
		padding-top: 40px;
	}

	.pep-lead {
		margin-bottom: 16px;
		font-size: 15px;
	}

	/* Преимущества — одна строка, листается пальцем */
	.pep-perks {
		display: flex;
		gap: 10px;
		margin-bottom: 20px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.pep-perks::-webkit-scrollbar {
		display: none;
	}

	.pep-perk {
		flex: 0 0 min(78%, 280px);
		grid-template-columns: 40px minmax(0, 1fr);
		column-gap: 12px;
		padding: 14px 16px;
		border-radius: 16px;
		scroll-snap-align: start;
	}

	.pep-perk__icon {
		width: 40px;
		height: 40px;
		padding: 9px;
	}

	.pep-perk__title {
		font-size: 15px;
	}

	.pep-perk__text {
		font-size: 13px;
	}

	/* Рубрики — одна строка, листается пальцем */
	.pep-cats {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.pep-cats::-webkit-scrollbar {
		display: none;
	}

	.pep-cat {
		flex: none;
		min-height: 38px;
		font-size: 14px;
	}

	.pep-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pep-card {
		border-radius: 16px;
	}

	.pep-card__body {
		padding: 12px;
	}

	.pep-card__term {
		display: none;
	}

	.pep-card__top {
		margin-bottom: 4px;
	}

	.pep-card__price {
		font-size: 18px;
	}

	.pep-stock {
		font-size: 12px;
	}

	.pep-card__name {
		margin-bottom: 12px;
		font-size: 14px;
	}

	.pep-card .pep-variants {
		gap: 4px;
		margin-bottom: 12px;
	}

	.pep-card .pep-variant {
		min-height: 28px;
		padding: 3px 9px;
		font-size: 12px;
	}

	.pep-page .btn.pep-buy {
		min-height: 40px;
		padding: 0 12px;
		font-size: 14px;
	}

	.pep-product {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		margin-bottom: 36px;
	}

	.pep-product__priceline {
		margin-bottom: 18px;
	}

	.pep-product__price {
		font-size: 26px;
	}

	.pep-page .btn.pep-product__buy {
		max-width: none;
	}

	.pep-specs div {
		grid-template-columns: 120px minmax(0, 1fr);
	}

	.pep-details {
		gap: 24px;
		margin-bottom: 36px;
	}

	.pep-content h2 {
		margin-top: 28px;
		font-size: 20px;
	}

	.pep-content p,
	.pep-content li,
	.pep-text p {
		font-size: 15px;
	}

	.pep-table {
		font-size: 14px;
	}

	.pep-table th,
	.pep-table td {
		padding: 10px 12px;
	}

	.pep-table tbody th {
		width: 38%;
	}

	.pep-about {
		grid-template-columns: minmax(0, 1fr);
	}

	.pep-about__item {
		padding: 16px 18px;
	}

	.pep-text {
		padding-bottom: 40px;
	}

}
