/**
 * MR Stiff Product Manual Tab — Product Slider (independent of Bestsellers).
 *
 * Columns via --mspmt-ps-cols (set per breakpoint by the script); --mspmt-ps-gap
 * and --mspmt-ps-ratio come from the widget.
 */

.mspmt-ps {
	position: relative;
	--mspmt-ps-gap: 16px;
	--mspmt-ps-cols: 4;
}

.mspmt-ps__viewport {
	overflow: hidden;
}

.mspmt-ps__track {
	display: flex;
	gap: var( --mspmt-ps-gap );
	transition: transform var( --mspmt-ps-speed, 400ms ) ease;
	will-change: transform;
}

.mspmt-ps__slide {
	flex: 0 0 calc( ( 100% - ( var( --mspmt-ps-cols ) - 1 ) * var( --mspmt-ps-gap ) ) / var( --mspmt-ps-cols ) );
	box-sizing: border-box;
	min-width: 0;
}

/* ---- Card -------------------------------------------------------------- */

.mspmt-ps-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #f6f6f6;
}

.mspmt-ps-card__media {
	position: relative;
}

.mspmt-ps-card__tags {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mspmt-ps-tag {
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.7;
	border-radius: 4px;
}

.mspmt-ps-tag--sale {
	color: #1a1a1a;
	background: #f4e409;
}

.mspmt-ps-tag--best {
	color: #fff;
	background: #2b2b2b;
}

.mspmt-ps-card__wishlist {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 4;
}

.mspmt-ps-card__link {
	display: block;
}

.mspmt-ps-card__images {
	position: relative;
	aspect-ratio: var( --mspmt-ps-ratio, 1 / 1 );
	background: #f6f6f6;
}

.mspmt-ps-card__img {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mspmt-ps-card__img.is-active {
	opacity: 1;
}

.mspmt-ps-card__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mspmt-ps-card__gdots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 4;
	display: flex;
	gap: 6px;
	justify-content: center;
}

.mspmt-ps-card__gdot {
	width: 8px;
	height: 8px;
	padding: 0;
	cursor: pointer;
	background: rgba( 0, 0, 0, 0.25 );
	border: 0;
	border-radius: 50%;
}

.mspmt-ps-card__gdot.is-active {
	background: #333;
}

/* Hover "+" add-to-cart, at the image's bottom-left. */

.mspmt-ps-card__cart {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 5;
	opacity: 0;
	transform: translateY( 6px );
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.mspmt-ps-card:hover .mspmt-ps-card__cart,
.mspmt-ps-card:focus-within .mspmt-ps-card__cart {
	opacity: 1;
	transform: none;
}

.mspmt-ps-card__cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	line-height: 0;
	border-radius: 8px;
}

.mspmt-ps-plus {
	font-size: 26px;
	font-weight: 400;
	line-height: 1;
}

/* Text variant: a full-width Add to cart button instead of the "+" icon. */

.mspmt-ps-card__cart--text {
	right: 12px;
}

.mspmt-ps-card__cart--text .mspmt-ps-card__cart-btn {
	display: block;
	width: 100%;
	height: auto;
	padding: 10px 14px;
	line-height: normal;
	text-align: center;
}

.mspmt-ps-card__cart .added_to_cart {
	display: none;
}

/* ---- Body -------------------------------------------------------------- */

.mspmt-ps-card__body {
	padding: 12px 4px 4px;
}

.mspmt-ps-card__title {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
	text-decoration: none;
}

.mspmt-ps-card__rating {
	margin-bottom: 4px;
	font-size: 0.85em;
}

.mspmt-ps-card__price {
	font-weight: 600;
}

.mspmt-ps-card__price del {
	margin-left: 6px;
	font-weight: 400;
	opacity: 0.6;
}

.mspmt-ps-card__from {
	margin-right: 2px;
	font-weight: 400;
}

/* ---- Arrows (hidden until the slider is hovered) ----------------------- */

.mspmt-ps__arrow {
	position: absolute;
	top: 38%;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: #222;
	cursor: pointer;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.12 );
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

.mspmt-ps:hover .mspmt-ps__arrow {
	opacity: 1;
	visibility: visible;
}

.mspmt-ps__arrow .mspmt-arrow-svg {
	display: block;
}

.mspmt-ps__arrow--prev {
	left: -8px;
}

.mspmt-ps__arrow--next {
	right: -8px;
}

.mspmt-ps__arrow[disabled] {
	opacity: 0;
	cursor: default;
}

.mspmt-ps:hover .mspmt-ps__arrow[disabled] {
	opacity: 0.35;
	visibility: visible;
}

/* ---- Dots -------------------------------------------------------------- */

.mspmt-ps__dots {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 16px;
}

.mspmt-ps__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	cursor: pointer;
	background: #ccc;
	border: 0;
	border-radius: 50%;
	transition: background-color 0.15s ease;
}

.mspmt-ps__dot.is-active {
	background: #333;
}
