/**
 * Product Category Page Custom Styles
 * Mimics JingSourcing product category page layout
 *
 * @package Astra
 * @version 1.0.0
 */

/* ==================== Variables & Reset ==================== */
:root {
	--rhw-primary: #2563eb;
	--rhw-primary-dark: #1d4ed8;
	--rhw-primary-light: #dbeafe;
	--rhw-accent: #f59e0b;
	--rhw-dark: #0f172a;
	--rhw-text: #334155;
	--rhw-text-light: #64748b;
	--rhw-bg-light: #f8fafc;
	--rhw-bg-gray: #f1f5f9;
	--rhw-border: #e2e8f0;
	--rhw-white: #ffffff;
	--rhw-radius: 12px;
	--rhw-radius-sm: 8px;
	--rhw-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	--rhw-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
	--rhw-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--rhw-max-width: 1200px;
}

.rhw-container {
	max-width: var(--rhw-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.rhw-section-title {
	font-size: 2rem;
	font-weight: 700;
	color: var(--rhw-dark);
	margin: 0 0 12px;
	line-height: 1.3;
}

.rhw-section-title span {
	color: var(--rhw-primary);
}

.rhw-section-subtitle {
	font-size: 1.05rem;
	color: var(--rhw-text-light);
	margin: 0 0 40px;
	line-height: 1.6;
}

.rhw-section-header {
	margin-bottom: 48px;
}

.rhw-section-header--center {
	text-align: center;
}

.rhw-section-header--center .rhw-section-title {
	margin-bottom: 12px;
}

.rhw-section-header--center .rhw-section-subtitle {
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* ==================== Hero Banner ==================== */
.rhw-cat-hero {
	position: relative;
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-size: cover;
	background-position: center;
	background-color: var(--rhw-dark);
	background-repeat: no-repeat;
	overflow: hidden;
}

.rhw-cat-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(37, 99, 235, 0.7) 100%);
}

.rhw-cat-hero__content {
	position: relative;
	z-index: 2;
	max-width: 800px;
	padding: 60px 20px;
}

.rhw-cat-hero__title {
	font-size: 2.8rem;
	font-weight: 800;
	color: #fff;
	margin: 0 0 20px;
	line-height: 1.2;
	letter-spacing: -0.5px;
}

.rhw-cat-hero__desc {
	font-size: 1.2rem;
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.7;
	margin: 0 0 32px;
}

.rhw-cat-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 36px;
	background: #fff;
	color: var(--rhw-primary);
	font-size: 1.05rem;
	font-weight: 700;
	border-radius: 50px;
	text-decoration: none;
	transition: var(--rhw-transition);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.rhw-cat-hero__btn:hover {
	background: var(--rhw-accent);
	color: #fff;
	transform: translateY(-3px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.rhw-cat-hero__btn svg {
	transition: transform 0.3s ease;
}

.rhw-cat-hero__btn:hover svg {
	transform: translateX(4px);
}

/* ==================== Intro Section ==================== */
.rhw-cat-intro {
	padding: 80px 0;
	background: var(--rhw-white);
}

.rhw-cat-intro__inner {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 60px;
	align-items: center;
}

.rhw-cat-intro__text .rhw-section-title {
	margin-bottom: 20px;
}

.rhw-cat-intro__desc {
	font-size: 1.05rem;
	color: var(--rhw-text);
	line-height: 1.8;
	margin: 0 0 28px;
}

.rhw-cat-intro__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.rhw-cat-intro__list li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--rhw-dark);
}

.rhw-cat-intro__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--rhw-primary-light);
	color: var(--rhw-primary);
	border-radius: 50%;
	flex-shrink: 0;
}

.rhw-cat-intro__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.rhw-cat-stat {
	text-align: center;
	padding: 32px 16px;
	background: var(--rhw-bg-light);
	border-radius: var(--rhw-radius);
	border: 1px solid var(--rhw-border);
	transition: var(--rhw-transition);
}

.rhw-cat-stat:hover {
	background: var(--rhw-white);
	box-shadow: var(--rhw-shadow);
	transform: translateY(-4px);
}

.rhw-cat-stat__num {
	display: block;
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--rhw-primary);
	line-height: 1;
	margin-bottom: 8px;
}

.rhw-cat-stat__label {
	display: block;
	font-size: 0.85rem;
	color: var(--rhw-text-light);
	font-weight: 500;
}

/* ==================== Products Section ==================== */
.rhw-cat-products {
	padding: 80px 0;
	background: var(--rhw-bg-light);
}

.rhw-cat-products .rhw-section-header {
	text-align: center;
}

.rhw-cat-products .rhw-section-title {
	margin-bottom: 12px;
}

.rhw-cat-products .rhw-section-subtitle {
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 40px;
}

