/* Categories Section Styles */

.category-wrap {
	max-width: 1540px;
	margin: 0 auto;
	padding: 0 clamp(22px, 4vw, 64px);
}

/* Intro Section */
.category-intro {
	max-width: 900px;
	margin: 0 auto clamp(46px, 5vw, 72px);
	text-align: center;
}

.category-intro .label {
	color: #8A655A;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.17em;
	text-transform: uppercase;
}

.category-intro h2 {
	margin-top: 17px;
	font-size: clamp(42px, 5.2vw, 78px);
	font-weight: 300;
	letter-spacing: -0.055em;
	line-height: 1.03;
	font-family: var(--serif);
}

/* Grid Layout - Desktop */
.category-grid {
	display: flex;
	gap: 12px;
	height: clamp(520px, 64vh, 650px);
}

.category-grid > * {
	min-width: 0;
	flex: 1 1 0;
}

.category-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
}

.category-col > .category-card {
	flex: 1 1 0;
	min-height: 0;
}

/* Card Base Styles */
.category-card {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	background: var(--paper);
	text-decoration: none;
	isolation: isolate;
	display: block;
}

/* Images */
.category-card > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.5s var(--ease), transform 0.9s var(--ease);
}

.category-card .product-reveal {
	opacity: 0;
	transform: scale(1.01);
}

.category-card:hover > img:first-of-type {
	transform: scale(1.035);
}

.category-card:hover .product-reveal {
	opacity: 1;
	transform: scale(1.07);
}

/* Gradient Overlay */
.category-card::after {
	content: '';
	position: absolute;
	z-index: 1;
	inset: 42% 0 0;
	background: linear-gradient(transparent, rgba(12, 10, 9, 0.68));
	pointer-events: none;
}

.category-card.light-label::after {
	background: linear-gradient(transparent, rgba(250, 246, 240, 0.9));
}

/* Text Label */
.cat-label {
	position: absolute;
	z-index: 2;
	left: 24px;
	right: 22px;
	bottom: 22px;
	color: #fff;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
}

.light-label .cat-label {
	color: var(--ink);
}

.cat-label small {
	display: block;
	margin-bottom: 8px;
	font-size: 7px;
	font-weight: 600;
	letter-spacing: 0.17em;
	text-transform: uppercase;
	color: inherit;
}

.light-label .cat-label small {
	color: #796F69;
}

.cat-label h2 {
	font: 300 clamp(27px, 2.25vw, 40px) / 1.02 var(--serif);
	letter-spacing: -0.035em;
	margin: 0;
}

.cat-description {
	margin: 8px 0 0;
	font-size: clamp(13px, 1.1vw, 16px);
	line-height: 1.4;
	color: inherit;
}

.category-col .cat-label h2 {
	font-size: clamp(23px, 1.75vw, 32px);
}

/* Arrow Button */
.cat-arrow {
	width: 38px;
	height: 38px;
	border: 1px solid currentColor;
	border-radius: 100%;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	font-size: 15px;
	transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
	background: transparent;
	color: inherit;
}

.cat-arrow i {
	font-size: 17px;
}

.category-card:hover .cat-arrow {
	transform: translateX(4px);
	background: #fff;
	color: var(--ink);
}

/* Desktop Hover Grow Effect (1101px+) */
@media (hover: hover) and (min-width: 1101px) {
	.category-grid > * {
		transition: flex-grow 0.58s cubic-bezier(0.33, 0, 0.2, 1);
	}

	.category-grid > *:hover,
	.category-grid > *:focus-within {
		flex-grow: 1.18;
	}

	.category-col > .category-card {
		transition: flex-grow 0.58s cubic-bezier(0.33, 0, 0.2, 1);
	}

	.category-col > .category-card:hover,
	.category-col > .category-card:focus-visible {
		flex-grow: 1.28;
	}
}

/* Tablet — max-width 940px */
@media (max-width: 940px) {
	.categories-section {
		padding-top: 64px;
	}

	.category-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		height: auto;
		gap: 12px;
	}

	.category-grid > * {
		flex: none;
	}

	.category-col {
		display: contents;
	}

	.category-card {
		min-height: 520px;
	}

	.category-col .category-card {
		min-height: 300px;
	}
}

/* Mobile — max-width 560px */
@media (max-width: 560px) {
	.category-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		height: auto;
	}

	.category-card,
	.category-col .category-card {
		min-height: 280px;
	}

	.cat-label {
		left: 12px;
		right: 10px;
		bottom: 12px;
		gap: 8px;
	}

	.cat-label small {
		font-size: 9px;
		margin-bottom: 5px;
		letter-spacing: 0.12em;
	}

	.cat-label h2,
	.category-col .cat-label h2 {
		font-size: clamp(16px, 4.8vw, 20px);
	}

	.cat-arrow {
		width: 32px;
		height: 32px;
		border-width: 1px;
	}

	.cat-arrow i {
		font-size: 14px;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.category-card > img,
	.category-grid > *,
	.category-col > .category-card,
	.cat-arrow {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
