/* Выезжающая панель корзины (п.3): фиксированная справа, выезжает по transform. */

.tpt-cart-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	z-index: 99998;
}
.tpt-cart-backdrop.tpt-open {
	opacity: 1;
	pointer-events: auto;
}

.tpt-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: min(400px, 100vw);
	background: #fff;
	box-shadow: -8px 0 24px rgba(0, 0, 0, .15);
	transform: translateX(100%);
	transition: transform .3s ease;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.tpt-cart-drawer.tpt-open {
	transform: translateX(0);
}

.tpt-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
	flex: 0 0 auto;
}
.tpt-drawer-title {
	font-size: 1.15em;
	font-weight: 600;
}
.tpt-drawer-close {
	background: none;
	border: none;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 4px 8px;
}
.tpt-drawer-close:hover {
	color: #000;
}

.tpt-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 20px;
}
.tpt-drawer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tpt-drawer-item {
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}
.tpt-drawer-item-info {
	display: flex;
	flex-direction: column;
	margin-bottom: 8px;
}
.tpt-drawer-item-title {
	font-weight: 500;
}
.tpt-drawer-item-dt {
	font-size: .9em;
	color: #666;
}
.tpt-drawer-item-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}
.tpt-drawer-qty-btn {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	border: 1px solid #ddd;
	background: #f7f7f7;
	cursor: pointer;
	font-size: 1em;
	line-height: 1;
}
.tpt-drawer-qty-btn:hover {
	background: #eee;
}
.tpt-drawer-qty {
	min-width: 22px;
	text-align: center;
}
.tpt-drawer-item-sum {
	margin-left: auto;
	font-weight: 600;
}
.tpt-drawer-remove {
	background: none;
	border: none;
	color: #b32d2e;
	font-size: 1.3em;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.tpt-drawer-footer {
	flex: 0 0 auto;
	padding: 16px 20px 20px;
	border-top: 1px solid #eee;
}
.tpt-drawer-total {
	font-size: 1.15em;
	margin-bottom: 12px;
}
.tpt-drawer-checkout {
	display: block;
	text-align: center;
	margin-bottom: 8px;
}
.tpt-drawer-cart-link {
	display: block;
	text-align: center;
}

.tpt-cart-toggle {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a7f37;
	border: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
	cursor: pointer;
	z-index: 99997;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tpt-cart-toggle:hover {
	background: #166b2f;
}
.tpt-cart-toggle-icon {
	width: 24px;
	height: 24px;
	display: inline-block;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 4h-2l-1 2h2l3.6 7.59-1.35 2.44c-.16.28-.25.61-.25.97 0 1.1.9 2 2 2h12v-2h-11.42c-.13 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1h-14.19l-.94-2zm4 20c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm10 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 4h-2l-1 2h2l3.6 7.59-1.35 2.44c-.16.28-.25.61-.25.97 0 1.1.9 2 2 2h12v-2h-11.42c-.13 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1h-14.19l-.94-2zm4 20c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm10 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z'/></svg>") no-repeat center / contain;
}
.tpt-cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #b32d2e;
	color: #fff;
	font-size: .75em;
	line-height: 1;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

@media (max-width: 480px) {
	.tpt-cart-drawer {
		width: 100vw;
	}
}
