/* Pâtissil – sélecteur de tapis pour les kits modulables */
.pk-kit {
	--pk-accent: var(--fs-color-primary, #f99b1c);
	--pk-border: #ddd;
	margin: 0 0 1.5em;
	width: 100%;
}

.pk-kit__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1em;
	margin-bottom: .6em;
}

.pk-kit__title {
	font-weight: 700;
	color: #222;
}

.pk-kit__counter {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: #777;
	white-space: nowrap;
}

.pk-kit--complete .pk-kit__counter {
	color: #2e7d32;
}

/* Emplacements choisis */
.pk-kit__slots {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: .8em;
}

.pk-kit .pk-kit__slot {
	position: relative;
	width: 56px;
	height: 56px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 2px dashed var(--pk-border);
	border-radius: 6px;
	background: #fafafa;
	color: #aaa;
	font-size: 1em;
	font-weight: 700;
	line-height: 1;
	opacity: 1;
	overflow: visible;
}

.pk-kit .pk-kit__slot.is-filled {
	border: 2px solid var(--pk-accent);
	background: #fff;
	cursor: pointer;
}

.pk-kit__slot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

.pk-kit__remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #333;
	color: #fff;
	font-size: 15px;
	line-height: 19px;
	text-align: center;
}

.pk-kit__error {
	margin: 0 0 .8em;
	padding: .5em .8em;
	border-left: 3px solid #b20000;
	background: #fdf0f0;
	color: #b20000;
	font-size: .9em;
}

/* Grille des tapis disponibles */
.pk-kit__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 8px;
}

.pk-kit .pk-kit__tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	min-height: 0;
	margin: 0;
	padding: 4px;
	border: 2px solid var(--pk-border);
	border-radius: 6px;
	background: #fff;
	color: #333;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, opacity .15s;
}

.pk-kit .pk-kit__tile:hover,
.pk-kit .pk-kit__tile:focus-visible {
	border-color: var(--pk-accent);
	box-shadow: none;
}

.pk-kit .pk-kit__tile.is-selected {
	border-color: var(--pk-accent);
}

.pk-kit__tile img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 3px;
}

.pk-kit__name {
	display: block;
	padding: 4px 0 2px;
	overflow-wrap: anywhere;
}

.pk-kit__badge {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border-radius: 11px;
	background: var(--pk-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
}

.pk-kit__grid.is-full .pk-kit__tile:not(.is-selected) {
	opacity: .45;
}

.pk-kit--waiting .pk-kit__grid {
	opacity: .45;
	pointer-events: none;
}

/* Quantité, placée au-dessus du choix des tapis */
.pk-kit-qty {
	display: flex;
	align-items: center;
	gap: 1em;
	width: 100%;
	margin: 0 0 1.2em;
}

.pk-kit-qty__label {
	font-weight: 700;
	color: #222;
}

.pk-kit-qty .quantity {
	margin: 0;
}
