/* ===== صفحة تصنيف المنتجات — product_cat ===== */
.ward-product-cat-page {
	direction: rtl;
}

body.tax-product_cat .ward-page-banner {
	/* تأكد إن البانر تحت الهيدر مش فوقه */
	position: relative;
	z-index: 0;
}

body.has-ward-page-banner.tax-product_cat .site-header,
body.has-ward-page-banner.single-product .site-header {
	position: relative;
	z-index: 2;
}

.ward-product-cat-content {
	padding: 56px 0 80px;
	background: #f5f6fa;
}

.ward-product-cat-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.ward-product-cat-count {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #091037;
}

.ward-product-cat-toolbar .woocommerce-ordering {
	margin: 0;
}

.ward-product-cat-toolbar .woocommerce-ordering select {
	border: 1px solid #d1d5e1;
	border-radius: 10px;
	background: #fff;
	color: #091037;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	min-width: 180px;
}

.ward-product-cat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

/* كارت الكتاب */
.ward-pcard {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(16, 26, 74, .07);
	transition: transform .25s ease, box-shadow .25s ease;
}

.ward-pcard:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px rgba(16, 26, 74, .12);
}

.ward-pcard-media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #eef0f6;
}

.ward-pcard-img,
.ward-pcard-media img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.ward-pcard-cat {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	padding: 5px 10px;
	border-radius: 8px;
	background: #f3e8c8;
	color: #091037;
	font-size: 11px;
	font-weight: 700;
}

.ward-pcard-body {
	padding: 16px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	text-align: right;
}

.ward-pcard-title {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.5;
	color: #091037;
}

.ward-pcard-title a {
	color: inherit;
	text-decoration: none;
}

.ward-pcard-title a:hover {
	color: #1b2a6b;
}

.ward-pcard-author {
	margin: 0;
	font-size: 13px;
	color: #c9a24b;
	font-weight: 700;
}

.ward-pcard-meta {
	margin: 0;
	font-size: 12px;
	color: #9aa0b5;
}

.ward-pcard-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 12px;
}

.ward-pcard-price {
	font-size: 14px;
	font-weight: 800;
	color: #091037;
}

.ward-pcard-price .woocommerce-Price-amount {
	color: inherit;
}

.ward-pcard-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #091037;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background .2s ease;
	white-space: nowrap;
}

.ward-pcard-btn:hover {
	background: #1b2a6b;
	color: #fff !important;
}

.ward-product-cat-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.ward-product-cat-pagination .woocommerce-pagination ul {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ward-product-cat-pagination .woocommerce-pagination a,
.ward-product-cat-pagination .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	background: #fff;
	color: #091037;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(16, 26, 74, .06);
	text-decoration: none;
}

.ward-product-cat-pagination .woocommerce-pagination .current {
	background: #091037;
	color: #fff;
}

.ward-product-cat-empty {
	text-align: center;
	padding: 60px 20px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(16, 26, 74, .06);
}

.ward-product-cat-empty p {
	margin: 0 0 20px;
	color: #6b7089;
	font-size: 15px;
}

.ward-product-cat-empty-btn {
	display: inline-flex;
	padding: 12px 24px;
	border-radius: 999px;
	background: #091037;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}

@media (max-width: 1100px) {
	.ward-product-cat-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 800px) {
	.ward-product-cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.ward-product-cat-grid {
		grid-template-columns: 1fr;
	}

	.ward-product-cat-content {
		padding: 40px 0 56px;
	}
}
