/*--------------------------------------------------------------
# Running Stitches Category Page Tools
# Layout only - typography controlled by Divi module settings where possible
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Category Intro
--------------------------------------------------------------*/

.rs-category-intro {
	width: 100%;
	margin: 0 0 32px;
}

.rs-category-intro p:last-child {
	margin-bottom: 0;
}

/*--------------------------------------------------------------
# Child Category Grid
--------------------------------------------------------------*/

.rs-child-category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	width: 100%;
	max-width: none;
	margin: 0 0 42px;
}

.rs-child-category-card {
	position: relative;
	display: block;
	min-height: 360px;
	overflow: hidden;
	text-decoration: none;
	background: #2f4f4f;
	color: #ffffff;
}

.rs-child-category-card-bg {
	position: absolute;
	inset: 0;
	display: block;
	background-size: cover;
	background-position: center;
	transition: transform 0.4s ease;
}

.rs-child-category-card-overlay {
	position: absolute;
	inset: 0;
	display: block;
	background: linear-gradient(
		to top,
		rgba(47, 79, 79, 0.78) 0%,
		rgba(47, 79, 79, 0.50) 24%,
		rgba(47, 79, 79, 0.16) 48%,
		rgba(47, 79, 79, 0.00) 68%
	);
	transition: background 0.3s ease;
}

.rs-child-category-card-content {
	position: relative;
	z-index: 2;
	display: flex;
	height: 100%;
	min-height: 360px;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	text-align: center;
	padding: 26px 20px 24px;
	box-sizing: border-box;
}

.rs-child-category-card-title {
	display: block;
	margin: 0;
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.rs-child-category-card-button {
	display: inline-block;
	margin-top: 16px;
	padding: 10px 22px;
	background: #e9967a;
	border: 2px solid #ffffff;
	color: #ffffff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
}

.rs-child-category-card:hover .rs-child-category-card-bg {
	transform: scale(1.05);
}

.rs-child-category-card:hover .rs-child-category-card-overlay {
	background: linear-gradient(
		to top,
		rgba(47, 79, 79, 0.84) 0%,
		rgba(47, 79, 79, 0.58) 26%,
		rgba(47, 79, 79, 0.20) 50%,
		rgba(47, 79, 79, 0.00) 70%
	);
}

/*--------------------------------------------------------------
# Preview Wrapper
--------------------------------------------------------------*/

.rs-category-page-preview {
	width: 100%;
}

.rs-category-page-preview-title {
	margin-bottom: 24px;
}

/*--------------------------------------------------------------
# WooCommerce Products Inside Preview
--------------------------------------------------------------*/

.rs-category-page-preview ul.products {
	margin-top: 30px;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/

@media (max-width: 980px) {
	.rs-child-category-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rs-child-category-card,
	.rs-child-category-card-content {
		min-height: 330px;
	}
}

@media (max-width: 767px) {
	.rs-child-category-grid {
		grid-template-columns: 1fr;
	}

	.rs-child-category-card,
	.rs-child-category-card-content {
		min-height: 300px;
	}
}

/*--------------------------------------------------------------
# Subcategory Text
--------------------------------------------------------------*/

.rs-subcategory-text {
	width: 100%;
	margin: 36px 0 0;
}

.rs-subcategory-text p:last-child {
	margin-bottom: 0;
}