/* ============================================================
   Blog — article pages (/blog/<slug>/) and index (/blog/).
   Pages are fully pre-rendered by blog-render.mjs; this sheet
   only styles the blog-* classes it emits. Uses the site's
   design tokens from styles.css.
   ============================================================ */

.blog-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* --- breadcrumb --- */
.blog-breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 8px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.blog-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.blog-breadcrumb a:hover { color: var(--color-red); text-decoration: underline; }
.blog-breadcrumb [aria-current] { color: var(--color-text); font-weight: 600; }

/* --- article header --- */
.blog-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-red);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
}
.blog-article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.25;
  color: var(--color-red);
  margin: 14px 0 10px;
}
.blog-byline {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

/* --- cover --- */
.blog-cover {
  margin: 0 0 28px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  justify-content: center;
}
.blog-cover img {
  width: min(360px, 70vw);
  height: auto;
  object-fit: contain;
}

/* --- body typography --- */
.blog-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--color-text);
}
.blog-body h2 {
  font-size: 1.35rem;
  color: var(--color-red);
  margin: 34px 0 12px;
  line-height: 1.3;
}
.blog-body p { margin: 0 0 16px; }
.blog-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
}
.blog-body li { margin-bottom: 8px; }
.blog-body a { color: var(--color-blue); }

/* --- FAQ accordion --- */
.blog-faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  padding: 0;
  overflow: hidden;
}
.blog-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 18px;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.blog-faq-item summary::-webkit-details-marker { display: none; }
.blog-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--color-red);
}
.blog-faq-item[open] summary::after { content: "–"; }
.blog-faq-item > p {
  padding: 0 18px 14px;
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* --- related products / posts asides --- */
.blog-aside-title {
  font-size: 1.2rem;
  color: var(--color-red);
  margin: 40px 0 14px;
}
.blog-product-grid,
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.blog-product-card,
.blog-related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.blog-product-card:hover,
.blog-related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.blog-product-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.blog-product-name {
  font-weight: 700;
  font-size: 0.92rem;
  text-align: center;
  color: var(--color-red);
}
.blog-product-cta,
.blog-related-kicker {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.blog-related-card { align-items: flex-start; }
.blog-related-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--color-accent);
}
.blog-related-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* --- blog index --- */
.blog-index-header { margin: 16px 0 28px; }
.blog-index-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-red);
  margin: 0 0 8px;
}
.blog-index-header p { color: var(--color-text-muted); margin: 0; }
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #fff;
  padding: 16px;
  box-sizing: border-box;
}
.blog-card-img-empty { background: var(--color-bg); }
.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  flex: 1;
}
.blog-card-title {
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--color-red);
  margin: 0;
}
.blog-card-desc {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-date {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--color-text-light);
}

@media (max-width: 600px) {
  .blog-content { padding: 16px 14px 48px; }
  .blog-cover { padding: 14px; }
}
