/* Цвета взяты из темы УМЦ. Шрифты наследуются от темы сайта. */
.vdpo-catalog,
.vdpo-chip {
	--vdpo-accent: #174e8f;
	--vdpo-accent-dark: #081f3b;
	--vdpo-focus: #f26522;
	--vdpo-border: #d9e0e8;
	--vdpo-surface: #f3f6f9;
	--vdpo-muted: #566270;
	--vdpo-error: #b42318;
	--vdpo-radius: 8px;
}

.vdpo-catalog *,
.vdpo-catalog *::before,
.vdpo-catalog *::after,
.vdpo-chip {
	box-sizing: border-box;
}

.vdpo-catalog [hidden],
.vdpo-chip[hidden] {
	display: none !important;
}

.vdpo-catalog a:focus-visible,
.vdpo-catalog button:focus-visible,
.vdpo-catalog input:focus-visible,
.vdpo-catalog textarea:focus-visible,
.vdpo-chip:focus-visible {
	outline: 3px solid var(--vdpo-focus);
	outline-offset: 2px;
}

.vdpo-intro {
	margin-bottom: 20px;
}

/* Разделы */
.vdpo-sections {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.vdpo-catalog .vdpo-sections a {
	padding: 7px 14px;
	border-radius: 6px;
	background: var(--vdpo-surface);
	color: var(--vdpo-accent);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.vdpo-catalog .vdpo-sections a:hover {
	background: #e3e9f0;
}

.vdpo-catalog .vdpo-sections a[aria-current] {
	background: var(--vdpo-accent);
	color: #fff;
}

/* Сетка карточек */
.vdpo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

.vdpo-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--vdpo-border);
	border-radius: var(--vdpo-radius);
	background: #fff;
}

.vdpo-catalog .vdpo-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, var(--vdpo-surface), #e2e8ef);
}

.vdpo-catalog .vdpo-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.vdpo-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 14px 16px 16px;
}

.vdpo-catalog .vdpo-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: none;
}

.vdpo-catalog .vdpo-card__title a {
	color: var(--vdpo-accent-dark);
	text-decoration: none;
}

.vdpo-catalog .vdpo-card__title a:hover {
	color: var(--vdpo-accent);
	text-decoration: underline;
}

.vdpo-catalog .vdpo-card__excerpt {
	margin: 0 0 10px;
	color: var(--vdpo-muted);
	font-size: 15px;
	line-height: 1.35;
}

.vdpo-card__footer {
	margin-top: auto;
}

.vdpo-price {
	margin-bottom: 10px;
	color: var(--vdpo-accent-dark);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.vdpo-price--large {
	font-size: 28px;
}

/* Кнопки */
.vdpo-catalog a.vdpo-btn,
.vdpo-catalog button.vdpo-btn {
	display: inline-block;
	width: auto;
	height: auto;
	padding: 10px 20px;
	border: 0;
	border-radius: 7px;
	background: var(--vdpo-accent);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.vdpo-catalog a.vdpo-btn:hover,
.vdpo-catalog button.vdpo-btn:hover {
	background: var(--vdpo-accent-dark);
	color: #fff;
}

.vdpo-catalog a.vdpo-btn.is-added {
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--vdpo-accent);
	color: var(--vdpo-accent);
}

.vdpo-catalog a.vdpo-btn.is-added:hover {
	background: var(--vdpo-accent);
	color: #fff;
}

.vdpo-catalog button.vdpo-btn:disabled {
	background: #8a97a6;
	cursor: wait;
}

.vdpo-catalog .vdpo-btn--large,
.vdpo-catalog a.vdpo-btn--large,
.vdpo-catalog button.vdpo-btn--large {
	padding: 13px 28px;
	font-size: 16px;
}

/* Страница карточки */
.vdpo-single__top {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
	gap: 28px;
	margin-bottom: 24px;
}

.vdpo-single__top--no-media {
	grid-template-columns: minmax(0, 1fr);
}

.vdpo-catalog .vdpo-single__media img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border-radius: var(--vdpo-radius);
}

.vdpo-single__buy {
	align-self: start;
	padding: 20px;
	border: 1px solid var(--vdpo-border);
	border-radius: var(--vdpo-radius);
	background: #fff;
}

.vdpo-single__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-top: 12px;
}

.vdpo-catalog .vdpo-hint {
	margin: 14px 0 0;
	color: var(--vdpo-muted);
	font-size: 15px;
	line-height: 1.35;
}

