/*
 * Блок «Использованные изделия» на странице объекта (inc/case-items.php).
 * Карточки позиций объекта: сетка при 1–3 позициях, слайдер slick при 4+.
 * Desktop — 3 карточки, tablet — 2, mobile — 1 + край следующей как подсказка свайпа.
 */

.case_items {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -10px;
}

.case_items.is-grid {
	justify-content: center;
}

.case_item {
	width: 33.333%;
	padding: 10px;
	box-sizing: border-box;
	display: flex;
}

.case_item__inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

/* Картинка --------------------------------------------------------------- */

.case_item__image {
	position: relative;
	height: 200px;
	background: #f3f1ee;
	flex: 0 0 auto;
}

.case_item__image a {
	display: block;
	height: 100%;
}

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

.case_item__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none'%3e%3cpath d='M8 44 24 20l12 16 8-8 12 16H8Z' stroke='%23b8b2aa' stroke-width='2.5' stroke-linejoin='round'/%3e%3ccircle cx='46' cy='16' r='5' stroke='%23b8b2aa' stroke-width='2.5'/%3e%3c/svg%3e")
		center / 64px no-repeat,
		linear-gradient(135deg, #f3f1ee 0%, #e7e3dd 100%);
}

.case_item__badge {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	background: rgba(29, 29, 31, 0.82);
	color: #fff;
	font-weight: 600;
	font-size: 11px;
	line-height: 150%;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.case_item.is-custom .case_item__badge {
	background: rgba(204, 32, 64, 0.9);
}

/* Текст ------------------------------------------------------------------ */

.case_item__body {
	padding: 16px 16px 8px;
	flex: 1 1 auto;
}

.case_item__kicker {
	display: block;
	font-weight: 500;
	font-size: 12px;
	line-height: 150%;
	color: #9b9b9b;
	margin-bottom: 4px;
}

.case_item__title {
	font-weight: 700;
	font-size: 15px;
	line-height: 135%;
	color: #1d1d1f;
	margin: 0 0 12px;
}

.case_item__title a {
	color: inherit;
	text-decoration: none;
}

.case_item__title a:hover {
	color: #cc2040;
}

.case_item__spec {
	margin: 0 0 12px;
	padding: 0;
	border-top: 1px solid #ececec;
}

.case_item__spec > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 7px 0;
	border-bottom: 1px solid #ececec;
	font-size: 13px;
	line-height: 145%;
}

.case_item__spec dt {
	color: #7a7a7a;
	font-weight: 400;
	flex: 0 0 auto;
}

.case_item__spec dd {
	margin: 0;
	color: #1d1d1f;
	font-weight: 600;
	text-align: right;
}

.case_item__volume {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin: 0;
	font-size: 13px;
	line-height: 145%;
}

.case_item__volume span {
	color: #7a7a7a;
}

.case_item__volume strong {
	color: #1d1d1f;
	font-weight: 700;
	white-space: nowrap;
}

/* Низ карточки: цена и кнопка прижаты книзу ------------------------------- */

.case_item__footer {
	padding: 8px 16px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: auto;
}

.case_item__price {
	margin: 0;
	font-weight: 700;
	font-size: 15px;
	line-height: 135%;
	color: #1d1d1f;
}

.case_item__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 6px;
	border: 2px solid #1a1a1a;
	background: #fff;
	color: #1a1a1a;
	font-weight: 600;
	font-size: 13px;
	line-height: 140%;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	margin-left: auto;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.case_item__btn:hover,
.case_item__btn:focus-visible {
	background: #1a1a1a;
	color: #fff;
	outline: none;
}

.case_item.is-exact .case_item__btn,
.case_item.is-custom .case_item__btn {
	background: #cc2040;
	border-color: #cc2040;
	color: #fff;
}

.case_item.is-exact .case_item__btn:hover,
.case_item.is-exact .case_item__btn:focus-visible,
.case_item.is-custom .case_item__btn:hover,
.case_item.is-custom .case_item__btn:focus-visible {
	background: #a8182f;
	border-color: #a8182f;
}

