/* iPromo Product Snippets - front-end + shared preview styles */

.ips-snippet {
	margin: 1.75em 0;
}

.ips-snippet__grid {
	display: grid;
	gap: 20px;
}

/* Multiple products: responsive grid. */
.ips-snippet--multi .ips-snippet__grid {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Single product: horizontal card on wider screens. */
.ips-snippet--single .ips-snippet__grid {
	grid-template-columns: minmax(0, 1fr);
}

.ips-snippet--single .ips-card {
	display: grid;
	grid-template-columns: 200px 1fr;
	align-items: center;
	gap: 24px;
}

.ips-snippet--single .ips-card__media {
	align-self: stretch;
}

/* Stacked layout override: always one column. */
.ips-snippet--stack .ips-snippet__grid {
	grid-template-columns: minmax(0, 1fr);
}

.ips-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ips-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ips-card__media {
	display: block;
	position: relative;
	background: #f6f7f9;
	line-height: 0;
}

.ips-card__img {
	width: 100%;
	height: 100%;
	max-height: 260px;
	object-fit: contain;
	aspect-ratio: 1 / 1;
	padding: 12px;
	box-sizing: border-box;
}

/* Hover image swap (matches the live category card behavior). */
.ips-card__img--primary.has-hover {
	transition: opacity 0.3s ease-in-out;
}

.ips-card__img--hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	pointer-events: none;
}

.ips-card:hover .ips-card__img--primary.has-hover {
	opacity: 0;
}

.ips-card:hover .ips-card__img--hover {
	opacity: 1;
}

.ips-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	flex: 1 1 auto;
}

.ips-snippet .ips-card__name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: #14263b;
	text-decoration: none;
}

.ips-snippet .ips-card__name:hover {
	color: #00abbd;
}

.ips-snippet .ips-card__price {
	font-size: 18px;
	font-weight: 700;
	color: #14263b;
	margin-top: auto;
}

/* CTA: scope with .ips-snippet and use !important so theme link colors
   (which can render the label invisible) never override the button text. */
.ips-snippet .ips-card__cta,
.ips-snippet .ips-card__cta:link,
.ips-snippet .ips-card__cta:visited {
	display: inline-block;
	text-align: center;
	background: #00abbd !important;
	color: #ffffff !important;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none !important;
	padding: 11px 18px;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.ips-snippet .ips-card__cta:hover,
.ips-snippet .ips-card__cta:focus,
.ips-snippet .ips-card__cta:active {
	background: #1babbc !important;
	color: #ffffff !important;
	text-decoration: none !important;
}

.ips-snippet--empty {
	border: 1px dashed #c9ced6;
	border-radius: 8px;
	padding: 20px;
	color: #6b7280;
	text-align: center;
	font-size: 14px;
}

/* Carousel (multiple products) */
.ips-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ips-carousel__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.ips-carousel__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	/* Use proximity (not mandatory) so JS-driven scrollBy is not canceled
	   by the snap engine in some browsers, which made the arrows look dead. */
	scroll-snap-type: x proximity;
	padding: 4px 2px 12px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.ips-carousel__track > .ips-card {
	flex: 0 0 240px;
	max-width: 240px;
	scroll-snap-align: start;
}

.ips-carousel__nav {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid #d1d5db;
	background: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Hide the fallback glyph; the chevron is drawn with borders below. */
	font-size: 0;
	color: transparent;
	box-shadow: 0 3px 12px rgba(4, 30, 66, 0.18);
	transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
	z-index: 2;
}

/* Crisp chevron drawn with borders so it renders on every font/browser. */
.ips-carousel__nav::before {
	content: "";
	display: block;
	width: 11px;
	height: 11px;
	border-right: 2.5px solid #041e42;
	border-bottom: 2.5px solid #041e42;
}

.ips-carousel__nav--prev::before {
	transform: rotate(135deg);
	margin-left: 4px;
}

.ips-carousel__nav--next::before {
	transform: rotate(-45deg);
	margin-right: 4px;
}

.ips-carousel__nav:hover:not(:disabled) {
	background: #00abbd;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.ips-carousel__nav:hover:not(:disabled)::before {
	border-color: #ffffff;
}

.ips-carousel__nav:active:not(:disabled) {
	transform: scale(0.94);
}

.ips-carousel__nav:disabled {
	opacity: 0.45;
	cursor: default;
}

@media (max-width: 600px) {
	.ips-snippet--single .ips-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.ips-snippet__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ips-snippet--grid .ips-snippet__grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.ips-carousel__track > .ips-card {
		flex-basis: 70%;
		max-width: 70%;
	}

	.ips-carousel__nav {
		width: 34px;
		height: 34px;
		font-size: 20px;
	}
}
