/* QY Product Manager - Elementor widgets */
.qypm-products-widget,
.qypm-products-widget * {
	box-sizing: border-box;
}

.qypm-elementor-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: 24px;
}

.qypm-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	min-width: 0;
	height: auto;
	overflow: hidden;
	border: 1px solid #e1e5e9;
	border-radius: 10px;
	background: #fff;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.qypm-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(20, 34, 48, .10);
}

.qypm-product-card__image {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f5f7f9;
}

.qypm-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 12px;
	object-fit: contain;
	transition: transform .28s ease;
}

.qypm-product-card:hover .qypm-product-card__image img {
	transform: scale(1.025);
}

.qypm-product-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	padding: 20px;
}

.qypm-product-card__category {
	margin: 0 0 8px;
	color: #7a838b;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 650;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.qypm-product-card__title {
	margin: 0;
	padding: 0;
	color: #17212b;
	font-size: 20px;
	line-height: 1.35;
	font-weight: 700;
}

.qypm-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.qypm-product-card__title a:hover {
	text-decoration: none;
}

.qypm-product-card__description {
	margin: 12px 0 0;
	color: #5f6872;
	font-size: 14px;
	line-height: 1.7;
}

/* Keep the action row at the same vertical position on every card.
 * The wrapper owns the automatic top margin while its padding guarantees
 * a minimum gap from the title/description even when a card is content-heavy. */
.qypm-product-card__actions {
	display: flex;
	align-items: flex-start;
	width: 100%;
	margin-top: auto;
	padding-top: 18px;
}

.qypm-product-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 42px;
	margin: 0;
	padding: 11px 16px;
	border-radius: 4px;
	background: #17212b;
	color: #fff;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 700;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.qypm-product-card__button:hover,
