/**
 * Pelagia Book Store — Editorial Single Post Styles
 *
 * 3-column layout inspired by Kinfolk / Apple minimalism.
 */

/* ── Container & Grid Architecture (Desktop) ────────────── */
.single-post .site-main {
	padding: clamp(3rem, 5vw, 5rem) var(--container-pad) clamp(4rem, 8vw, 8rem);
	background-color: var(--color-white); /* Clean white background */
}

.editorial-layout {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 280px minmax(auto, 760px) 240px;
	gap: 64px;
	align-items: start;
}

/* ── Left Sidebar (Aside) ───────────────────────────────── */
.editorial-sidebar-left {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.editorial-featured-img {
	margin: 0;
}
.editorial-featured-img img {
	width: 100%;
	height: auto;
	aspect-ratio: 3/4;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0,0,0,0.06);
	display: block;
}

/* Recent Posts Compact */
.editorial-recent-title {
	font-family: var(--font-family);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-muted);
	margin: 0 0 16px;
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 8px;
}
.editorial-recent-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.editorial-recent-item {
	display: flex;
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: inherit;
	transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.editorial-recent-item:hover {
	opacity: 0.8;
	transform: translateX(2px);
}
.editorial-recent-thumb {
	flex: 0 0 72px;
	border-radius: 6px;
	overflow: hidden;
}
.editorial-recent-thumb img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
}
.editorial-recent-info h4 {
	font-size: 0.85rem;
	line-height: 1.4;
	margin: 0 0 4px;
	font-weight: 700;
	color: var(--color-dark);
}
.editorial-recent-info span {
	font-size: 0.75rem;
	color: var(--color-muted);
}
.editorial-recent-view-all {
	display: inline-block;
	margin-top: 16px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--color-primary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
}

/* Quote Card */
.editorial-quote-card {
	background: var(--color-white);
	padding: 32px 24px;
	border-radius: 12px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.editorial-quote-card p {
	font-family: var(--font-heading, var(--font-family));
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--color-primary);
	font-style: italic;
	margin: 0;
}

/* ── Center Column (Main Article) ───────────────────────── */
.editorial-main {
	min-width: 0;
}

/* Typography Hierarchy */
.editorial-header {
	margin-bottom: 48px;
}
.editorial-title {
	font-size: clamp(40px, 5vw, 72px);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--color-dark);
	margin: 0 0 32px;
}
.editorial-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.85rem;
	color: var(--color-muted);
	letter-spacing: 0.02em;
	flex-wrap: wrap;
}
.editorial-meta-cat {
	color: var(--color-primary);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: rgba(179, 73, 47, 0.08); /* Soft terracotta */
	padding: 4px 10px;
	border-radius: 4px;
	text-decoration: none;
}
.editorial-meta-separator {
	color: var(--color-border);
}

.editorial-content {
	font-size: 1.125rem; /* 18px */
	line-height: 1.9;
	color: var(--color-body);
	max-width: 70ch;
	margin: 0 auto;
}
.editorial-content p {
	margin-bottom: 2rem;
}
.editorial-content h2 {
	font-size: 2rem;
	font-weight: 800;
	margin: 3rem 0 1.5rem;
	color: var(--color-dark);
}
.editorial-content h3 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 2.5rem 0 1rem;
	color: var(--color-dark);
}
.editorial-content blockquote {
	margin: 3rem 0;
	padding: 2rem 2rem 2rem 3rem;
	background: rgba(179, 73, 47, 0.04);
	border-left: 4px solid var(--color-primary);
	border-radius: 0 12px 12px 0;
	font-size: 1.25rem;
	font-style: italic;
	color: var(--color-dark);
	position: relative;
}
.editorial-content blockquote::before {
	content: '\201C';
	font-size: 4rem;
	color: rgba(179, 73, 47, 0.2);
	position: absolute;
	top: -0.5rem;
	left: 0.5rem;
	font-family: Georgia, serif;
	line-height: 1;
}
.editorial-content img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 2rem 0;
	box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* ── Right Sidebar (Sticky Info) ────────────────────────── */
.editorial-sidebar-right {
	position: sticky;
	top: 120px;
}
.editorial-info-card {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 32px 24px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.02);
}
.editorial-info-row {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--color-border);
}
.editorial-info-row:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}
.editorial-info-label {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-muted);
	margin-bottom: 8px;
}
.editorial-info-value {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-dark);
}

.editorial-share-buttons {
	display: flex;
	gap: 12px;
	margin-top: 12px;
}
.editorial-share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-bg-light);
	color: var(--color-dark);
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
	border: 1px solid var(--color-border);
}
.editorial-share-btn:hover {
	background: var(--color-white);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	color: var(--color-primary);
	border-color: var(--color-primary);
}

