/* Popular Collections Masonry — modern styling + animation
   Palette: Navy #0B2A55 / Dark Navy #071B38 / Gold #C9972B / Light Gold #E0B94F
            White #FFFFFF / Off White #F8F7F4 / Text #242A33 / Muted #6B7280 / Border #E5E7EB
   Fonts: Cormorant Garamond 600 (headings), Manrope 400 (body), Manrope 600 (nav/buttons/labels)
*/

.pcm-wrapper {
	position: relative;
	background:
		radial-gradient(ellipse 800px 400px at 15% 0%, rgba(201, 151, 43, 0.07), transparent 60%),
		radial-gradient(ellipse 700px 500px at 100% 100%, rgba(11, 42, 85, 0.05), transparent 60%),
		#F8F7F4;
	padding: 80px 24px;
	font-family: 'Manrope', sans-serif;
	overflow: hidden;
}

/* ---------- Entrance animation (runs automatically, no scroll needed) ---------- */
@keyframes pcmFadeUp {
	from { opacity: 0; transform: translateY(42px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pcmGrow {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

@keyframes pcmFadeIn {
	from { opacity: 0; letter-spacing: 0.35em; }
	to   { opacity: 1; letter-spacing: 0.18em; }
}

/* ---------- Heading block ---------- */
.pcm-heading-block {
	max-width: 1280px;
	margin: 0 auto 44px auto;
}

.pcm-kicker {
	display: inline-block;
	font-family: 'Manrope', sans-serif;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #C9972B;
	margin-bottom: 14px;
	animation: pcmFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pcm-heading {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 600;
	font-size: 48px;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: #0B2A55;
	margin: 0;
	animation: pcmFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.pcm-heading::after {
	content: '';
	display: block;
	width: 72px;
	height: 3px;
	margin-top: 22px;
	border-radius: 2px;
	background: linear-gradient(90deg, #C9972B, #E0B94F);
	transform-origin: left;
	animation: pcmGrow 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.pcm-heading em {
	font-style: normal;
	font-weight: 700;
	background: linear-gradient(90deg, #C9972B, #E0B94F 60%, #C9972B);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------- Grid ---------- */
.pcm-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 200px;
	grid-auto-flow: dense;
	gap: 20px;
	max-width: 1280px;
	margin: 0 auto;
	perspective: 1200px;
}

.pcm-tile--small { grid-column: span 1; grid-row: span 1; }
.pcm-tile--wide   { grid-column: span 2; grid-row: span 1; }
.pcm-tile--tall   { grid-column: span 1; grid-row: span 2; }
.pcm-tile--large  { grid-column: span 2; grid-row: span 2; }

/* ---------- Tile ---------- */
.pcm-tile {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 22px;
	background-color: #FFFFFF;
	text-decoration: none;
	isolation: isolate;
	will-change: transform;
	transform-style: preserve-3d;

	box-shadow: 0 1px 3px rgba(11, 42, 85, 0.08);
	transition: box-shadow 0.4s ease, transform 0.25s ease;

	animation: pcmFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
	animation-delay: var(--delay, 0s);
}

/* Gold gradient ring, revealed on hover */
.pcm-tile::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 3;
	padding: 2px;
	border-radius: 22px;
	background: linear-gradient(135deg, #E0B94F, #C9972B 40%, transparent 70%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.pcm-tile:hover,
.pcm-tile:focus-visible {
	box-shadow:
		0 32px 56px -18px rgba(11, 42, 85, 0.4),
		0 0 0 1px rgba(201, 151, 43, 0.2);
}

.pcm-tile:hover::before {
	opacity: 1;
}

.pcm-tile__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1.001);
	transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
	z-index: 0;
}

.pcm-tile:hover .pcm-tile__image {
	transform: scale(1.1);
	filter: saturate(1.1) brightness(1.02);
}

.pcm-tile__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, transparent 28%, rgba(7, 27, 56, 0.55) 62%, #071B38 100%);
	opacity: 0.92;
	transition: opacity 0.4s ease;
}

.pcm-tile:hover .pcm-tile__overlay {
	opacity: 0.8;
}

.pcm-tile__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 2;
	background: rgba(7, 27, 56, 0.55);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(224, 185, 79, 0.45);
	color: #FFFFFF;
	font-family: 'Manrope', sans-serif;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.04em;
	padding: 7px 14px;
	border-radius: 999px;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pcm-tile:hover .pcm-tile__badge {
	transform: translateY(-2px);
}

.pcm-tile__content {
	position: absolute;
	left: 22px;
	right: 22px;
	bottom: 20px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 9px;
	transform: translateY(10px);
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pcm-tile:hover .pcm-tile__content {
	transform: translateY(0);
}

.pcm-tile__title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 600;
	font-size: 27px;
	line-height: 1.2;
	color: #FFFFFF;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.pcm-tile--large .pcm-tile__title,
.pcm-tile--tall .pcm-tile__title {
	font-size: 36px;
}

.pcm-tile__button {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: 'Manrope', sans-serif;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.03em;
	color: #E0B94F;
	padding-bottom: 4px;
	opacity: 0.9;
}

.pcm-tile__button::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 28px;
	height: 1px;
	background: #E0B94F;
	transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.pcm-tile:hover .pcm-tile__button::after {
	width: 100%;
}

.pcm-tile:hover .pcm-tile__button {
	opacity: 1;
}

.pcm-tile__arrow {
	display: inline-block;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pcm-tile:hover .pcm-tile__arrow {
	transform: translateX(6px);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.pcm-kicker,
	.pcm-heading,
	.pcm-heading::after,
	.pcm-tile,
	.pcm-tile__image,
	.pcm-tile__overlay,
	.pcm-tile__content,
	.pcm-tile__badge,
	.pcm-tile__button::after,
	.pcm-tile__arrow {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
		letter-spacing: 0.18em !important;
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.pcm-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		grid-auto-rows: 180px;
		gap: 16px;
	}
	.pcm-tile--large { grid-column: span 2; grid-row: span 2; }
	.pcm-tile--wide   { grid-column: span 2; grid-row: span 1; }
	.pcm-tile--tall   { grid-column: span 1; grid-row: span 2; }
	.pcm-heading { font-size: 36px; }
}

@media (max-width: 560px) {
	.pcm-grid {
		grid-template-columns: 1fr !important;
		grid-auto-rows: 240px;
		gap: 14px;
	}
	.pcm-tile--small,
	.pcm-tile--wide,
	.pcm-tile--tall,
	.pcm-tile--large {
		grid-column: span 1;
		grid-row: span 1;
	}
	.pcm-heading { font-size: 28px; text-align: left; }
	.pcm-wrapper { padding: 56px 16px; }
}
