/* DB Designer Spotlight v1.2.0
 * Overlay text over the worst case (a white photo):
 *   Black overlay: name 6.2:1, label 6.2:1   Red overlay (--brand-red 88%): name and label 4.7:1
 * v1.2.0: name uses the accent font (Merriweather) in its text style, italic Regular;
 * sizes use tokens. The arrows keep Georgia for the arrow glyphs only.
 */

.db-designer-spotlight {
	width: 100%;
	overflow: hidden;
}

/* Track wrapper holds track + arrow buttons */
.db-designer-spotlight__track-wrapper {
	position: relative;
	overflow: hidden;
	width: 100%;
}

/* Scrollable track (ul) */
.db-designer-spotlight .db-designer-spotlight__track {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.4s ease;
	will-change: transform;
	cursor: grab;
	user-select: none;
}

.db-designer-spotlight__track:active {
	cursor: grabbing;
}

/* Each item: fixed width per viewport */
.db-designer-spotlight .db-designer-spotlight__item {
	flex: 0 0 33.3333%;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 767px) {
	.db-designer-spotlight .db-designer-spotlight__item {
		flex: 0 0 100%;
	}
}

.db-designer-spotlight__tile {
	position: relative;
	overflow: hidden;
	display: block;
	text-decoration: none;
}

/* Aspect ratio: portrait editorial feel, ~4:5 */
.db-designer-spotlight__tile::after {
	content: '';
	display: block;
	padding-top: 125%;
}

.db-designer-spotlight__image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.4s ease;
	-webkit-user-drag: none;
}

.db-designer-spotlight__tile:hover .db-designer-spotlight__image {
	transform: scale(1.04);
}

/* Focus: white ring with a dark inner edge so it shows on any photo */
.db-designer-spotlight .db-designer-spotlight__tile:focus { outline: none; }
.db-designer-spotlight .db-designer-spotlight__tile:focus-visible {
	outline: 3px solid var(--color-white, #ffffff);
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px var(--color-black, #000000);
}

/* Overlay - bottom-left. At least 72% wide and grows to fit a long name.
 * The soft fade always sits in the empty space after the text, so text never fades. */
.db-designer-spotlight__overlay {
	--db-ds-fade: 100px;
	position: absolute;
	bottom: 20px;
	left: 0;
	z-index: 1;
	box-sizing: border-box;
	width: max-content;
	min-width: 72%;
	max-width: 100%;
	padding: 14px var(--db-ds-fade) 14px 20px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--db-ds-fade)), transparent 100%);
	mask-image: linear-gradient(to right, #000 calc(100% - var(--db-ds-fade)), transparent 100%);
}

/* Left accent bar - 3px vertical line */
.db-designer-spotlight__overlay::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 3px;
}

/* Black overlay variant */
.db-designer-spotlight__tile--black .db-designer-spotlight__overlay {
	background: rgba(0, 0, 0, 0.62);
}
.db-designer-spotlight__tile--black .db-designer-spotlight__overlay::before {
	background: rgba(255, 255, 255, 0.5);
}

/* Red overlay variant (site red token at 88%) */
.db-designer-spotlight__tile--red .db-designer-spotlight__overlay {
	background: rgba(195, 43, 42, 0.88);
	background: color-mix(in srgb, var(--brand-red, #c32b2a) 88%, transparent);
}
.db-designer-spotlight__tile--red .db-designer-spotlight__overlay::before {
	background: rgba(255, 255, 255, 0.6);
}

/* Label - small caps */
.db-designer-spotlight__label {
	font-family: var(--font-primary, 'Lato', sans-serif);
	font-size: var(--font-size-xs, 12px);
	font-weight: var(--font-weight-black, 900);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-white, #ffffff);
	line-height: 1.1;
}

/* Name - accent font, text style (italic Regular). The weight token steps up
 * in the bolder text mode. The 85% size match is built into the font file. */
.db-designer-spotlight__name {
	font-family: var(--font-accent, Georgia, serif);
	font-size: var(--font-size-3xl, 30px);
	font-weight: var(--font-accent-weight-text, 400);
	font-style: var(--font-accent-style-text, italic);
	color: var(--color-white, #ffffff);
	line-height: 1.1;
}

@media (max-width: 900px) {
	.db-designer-spotlight__name {
		font-size: var(--font-size-2xl, 25px);
	}
}

/* Navigation arrows - dark halo keeps the white arrow visible on any photo */
.db-designer-spotlight .db-designer-spotlight__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 12px;
	background: none;
	border: none;
	color: var(--color-white, #ffffff);
	font-family: Georgia, serif; /* arrow glyphs only */
	font-size: 60px;
	line-height: 1;
	text-shadow: 0 0 2px #000, 0 0 4px #000, 0 0 10px rgba(0, 0, 0, 0.8);
	cursor: pointer;
	opacity: 0.9;
	transition: opacity 0.2s;
}

.db-designer-spotlight .db-designer-spotlight__arrow:hover {
	opacity: 1;
}

.db-designer-spotlight .db-designer-spotlight__arrow:focus { outline: none; }
.db-designer-spotlight .db-designer-spotlight__arrow:focus-visible {
	opacity: 1;
	outline: 3px solid var(--color-white, #ffffff);
	outline-offset: -3px;
	box-shadow: inset 0 0 0 6px var(--color-black, #000000);
}

.db-designer-spotlight__arrow--prev {
	left: 4px;
}

.db-designer-spotlight__arrow--next {
	right: 4px;
}

/* Hide arrows when not needed */
.db-designer-spotlight__arrow[hidden] {
	display: none;
}

/* Reduced motion: no slide or zoom animation */
@media (prefers-reduced-motion: reduce) {
	.db-designer-spotlight .db-designer-spotlight__track,
	.db-designer-spotlight__image {
		transition: none;
	}
	.db-designer-spotlight__tile:hover .db-designer-spotlight__image {
		transform: none;
	}
}