.qypm-product-card__button:focus {
	background: #f17c3b;
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.qypm-product-card__button span {
	font-size: 16px;
	line-height: 1;
}

.qypm-elementor-empty {
	padding: 20px 22px;
	border: 1px dashed #bbc3ca;
	border-radius: 6px;
	background: #f7f8f9;
	color: #5b6570;
	font-size: 14px;
	line-height: 1.6;
}

/* Carousel */
.qypm-elementor-carousel {
	--qypm-slides: 4;
	--qypm-gap: 20px;
	position: relative;
	width: 100%;
	padding-inline: 44px;
}

.qypm-carousel-viewport {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.qypm-carousel-viewport::-webkit-scrollbar {
	display: none;
}

.qypm-carousel-track {
	display: flex;
	align-items: stretch;
	gap: var(--qypm-gap);
	width: 100%;
}

/* Explicitly keep every carousel card stretched to the tallest card in the row. */

.qypm-carousel-track > .qypm-product-card {
	flex: 0 0 100%;
	align-self: stretch;
	height: auto;
	scroll-snap-align: start;
}

.qypm-carousel-arrow {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0 0 3px;
	border: 1px solid #d9dee3;
	border-radius: 50%;
	background: #fff;
	color: #17212b;
	box-shadow: 0 6px 20px rgba(20, 34, 48, .10);
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
	transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.qypm-carousel-arrow:hover,
.qypm-carousel-arrow:focus-visible {
	transform: translateY(-50%) scale(1.06);
	box-shadow: 0 8px 24px rgba(20, 34, 48, .16);
}

.qypm-carousel-arrow:disabled {
	opacity: .35;
	cursor: default;
}

.qypm-carousel-prev {
	left: 0;
}

.qypm-carousel-next {
	right: 0;
}

.qypm-carousel-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 18px;
	margin-top: 18px;
}

.qypm-carousel-dot {
	display: block;
	width: 8px;
	height: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c8cdd2;
	cursor: pointer;
	transition: width .2s ease, border-radius .2s ease, background-color .2s ease;
}

.qypm-carousel-dot.is-active {
	width: 24px;
	border-radius: 8px;
	background: #f17c3b;
}

.qypm-elementor-carousel.is-single-page .qypm-carousel-arrow,
.qypm-elementor-carousel.is-single-page .qypm-carousel-dots {
	display: none;
}

@media (max-width: 767px) {
	.qypm-elementor-carousel {
		padding-inline: 34px;
	}

	.qypm-carousel-arrow {
		width: 30px;
		height: 30px;
		font-size: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qypm-product-card,
	.qypm-product-card__image img,
	.qypm-product-card__button,
	.qypm-carousel-arrow,
	.qypm-carousel-dot,
	.qypm-carousel-viewport {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}

/* Product series/category filter */
.qypm-series-filter,
.qypm-series-filter * {
	box-sizing: border-box;
}

.qypm-series-filter {
	--qypm-series-accent: #E85234;
	--qypm-series-line: #ededed;
	width: 100%;
	border: 1px solid var(--qypm-series-line);
	background: #fff;
	color: #20242c;
	font-family: inherit;
}

.qypm-series-filter__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 42px;
	padding: 9px 10px;
	background: var(--qypm-series-accent);
	color: #fff;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 750;
}

.qypm-series-filter__heading {
	min-width: 0;
}

.qypm-series-filter__header-icon {
	flex: 0 0 auto;
	display: grid;
	gap: 2px;
	width: 16px;
}

.qypm-series-filter__header-icon i {
	position: relative;
	display: block;
	height: 2px;
	margin-left: 4px;
	background: currentColor;
}

.qypm-series-filter__header-icon i::before {
	content: '';
	position: absolute;
	left: -4px;
	top: 0;
	width: 2px;
	height: 2px;
	background: currentColor;
}

.qypm-series-filter__list,
.qypm-series-filter__submenu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.qypm-series-filter__term {
	margin: 0;
	padding: 0 10px;
	background: #fff;
}

.qypm-series-filter__row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	border-bottom: 1px solid var(--qypm-series-line);
}

.qypm-series-filter__term:last-child > .qypm-series-filter__row {
	border-bottom-color: transparent;
}

.qypm-series-filter__term-link {
	flex: 1 1 auto;
	min-width: 0;
	padding: 11px 0;
	color: #20242c;
	font-size: 15px;
	line-height: 1.45;
	font-weight: 450;
	text-decoration: none;
	transition: color .2s ease;
}

.qypm-series-filter__term-link:hover,
.qypm-series-filter__term-link:focus {
	color: var(--qypm-series-accent);
	text-decoration: none;
}

.qypm-series-filter__toggle {
	position: relative;
	flex: 0 0 28px;
	width: 28px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #17212b;
	cursor: pointer;
}

.qypm-series-filter__toggle span::before,
.qypm-series-filter__toggle span::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 10px;
	height: 1.5px;
	background: currentColor;
	transform: translate(-50%, -50%);
	transition: transform .2s ease, opacity .2s ease;
}

.qypm-series-filter__toggle span::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.qypm-series-filter__term.is-open > .qypm-series-filter__row .qypm-series-filter__toggle span::after {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(0deg);
}

.qypm-series-filter__submenu {
	margin: 0 -10px;
	padding: 0 10px 4px 14px;
	background: #fafafa;
	border-bottom: 1px solid var(--qypm-series-line);
}

.qypm-series-filter__submenu[hidden] {
	display: none !important;
}

.qypm-series-filter__submenu .qypm-series-filter__term {
	padding-right: 0;
	background: transparent;
}

.qypm-series-filter__submenu .qypm-series-filter__row {
	min-height: 40px;
}

.qypm-series-filter__submenu .qypm-series-filter__term-link {
	padding: 8px 0;
	font-size: 14px;
	font-weight: 550;
}

.qypm-series-filter__product {
	margin: 0;
	padding: 0;
}

.qypm-series-filter__product-link {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	padding: 8px 6px 8px 4px;
	border-bottom: 1px solid rgba(0, 0, 0, .055);
	color: #626870;
	font-size: 13px;
	line-height: 1.45;
	font-weight: 400;
	text-decoration: none;
	transition: color .2s ease, padding-left .2s ease;
}

.qypm-series-filter__product:last-child > .qypm-series-filter__product-link {
	border-bottom: 0;
}

.qypm-series-filter__product-link:hover,
.qypm-series-filter__product-link:focus {
	padding-left: 8px;
	color: var(--qypm-series-accent);
	text-decoration: none;
}

.qypm-series-filter__product-mark {
	flex: 0 0 auto;
	color: var(--qypm-series-accent);
	font-size: 16px;
	line-height: 1.2;
}

@media (max-width: 767px) {
	.qypm-series-filter__header {
		font-size: 17px;
	}

	.qypm-series-filter__term-link {
		font-size: 15px;
	}
}

/* Optional server-side pagination for QY Products / QY Product Carousel */
.qypm-widget-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 28px;
}

.qypm-widget-pagination__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #dfe4e8;
	border-radius: 4px;
	background: #fff;
	color: #27323d;
	font-size: 14px;
	line-height: 1;
	font-weight: 650;
	text-decoration: none;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.qypm-widget-pagination__link:hover,
.qypm-widget-pagination__link:focus,
.qypm-widget-pagination__link.is-current {
	border-color: #E85234;
	background: #E85234;
	color: #fff;
	text-decoration: none;
}

.qypm-widget-pagination__dots {
	padding: 0 3px;
	color: #7b838b;
}