/* WooCommerce product grid overrides */
.rhw-cat-products ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rhw-cat-products ul.products li.product {
	margin: 0 !important;
	width: auto !important;
	background: var(--rhw-white);
	border-radius: var(--rhw-radius);
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
	transition: var(--rhw-transition);
	display: flex;
	flex-direction: column;
}

.rhw-cat-products ul.products li.product:hover {
	box-shadow: var(--rhw-shadow-hover);
	transform: translateY(-6px);
}

.rhw-cat-products ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 600;
	padding: 12px 16px 4px;
	margin: 0;
	color: var(--rhw-dark);
}

.rhw-cat-products ul.products li.product .price {
	padding: 0 16px 16px;
	color: var(--rhw-primary);
	font-weight: 700;
}

.rhw-cat-products ul.products li.product img {
	margin-bottom: 0;
}

.rhw-cat-products ul.products li.product .button {
	margin: 0 16px 16px;
	width: calc(100% - 32px);
	text-align: center;
}

/* ==================== Features Section ==================== */
.rhw-cat-features {
	padding: 80px 0;
	background: var(--rhw-white);
}

.rhw-features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.rhw-feature-card {
	padding: 40px 32px;
	background: var(--rhw-bg-light);
	border-radius: var(--rhw-radius);
	border: 1px solid var(--rhw-border);
	transition: var(--rhw-transition);
}

.rhw-feature-card:hover {
	background: var(--rhw-white);
	border-color: var(--rhw-primary);
	box-shadow: var(--rhw-shadow);
	transform: translateY(-6px);
}

.rhw-feature-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	background: var(--rhw-primary-light);
	color: var(--rhw-primary);
	border-radius: var(--rhw-radius);
	margin-bottom: 24px;
	transition: var(--rhw-transition);
}

.rhw-feature-card:hover .rhw-feature-card__icon {
	background: var(--rhw-primary);
	color: #fff;
}

.rhw-feature-card__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--rhw-dark);
	margin: 0 0 12px;
}

.rhw-feature-card__text {
	font-size: 0.95rem;
	color: var(--rhw-text-light);
	line-height: 1.7;
	margin: 0;
}

/* ==================== Process Section ==================== */
.rhw-cat-process {
	padding: 80px 0;
	background: var(--rhw-bg-gray);
}

.rhw-process-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	position: relative;
}

.rhw-process-step {
	text-align: center;
	padding: 40px 24px;
	background: var(--rhw-white);
	border-radius: var(--rhw-radius);
	position: relative;
	transition: var(--rhw-transition);
}

.rhw-process-step:hover {
	box-shadow: var(--rhw-shadow);
	transform: translateY(-4px);
}

.rhw-process-step__num {
	position: absolute;
	top: 20px;
	right: 24px;
	font-size: 3rem;
	font-weight: 800;
	color: var(--rhw-primary);
	opacity: 0.1;
	line-height: 1;
}

.rhw-process-step__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background: var(--rhw-primary-light);
	color: var(--rhw-primary);
	border-radius: 50%;
	margin-bottom: 24px;
}

.rhw-process-step__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--rhw-dark);
	margin: 0 0 12px;
}

.rhw-process-step__text {
	font-size: 0.9rem;
	color: var(--rhw-text-light);
	line-height: 1.7;
	margin: 0;
}

/* ==================== FAQ Section ==================== */
.rhw-cat-faq {
	padding: 80px 0;
	background: var(--rhw-white);
}

.rhw-faq-list {
	max-width: 820px;
	margin: 0 auto;
}

.rhw-faq-item {
	border: 1px solid var(--rhw-border);
	border-radius: var(--rhw-radius-sm);
	margin-bottom: 16px;
	overflow: hidden;
	transition: var(--rhw-transition);
}

.rhw-faq-item:hover {
	border-color: var(--rhw-primary);
}

.rhw-faq-item.active {
	border-color: var(--rhw-primary);
	box-shadow: var(--rhw-shadow);
}

.rhw-faq-item__q {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--rhw-dark);
	text-align: left;
	transition: var(--rhw-transition);
}

.rhw-faq-item__q:hover {
	background: var(--rhw-bg-light);
}

.rhw-faq-item__toggle {
	flex-shrink: 0;
	color: var(--rhw-primary);
	transition: transform 0.3s ease;
}

.rhw-faq-item.active .rhw-faq-item__toggle {
	transform: rotate(180deg);
}

.rhw-faq-item__a {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, padding 0.4s ease;
	padding: 0 24px;
}

.rhw-faq-item.active .rhw-faq-item__a {
	max-height: 300px;
	padding: 0 24px 20px;
}

.rhw-faq-item__a p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--rhw-text);
	line-height: 1.8;
}

