.boxes--rows {
	.respond-to("medium-min";
		{
			&.row {
				margin: 0;
			}
		}
	);
	.box {
		.respond-to("medium-min";
			{
				flex: 1 100%;
				width: 100%;
				&:first-of-type {
					.box__inner {
						&.box__inner--product {
							border: 1px solid transparent;
						}
					}
				}
				&:not(.box--news) {
					margin: 0 !important;
				}
				&:hover {
					& + .box {
						.box__inner--product {
							border: 1px solid transparent;
						}
					}
					.box__inner {
						&.box__inner--product {
							border: 1px solid transparent;
						}
					}
				}
				.box__inner {
					flex-direction: row;
					&.box__inner--product {
						border: 1px solid transparent;
						border-top: 1px solid @color-gray-9;
						border-radius: 0;
					}
				}

				.box__content {
					&.box__content--top {
						width: auto;
						flex-shrink: 0;
						.generate-spacing-rule(4,padding,right);
					}
					&.box__content--bottom {
						padding: 0;
						h4,
						h5 {
							text-align: left;
							margin: 0;
						}
					}
				}

				.box__content__inner {
					display: block;
				}

				.box__content__inner--news {
					flex-grow: 0;
				}

				.box__footer {
					float: left;
					width: auto;
				}
			}
		);
	}
}

& when (@order-table-view = true) {
	.boxes--table {
		.shell_content--small;
		.respond-to("medium-min";
			{
				.box {
					width: 100%;
					padding: 0;
					&:nth-of-type(even) {
						.box__inner {
							background: @color-gray-10;
						}
					}
				}

				.box__inner {
					.generate-spacing-rule(1,padding,top);
					.generate-spacing-rule(1,padding,bottom);
					.generate-spacing-rule(4,padding,left);
					.generate-spacing-rule(4,padding,right);
					.box__footer {
						display: flex;
						align-items: center;
						align-self: center;
						width: auto;
						flex: 0 auto;
						.box__footer__link {
							.button;
						}
					}
					.box__inner__content {
						width: auto;
						display: flex;
					}

					.box__header {
						width: 270px;
						padding: 0;
						flex: 0 auto;
						.generate-spacing-rule(4,margin,right);
						.box__title {
							flex: 0 auto;
							order: 1;
							.typography-rule(1,bold);
							.generate-spacing-rule(4,margin,right);
						}
						.box__header__icon {
							order: 0;
							.typography-rule(none);
							.generate-spacing-rule(4,margin,right);
						}
						.box__header__description {
							width: auto;
							order: 1;
						}
					}

					.box__inner__list {
						display: flex;
						align-items: center;
						flex: 1 auto;
						padding: 0;
						> li {
							border: 0;
							order: 0;
							padding: 0;
							.generate-spacing-rule(4,margin,right);
							&.box__inner__list__status {
								width: 120px;
							}
							&.box__inner__list__last {
								order: 1;
							}
							&.box__inner__list__big {
								flex: 1 auto;
								ul {
									text-align: left;
									border: 0;
									padding: 0;
									li {
										background: white;
										border: 1px solid @color-gray-9;
										padding: 0;
										.generate-spacing-rule(1,margin,right);
									}
								}
							}
							span {
								width: 100%;
								&.box__inner__list__label {
									display: none;
								}
							}
						}
					}
				}
			}
		);
	}
}

.boxes--grid {
	&:not(.boxes--rows) {
		.respond-to("medium-min";
			{
				.box--news {
					h4 {
						text-align: center;
						.h5;
						& + span {
							text-align: center;
						}
					}
				}
			}
		);
	}
	.box {
		.generate-spacing-rule(2,margin,bottom);
		&.box--news {
			background: white;
			.respond-to("medium";
				{
					.box__inner--news {
						padding: 0;
						.box__content--news,
						.box__content__inner--news {
							display: block;
							.generate-spacing-rule(4,padding,all);
						}

						.box__content__inner--news {
							padding-top: 0;
						}
					}
				}
			);
		}
	}
}

.boxes--events {
	justify-content: center;
}

