/* ============================================================
   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%; background: var(--pink); color: var(--text-on-dark); display: flex; align-items: center; justify-content: center; font-family: var(--ff-display); font-weight: var(--weight-black); font-size: 16px; flex-shrink: 0; }
.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); }
.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; }
.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__price { font-family: var(--ff-display); font-weight: var(--weight-ultra); font-size: 20px; color: var(--text-1); }
.sidebar-deal__original { font-size: 13px; color: var(--text-3); text-decoration: line-through; margin-left: 6px; font-weight: var(--weight-regular); }
.sidebar-deal__saving { font-size: 12px; color: var(--error); font-weight: var(--weight-bold); display: block; margin-bottom: 8px; }

/* ─── 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); }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.comment-body { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 20px; }
.comment-author .fn { font-family: var(--ff-display); font-weight: var(--weight-bold); font-size: 15px; color: var(--text-1); }
.comment-metadata { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.comment-content p { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.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; }
.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;
}
