/**
 * Всплывающая мини-корзина (после добавления пептида в корзину).
 *
 * Стили самодостаточные: на странице пептида cart.css не подключён.
 */

.pt-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
	pointer-events: none;
	visibility: hidden;
}

.pt-cart-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
}

.pt-cart-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.pt-cart-drawer.is-open .pt-cart-drawer__overlay {
	opacity: 1;
}

.pt-cart-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 420px;
	height: 100%;
	background: #fff;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.pt-cart-drawer.is-open .pt-cart-drawer__panel {
	transform: translateX(0);
}

body.pt-cart-drawer-open {
	overflow: hidden;
}

.pt-cart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid #E2D9DC;
}

.pt-cart-drawer__title {
	font-weight: 600;
	font-size: 20px;
	line-height: 28px;
	color: var(--color-primary, #4A0808);
}

.pt-cart-drawer__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--color-primary, #4A0808);
	cursor: pointer;
}

.pt-cart-drawer__content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	padding: 20px 24px 24px;
	overflow-y: auto;
}

.pt-cart-drawer__empty {
	color: #6B6B6B;
	font-size: 16px;
	line-height: 24px;
}

.pt-cart-drawer__count {
	margin-bottom: 12px;
	color: #6B6B6B;
	font-size: 14px;
	line-height: 20px;
}

.pt-cart-drawer__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-cart-drawer__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 16px;
	border-bottom: 1px solid #E2D9DC;
}

.pt-cart-drawer__item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.pt-cart-drawer__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	overflow: hidden;
	border-radius: 8px;
	background: #F6F6F6;
}

.pt-cart-drawer__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pt-cart-drawer__info {
	flex: 1;
	min-width: 0;
}

.pt-cart-drawer__name {
	font-weight: 500;
	font-size: 16px;
	line-height: 22px;
	color: var(--color-primary, #4A0808);
}

.pt-cart-drawer__meta,
.pt-cart-drawer__qty {
	margin-top: 2px;
	color: #6B6B6B;
	font-size: 14px;
	line-height: 20px;
}

.pt-cart-drawer__price {
	flex: 0 0 auto;
	font-weight: 600;
	font-size: 16px;
	line-height: 22px;
	white-space: nowrap;
	color: var(--color-primary, #4A0808);
}

.pt-cart-drawer__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
	padding-top: 20px;
	font-weight: 600;
	font-size: 18px;
	line-height: 26px;
	color: var(--color-primary, #4A0808);
}

.pt-cart-drawer__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 47px;
	margin-top: 16px;
	background: var(--color-primary, #4A0808);
	border: 1px solid var(--color-primary, #4A0808);
	border-radius: 35px;
	color: #fff;
	font-size: 20px;
	line-height: 28px;
	text-decoration: none;
}

/* Сообщение под кнопкой «Купить». */
.js-peptide-buy-message {
	margin-top: 10px;
	font-size: 16px;
	line-height: 22px;
	color: var(--color-primary, #4A0808);
}

/* Пустое сообщение (JS создаёт его до ответа сервера) не должно давать отступ. */
.js-peptide-buy-message:empty {
	display: none;
}

.js-peptide-buy-message.is-error {
	color: #C81E1E;
}

.btn3.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

@media (max-width: 480px) {
	.pt-cart-drawer__panel {
		max-width: 100%;
	}
}