.case_item__btn:focus-visible,
.case_item__title a:focus-visible {
	box-shadow: 0 0 0 3px rgba(204, 32, 64, 0.35);
}

/* Слайдер (slick) --------------------------------------------------------- */

.case_items.is-slider {
	display: block;
	margin: 0 -10px;
	position: relative;
}

.case_items.is-slider .slick-list {
	overflow: hidden;
}

.case_items.is-slider .slick-track {
	display: flex;
}

.case_items.is-slider .slick-slide {
	height: auto;
	display: flex;
}

.case_items.is-slider .slick-slide > div {
	display: flex;
	width: 100%;
}

.case_items.is-slider .case_item {
	width: 100%;
}

.case_items .slick-arrow {
	position: absolute;
	top: 90px;
	z-index: 2;
	width: 48px;
	height: 48px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid #e0e0e0;
	background: #fff center / 10px 16px no-repeat;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	font-size: 0;
	color: transparent;
	cursor: pointer;
	transition: background-color 0.2s;
}

.case_items .slick-arrow:hover,
.case_items .slick-arrow:focus-visible {
	background-color: #f3f1ee;
	outline: none;
	box-shadow: 0 0 0 3px rgba(204, 32, 64, 0.35);
}

.case_items .slick-arrow.slick-disabled {
	opacity: 0.35;
	cursor: default;
}

.case_items .slick-prev {
	left: -14px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='10' height='16' viewBox='0 0 10 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M1.0625 7.5L7.125 1.40625C7.4375 1.125 7.90625 1.125 8.1875 1.40625L8.90625 2.125C9.1875 2.40625 9.1875 2.875 8.90625 3.1875L4.09375 8L8.90625 12.8438C9.1875 13.1562 9.1875 13.625 8.90625 13.9062L8.1875 14.625C7.90625 14.9062 7.4375 14.9062 7.125 14.625L1.0625 8.53125C0.78125 8.25 0.78125 7.78125 1.0625 7.5Z' fill='%231d1d1f'/%3e%3c/svg%3e");
}

.case_items .slick-next {
	right: -14px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg width='10' height='16' viewBox='0 0 10 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.90625 8.53125L2.84375 14.625C2.53125 14.9062 2.0625 14.9062 1.78125 14.625L1.0625 13.9062C0.78125 13.625 0.78125 13.1562 1.0625 12.8438L5.875 8L1.0625 3.1875C0.78125 2.875 0.78125 2.40625 1.0625 2.125L1.78125 1.40625C2.0625 1.125 2.53125 1.125 2.84375 1.40625L8.90625 7.5C9.1875 7.78125 9.1875 8.25 8.90625 8.53125Z' fill='%231d1d1f'/%3e%3c/svg%3e");
}

/* Планшет: 2 карточки ------------------------------------------------------ */

@media (max-width: 991px) {
	.case_item {
		width: 50%;
	}

	.case_items .slick-prev {
		left: 0;
	}

	.case_items .slick-next {
		right: 0;
	}
}

/* Мобильный: 1 карточка + ~18 % следующей как подсказка свайпа ------------ */

@media (max-width: 767px) {
	.case_item {
		width: 100%;
	}

	.case_items.is-slider .slick-list {
		padding-right: 15%;
	}

	.case_items .slick-arrow {
		top: 76px;
		width: 40px;
		height: 40px;
	}

	.case_item__image {
		height: 170px;
	}
}

/* Обратные блоки: «Объекты, где применено изделие» (карточка товара) и
   «Наши объекты» (категория). Карточки — стили архива портфолио (.portfolio_list). */

.case_related {
	padding: 70px 0;
}

.case_related--category {
	padding: 85px 0 20px;
}

.case_related .head_section {
	margin-bottom: 32px;
}

.case_related .portfolio_list > div > a {
	height: 260px;
}

.case_related .portfolio_list img {
	display: block;
}

@media (max-width: 767px) {
	.case_related {
		padding: 48px 0;
	}

	.case_related .portfolio_list > div > a {
		height: 220px;
	}
}