/* Количество */
.vdpo-qty {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	color: var(--vdpo-muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
}

.vdpo-catalog .vdpo-qty input {
	width: 84px;
	height: 42px;
	padding: 0 8px;
	border: 1px solid #98a4b2;
	border-radius: 6px;
	background: #fff;
	color: #222;
	font: inherit;
	font-size: 16px;
}

/* Список в заявке */
/* Селекторы с тегами: у тем есть более конкретные правила для списков внутри статей. */
.vdpo-catalog ul.vdpo-lines.vdpo-lines {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.vdpo-catalog ul.vdpo-lines li.vdpo-line {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 150px 90px 80px;
	gap: 8px 16px;
	align-items: center;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid var(--vdpo-border);
	list-style: none;
}

.vdpo-catalog .vdpo-line::before {
	content: none;
}

.vdpo-catalog .vdpo-line__title {
	color: var(--vdpo-accent-dark);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

.vdpo-catalog .vdpo-line__title:hover {
	color: var(--vdpo-accent);
	text-decoration: underline;
}

.vdpo-line__price {
	font-weight: 600;
}

.vdpo-catalog .vdpo-line__remove {
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--vdpo-error);
	font: inherit;
	font-size: 15px;
	text-decoration: underline;
	cursor: pointer;
}

.vdpo-catalog .vdpo-total {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
}

.vdpo-catalog .vdpo-notice {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 6px;
	background: #fff4e5;
}

/* Форма */
.vdpo-form {
	margin-top: 24px;
	padding: 22px;
	border-radius: var(--vdpo-radius);
	background: var(--vdpo-surface);
}

.vdpo-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
}

.vdpo-field--wide {
	grid-column: 1 / -1;
}

.vdpo-catalog .vdpo-field label {
	display: block;
	margin: 0 0 5px;
	color: var(--vdpo-accent-dark);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
}

.vdpo-catalog .vdpo-field input:not([type="checkbox"]),
.vdpo-catalog .vdpo-field textarea {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	min-height: 44px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid #98a4b2;
	border-radius: 6px;
	background: #fff;
	color: #222;
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
}

.vdpo-catalog .vdpo-field [aria-invalid="true"] {
	border-color: var(--vdpo-error);
	box-shadow: inset 0 0 0 1px var(--vdpo-error);
}

.vdpo-catalog .vdpo-field__help {
	margin: 5px 0 0;
	color: var(--vdpo-muted);
	font-size: 14px;
	line-height: 1.3;
}

.vdpo-catalog .vdpo-field__error,
.vdpo-catalog .vdpo-form__error {
	margin: 5px 0 0;
	color: var(--vdpo-error);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.vdpo-catalog .vdpo-form__error {
	margin: 0 0 14px;
}

.vdpo-field--consent {
	margin: 16px 0;
}

.vdpo-catalog .vdpo-field .vdpo-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0;
	font-weight: 400;
	line-height: 1.35;
}

.vdpo-catalog .vdpo-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: var(--vdpo-accent);
}

/* Скрытое поле от спама */
.vdpo-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.vdpo-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Результат */
.vdpo-done {
	padding: 24px;
	border-radius: var(--vdpo-radius);
	background: var(--vdpo-surface);
	outline: 0;
}

.vdpo-done__title {
	margin-bottom: 8px;
	color: var(--vdpo-accent-dark);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.vdpo-catalog .vdpo-done p {
	margin: 0 0 16px;
}

/* Страницы */
.vdpo-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vdpo-catalog .vdpo-pagination li {
	margin: 0;
	list-style: none;
}

.vdpo-catalog .vdpo-pagination .page-numbers {
	display: block;
	min-width: 40px;
	padding: 9px 12px;
	border-radius: 6px;
	background: var(--vdpo-surface);
	color: var(--vdpo-accent);
	text-align: center;
	text-decoration: none;
}

.vdpo-catalog .vdpo-pagination .current {
	background: var(--vdpo-accent);
	color: #fff;
}

/* Плавающая кнопка */
a.vdpo-chip {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 900;
	display: inline-flex;
	gap: 10px;
	align-items: center;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--vdpo-accent);
	box-shadow: 0 6px 20px rgba(8, 31, 59, .3);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

a.vdpo-chip:hover {
	background: var(--vdpo-accent-dark);
	color: #fff;
}

.vdpo-chip__count {
	min-width: 24px;
	padding: 4px 6px;
	border-radius: 999px;
	background: #fff;
	color: var(--vdpo-accent-dark);
	font-size: 14px;
	text-align: center;
}

@media (max-width: 760px) {
	.vdpo-single__top,
	.vdpo-form__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.vdpo-catalog ul.vdpo-lines li.vdpo-line {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.vdpo-catalog .vdpo-line__title {
		grid-column: 1 / -1;
	}

	.vdpo-line__price {
		grid-column: 1 / -1;
	}

	.vdpo-catalog .vdpo-line__remove {
		justify-self: end;
	}

	.vdpo-form {
		padding: 16px;
	}
}

