/**
 * A2Z Products shortcode — grid / carousel cards.
 */

.a2z-products {
	--a2z-prod-gap: 0;
	--a2z-prod-cols: 4;
	margin: 0 0 32px;
	color: #fff;
}

.a2z-products__heading {
	margin: 0 0 20px;
	font-size: clamp(20px, 2.4vw, 28px);
	font-weight: 700;
	color: #fff;
}

.a2z-products__grid {
	display: grid;
	gap: 10px !important;
	row-gap: 10px !important;
	column-gap: 10px !important;
	align-items: start;
}

.a2z-products__grid > .a2z-product-card {
	margin: 0 !important;
	height: auto;
}

.a2z-products__grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.a2z-products__grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.a2z-products__grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Carousel */
.a2z-products__carousel {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.a2z-products__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.a2z-products__track {
	display: flex;
	align-items: stretch;
	gap: var(--a2z-prod-gap);
	transition: transform 0.35s ease;
	will-change: transform;
}

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

.a2z-products__slide .a2z-product-card {
	height: 100%;
}

.a2z-products__nav {
	flex: 0 0 auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: #2a2843;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.a2z-products__nav:hover,
.a2z-products__nav:focus {
	background: #008751;
	border-color: #008751;
	outline: none;
}

.a2z-products__nav[hidden],
.a2z-products__dots[hidden] {
	display: none !important;
}

.a2z-products__nav:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.a2z-products__dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.a2z-products__dot {
	width: 10px;
	height: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	cursor: pointer;
}

.a2z-products__dot.is-active,
.a2z-products__dot:hover,
.a2z-products__dot:focus {
	background: #00ff85;
	outline: none;
}

/* Card */
.a2z-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: auto;
	min-width: 0;
	margin: 0;
	background: #2c2a44;
	overflow: hidden;
}

.a2z-product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #26243c;
	overflow: hidden;
	text-decoration: none !important;
}

.a2z-product-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transition: transform 0.35s ease;
}

.a2z-product-card:hover .a2z-product-card__image {
	transform: scale(1.04);
}

.a2z-product-card__sale {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 72px 72px 0;
	border-color: transparent #008751 transparent transparent;
	pointer-events: none;
}

.a2z-product-card__sale-text {
	position: absolute;
	top: 14px;
	right: -66px;
	width: 72px;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
	transform: rotate(45deg);
	white-space: nowrap;
}

.a2z-product-card__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px 16px;
	align-items: start;
	padding: 16px 18px 18px;
	min-height: 0;
}

.a2z-product-card__meta-left {
	min-width: 0;
}

.a2z-product-card__meta-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	text-align: right;
	flex: 0 0 auto;
}

.a2z-product-card__category {
	display: block;
	margin: 0 0 8px;
	color: rgba(255, 255, 255, 0.55);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

.a2z-product-card__title {
	margin: 0;
	font-size: clamp(14px, 1.4vw, 18px);
	font-weight: 800;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.a2z-product-card__title a {
	color: #fff !important;
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

.a2z-product-card__title a:hover {
	color: #00ff85 !important;
}

.a2z-product-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	line-height: 1;
}

.a2z-product-card__star {
	color: rgba(255, 255, 255, 0.25);
	font-size: 13px;
	line-height: 1;
}

.a2z-product-card__star.is-filled,
.a2z-product-card__star.is-half {
	color: #f0c419;
}

.a2z-product-card__price {
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.a2z-product-card__price del {
	margin-right: 6px;
	color: rgba(255, 255, 255, 0.45);
	font-size: 13px;
	font-weight: 600;
	text-decoration: line-through;
}

.a2z-product-card__price ins {
	text-decoration: none;
	color: #fff;
	font-weight: 800;
}

.a2z-products--empty,
.a2z-products--error {
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.03);
	color: #9e9caa;
	text-align: center;
}

@media (max-width: 1199px) {
	.a2z-products__grid--cols-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.a2z-products__grid--cols-4,
	.a2z-products__grid--cols-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575px) {
	.a2z-products__grid--cols-4,
	.a2z-products__grid--cols-3,
	.a2z-products__grid--cols-2 {
		grid-template-columns: 1fr;
	}

	.a2z-products--carousel {
		--a2z-prod-cols: 1;
	}

	.a2z-product-card__body {
		padding: 14px 14px 16px;
	}

	.a2z-products__nav {
		width: 34px;
		height: 34px;
		font-size: 22px;
	}
}
