/* ==========================================================================
   Galleria De Rings: Top Jewellery Trends (home page, below the Category
   spotlight)
   Simple and quiet, on the site's warm off-white: a centred serif heading,
   then three compact square photos (softly rounded, as elsewhere on the
   site) with a centred serif name under each.
   Hover (pointer devices): the card lifts a little, the photo's shadow
   grows, a white "Shop now →" pill rises in at the bottom of the photo and
   a hairline grows under the name from the centre. Photos never zoom.
   Phones: the photos scroll sideways (the next one peeks in).
   ========================================================================== */

.trends {
	--tr-radius: 14px;

	padding: clamp(28px, 3.5vw, 56px) clamp(16px, 4vw, 64px) clamp(52px, 6vw, 88px);
	background: var(--g-cream, #f7f5f1);
}

.trends__inner {
	max-width: 1040px; /* keeps the three cards compact */
	margin: 0 auto;
}

.trends__title {
	margin: 0 0 clamp(26px, 3vw, 44px);
	color: var(--g-navy);
	font-family: var(--g-font-heading);
	font-size: clamp(28px, 3.2vw, 42px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-align: center;
}

.trends__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.6vw, 36px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.trends__card {
	min-width: 0;
}

.trends__link {
	--tr-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(16px, 1.8vw, 24px);
	color: var(--g-navy);
	text-decoration: none;
	transition: transform 0.45s var(--tr-ease);
}

.trends__media {
	--reveal-radius: var(--tr-radius); /* keeps the corners round during reveals */

	display: block;
	width: 100%;
	overflow: hidden;
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: var(--tr-radius);
	background: #efebe3;
	box-shadow: 0 10px 24px -20px rgba(11, 19, 42, 0.3);
	transition: box-shadow 0.45s var(--tr-ease);
}

/* "Shop now" pill: waits just below its spot, invisible */
.trends__cta {
	position: absolute;
	bottom: clamp(14px, 1.4vw, 20px);
	left: 50%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 10px 24px -14px rgba(11, 19, 42, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity 0.35s ease, transform 0.45s var(--tr-ease);
	pointer-events: none;
}

.trends__cta-arrow {
	transition: transform 0.35s var(--tr-ease);
}

.trends__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Name, with a hairline that grows from the centre on hover */
.trends__caption {
	position: relative;
	padding-bottom: 4px;
	font-family: var(--g-font-heading);
	font-size: clamp(19px, 1.7vw, 23px);
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
}

.trends__caption::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: currentColor;
	content: "";
	transform: scaleX(0);
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Hover effects only where there is a pointer, so taps don't leave them stuck. */
@media (hover: hover) {
	.trends__link:hover {
		transform: translateY(-6px);
	}

	.trends__link:hover .trends__media {
		box-shadow: 0 30px 50px -28px rgba(11, 19, 42, 0.45);
	}

	.trends__link:hover .trends__cta {
		opacity: 1;
		transform: translate(-50%, 0);
	}

	.trends__link:hover .trends__cta-arrow {
		transform: translateX(3px);
	}

	.trends__link:hover .trends__caption::after {
		transform: scaleX(1);
	}
}

/* Keyboard focus shows the same cues (no lift). */
.trends__link:focus-visible .trends__cta {
	opacity: 1;
	transform: translate(-50%, 0);
}

.trends__link:focus-visible .trends__caption::after {
	transform: scaleX(1);
}

.trends__link:focus-visible {
	outline: none;
}

.trends__link:focus-visible .trends__media {
	outline: 2px solid var(--g-navy);
	outline-offset: 4px;
}

/* Phones: a sideways-scrolling row, the next photo peeking in */
@media (max-width: 767px) {
	.trends {
		padding: 28px 0 48px;
	}

	.trends__title {
		padding: 0 16px;
	}

	.trends__list {
		display: flex;
		gap: 14px;
		padding: 0 16px 6px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: 16px;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.trends__list::-webkit-scrollbar {
		display: none;
	}

	.trends__card {
		flex: 0 0 72%;
		scroll-snap-align: start;
	}

	.trends__caption {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trends__link,
	.trends__media,
	.trends__cta,
	.trends__cta-arrow,
	.trends__caption::after {
		transition: none;
	}

	.trends__link:hover {
		transform: none;
	}
}