.box {
	display: flex;
	position: relative;
	.respond-to("extra-large-min";
		{
			&:hover {
				.box__inner--product {
					border: 1px solid @color-gray-9;
                    .box-shadow(0 0 10px @color-gray-9);
                    .button--product {
						opacity: 1;
					}
				}
			}
		}
	);
}


.box__inner {
	border-radius: @global-radius;
	border: 1px solid @color-gray-9;
	text-align: left;
	display: flex;
	flex: 1 auto;
	flex-direction: column;
	width: 100%;
	&.box__inner--product {
		border: 1px solid transparent;
	}
	.box__header {
		display: flex;
		align-items: center;
		position: relative;
		width: 100%;
		&.box__header--wrap {
			flex-flow: row wrap;
		}
		.box__header__icon {
			&.box__header__icon--success {
				stroke: @color-success;
			}
			&.box__header__icon--error {
				stroke: @color-error;
			}
			&.box__header__icon--info {
				stroke: @color-info;
			}
		}
		.box__header__counter {
			color: white;
			background: @color_main;
			.generate-spacing-rule(1,padding,all);
			.generate-spacing-rule(1,margin,left);
		}
	}

	.box__title {
		flex: 1 0;
	}

	img {
		max-width: 100%;
		display: block;
		margin: 0 auto;
	}

	.box__content {
		width: 100%;
		padding: 0;
		&.box__content--bottom {
			flex-direction: column;
			.generate-spacing-rule(1,padding,top);
		}
	}


	.box__footer {
		align-self: flex-end;
		width: 100%;
		&.box__footer--absolute {
			color: white;
			position: absolute;
			bottom: 0;
			left: 0;
			right: 0;
			.box__footer__title {
				color: white;
				text-shadow: 0 0 20px @color-gray-8;
			}
		}
		&.box__footer--normal {
			.respond-to("small-large-min";
				{
					flex: none;
				}
			);
		}
		&.box__footer--news {
			.respond-to("medium-min";
				{
					align-self: flex-start;
					a {
						padding-bottom: 0;
						.generate-spacing-rule(2,padding,right,12px);
						.typography-lineheight(24px);
						svg {
							right: 0;
						}
					}
				}
			);
			.respond-to("medium";
				{
					.box__footer__link {
						border-top: 1px solid @color-gray-9;
						.generate-spacing-rule(4,padding,all);
					}
				}
			);
		}
		.box__footer__link {
			svg {
				right: ~"calc((@{spacing-min} + (4 * @{spacing-step}))/2)";
			}
		}
	}

	.respond-to("medium";
		{
			flex-direction: column;
			&.box__inner--product {
				flex-direction: column;
				.box__content--top {
					text-align: center;
					> div {
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}

			.box__labels {
				display: none;
			}

			.box__gift {
				border: 0;
				display: inline-block;
				position: relative;
				top: auto;
				left: auto;
				.generate-spacing-rule(2,margin,left,20px);
				&:before {
					content: '+';
					color: @color_teritary;
					text-align: center;
					display: block;
					position: absolute;
					top: 50%;
					left: -22px;
					.translate(0,-50%);
					.typography-rule(4,bold,true);
					.element--nopadding;
				}
				a {
					.generate-spacing-rule(1,padding,all);
				}
				span {
					display: none !important;
				}
			}
		}
	);
}

.box__labels {
	position: absolute;
	top: 0;
	right: 0;
	.box__labels__label__holder {
		text-align: right;
		.generate-spacing-rule(0,padding,bottom);
		&:last-of-type {
			padding: 0;
		}
	}
	.box__labels__label {
		display: inline-block;
	}
}

.box__gift {
	color: white;
	background: white;
	.box-shadow(0 0 4px rgba(0,0,0,0.24));
	border-radius: 2px;
	text-align: center;
	position: absolute;
	top: 0;
	left: 0;
	width: 70px;
	cursor: default;
	.box__gift__label {
		color: @color_teritary;
		.generate-spacing-rule(0,padding,all);
	}

	img {
		border-radius: @color-gray-10;
	}
}