.books-poster-slider {
	width: 100%;
	height: var(--books-poster-height, 400px);
	overflow: hidden;
	background: transparent;
	touch-action: pan-y;
	user-select: none;
	cursor: grab;
	margin-bottom: 0px !important;
	margin-top: 0px !important;
	display: block;
	line-height: 0; /* Removes potential whitespace gaps */
}

/* Specific styling for Discount Bar (slim, no margin) */
.books-discount-bar {
	margin-top: 0px !important;
	margin-bottom: 0px !important;
	background-color: #f1f1f1; /* Fallback background */
	/* Force Full Width */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	position: relative;
	z-index: 10;
}

/* Specific styling for Main Banner */
.books-main-banner {
	margin-top: 0px !important;
	margin-bottom: 0px !important;
	/* Force Full Width */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	position: relative;
	z-index: 9;
	cursor: pointer;
}

.books-main-banner.is-dragging {
	cursor: grabbing;
}

@supports (aspect-ratio: 1 / 1) {
	.books-poster-slider {
		aspect-ratio: var(--books-poster-aspect, 1920 / 400);
		height: auto;
	}
}

.books-poster-slider.is-dragging {
	cursor: grabbing;
}

.books-poster-slider__track {
	display: flex;
	width: 100%;
	height: 100%;
	transform: translate3d(0%, 0, 0);
	transition: transform 520ms ease;
	will-change: transform;
}

.books-poster-slider__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
}

.books-poster-slider__slide img {
	width: 100%;
	height: 100%;
	object-fit: contain; /* Ensures the whole image is seen within the aspect ratio */
	display: block;
	pointer-events: none;
	-webkit-user-drag: none;
	user-select: none;
}
/* If banners need to fill the width absolutely, use cover, but contain is safer for text-heavy banners */
.books-main-banner .books-poster-slider__slide img {
	object-fit: cover; 
}
.books-discount-bar .books-poster-slider__slide img {
	object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
	.books-poster-slider__track {
		transition: none;
	}
}



/* Mobile optimization for main banner */
@media (max-width: 600px) {
    .books-main-banner {
        --books-poster-aspect: 16 / 9 !important;
        max-height: 200px !important;
    }
    
    .books-main-banner .books-poster-slider__slide img {
        object-fit: contain !important;
    }

    .books-discount-bar {
        max-height: none !important;
        height: auto !important;
    }
}

@media (max-width: 400px) {
    .books-main-banner {
        --books-poster-aspect: 4 / 3 !important;
        max-height: 180px !important;
    }
}
