.card {
	box-shadow: 0 4px 30px 0 rgba(0, 0, 0, 0.1);
	background: var(--belyy);
	position: relative;
	width: 210px;
	flex-shrink: 0;
	display: block;
	text-decoration: none;
	color: inherit;
}

.card__media-link,
.card__title-link,
.card__price {
	display: block;
	color: inherit;
	text-decoration: none;
}

.card__media-link {
	position: relative;
	z-index: 1;
}

.card__points {
	position: absolute;
	top: 0;
	z-index: 3;
}

.card__instalments {
	width: max-content;
	margin-bottom: 20px;
}

.card__label-block {
	font-family: var(--font-family);
	font-weight: 400;
	font-size: clamp(11px, 8.5px + 0.781vw, 18px);
	line-height: 100%;
	color: var(--chernyy);
	background: var(--svetlo-seryy);
	padding: 5px;
}

.card__title {
	margin-bottom: 10px;
	font-weight: 600;
	font-size: clamp(15px, 13.286px + 0.536vw, 18px);
	line-height: 130%;
	color: var(--chernyy);
}

.card__content {
	padding: 15px;
	background: var(--belyy);
}

.card__rating-menu {
	display: flex;
	align-items: center;
	gap: 5px;
	font-weight: 500;
	font-size: clamp(14px, 12.86px + 0.36vw, 18px);
	line-height: 140%;
	margin-bottom: 10px;
}

.card__reviews-count {
	display: flex;
	gap: 4px;
	color: var(--seryy);
}

.card__actions {
	display: flex;
	justify-content: space-between;
}

.card__price {
	padding: 5px 10px;
	border: 1.5px solid var(--temno-belyy);
	flex: 1;
}

.card__current-price {
	grid-area: 1 / 1 / 2 / 2;
	font-weight: 600;
	font-size: clamp(14px, 14.86px + 0.36vw, 25px);
	line-height: 100%;
	color: var(--chernyy);
	white-space: nowrap;
}

.card__old-price {
	grid-area: 2 / 1 / 3 / 2;
	font-weight: 500;
	font-size: clamp(14px, 12.86px + 0.36vw, 18px);
	line-height: 140%;
	text-decoration: line-through;
	color: var(--seryy);
	white-space: nowrap;
}

.card__buy-button {
	background: var(--firmennyy);
	grid-area: 1 / 2 / 3 / 3;
	width: 60px;
}

.card__buy-button:hover {
	background: var(--firmennyy-2);
}

.card__buy-button.active {
	background: var(--chernyy);
}

.card__buy-icon {
	display: block;
	width: 25px;
	max-width: 25px;
	height: auto;
	margin: 0 auto;
}

.card__buy-icon img {
	display: block;
	width: 100%;
	height: auto;
}

.card__buttons-menu {
	display: flex;
	justify-content: end;
	height: 100%;
}

.card__fav-icon {
	position: absolute;
	top: 10px;
	right: 10px;
	background: transparent;
	cursor: pointer;
	z-index: 4;
	min-width: 20px;
	width: 8%;
	height: auto;
}

@media (min-width: 768px) {
	.card__fav-icon {
		width: 8%;
		top: 15px;
		right: 15px;
	}
}

@media (min-width: 1200px) {
	.card {
		width: 330px;
	}
	.card__rating-icon {
		width: 19px;
	}

	.card__price {
		padding: 10px;
		border: 3px solid var(--temno-belyy);
	}
	.card__buy-button {
		width: 93px;
	}
	.card__content {
		padding: 10px;
	}
	.card__label-block {
		font-weight: 500;
		line-height: 140%;
	}
	.card__instalments {
		width: max-content;
		margin-bottom: 25px;
	}
}

@media (min-width: 1500px) {
	.card--horizontal {
		width: 100%;
		display: grid;
		grid-template-columns: repeat(3, auto);
		column-gap: 20px;
		padding: 20px;
		position: sticky;
		top: 0;
	}
	.card__title {
		font-size: 23px;
	}
	.card__title--horizontal {
		margin-bottom: 0;
	}

	.card__old-price--horizontal {
		font-weight: 700;
	}
	.card__fav-icon--horizontal {
		position: initial;
		width: auto;
		height: auto;
		padding: 16px;
	}
	.card__content--horizontal {
		padding: 0;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 10px;
	}
	.card__current-price--horizontal {
		line-height: 130%;
		color: var(--chernyy);
	}
	.card__price--horizontal {
		padding: 0;
		text-align: end;
		border: none;
	}
	.card__actions--horizontal {
		background: none;
		flex-direction: column;
		gap: 10px;
	}
	.card__rating-menu--horizontal {
		margin-bottom: 0;
	}

	.card__content--horizontal {
		padding: 0;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 10px;
	}

	.card__media--horizontal {
		max-width: 124px;
		aspect-ratio: 1/1;
		padding: 20px;
		box-shadow: inset 0 0 18px 0 rgba(224, 224, 224, 0.7);
		background: var(--belyy);
	}
	.card__links-menu {
		display: flex;
		gap: 10px;
	}
}

@media (max-width: 767px) {
	.card__content {
		padding: 10px;
	}
	.card__title {
		font-weight: 500;
		font-size: 15px;
		line-height: 140%;
	}
	.card__rating-menu {
		font-size: 15px;
	}
	.card__current-price {
		font-weight: 700;
		font-size: 15px;
		line-height: 140%;
	}
	.card__old-price {
		font-weight: 400;
		font-size: 11px;
		line-height: 100%;
	}
	.card__buy-button {
		background: var(--krasnyy);
		width: 62px;
	}
}

/* Equal-height cards: the price / cart row always sits at the bottom, with or without an old price. */
.card {
	display: flex;
	flex-direction: column;
}

.card__content {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.card__instalments {
	align-self: flex-start;
}

.card__actions {
	margin-top: auto;
	align-items: stretch;
}

.card__price {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 56px;
}

.card__buy-button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

@media (min-width: 1200px) {
	.card__price {
		min-height: 70px;
	}
}

/* Equal cards whatever the title length (Figma: title area is two lines, price row at the bottom) */
.card {
	display: flex;
	flex-direction: column;
}

.card__content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.card__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: calc(2em * 1.3);
}

.card__actions {
	margin-top: auto;
}
