/**
 * Core Pages Styles - Beevora Theme
 * Covers: 404, archive, search, page, index (blog), single post
 *
 * @package beevora
 */

/* ========================================================================
   1. Page Hero Banner (Reusable)
   ======================================================================== */
.page-hero {
	background-color: var(--beevora-brown, #5d3615);
	padding: 60px 0;
	text-align: center;
}

.page-hero-title {
	color: #fff;
	font-size: 42px;
	font-weight: 700;
	margin: 0;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.page-hero-subtitle {
	color: rgba(255, 255, 255, 0.75);
	font-size: 16px;
	margin: 12px 0 0;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* ========================================================================
   2. Post Card (Reusable)
   ======================================================================== */
.post-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-card-image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
	transform: scale(1.05);
}

.post-card-body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.post-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 13px;
	color: #999;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.post-card-cat {
	background: rgba(206, 159, 71, 0.12);
	color: var(--beevora-gold, #ce9f47);
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.post-card-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.5;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.post-card-title a {
	color: var(--beevora-brown, #5d3615);
	text-decoration: none;
	transition: color 0.3s ease;
}

.post-card-title a:hover {
	color: var(--beevora-gold, #ce9f47);
}

.post-card-excerpt {
	color: #666;
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 15px;
	flex: 1;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.post-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--beevora-gold, #ce9f47);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	transition: gap 0.3s ease;
}

.post-card-link::after {
	content: '\2190';
	font-size: 16px;
	transition: transform 0.3s ease;
}

[dir="ltr"] .post-card-link::after {
	content: '\2192';
}

.post-card-link:hover {
	gap: 10px;
}

/* ========================================================================
   3. Posts Grid
   ======================================================================== */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 30px;
	padding: 50px 0;
}

/* ========================================================================
   4. Pagination
   ======================================================================== */
.beevora-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 0 0 60px;
}

.beevora-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--beevora-brown, #5d3615);
	background: #fff;
	border: 1.5px solid #e0e0e0;
	text-decoration: none;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.beevora-pagination .page-numbers:hover {
	border-color: var(--beevora-gold, #ce9f47);
	color: var(--beevora-gold, #ce9f47);
}

.beevora-pagination .page-numbers.current {
	background: var(--beevora-brown, #5d3615);
	color: #fff;
	border-color: var(--beevora-brown, #5d3615);
}

.beevora-pagination .page-numbers.dots {
	border: none;
	background: transparent;
	pointer-events: none;
}

.beevora-pagination .page-numbers.prev,
.beevora-pagination .page-numbers.next {
	font-size: 18px;
}

/* ========================================================================
   5. Page Content (Standard Pages)
   ======================================================================== */
.page-content-area {
	padding: 50px 0 60px;
}

.page-content-area .entry-content {
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.85;
	color: #444;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.page-content-area .entry-content h2,
.page-content-area .entry-content h3,
.page-content-area .entry-content h4 {
	color: var(--beevora-brown, #5d3615);
	margin-top: 35px;
	margin-bottom: 15px;
}

.page-content-area .entry-content a {
	color: var(--beevora-gold, #ce9f47);
}

.page-content-area .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

/* ========================================================================
   6. Single Post
   ======================================================================== */
.single-post-hero .page-hero-title {
	font-size: 36px;
	max-width: 700px;
	margin: 0 auto;
	line-height: 1.5;
}

.single-post-meta {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin-top: 16px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.single-post-meta a {
	color: var(--beevora-gold, #ce9f47);
	text-decoration: none;
}

.single-featured-image {
	margin: -30px auto 0;
	max-width: 800px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	position: relative;
	z-index: 1;
}

.single-featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.single-content-area {
	padding: 40px 0 50px;
}

.single-content-area .entry-content {
	max-width: 800px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.85;
	color: #444;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.single-content-area .entry-content h2,
.single-content-area .entry-content h3,
.single-content-area .entry-content h4 {
	color: var(--beevora-brown, #5d3615);
	margin-top: 35px;
	margin-bottom: 15px;
}

.single-content-area .entry-content a {
	color: var(--beevora-gold, #ce9f47);
}

.single-content-area .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

/* Tags */
.single-post-tags {
	max-width: 800px;
	margin: 0 auto 30px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.single-post-tags .tag-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.single-post-tags a {
	display: inline-block;
	background: #f5f0e8;
	color: var(--beevora-brown, #5d3615);
	padding: 4px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.3s ease, color 0.3s ease;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.single-post-tags a:hover {
	background: var(--beevora-gold, #ce9f47);
	color: #fff;
}

/* Post Navigation */
.post-nav {
	max-width: 800px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 30px 0;
	border-top: 1px solid #eee;
}

.post-nav-item {
	text-decoration: none;
}

.post-nav-item:last-child {
	text-align: left;
}

[dir="rtl"] .post-nav-item:last-child {
	text-align: left;
}

[dir="ltr"] .post-nav-item:last-child {
	text-align: right;
}

.post-nav-label {
	display: block;
	font-size: 12px;
	color: #999;
	margin-bottom: 6px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.post-nav-title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: var(--beevora-brown, #5d3615);
	transition: color 0.3s ease;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.post-nav-item:hover .post-nav-title {
	color: var(--beevora-gold, #ce9f47);
}

/* Related Posts */
.related-posts {
	background: #f9f6f1;
	padding: 50px 0;
}

.related-posts-title {
	text-align: center;
	font-size: 28px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 30px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

/* ========================================================================
   7. 404 Page
   ======================================================================== */
.error-404-content {
	text-align: center;
	padding: 60px 0 80px;
}

.error-404-number {
	font-size: 160px;
	font-weight: 900;
	color: var(--beevora-gold, #ce9f47);
	line-height: 1;
	margin-bottom: 10px;
	opacity: 0.15;
	font-family: var(--beevora-font-en, 'Adobe Arabic', serif);
}

.error-404-text {
	font-size: 18px;
	color: #666;
	margin: 0 0 30px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.error-404-search {
	max-width: 450px;
	margin: 0 auto 25px;
}

.error-404-search .search-field {
	width: 100%;
	padding: 14px 20px;
	border: 1.5px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	outline: none;
	transition: border-color 0.3s ease;
}

.error-404-search .search-field:focus {
	border-color: var(--beevora-gold, #ce9f47);
}

.error-404-search .search-submit {
	display: none;
}

.error-404-btn {
	display: inline-block;
	background: var(--beevora-gold, #ce9f47);
	color: #fff;
	padding: 14px 40px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	transition: background 0.3s ease;
}

.error-404-btn:hover {
	background: var(--beevora-brown, #5d3615);
	color: #fff;
}

/* 404 Products */
.error-404-products {
	padding: 0 0 60px;
}

.error-404-products-title {
	text-align: center;
	font-size: 24px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 25px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.error-404-products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.error-404-product-card {
	text-align: center;
}

.error-404-product-image {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 12px;
}

.error-404-product-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}

.error-404-product-card:hover .error-404-product-image img {
	transform: scale(1.05);
}

.error-404-product-name {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.error-404-product-name a {
	color: var(--beevora-brown, #5d3615);
	text-decoration: none;
	transition: color 0.3s ease;
}

.error-404-product-name a:hover {
	color: var(--beevora-gold, #ce9f47);
}

.error-404-product-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* ========================================================================
   8. Search Results
   ======================================================================== */
.search-hero .search-form-hero {
	max-width: 500px;
	margin: 20px auto 0;
	position: relative;
}

.search-hero .search-form-hero .search-field {
	width: 100%;
	padding: 14px 20px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	outline: none;
}

.search-hero .search-form-hero .search-submit {
	position: absolute;
	top: 50%;
	inset-inline-end: 8px;
	transform: translateY(-50%);
	background: var(--beevora-gold, #ce9f47);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.search-results-count {
	text-align: center;
	padding: 20px 0 0;
	font-size: 15px;
	color: #888;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* No Results */
.no-results-content {
	text-align: center;
	padding: 60px 0 80px;
}

.no-results-icon {
	font-size: 80px;
	color: #ddd;
	margin-bottom: 20px;
}

.no-results-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 12px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.no-results-text {
	font-size: 16px;
	color: #888;
	margin: 0 0 25px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 991.98px) {
	.page-hero {
		padding: 45px 0;
	}

	.page-hero-title {
		font-size: 34px;
	}

	.posts-grid {
		gap: 20px;
		padding: 40px 0;
	}

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

	.error-404-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.single-post-hero .page-hero-title {
		font-size: 30px;
	}
}

@media (max-width: 767.98px) {
	.page-hero {
		padding: 35px 0;
	}

	.page-hero-title {
		font-size: 28px;
	}

	.posts-grid {
		grid-template-columns: 1fr;
		padding: 30px 0;
	}

	.related-posts-grid {
		grid-template-columns: 1fr;
	}

	.post-nav {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.post-nav-item:last-child {
		text-align: inherit;
	}

	.error-404-number {
		font-size: 100px;
	}

	.error-404-products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}

	.single-post-hero .page-hero-title {
		font-size: 24px;
	}

	.single-featured-image {
		margin-top: -20px;
		border-radius: 8px;
	}

	.related-posts {
		padding: 35px 0;
	}

	.related-posts-title {
		font-size: 22px;
	}
}

@media (max-width: 575.98px) {
	.page-hero {
		padding: 30px 0;
	}

	.page-hero-title {
		font-size: 24px;
	}

	.page-hero-subtitle {
		font-size: 14px;
	}

	.post-card-title {
		font-size: 16px;
	}

	.post-card-body {
		padding: 15px;
	}

	.beevora-pagination .page-numbers {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}

	.single-post-meta {
		flex-wrap: wrap;
		gap: 8px;
		font-size: 13px;
	}

	.single-content-area .entry-content {
		font-size: 15px;
	}

	.error-404-number {
		font-size: 80px;
	}

	.error-404-products-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ========================================================================
   9. WooCommerce Notices - Global Styles
   ======================================================================== */
@keyframes beevora-notice-slide-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes beevora-notice-fade-out {
	0%, 70% {
		opacity: 1;
		max-height: 200px;
		margin-bottom: 15px;
		padding: 14px 20px;
	}
	100% {
		opacity: 0;
		max-height: 0;
		margin-bottom: 0;
		padding: 0 20px;
		overflow: hidden;
		border-width: 0;
	}
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notice {
	border-radius: 10px;
	padding: 14px 20px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	font-size: 14px;
	font-weight: 500;
	list-style: none;
	margin-bottom: 15px;
	position: relative;
	animation: beevora-notice-slide-in 0.3s ease, beevora-notice-fade-out 6s ease forwards;
	border: none;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	color: inherit;
	position: relative;
	top: 0;
	margin-inline-end: 8px;
}

/* Success */
.woocommerce-message {
	background: #e8f5e9;
	border-inline-start: 4px solid #4caf50;
	color: #2e7d32;
}

/* Error */
.woocommerce-error {
	background: #fdf2f2;
	border-inline-start: 4px solid #e74c3c;
	color: #c0392b;
}

/* Info */
.woocommerce-info {
	background: #f9f6f1;
	border-inline-start: 4px solid var(--beevora-gold, #ce9f47);
	color: var(--beevora-brown, #5d3615);
}

/* Generic notice */
.woocommerce-notice {
	background: #f9f6f1;
	border-inline-start: 4px solid var(--beevora-gold, #ce9f47);
	color: var(--beevora-brown, #5d3615);
}

/* Error list items */
.woocommerce-error li {
	list-style: none;
	color: #c0392b;
}

/* Notice buttons */
.woocommerce-message .button,
.woocommerce-message .wc-forward,
.woocommerce-info .button,
.woocommerce-info .wc-forward,
.woocommerce-error .button,
.woocommerce-error .wc-forward,
.woocommerce-notice .button,
.woocommerce-notice .wc-forward {
	float: none;
	display: inline-block;
	background: var(--beevora-brown, #5d3615);
	color: #fff;
	padding: 5px 14px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	margin-inline-start: 8px;
	transition: background 0.3s ease;
	border: none;
	cursor: pointer;
}

.woocommerce-message .button:hover,
.woocommerce-message .wc-forward:hover,
.woocommerce-info .button:hover,
.woocommerce-info .wc-forward:hover,
.woocommerce-error .button:hover,
.woocommerce-error .wc-forward:hover,
.woocommerce-notice .button:hover,
.woocommerce-notice .wc-forward:hover {
	background: var(--beevora-gold, #ce9f47);
	color: #fff;
}
