/* ============================================================
   AFFINZA HOME — blog.css  (blog post / editorial)
   ============================================================ */

.author-bar { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-avatar__img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; display: block; }
.author-name { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--text-1); }
.author-meta { font-size: 12px; color: var(--text-3); }
.share-row { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: var(--radius-pill); font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 12px; border: 1.5px solid var(--border); color: var(--text-2); background: var(--bg-card); cursor: pointer; transition: all var(--transition); }
.share-btn:hover { border-color: var(--pink); color: var(--pink); }

.hero-post-img { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 28px; }
.hero-post-img img { width: 100%; height: 400px; object-fit: cover; }

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

/* Featured post component */
.featured-post { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 20px; transition: all 200ms ease; text-decoration: none; }
.featured-post:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.featured-post img { width: 100%; height: 260px; object-fit: cover; }
.featured-post-img img { width: 100%; height: 260px; object-fit: cover; }
.featured-post-body { padding: 28px; }

/* Reading progress bar */
.reading-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200; }
.reading-progress__bar { height: 100%; background: var(--pink); width: 0%; transition: width 100ms linear; }

/* Post card (grid and list variant) */
.post-card { display: block; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all 200ms ease; text-decoration: none; color: inherit; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card-img { position: relative; height: 160px; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.post-card:hover .post-card-img img { transform: scale(1.04); }

/* No-thumbnail placeholder */
.post-card-img__placeholder {
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--pink-light) 0%, var(--teal-light) 100%);
	display: flex; align-items: center; justify-content: center;
	color: var(--pink); font-size: 32px;
}
.post-card-img__placeholder--sm {
	width: 80px; height: 80px;
	border-radius: var(--radius-md);
	font-size: 20px;
}
.post-cat { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); display: inline-flex; align-items: center; gap: 4px; }
.post-title { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 14px; color: var(--text-1); line-height: 1.35; margin-bottom: 6px; }
.post-excerpt { font-size: 12px; color: var(--text-2); line-height: 1.55; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--text-3); }

/* Filter bar */
.filter-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.result-count { font-size: 14px; color: var(--text-2); }

/* Search result */
.search-result { display: flex; gap: 16px; background: var(--bg-card); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); transition: all 200ms ease; cursor: pointer; margin-bottom: 14px; text-decoration: none; }
.search-result:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.result-type { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pink); margin-bottom: 4px; }
.result-title { font-family: var(--ff-display); font-weight: 800; font-size: 15px; color: var(--text-1); margin-bottom: 6px; line-height: 1.3; }
.result-excerpt { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.result-meta { font-size: 11px; color: var(--text-3); }

@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-img img { height: 200px; }
}

/* Mobile fixes */
@media(max-width: 640px) {
  /* Author bar: wrap share buttons below author info */
  .author-bar { flex-wrap: wrap; gap: 10px; }
  .share-row { margin-left: 0; width: 100%; justify-content: flex-start; }
  .share-btn { min-height: 40px; }

  /* Post cover image: reduce height on mobile */
  .hero-post-img img { height: 220px; }

  /* Related grid: already 1-col at 768px — tighten gap */
  .related-grid { gap: 12px; }

  /* Search result cards: stack on mobile */
  .search-result { flex-direction: column; gap: 10px; }
  .search-result img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-md); }
}