/* ==================== CTA Section ==================== */
.rhw-cat-cta {
	padding: 80px 0;
	background: var(--rhw-dark);
}

.rhw-cat-cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
}

.rhw-cat-cta__title {
	font-size: 2rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 12px;
	line-height: 1.3;
}

.rhw-cat-cta__desc {
	font-size: 1.05rem;
	color: rgba(255, 255, 255, 0.8);
	margin: 0;
	line-height: 1.6;
}

.rhw-cat-cta__action {
	display: flex;
	gap: 16px;
	flex-shrink: 0;
}

.rhw-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 30px;
	font-size: 1rem;
	font-weight: 700;
	border-radius: 50px;
	text-decoration: none;
	transition: var(--rhw-transition);
	cursor: pointer;
	border: 2px solid transparent;
}

.rhw-btn--primary {
	background: var(--rhw-primary);
	color: #fff;
	border-color: var(--rhw-primary);
}

.rhw-btn--primary:hover {
	background: var(--rhw-primary-dark);
	border-color: var(--rhw-primary-dark);
	transform: translateY(-3px);
	box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
}

.rhw-btn--outline {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

.rhw-btn--outline:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-3px);
}

.rhw-btn svg {
	transition: transform 0.3s ease;
}

.rhw-btn:hover svg {
	transform: translateX(4px);
}

/* ==================== WooCommerce Breadcrumb Override ==================== */
.rhw-cat-products .woocommerce-breadcrumb,
.rhw-cat-hero + .woocommerce-breadcrumb {
	background: var(--rhw-bg-light);
	padding: 12px 0;
	margin: 0;
	font-size: 0.85rem;
}

.rhw-cat-products .woocommerce-breadcrumb a {
	color: var(--rhw-primary);
	text-decoration: none;
}

.rhw-cat-products .woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

/* ==================== Pagination Override ==================== */
.rhw-cat-products .woocommerce-pagination {
	margin-top: 40px;
	text-align: center;
}

.rhw-cat-products .woocommerce-pagination .page-numbers {
	display: inline-flex;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rhw-cat-products .woocommerce-pagination .page-numbers li {
	margin: 0;
}

.rhw-cat-products .woocommerce-pagination .page-numbers a,
.rhw-cat-products .woocommerce-pagination .page-numbers span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: var(--rhw-radius-sm);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: var(--rhw-transition);
}

.rhw-cat-products .woocommerce-pagination .page-numbers a {
	background: var(--rhw-white);
	color: var(--rhw-text);
	border: 1px solid var(--rhw-border);
}

.rhw-cat-products .woocommerce-pagination .page-numbers a:hover {
	background: var(--rhw-primary);
	color: #fff;
	border-color: var(--rhw-primary);
}

.rhw-cat-products .woocommerce-pagination .page-numbers .current {
	background: var(--rhw-primary);
	color: #fff;
	border: 1px solid var(--rhw-primary);
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
	.rhw-features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rhw-process-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rhw-cat-products ul.products {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.rhw-cat-hero {
		min-height: 320px;
	}

	.rhw-cat-hero__title {
		font-size: 2rem;
	}

	.rhw-cat-hero__desc {
		font-size: 1rem;
	}

	.rhw-cat-intro {
		padding: 50px 0;
	}

	.rhw-cat-intro__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.rhw-cat-intro__list {
		grid-template-columns: 1fr;
	}

	.rhw-cat-intro__stats {
		grid-template-columns: 1fr 1fr;
	}

	.rhw-section-title {
		font-size: 1.6rem;
	}

	.rhw-section-subtitle {
		font-size: 0.95rem;
		margin-bottom: 30px;
	}

	.rhw-features-grid {
		grid-template-columns: 1fr;
	}

	.rhw-process-grid {
		grid-template-columns: 1fr;
	}

	.rhw-cat-products ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.rhw-cat-cta__inner {
		flex-direction: column;
		text-align: center;
	}

	.rhw-cat-cta__action {
		flex-direction: column;
		width: 100%;
	}

	.rhw-btn {
		justify-content: center;
	}

	.rhw-cat-cta__title {
		font-size: 1.5rem;
	}

	.rhw-feature-card,
	.rhw-process-step {
		padding: 30px 24px;
	}
}

@media (max-width: 480px) {
	.rhw-cat-products ul.products {
		grid-template-columns: 1fr;
	}

	.rhw-cat-intro__stats {
		grid-template-columns: 1fr;
	}

	.rhw-cat-hero__title {
		font-size: 1.6rem;
	}

	.rhw-cat-hero__btn {
		padding: 14px 28px;
		font-size: 0.95rem;
	}

	.rhw-section-title {
		font-size: 1.4rem;
	}
}
