$cardTypes: (
	product: (
		base: #FEE5C8,
		text: #C94C0A,
		button : #EC7B3F,
		shadow: #F6D0AD,
		border: #EC7B3F
	),
	info: (
		base: #BDD6DE,
		text: #3B6977,
		button : #4591A9,
		shadow: #B9D3CF,
		border: #4591A9
	),
	other: (
		base: #DBE2AE,
		text: #A0B809,
		button : #A0B809,
		shadow: #DBE2AD,
		border: #A0B809
	),
	seen: (
		base: #fff,
		text: #605D5D,
		button: #605D5D,
		shadow: rgba(#fff, 0),
		border: #8a8a8a
	),
	disabled: (
		base: #F0F0F0,
		text: #CDCCCC,
		button: rgba(#fff, 0),
		shadow: rgba(#fff, 0),
		border: #F0F0F0
	)
);

@mixin colorCards($prefix: '--') {
	@each $name, $theme in $cardTypes {
		&#{$prefix}#{$name} {
			color: map_get($theme, text);
			background-color: map_get($theme, base);
			border-color: map_get($theme, base);
			box-shadow: 0 30px 30px -10px desaturate(rgba(map_get($theme, shadow), 0.5), 15%);

			&:hover {
				border-color: map_get($theme, border);
				box-shadow: 0 35px 40px -20px desaturate(rgba(map_get($theme, shadow), 0.5), 15%);
			}

			&:active,
			&:focus {
				box-shadow: none;
				outline: none;
			}

			.card__button {
				background-color: map_get($theme, button);
			}
		}
	}
}

.cards-list {
	display: flex;
	flex-wrap: wrap;
}

.cards-list__item {
	display: flex;
	flex-direction: column;
	margin-right: 30px;
	margin-bottom: 30px;
}

.card {
	@include colorCards;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	box-sizing: border-box;
	padding: 10px;
	width: 160px;
	min-height: 210px;
	color: #605D5D;
	background-color: $bg-main;
	border: 1px solid $bg-main;
	border-radius: 8px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.card__image {
	width: 140px;
	height: 90px;
	background-image: linear-gradient(180deg, #FFFFFF 0%, #ECECEC 100%);
	border-radius: 6px;
	overflow: hidden;
}

.card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.card__title {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 10px 0;
	font-weight: 500;
	font-size: 15px;
	line-height: 20px;
}

button.card__button {
	@include hover;
	color: $bg-main;
	font-weight: 400;
	padding: 5px 10px;
	min-width: 120px;
	font-size: 12px;
	line-height: 16px;
	border-radius: 8px;

	&:hover,
	&:active,
	&:focus {
		color: $bg-main;
	}
}

.card__note {
	display: flex;
	align-items: center;
	font-weight: 400;
	font-size: 12px;
	line-height: 30px;
	color: #B2C5B7;
}

.card__note svg {
	display: block;
	margin-left: 9px;
}

.card--disabled {
	cursor: default;
}

.card--disabled .card__title {
	font-size: 13px;
	line-height: 17px;
}

.card--disabled .card__image {
	filter: grayscale(100%);
	opacity: 0.5;
}