/* ─── TOC ─── */
.toc { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 28px; }
.toc h4,
.toc__title { font-size: 13px; font-weight: var(--weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; }
.toc__list { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.toc__link { font-size: var(--text-sm); color: var(--pink); font-weight: var(--weight-medium); transition: color var(--transition); }
.toc__link:hover { color: var(--pink-hover); text-decoration: underline; }
.toc__link--h3 { padding-left: 14px; font-size: 13px; color: var(--text-2); }
.toc__link.is-active { color: var(--pink-hover); font-weight: var(--weight-bold); }

/* ─── TOC toggle ─── */
.toc__header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; margin-bottom: 12px; }
.toc__toggle { color: var(--text-3); transition: transform var(--transition); }
.toc.is-open .toc__toggle { transform: rotate(180deg); }
.toc__body { display: none; }
.toc.is-open .toc__body { display: block; }

/* ─── Sidebar newsletter ─── */
.sidebar-newsletter { background: linear-gradient(135deg, var(--pink-light), var(--teal-light)); border-radius: var(--radius-lg); padding: 20px 16px; }
.sidebar-newsletter__icon { font-size: 24px; margin-bottom: 8px; }
.sidebar-newsletter__title { font-family: var(--ff-display); font-weight: var(--weight-black); font-size: 15px; color: var(--text-1); margin-bottom: 6px; }
.sidebar-newsletter__desc { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; }
.sidebar-newsletter__form { display: flex; flex-direction: column; gap: 8px; }
.sidebar-newsletter__input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--ff-body); font-size: 13px; outline: none; background: var(--bg-card); }
.sidebar-newsletter__input:focus { border-color: var(--pink); }
.sidebar-newsletter__btn,
.sidebar-newsletter__form button { width: 100%; background: var(--pink); color: var(--text-on-dark); border-radius: var(--radius-sm); padding: 10px; font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 13px; border: none; cursor: pointer; transition: background var(--transition); display: flex; align-items: center; justify-content: center; gap: 6px; }
.sidebar-newsletter__form button:hover { background: var(--pink-hover); }

/* ─── Sidebar deal widget ─── */
.sidebar-deal__img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: 10px; display: block; }
.sidebar-deal__name { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 13px; color: var(--text-1); margin-bottom: 6px; }
.sidebar-deal__pricing { margin-bottom: 10px; }
.sidebar-deal__price { font-family: var(--ff-display); font-weight: var(--weight-ultra); font-size: 20px; color: var(--pink); display: block; }
.sidebar-deal__saving { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }
.btn-amazon--full { width: 100%; display: flex; justify-content: center; }

/* ─── Sidebar popular posts thumbnails ─── */
.widget-picks-list { display: flex; flex-direction: column; }
.widget-pick__thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--radius-md); overflow: hidden; }
.widget-pick__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Comments ─── */
.comments-area { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-family: var(--ff-display); font-weight: var(--weight-ultra); font-size: 22px; margin-bottom: 24px; color: var(--text-1); }

/* Top-level list */
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-direction: column; gap: 20px; }

/* Each comment item — li wrapper */
.comment-list .comment,
.comment-list .pingback { list-style: none; }

/* Comment card */
.comment-body { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 20px; }

