/*
 * Shared listing shape — vitrine or grid.
 * Cards are children of .fs-listing__items; this file does not name a card.
 *
 * min-width/width keep the listing inside an FS Column: without them the
 * vitrine’s card row becomes the min-content width, 100cqw explodes and
 * 1:1 product photos stretch the column.
 */

.fs-listing {
	min-width: 0;
	width: 100%;
	max-width: 100%;
}

.fs-listing.fs-flex {
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
}

.fs-listing--layout-grid .fs-listing__items {
	display: grid;
	grid-template-columns: repeat(var(--fs-listing-columns-int, 1), minmax(0, 1fr));
	gap: var(--fs-space-16, 16px);
	align-items: start;
	min-width: 0;
	width: calc(100% + var(--fs-listing-bleed-right, 0px));
	max-width: none;
	margin-right: calc(-1 * var(--fs-listing-bleed-right, 0px));
}

.fs-listing--layout-grid .fs-listing__items > * {
	min-width: 0;
}

.fs-listing--empty .fs-listing__items {
	opacity: 0.5;
}

.fs-listing__stage {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	min-width: 0;
	width: calc(100% + var(--fs-listing-bleed-right, 0px));
	max-width: none;
	margin-right: calc(-1 * var(--fs-listing-bleed-right, 0px));
}

.fs-listing--arrows-align-top .fs-listing__stage {
	align-items: flex-start;
}

.fs-listing--arrows-align-bottom .fs-listing__stage {
	align-items: flex-end;
}

.fs-listing__viewport {
	overflow: hidden;
	min-width: 0;
	min-height: 0;
	width: 100%;
	flex: 1 1 0;
	container-type: inline-size;
	container-name: fs-listing;
	touch-action: pan-y;
}

.fs-listing--layout-vitrine .fs-listing__items {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: var(--fs-space-16, 16px);
	align-items: flex-start;
	min-width: 0;
	transition: transform 0.35s ease;
}

.fs-listing--layout-vitrine .fs-listing__items > * {
	flex: 0 0 calc((100cqw - var(--fs-listing-column-gaps, 0) * var(--fs-space-16, 16px)) / var(--fs-listing-columns, 1));
	min-width: 0;
	max-width: calc((100cqw - var(--fs-listing-column-gaps, 0) * var(--fs-space-16, 16px)) / var(--fs-listing-columns, 1));
}

.fs-listing__arrow {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	z-index: 1;
}

.fs-listing.is-slider .fs-listing__arrow {
	display: var(--fs-listing-arrows, none);
}

.fs-listing.is-dragging .fs-listing__items {
	transition: none;
}

.fs-listing__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.fs-listing__arrow-icon {
	display: block;
	width: auto;
	height: auto;
	max-width: var(--fs-listing-arrow-icon-max, none);
}

.fs-listing__arrow-fallback {
	display: block;
	width: 0.55em;
	height: 0.55em;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.fs-listing__arrow--next .fs-listing__arrow-fallback {
	transform: rotate(-135deg);
}

.fs-listing--arrows-inside .fs-listing__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.fs-listing--arrows-inside.fs-listing--arrows-align-top .fs-listing__arrow {
	top: 0;
	transform: none;
}

.fs-listing--arrows-inside.fs-listing--arrows-align-bottom .fs-listing__arrow {
	top: auto;
	bottom: 0;
	transform: none;
}

.fs-listing--arrows-inside .fs-listing__arrow--prev {
	left: var(--fs-listing-arrow-offset, var(--fs-space-8, 8px));
}

.fs-listing--arrows-inside .fs-listing__arrow--next {
	right: var(--fs-listing-arrow-offset, var(--fs-space-8, 8px));
}

.fs-listing--arrows-outside .fs-listing__arrow--prev {
	margin-right: var(--fs-listing-arrow-offset, var(--fs-space-8, 8px));
}

.fs-listing--arrows-outside .fs-listing__arrow--next {
	margin-left: var(--fs-listing-arrow-offset, var(--fs-space-8, 8px));
}

.fs-listing__dots {
	display: none;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--fs-space-8, 8px);
	margin-top: var(--fs-listing-dots-offset, var(--fs-space-16, 16px));
}

.fs-listing.is-slider .fs-listing__dots {
	display: flex;
}

.fs-listing__dot {
	display: block;
	width: var(--fs-listing-dot-size, var(--fs-space-8, 8px));
	height: var(--fs-listing-dot-size, var(--fs-space-8, 8px));
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fs-listing-dot-color, currentColor);
	opacity: 0.35;
	cursor: pointer;
}

.fs-listing__dot.is-active {
	opacity: 1;
	background: var(--fs-listing-dot-color-active, var(--fs-listing-dot-color, currentColor));
}