/* ── Post Navigation ────────────────────────────────────── */
.editorial-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	margin-top: 80px;
	padding-top: 40px;
	border-top: 1px solid var(--color-border);
}
.editorial-post-nav > div {
	flex: 1;
}
.editorial-nav-next {
	text-align: right;
}
.editorial-post-nav a {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.editorial-nav-prev a:hover {
	opacity: 0.8;
	transform: translateX(-4px);
}
.editorial-nav-next a:hover {
	opacity: 0.8;
	transform: translateX(4px);
}
.editorial-nav-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-muted);
	margin-bottom: 8px;
}
.editorial-nav-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--color-dark);
	line-height: 1.3;
}

/* ── Comments Redesign ──────────────────────────────────── */
.editorial-comments {
	margin-top: 80px;
	padding-top: 60px;
	border-top: 1px solid var(--color-border);
}
.editorial-comments-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin-bottom: 40px;
}
.comment-form-wrap {
	background: var(--color-white);
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.02);
}
.comment-form-wrap label {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 8px;
	color: var(--color-dark);
}
.comment-form-wrap input[type="text"],
.comment-form-wrap input[type="email"],
.comment-form-wrap input[type="url"],
.comment-form-wrap textarea {
	width: 100%;
	padding: 16px;
	border: 1.5px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-bg-light);
	font-family: var(--font-family);
	font-size: 1rem;
	transition: border-color var(--transition-fast), background var(--transition-fast);
	margin-bottom: 16px;
	height: auto;
}
.comment-form-wrap input[type="text"]:focus,
.comment-form-wrap input[type="email"]:focus,
.comment-form-wrap input[type="url"]:focus,
.comment-form-wrap textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	background: var(--color-white);
}
.comment-form-wrap textarea {
	min-height: 140px;
	resize: vertical;
}
.comment-form-wrap .submit {
	background: var(--color-primary);
	color: var(--color-white);
	border: none;
	padding: 16px 32px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.comment-form-wrap .submit:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* ── Related Products (Footer Area) ─────────────────────── */
.editorial-related-books {
	margin-top: 100px;
	padding-top: 60px;
	border-top: 1px solid var(--color-border);
}
.editorial-related-title {
	font-size: 1.5rem;
	font-weight: 800;
	margin-bottom: 40px;
	text-align: center;
}
.editorial-related-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 24px;
	margin: 0;
}

/* ── Responsive ─────────────────────────────────────────── */

/* Tablet (768px - 1024px) */
@media (max-width: 1100px) {
	.editorial-layout {
		grid-template-columns: 240px 1fr;
		gap: 40px;
	}
	.editorial-sidebar-right {
		grid-column: 1 / -1;
		position: static;
		display: flex;
		flex-direction: row;
		gap: 20px;
	}
	.editorial-info-card {
		flex: 1;
		display: flex;
		flex-wrap: wrap;
		gap: 24px;
		align-items: center;
		padding: 24px;
	}
	.editorial-info-row {
		margin: 0;
		padding: 0;
		border: none;
	}
	.editorial-related-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile (<768px) */
@media (max-width: 767px) {
	.editorial-layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	/* Order shift for mobile */
	.editorial-sidebar-left {
		order: 3;
	}
	.editorial-sidebar-right {
		order: 2;
		margin-top: 0;
	}
	.editorial-main {
		order: 1;
	}
	
	.editorial-featured-img img {
		aspect-ratio: 16/9; /* Horizontal for mobile top */
		margin-bottom: 32px;
	}
	/* Move featured image to top on mobile */
	.editorial-featured-img {
		display: none; /* Hide from sidebar */
	}
	.editorial-mobile-img {
		display: block;
		margin-bottom: 24px;
	}
	.editorial-mobile-img img {
		width: 100%;
		height: auto;
		border-radius: 12px;
		aspect-ratio: 16/9;
		object-fit: cover;
	}
	
	.editorial-title {
		font-size: clamp(32px, 8vw, 40px);
	}
	
	.editorial-post-nav {
		flex-direction: column;
		gap: 32px;
		margin-top: 60px;
	}
	.editorial-nav-next {
		text-align: left;
	}
	.editorial-nav-next a:hover {
		transform: translateX(-4px);
	}
	
	.comment-form-wrap {
		padding: 24px 16px;
	}
	.comment-form-wrap .submit {
		width: 100%;
	}

	.editorial-related-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (min-width: 768px) {
	.editorial-mobile-img {
		display: none;
	}
}
