/* ==========================================================================
   DNB Shop Products Carousel — Frontend Styles
   Matches DNB Proper design system and Figma specifications
   ========================================================================== */

/* ==========================================================================
   Carousel Container
   ========================================================================== */

.dnb-shop-carousel {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 0 60px;
	box-sizing: border-box;
}

/* ==========================================================================
   Carousel Track — Horizontal Scrolling Container
   ========================================================================== */

.dnb-shop-carousel__track {
	display: flex;
	gap: 20px;
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

/* ==========================================================================
   Product Item Card
   ========================================================================== */

.dnb-shop-product {
	flex: 0 0 auto;
	width: calc(25% - 15px);
	min-width: 250px;
	background-color: #222222;
	border: 1px solid #333333;
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dnb-shop-product:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* Product Link Wrapper */
.dnb-shop-product__link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

/* Product Image */
.dnb-shop-product__image {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	background-color: #1a1a1a;
	transition: transform 0.3s ease;
}

.dnb-shop-product:hover .dnb-shop-product__image {
	transform: scale(1.05);
}

/* Product Title */
.dnb-shop-product__title {
	font-family: 'Roboto Condensed', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: -0.8px;
	color: #ffffff;
	margin: 0;
	padding: 16px;
	text-align: center;
	background-color: #222222;
	transition: color 0.2s ease;
}

.dnb-shop-product:hover .dnb-shop-product__title {
	color: #feff02;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.dnb-shop-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	z-index: 10;
	transition: opacity 0.2s ease;
	line-height: 0;
	width: 45px;
	height: 48px;
}

.dnb-shop-carousel__arrow:hover {
	opacity: 0.85;
}

.dnb-shop-carousel__arrow:focus {
	outline: 2px solid #feff02;
	outline-offset: 2px;
}

.dnb-shop-carousel__arrow--prev {
	left: 0;
}

.dnb-shop-carousel__arrow--next {
	right: 0;
}

/* Disabled Arrow State */
.dnb-shop-carousel__arrow--disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.dnb-shop-carousel__arrow svg {
	display: block;
	width: 45px;
	height: 48px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Large Desktop: 4 items per view */
@media (min-width: 1200px) {
	.dnb-shop-product {
		width: calc(25% - 15px);
	}
}

/* Desktop: 3 items per view */
@media (min-width: 900px) and (max-width: 1199px) {
	.dnb-shop-product {
		width: calc(33.333% - 14px);
	}
}

/* Tablet: 2 items per view */
@media (min-width: 601px) and (max-width: 899px) {
	.dnb-shop-carousel {
		padding: 0 50px;
	}

	.dnb-shop-product {
		width: calc(50% - 10px);
		min-width: 200px;
	}

	.dnb-shop-carousel__track {
		gap: 16px;
	}

	.dnb-shop-carousel__arrow {
		width: 40px;
		height: 44px;
	}

	.dnb-shop-carousel__arrow svg {
		width: 40px;
		height: 44px;
	}
}

/* Mobile: 1 item per view */
@media (max-width: 600px) {
	.dnb-shop-carousel {
		padding: 0 40px;
	}

	.dnb-shop-product {
		width: 100%;
		min-width: 0;
		max-width: 320px;
	}

	.dnb-shop-carousel__track {
		gap: 12px;
	}

	.dnb-shop-product__title {
		font-size: 14px;
		padding: 12px;
	}

	.dnb-shop-carousel__arrow {
		width: 36px;
		height: 40px;
	}

	.dnb-shop-carousel__arrow svg {
		width: 36px;
		height: 40px;
	}
}

/* Extra Small Mobile */
@media (max-width: 400px) {
	.dnb-shop-carousel {
		padding: 0 32px;
	}

	.dnb-shop-carousel__arrow {
		width: 32px;
		height: 36px;
	}

	.dnb-shop-carousel__arrow svg {
		width: 32px;
		height: 36px;
	}
}

/* ==========================================================================
   CSS Transitions for Smooth Animations
   ========================================================================== */

/* Smooth transform transition on track */
.dnb-shop-carousel__track {
	transition-property: transform;
	transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Prevent transition during initialization */
.dnb-shop-carousel__track.no-transition {
	transition: none;
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus visible for keyboard navigation */
.dnb-shop-product__link:focus {
	outline: 2px solid #feff02;
	outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.dnb-shop-carousel__track {
		transition-duration: 0.1s;
	}

	.dnb-shop-product,
	.dnb-shop-product__image,
	.dnb-shop-product__title {
		transition: none;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.dnb-shop-product {
		border-width: 2px;
	}

	.dnb-shop-carousel__arrow:focus {
		outline-width: 3px;
	}
}