/* Avatar + author row */
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author img { border-radius: 50%; flex-shrink: 0; }
.comment-author .fn { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 15px; color: var(--text-1); font-style: normal; }
.comment-metadata { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.comment-metadata a { color: var(--text-3); }
.comment-content p { font-size: 14px; line-height: 1.7; color: var(--text-2); margin: 0; }
.reply { margin-top: 10px; }
.comment-reply-link { font-size: 12px; color: var(--pink); font-weight: var(--weight-medium); }
.comment-reply-link:hover { text-decoration: underline; }

/* Threaded (nested) comments */
.comment-list .children {
	list-style: none;
	margin: 16px 0 0 32px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-left: 2px solid var(--pink-muted);
	padding-left: 20px;
}
.comment-list .children .children { margin-left: 20px; }
.comment-list .children .comment-body { background: var(--bg-card); border: 1px solid var(--border); }

/* ─── Pre / Code blocks — never overflow the box ─── */
.entry-content pre,
.article-body pre,
.comment-content pre {
	background: #f4f4f4;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 16px;
	overflow-x: auto;
	max-width: 100%;
	white-space: pre;
	font-size: 13px;
	line-height: 1.65;
	tab-size: 2;
	margin: 1em 0;
	/* prevent pre from stretching its flex/grid parent */
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}
.entry-content code,
.article-body code,
.comment-content code {
	background: #f4f4f4;
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 13px;
	color: var(--pink);
	word-break: break-word;
}
.entry-content pre code,
.article-body pre code,
.comment-content pre code {
	background: none;
	padding: 0;
	color: inherit;
	word-break: normal;
}

.comment-respond { margin-top: 40px; }
.comment-reply-title { font-family: var(--ff-display); font-weight: var(--weight-ultra); font-size: 22px; margin-bottom: 20px; color: var(--text-1); }
.comment-form label { display: block; font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 13px; color: var(--text-1); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--ff-body); font-size: 14px; color: var(--text-1); background: var(--bg-card); outline: none; transition: border-color var(--transition); margin-bottom: 16px; }
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--pink); }
.comment-form textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.comment-form-cookies-consent label { font-family: var(--ff-body); font-weight: var(--weight-regular); font-size: 13px; }
.form-submit .submit,
.comment-form .btn--primary { background: var(--pink); color: var(--text-on-dark); border: none; border-radius: var(--radius-md); padding: 12px 28px; font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: var(--text-sm); cursor: pointer; transition: background var(--transition); min-height: 44px; }
.form-submit .submit:hover { background: var(--pink-hover); }
.logged-in-as { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.logged-in-as a { color: var(--pink); }

/* ─── Post share bar ─── */
.post-share { margin: 24px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-share__label { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 13px; color: var(--text-2); }

/* ─── Amazon / lb button classes (used in post editor) ─── */
.article-body a.amazon-btn,
.article-body a.lb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--amazon-bg);
  color: var(--amazon-text);
  border: 1.5px solid var(--amazon-border);
  border-radius: var(--amazon-radius);
  padding: 10px 20px;
  font-family: var(--ff-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: background var(--transition);
  margin: 4px 0;
}
.article-body a.amazon-btn::before { content: '🛒'; }
.article-body a.amazon-btn:hover,
.article-body a.lb-btn:hover {
  background: var(--amazon-hover);
  color: var(--amazon-text);
  text-decoration: none;
}

/* Inside li — revert to plain link */
li .amazon-btn,
li .lb-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  color: var(--pink);
  text-decoration: none;
  font-weight: var(--weight-medium);
}
li .amazon-btn::before { content: none; }

/* afz_cta_button() injects a .afz-cta-inline wrapper — give it breathing room */
.article-body .afz-cta-inline {
  margin: 16px 0;
}

/* ─── Author bio (bottom of post) ─── */
.post-author-bio { display: flex; gap: 20px; align-items: flex-start; background: var(--bg-alt); border-radius: var(--radius-lg); padding: 24px; margin: 32px 0; }
.post-author-bio__avatar { flex-shrink: 0; }
.post-author-bio__img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; display: block; }
.post-author-bio__body { flex: 1; min-width: 0; }
.post-author-bio__name { font-family: var(--ff-display); font-weight: var(--weight-black); font-size: 16px; color: var(--text-1); margin-bottom: 8px; }
.post-author-bio__desc { font-size: 14px; color: var(--text-2); line-height: 1.65; margin-bottom: 12px; }
.post-author-bio__links { display: flex; gap: 10px; flex-wrap: wrap; }
.post-author-bio__link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: var(--weight-bold); color: var(--text-2); border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 5px 12px; transition: all var(--transition); text-decoration: none; }
.post-author-bio__link:hover { border-color: var(--pink); color: var(--pink); }

@media (max-width: 480px) {
  .post-author-bio { flex-direction: column; gap: 14px; }
  .post-author-bio__img { width: 64px; height: 64px; }
}

/* =============================================================
   Inline-style replacements — single.php
   ============================================================= */

/* Breadcrumb bar above hero */
.post-breadcrumb-bar {
	background: var(--bg-alt);
	border-bottom: 1px solid var(--border);
	padding: var(--space-3) 0;
}

/* Post hero intro block */
.post-hero-intro {
	padding: var(--space-3) 0 0;
}

/* Category label with bottom spacing */
.post-cat--spaced {
	margin-bottom: var(--space-3);
}

