/* Конструктор экипировки — фронт и админка */

.iv-ekip {
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 16px 48px;
}

.iv-ekip__empty {
	margin: 0;
	color: var(--iv-gray-700, #424242);
	font-size: 15px;
	line-height: 1.5;
}

.iv-ekip__section,
.iv-ekip__step {
	margin-top: 28px;
}

.iv-ekip__label,
.iv-ekip__row-label {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--iv-gray-500, #757575);
}

.iv-ekip__step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	font-size: 18px;
	font-weight: 800;
	color: var(--iv-black, #111);
}

.iv-ekip__step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--iv-black, #111);
	color: var(--iv-white, #fff);
	font-size: 14px;
}

.iv-ekip__brand-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.iv-ekip__brand-btn {
	appearance: none;
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	background: var(--iv-white, #fff);
	color: var(--iv-black, #111);
	padding: 10px 18px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.iv-ekip__brand-btn:hover,
.iv-ekip__brand-btn:focus-visible {
	border-color: var(--iv-black, #111);
}

.iv-ekip__brand-btn.is-active {
	background: var(--iv-black, #111);
	border-color: var(--iv-black, #111);
	color: var(--iv-white, #fff);
}

.iv-ekip__model-row,
.iv-ekip__color-row {
	padding: 16px 0;
	border-top: 1px solid var(--iv-gray-200, #e5e5e5);
}

.iv-ekip__model-row:first-child {
	border-top: none;
	padding-top: 0;
}

.iv-ekip__carousel-wrap {
	display: grid;
	grid-template-columns: 36px 1fr 36px;
	gap: 8px;
	align-items: center;
}

.iv-ekip__carousel {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 4px;
	scrollbar-width: thin;
}

.iv-ekip__carousel-nav {
	appearance: none;
	width: 36px;
	height: 36px;
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	border-radius: 50%;
	background: var(--iv-white, #fff);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.iv-ekip__carousel-nav:hover {
	border-color: var(--iv-black, #111);
}

.iv-ekip__model-card {
	appearance: none;
	flex: 0 0 140px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	background: var(--iv-white, #fff);
	border-radius: 12px;
	padding: 10px;
	cursor: pointer;
	scroll-snap-align: start;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.iv-ekip__model-card:hover,
.iv-ekip__model-card:focus-visible {
	border-color: var(--iv-black, #111);
}

.iv-ekip__model-card.is-selected {
	border-color: var(--iv-black, #111);
	box-shadow: inset 0 0 0 1px var(--iv-black, #111);
}

.iv-ekip__model-card-image {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	background: var(--iv-gray-50, #fafafa);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 8px;
}

.iv-ekip__model-card-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.iv-ekip__model-card-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--iv-black, #111);
	line-height: 1.25;
}

.iv-ekip__color-body {
	display: grid;
	grid-template-columns: minmax(100px, 132px) minmax(160px, 220px) minmax(220px, 1fr);
	gap: 10px 14px;
	align-items: center;
}

.iv-ekip__color-info {
	position: relative;
	padding-right: 10px;
	text-align: right;
	align-self: center;
}

.iv-ekip__color-info::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 6px;
	height: 1px;
	background: var(--iv-gray-300, #d4d4d4);
	transform: translateY(-50%);
}

.iv-ekip__color-preview {
	background: var(--iv-gray-50, #fafafa);
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	border-radius: 12px;
	padding: 10px;
	justify-self: start;
	width: 100%;
	max-width: 220px;
}

.iv-ekip__color-preview-img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

.iv-ekip__color-product {
	margin: 0 0 3px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--iv-black, #111);
}

.iv-ekip__color-sku {
	margin: 0 0 3px;
	font-size: 11px;
	line-height: 1.3;
	color: var(--iv-gray-500, #757575);
}

.iv-ekip__color-price {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--iv-black, #111);
}

.iv-ekip__swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 10px;
	max-height: 280px;
	overflow-y: auto;
	padding-right: 4px;
	margin-left: 72px;
}

.iv-ekip__swatch {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	background: var(--iv-white, #fff);
	border-radius: 10px;
	padding: 4px;
	cursor: pointer;
}

.iv-ekip__swatch:hover,
.iv-ekip__swatch:focus-visible {
	border-color: var(--iv-black, #111);
}

.iv-ekip__swatch.is-selected {
	border-color: var(--iv-black, #111);
	box-shadow: inset 0 0 0 1px var(--iv-black, #111);
}

.iv-ekip__swatch-image {
	display: block;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--iv-gray-50, #fafafa);
}

.iv-ekip__swatch-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.iv-ekip__summary {
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--iv-gray-200, #e5e5e5);
}

.iv-ekip__summary-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.iv-ekip__summary-item {
	display: grid;
	grid-template-columns: 100px 1fr auto auto;
	gap: 12px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid var(--iv-gray-200, #e5e5e5);
	border-radius: 10px;
	background: var(--iv-gray-50, #fafafa);
}

.iv-ekip__summary-slot {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--iv-gray-500, #757575);
}

.iv-ekip__summary-name {
	font-size: 14px;
	font-weight: 600;
}

.iv-ekip__summary-price {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.iv-ekip__summary-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--iv-black, #111);
	white-space: nowrap;
}

@media (max-width: 900px) {
	.iv-ekip__color-body {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.iv-ekip__color-info {
		text-align: left;
		padding-right: 0;
		order: 2;
	}

	.iv-ekip__color-info::after {
		display: none;
	}

	.iv-ekip__color-preview {
		order: 1;
		max-width: none;
		justify-self: stretch;
	}

	.iv-ekip__swatches {
		order: 3;
		margin-left: 0;
	}
}

@media (max-width: 720px) {
	.iv-ekip__summary-item {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.iv-ekip__carousel-wrap {
		grid-template-columns: 1fr;
	}

	.iv-ekip__carousel-nav {
		display: none;
	}
}

/* Admin */

.iv-ekip-admin__table {
	margin-top: 16px;
}

.iv-ekip-admin__yes {
	color: #008a20;
	font-weight: 700;
}

.iv-ekip-admin__no {
	color: #999;
}

.iv-ekip-admin__actions {
	white-space: nowrap;
}

.iv-ekip-admin__inline-form {
	display: inline;
	margin-left: 8px;
}

.iv-ekip-admin__slot {
	margin: 16px 0;
	padding: 14px 16px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
}

.iv-ekip-admin__slot legend {
	font-weight: 600;
	padding: 0 4px;
}

.iv-ekip-admin__slot select,
.iv-ekip-admin__variants input[type="text"] {
	min-width: 180px;
	max-width: 100%;
}

.iv-ekip-admin__variants {
	margin-top: 12px;
}

.iv-ekip-admin__form {
	max-width: 960px;
}

#iv-ekip-load-status {
	min-height: 1.2em;
	margin-top: 6px !important;
}

#iv-ekip-load-variants {
	margin-left: 8px;
	vertical-align: middle;
}

.iv-ekip-admin__duplicate-warn {
	color: #b32d2e !important;
	font-weight: 600;
}

.iv-ekip-admin__duplicate-warn a {
	font-weight: 600;
}
