.doost-popover-card {
	position: relative;
	display: inline-flex;
	width: 100%;
	max-width: 100%;
	overflow: visible;
}

.doost-popover-card *,
.doost-popover-card *::before,
.doost-popover-card *::after {
	box-sizing: border-box;
}

.doost-popover-trigger {
	position: relative;
	display: inline-flex;
	max-width: 100%;
	outline: 0;
	overflow: visible;
	cursor: pointer;
}

.doost-popover-image {
	display: block;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.doost-popover-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.doost-product-popover {
	--doost-popover-width: 360px;
	--doost-thumb-size: 86px;
	position: absolute;
	z-index: 30;
	display: grid;
	grid-template-columns: var(--doost-thumb-size) minmax(0, 1fr);
	gap: 16px;
	width: min(var(--doost-popover-width), calc(100vw - 32px));
	min-width: 280px;
	min-height: 126px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 8px, 0) scale(.98);
	transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
	background: #fffaf3;
	border: 1px solid rgba(0, 43, 102, .08);
	box-shadow: 0 18px 44px rgba(25, 22, 18, .16);
}

.doost-popover-card.no-thumb .doost-product-popover {
	display: flex;
	flex-direction: column;
}

.doost-popover-trigger:hover .doost-product-popover,
.doost-popover-trigger:focus-within .doost-product-popover {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0) scale(1);
}

.doost-popover-card--top .doost-product-popover {
	left: 50%;
	bottom: calc(100% + 18px);
	transform: translate3d(-50%, 8px, 0) scale(.98);
}

.doost-popover-card--top .doost-popover-trigger:hover .doost-product-popover,
.doost-popover-card--top .doost-popover-trigger:focus-within .doost-product-popover {
	transform: translate3d(-50%, 0, 0) scale(1);
}

.doost-popover-card--bottom .doost-product-popover {
	left: 50%;
	top: calc(100% + 18px);
	transform: translate3d(-50%, -8px, 0) scale(.98);
}

.doost-popover-card--bottom .doost-popover-trigger:hover .doost-product-popover,
.doost-popover-card--bottom .doost-popover-trigger:focus-within .doost-product-popover {
	transform: translate3d(-50%, 0, 0) scale(1);
}

.doost-popover-card--left .doost-product-popover {
	right: calc(100% + 18px);
	top: 50%;
	transform: translate3d(8px, -50%, 0) scale(.98);
}

.doost-popover-card--left .doost-popover-trigger:hover .doost-product-popover,
.doost-popover-card--left .doost-popover-trigger:focus-within .doost-product-popover {
	transform: translate3d(0, -50%, 0) scale(1);
}

.doost-popover-card--right .doost-product-popover {
	left: calc(100% + 18px);
	top: 50%;
	transform: translate3d(-8px, -50%, 0) scale(.98);
}

.doost-popover-card--right .doost-popover-trigger:hover .doost-product-popover,
.doost-popover-card--right .doost-popover-trigger:focus-within .doost-product-popover {
	transform: translate3d(0, -50%, 0) scale(1);
}

.doost-product-popover::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	background: inherit;
	border: inherit;
	border-left: 0;
	border-top: 0;
}

.doost-popover-card--top .doost-product-popover::after {
	left: 32px;
	bottom: -9px;
	transform: rotate(45deg);
}

.doost-popover-card--bottom .doost-product-popover::after {
	left: 32px;
	top: -9px;
	transform: rotate(225deg);
}

.doost-popover-card--left .doost-product-popover::after {
	right: -9px;
	top: 42px;
	transform: rotate(-45deg);
}

.doost-popover-card--right .doost-product-popover::after {
	left: -9px;
	top: 42px;
	transform: rotate(135deg);
}

.doost-popover-thumb {
	width: var(--doost-thumb-size);
	height: var(--doost-thumb-size);
	overflow: hidden;
	border-radius: 18px;
	background: #f8d8d6;
	align-self: start;
}

.doost-popover-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.doost-popover-content {
	width: 100%;
	min-width: 0;
	max-width: none;
	flex: 1 1 auto;
	padding-right: 0;
}

.doost-popover-title {
	margin: 0 0 6px;
	max-width: 100%;
	width: 100%;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.15;
	color: #002b66;
}

.doost-popover-gram {
	margin: 0 0 9px;
	max-width: 100%;
	width: 100%;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.1;
	color: #cda65a;
}

.doost-popover-description {
	margin: 0 0 14px;
	max-width: 100%;
	width: 100%;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: #4e463f;
}

.doost-popover-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 8px 25px;
	border-radius: 999px;
	background: #002b66;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-shadow: inset 0 -2px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,43,102,.24);
}

.doost-popover-button:hover,
.doost-popover-button:focus {
	color: #fff;
	filter: brightness(1.06);
}

@media (max-width: 767px) {
	.doost-product-popover {
		grid-template-columns: 68px minmax(0, 1fr);
		gap: 12px;
		width: min(var(--doost-popover-width), calc(100vw - 24px));
		min-width: min(280px, calc(100vw - 24px));
		min-height: 110px;
		padding: 14px;
	}

	.doost-popover-content {
		min-width: 0;
	}

	.doost-popover-thumb {
		width: 68px;
		height: 68px;
		border-radius: 14px;
	}

	.doost-popover-title {
		font-size: 16px;
	}

	.doost-popover-gram {
		font-size: 15px;
	}

	.doost-popover-description {
		font-size: 13px;
	}

	.doost-popover-button {
		min-height: 32px;
		padding: 7px 18px;
		font-size: 13px;
	}
}