/* Post hero h1 */
.post-hero-title {
	font-size: clamp(26px, 4vw, 36px);
	font-weight: var(--weight-bold);
	line-height: 1.15;
	margin-bottom: var(--space-4);
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Post hero excerpt */
.post-hero-excerpt {
	font-size: 16px;
	color: var(--text-2);
	max-width: 680px;
	line-height: 1.6;
	margin-bottom: var(--space-5);
}

/* Author name link — inherits parent colour, no underline */
.author-name__link {
	color: inherit;
	text-decoration: none;
}
.author-name__link:hover {
	text-decoration: underline;
}

/* Hero post cover — single variant */
.hero-post-img--single {
	max-width: var(--container-width, 1200px);
	margin: var(--space-4) auto 0;
}

/* Hero post cover image */
.hero-post-img__cover {
	width: 100%;
	height: 400px;
	object-fit: cover;
	display: block;
}

@media (max-width: 640px) {
	.hero-post-img__cover { height: 220px; }
}

/* Main article content section */
.post-content-section {
	padding: var(--space-4) 0 var(--space-4);
}

/* Tags row below article body */
.post-tags-bar {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: var(--space-5) 0;
}

/* Related articles section */
.related-section {
	margin-top: var(--space-8);
}

.related-section__title {
	font-size: 20px;
	font-weight: var(--weight-bold);
	margin-bottom: var(--space-4);
}

/* Post card body padding (shared by single + archive grid cards) */
.post-card-body {
	padding: var(--space-3);
}

/* Footer disclosure spacing */
.post-disclosure-footer {
	padding: var(--space-3) 0 0;
}

/* =============================================================
   Inline-style replacements — archive.php
   ============================================================= */

/* Badge wrapper inside .page-hero */
.page-hero__badge-wrap {
	margin-bottom: var(--space-3);
}

/* Blog content section */
.blog-content-section {
	padding: var(--space-7) 0 var(--space-8);
}

/* Category filter nav strip */
.category-filter-nav {
	display: flex;
	gap: var(--space-2);
	flex-wrap: wrap;
	margin-bottom: var(--space-5);
}

/* Featured post: category label spacing */
.featured-post__cat {
	margin-top: var(--space-3);
}

/* Featured post: larger title */
.featured-post__title {
	font-size: 22px;
	margin: var(--space-2) 0;
}

/* Featured post: author meta wrapper */
.post-meta__author-wrap {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

/* Small author avatar (used inside featured post meta) */
.author-avatar--sm {
	width: 28px;
	height: 28px;
	font-size: 11px;
}

/* Post grid (two-column) */
.post-card-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-4);
	margin-bottom: var(--space-5);
}

@media (max-width: 640px) {
	.post-card-grid { grid-template-columns: 1fr; }
}

/* "More Articles" section heading */
.more-articles-heading {
	font-size: 16px;
	font-weight: var(--weight-black);
	margin-bottom: var(--space-4);
}

/* List-style post card */
.post-card--list {
	display: flex;
	gap: var(--space-4);
	margin-bottom: var(--space-3);
	/* override the block default from .post-card */
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}
.post-card--list:hover {
	box-shadow: none;
	transform: none;
	color: var(--pink);
}

/* List card thumbnail wrapper */
.post-card--list__thumb {
	flex-shrink: 0;
}

/* List card thumbnail image */
.post-card--list__img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--radius-md);
	display: block;
}

/* Category label in list cards */
.post-cat--list {
	margin-bottom: var(--space-1);
}

/* Smaller post title in list cards */
.post-title--sm {
	font-size: 14px;
}

/* Post meta in list cards */
.post-meta--list {
	margin-top: var(--space-1);
}

/* Archive no-results state */
.archive-no-results {
	text-align: center;
	padding: var(--space-9) var(--space-7);
}

.archive-no-results__icon {
	font-size: 48px;
	color: var(--border);
	margin-bottom: var(--space-4);
	display: block;
}

.archive-no-results__heading {
	font-size: 20px;
	font-weight: var(--weight-bold);
	margin-bottom: var(--space-2);
}

.archive-no-results__text {
	color: var(--text-2);
}

/* Sidebar categories nav */
.widget-cat-nav {
	padding: var(--space-2) 0;
}

/* Sidebar tag cloud */
.widget-tag-cloud {
	padding: var(--space-3) var(--space-4);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}
