.kps {
	--kps-gap: 16px;
	--kps-per: var(--kps-pv, 4);
	position: relative;
	margin-block: 10px;
}

@media (max-width: 1024px) {
	.kps { --kps-per: var(--kps-pv-tablet, 3); }
}

@media (max-width: 767px) {
	.kps { --kps-gap: 12px; --kps-per: var(--kps-pv-mobile, 2); }
}

.kps__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.kps__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
}

.kps__nav {
	display: flex;
	gap: 8px;
	margin-inline-start: auto;
}

/* !important: Woodmart's global button styles (padding, radius, colors) otherwise win */
.kps .kps__arrow {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px !important;
	height: 42px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0;
	border: 1px solid #e5e5e5 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #1c1c1c !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.kps .kps__arrow:hover:not(:disabled) {
	background: var(--wd-primary-color, #1c1c1c) !important;
	border-color: var(--wd-primary-color, #1c1c1c) !important;
	color: #fff !important;
}

.kps .kps__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.kps .kps__arrow svg {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

[dir="rtl"] .kps .kps__arrow svg {
	transform: scaleX(-1);
}

.kps.is-static .kps__nav {
	display: none;
}

.kps__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--kps-per) - 1) * var(--kps-gap)) / var(--kps-per));
	gap: var(--kps-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 6px;
}

.kps__track::-webkit-scrollbar {
	display: none;
}

.kps__slide {
	display: flex;
	flex-direction: column;
	min-width: 0;
	scroll-snap-align: start;
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.kps__slide:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.kps__img {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #f7f5f2;
}

.kps__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.kps__slide:hover .kps__img img {
	transform: scale(1.05);
}

.kps__badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	padding: 3px 10px;
	border-radius: 20px;
	background: var(--wd-primary-color, #e53935);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

.kps__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 12px 12px 14px;
	text-align: center;
}

.kps__name {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.kps__name a {
	color: inherit;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.kps__price {
	font-weight: 700;
	color: var(--wd-primary-color, #1c1c1c);
}

.kps__price del {
	opacity: 0.5;
	font-weight: 400;
	font-size: 0.9em;
}

.kps .kps__btn {
	margin-top: auto;
	width: 100%;
	min-height: 38px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
}

.kps .kps__btn.added {
	display: none;
}

.kps .added_to_cart {
	display: block;
	margin-top: 4px;
	font-size: 13px;
}

@media (max-width: 767px) {
	.kps__title { font-size: 18px; }
	.kps .kps__arrow { width: 36px !important; height: 36px !important; }
	.kps__name { font-size: 13px; }
	.kps__body { padding: 10px 8px 12px; }
}