/* ============================================================
   Blog — listing + single post styles
   ============================================================ */

/* ── Blog hero ───────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d1b4e 100%);
  padding: 52px 0 44px;
  margin-bottom: 40px;
}
.blog-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.blog-hero-title [data-lucide] { width: 32px; height: 32px; }
.blog-hero-sub {
  color: rgba(255,255,255,.65);
  font-size: 1rem;
}

/* ── Main layout ─────────────────────────────────────────────── */
.blog-main {
  padding-bottom: 60px;
}

/* ── Empty state ─────────────────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Tags ────────────────────────────────────────────────────── */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.blog-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(193,39,45,.1);
  color: var(--accent);
  text-decoration: none;
}
a.blog-tag:hover { background: var(--accent); color: #fff; }

/* ── Meta line ───────────────────────────────────────────────── */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Featured post ───────────────────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 36px;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--border);
}
.blog-featured:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.blog-featured-img {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: #f0f0f0;
}
.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform .4s ease;
}
.blog-featured:hover .blog-featured-img img { transform: scale(1.04); }
.blog-featured-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.blog-featured-title {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}
.blog-featured-excerpt {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-read-more {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: .82rem;
}

@media (max-width: 680px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img { min-height: 200px; }
  .blog-featured-body { padding: 22px 20px; }
}

/* ── Posts grid ──────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.blog-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ── Blog card ───────────────────────────────────────────────── */
.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.blog-card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f0f0f0;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform .35s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.blog-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.blog-card-title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-excerpt {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.blog-breadcrumb {
  padding: 14px 0 0;
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-breadcrumb a { color: var(--text-muted); }
.blog-breadcrumb a:hover { color: var(--accent); }
.blog-breadcrumb span:last-child { color: var(--text); font-weight: 600; }

/* ── Single post ─────────────────────────────────────────────── */
.blog-post-wrap {
  padding-top: 24px;
  padding-bottom: 60px;
}
.blog-article {
  max-width: 760px;
  margin: 0 auto;
}
.blog-article-hero {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 30px;
  max-height: 420px;
}
.blog-article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-article-head {
  margin-bottom: 28px;
}
.blog-article-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-top: 10px;
}

/* ── Article body typography ─────────────────────────────────── */
.blog-article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}
.blog-article-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 32px 0 14px;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}
.blog-article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}
.blog-article-content p {
  margin-bottom: 16px;
}
.blog-article-content ul,
.blog-article-content ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.blog-article-content ul { list-style: disc; }
.blog-article-content ol { list-style: decimal; }
.blog-article-content li { margin-bottom: 6px; }
.blog-article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.blog-article-content a:hover { color: var(--accent-dark); }
.blog-article-content img {
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  display: block;
}
.blog-article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(193,39,45,.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-style: italic;
}
.blog-article-content strong { font-weight: 700; }
.blog-article-content em     { font-style: italic; }

/* ── Related ─────────────────────────────────────────────────── */
.blog-related {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 2px solid var(--border);
}
.blog-related-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 22px;
}

/* ── Sidebar layout ──────────────────────────────────────────── */
.blog-main.has-sidebar,
.blog-post-wrap.has-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.blog-post-wrap.has-sidebar .blog-article { max-width: 100%; }
.blog-posts-col { min-width: 0; }

/* ── Sidebar widget ───────────────────────────────────────────── */
.blog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.blog-sidebar-head {
  border-bottom: 1px solid var(--border);
}
.blog-sidebar-store-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}
.blog-sidebar-store-link:hover { background: var(--bg); }

.blog-sidebar-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: .82rem;
}

/* ── Sidebar offer cards ─────────────────────────────────────── */
.blog-offer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.blog-offer-card:last-child { border-bottom: none; }
.blog-offer-card:hover { background: var(--bg); }

.blog-offer-thumb {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 48px;
  border-radius: 5px;
  overflow: hidden;
  background: #f0f0f0;
}
.blog-offer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-offer-pages {
  position: absolute;
  bottom: 2px;
  right: 3px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.4;
}
.blog-offer-info { flex: 1; min-width: 0; }
.blog-offer-title {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-offer-date {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

@media (max-width: 860px) {
  .blog-main.has-sidebar,
  .blog-post-wrap.has-sidebar {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
  }
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  padding: 28px 0;
  margin-top: 40px;
}
