/* AJAW Trade blog (2026-09-19). The file shipped as a 43-byte stub ("filled by the blog
   agent"), so every blog-* class in public/blog.js rendered unstyled: the category tabs ran
   together as one line of text and the cards had no grid. Layout follows the the reference marketplace "Reads"
   audit in docs/blog/reference-blog-reference.md - featured story, category tabs, card grid,
   then a narrow reading column for the article.

   Only blog-* classes are defined here. .wrap, .empty, .btn, .panel, .field, .eyebrow and
   .text-btn are existing global components and are deliberately left alone. */

.blog-page { padding-bottom: 64px; }

/* ---------------------------------------------------------------- hub header + tabs */
.blog-hub-head { padding: 32px 0 20px; }
.blog-hub-head h1 { font-size: 38px; margin: 0 0 10px; }
.blog-hub-head p { font-size: 16px; line-height: 1.55; color: var(--gray); max-width: 680px; }

/* Scrolls sideways on a phone rather than wrapping into a ragged block. */
.blog-cat-tabs {
  display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none;
  padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.blog-cat-tabs::-webkit-scrollbar { display: none; }
.blog-cat-tabs a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 550; color: var(--gray); background: #fff;
  transition: border-color .15s, color .15s, background .15s;
}
.blog-cat-tabs a:hover { border-color: var(--soft); color: var(--ink); }
.blog-cat-tabs a.is-on { background: var(--violet); border-color: var(--violet); color: #fff; }
.blog-cat-tabs a small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.blog-cat-tabs a.is-on small { color: #cfcbff; }

/* ---------------------------------------------------------------- featured story */
.blog-featured { margin-bottom: 32px; }
.blog-featured-card {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.blog-featured-card:hover { border-color: var(--soft); box-shadow: 0 6px 24px rgba(37, 31, 149, .08); }
/* Covers are 1600x840 with the title baked in, so every slot uses 40/21 - any other ratio
   crops the headline. The image stays out of flow so a portrait upload can't stretch the card. */
.blog-featured-photo { position: relative; display: block; background: var(--canvas); aspect-ratio: 40 / 21; align-self: center; }
.blog-featured-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.blog-featured-copy { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 32px; }
.blog-featured-copy h2 { font-size: 27px; margin: 0; letter-spacing: -.03em; }
.blog-featured-copy p {
  font-size: 15px; line-height: 1.55; color: var(--gray); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-featured-copy small { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- card grid */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.blog-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.blog-card > a { display: flex; flex-direction: column; gap: 10px; }
.blog-card-photo { display: block; border-radius: 12px; overflow: hidden; background: var(--canvas); }
.blog-card-photo img {
  width: 100%; aspect-ratio: 40 / 21; object-fit: cover;
  transition: transform .25s ease;
}
.blog-card > a:hover .blog-card-photo img { transform: scale(1.03); }
.blog-card-cat {
  display: block; font-size: 11px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--violet);
}
.blog-card h3 {
  font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card > a:hover h3 { color: var(--violet); }
.blog-card > p {
  font-size: 14px; line-height: 1.5; color: var(--gray); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card > small { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- pagination + CTAs */
.blog-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px;
}
.blog-pagination a { display: inline-flex; align-items: center; gap: 6px; color: var(--violet); font-weight: 550; }
.blog-pagination a .icon { width: 16px; height: 16px; }
.blog-page-count { color: var(--muted); font-size: 13px; }
.blog-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.blog-cta-row .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- article */
/* 880px centred reading column, matching the approved legal/info pages in legal.css. */
.blog-article-page { max-width: 880px; margin-left: auto; margin-right: auto; }
.blog-crumbs { padding: 26px 0 14px; font-size: 13px; color: var(--muted); }
.blog-crumbs a { color: var(--gray); }
.blog-crumbs a:hover { color: var(--violet); }
.blog-article > h1 { font-size: 40px; line-height: 1.12; margin: 0 0 14px; }
.blog-byline { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.blog-cover { width: 100%; aspect-ratio: 40 / 21; object-fit: cover; border-radius: 14px; margin-bottom: 30px; background: var(--canvas); }

.blog-body { font-size: 16px; line-height: 1.72; color: var(--ink); }
.blog-body p { font-size: 16px; line-height: 1.72; color: var(--ink); margin: 0 0 18px; }
.blog-body h2 { font-size: 24px; letter-spacing: -.025em; margin: 36px 0 12px; }
.blog-body h3 { font-size: 18px; font-weight: 650; margin: 28px 0 10px; }
.blog-body ul, .blog-body ol { padding-left: 22px; margin: 0 0 18px; }
.blog-body li { margin-bottom: 8px; }
.blog-body a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.blog-body blockquote {
  margin: 24px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--soft);
  color: var(--gray); font-style: italic;
}
.blog-body blockquote p { color: inherit; margin: 0; }
.blog-body img { border-radius: 10px; margin: 24px 0; }
.blog-body strong { font-weight: 650; }

/* ---------------------------------------------------------------- article FAQ + related */
.blog-faq-view { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-faq-view h2 { font-size: 24px; margin: 0 0 18px; }
.blog-faq-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.blog-faq-item:last-child { border-bottom: 0; }
.blog-faq-item h3 { font-size: 16px; font-weight: 650; margin: 0 0 6px; color: var(--ink); }
.blog-faq-item p { font-size: 15px; line-height: 1.6; color: var(--gray); margin: 0; }

.blog-related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.blog-related h2 { font-size: 22px; margin: 0 0 20px; }
.blog-related .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ---------------------------------------------------------------- admin editor (/admin/blog) */
.blog-editor { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }
.blog-ai-panel h2 { font-size: 18px; margin: 0 0 4px; }
.blog-ai-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.blog-ai-row input { flex: 1; min-width: 0; }
.blog-ai-row .btn { flex-shrink: 0; }
.blog-ai-row .icon { width: 16px; height: 16px; }
.blog-cover-field img { max-width: 260px; border-radius: 10px; margin: 8px 0; }
.blog-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.blog-body-grid textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
.blog-preview-pane {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  max-height: 520px; overflow: auto; background: #fff;
}
.blog-preview-pane > b { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.blog-preview-pane .blog-body { font-size: 14px; }
.blog-preview-pane .blog-body p { font-size: 14px; margin-bottom: 12px; }
.blog-preview-pane .blog-body h2 { font-size: 19px; margin: 20px 0 8px; }
.blog-preview-pane .blog-body h3 { font-size: 16px; margin: 16px 0 6px; }

.blog-faq-block { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.blog-faq-empty { font-size: 13px; color: var(--muted); margin: 8px 0; }
.blog-faq-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.blog-faq-row .text-btn { align-self: flex-start; }
.blog-editor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 8px; }

/* Inline confirm bar - the owner banned browser confirm() popups and cramped modals. */
.blog-confirm-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 12px; padding: 14px 16px; border: 1px solid #f1c9c9; border-radius: 10px;
  background: #fdf6f6; font-size: 14px; color: var(--ink);
}
.blog-confirm-bar[hidden] { display: none; }
.blog-confirm-bar > span { flex: 1; min-width: 200px; }
.blog-btn-danger { background: #c0392b; color: #fff; }
.blog-btn-danger:hover { background: #a93226; }
.blog-danger-text { color: #c0392b; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .blog-grid, .blog-related .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .blog-featured-card { grid-template-columns: 1fr; }
  .blog-featured-photo { min-height: 0; aspect-ratio: 40 / 21; }
  .blog-featured-copy { padding: 22px; }
  .blog-featured-copy h2 { font-size: 22px; }
  .blog-body-grid { grid-template-columns: 1fr; }
  .blog-preview-pane { max-height: 320px; }
}
@media (max-width: 700px) {
  .blog-hub-head { padding: 22px 0 16px; }
  .blog-hub-head h1 { font-size: 27px; }
  .blog-hub-head p { font-size: 15px; }
  .blog-grid, .blog-related .blog-grid { grid-template-columns: 1fr; gap: 26px; }
  .blog-article > h1 { font-size: 28px; }
  .blog-body, .blog-body p { font-size: 15px; line-height: 1.68; }
  .blog-body h2 { font-size: 20px; margin-top: 28px; }
  .blog-cover { margin-bottom: 22px; border-radius: 10px; }
  .blog-cta-row .btn { flex: 1 1 100%; justify-content: center; }
  .blog-pagination { font-size: 13px; }
}

.blog-preview-bar{background:#FFF4DC;color:#6B4400;border:1px solid #F1D08F;border-radius:12px;padding:10px 14px;font-size:14px;margin:0 0 18px}

.blog-table{overflow-x:auto;margin:0 0 20px}.blog-table table{border-collapse:collapse;width:100%;font-size:15px}.blog-table th,.blog-table td{border:1px solid var(--line,#e7e8f0);padding:8px 10px;text-align:left;vertical-align:top}.blog-table th{background:#f3f2fe;font-weight:600}
/* The table header text inherited a too-small, too-grey style from somewhere else on
   the page; pin it explicitly so it reads clearly inside the article column. */
.blog-body .blog-table th, .blog-body th { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- seller hub (/sell/blog)
   Spanish chrome, a "publish free" side panel and (when live) a webinar link - no
   sidebar/sticky ad inside articles, but this hub-level panel is a normal in-flow
   page element, not an ad. */
.blog-hub-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.blog-hub-main { min-width: 0; }
.blog-side-panel {
  border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: #f8f7ff;
  position: sticky; top: 24px; display: flex; flex-direction: column; gap: 10px;
}
.blog-side-panel h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.blog-side-panel p { font-size: 14px; line-height: 1.55; color: var(--gray); margin: 0; }
.blog-side-panel .btn { align-self: flex-start; }
.blog-side-panel .text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.blog-side-panel .text-btn .icon { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- native promos
   ("From AJAW Trade" / "Desde AJAW Trade") - spliced INTO the article body between
   sections (app/blog.py's assemble_article_html()). Owner 2026-09-22: violet is used
   only for the CTA button and small accents, never as a full background fill - so
   these are real, varied formats, not one purple card repeated:
     - intro: a slim, light inline text banner with a thin border and an arrow link.
     - mid/manual/late(no products)/end: a photo banner (a real product/factory photo,
       dark scrim, white headline+CTA) when the promo has an image, else a white
       "RFQ banner" (icon-left, copy in the middle, CTA button on the right).
     - late (has real product matches): a strip of real catalog thumbnails (below).
   No sidebar, sticky bar or popup. */
.blog-promo-label {
  display: inline-block; font-size: 10px; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}

/* Format (b): slim inline link/text banner - light background, thin border, arrow link. */
.blog-promo-inline {
  display: block; font-size: 15px; line-height: 1.6; color: var(--ink);
  background: #fafafd; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; margin: 22px 0;
}
.blog-promo-inline .blog-promo-label { display: inline; margin-right: 6px; margin-bottom: 0; }
.blog-promo-inline a { color: var(--violet); font-weight: 650; text-decoration: none; white-space: nowrap; }
.blog-promo-inline a:hover { text-decoration: underline; }

.blog-promo-card { margin: 28px 0; border-radius: 14px; overflow: hidden; }
.blog-promo-card.blog-promo-end { margin: 40px 0 0; }

/* Format (a): photo banner - a real product/factory photo across the full width, a
   dark scrim so white text stays legible, headline + violet CTA button on top. */
.blog-promo-photo {
  position: relative; min-height: 220px; background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
}
.blog-promo-photo.blog-promo-end { min-height: 280px; }
.blog-promo-photo-scrim {
  width: 100%; padding: 24px; color: #fff;
  background: linear-gradient(0deg, rgba(10, 8, 30, .82) 0%, rgba(10, 8, 30, .45) 55%, rgba(10, 8, 30, 0) 100%);
}
.blog-promo-photo-scrim .blog-promo-label { color: #e4e1ff; }
.blog-promo-photo-scrim h3 { font-size: 20px; margin: 0 0 4px; color: #fff; letter-spacing: -.02em; }
.blog-promo-photo.blog-promo-end .blog-promo-photo-scrim h3 { font-size: 24px; }
.blog-promo-photo-scrim p { font-size: 14px; margin: 0 0 14px; color: #e9e8f5; max-width: 60ch; }
.blog-promo-photo-scrim .btn { box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }

/* Format (d): RFQ / spec banner - white background, thin border, a small violet icon
   dot on the left (stands in for "an icon or photo"), copy in the middle, CTA right. */
.blog-promo-banner {
  display: flex; align-items: center; gap: 18px; border: 1px solid var(--line);
  background: #fff; padding: 20px 22px;
}
.blog-promo-banner-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), #251f95);
}
.blog-promo-banner-copy { flex: 1; min-width: 0; }
.blog-promo-banner-copy h3 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.blog-promo-banner-copy p { font-size: 14px; line-height: 1.5; color: var(--gray); margin: 4px 0 0; }
.blog-promo-banner .btn { flex-shrink: 0; }
.blog-promo-banner.blog-promo-end { padding: 26px 28px; border-color: var(--soft); }
.blog-promo-banner.blog-promo-end h3 { font-size: 21px; }
.blog-promo-banner.blog-promo-end .blog-promo-banner-icon { width: 52px; height: 52px; }

/* Late slot / [[products:...]] / bottom "shop this article" strip - real catalog
   products, never a promo card (no impression/click tracking needed - each card is
   already a real, live /product/<id> link). */
.blog-product-strip { margin: 32px 0; }
.blog-product-strip h2 { font-size: 20px; margin: 0 0 14px; }
.blog-strip-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.blog-strip-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blog-strip-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: var(--canvas); }
.blog-strip-card span { font-size: 13px; font-weight: 550; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-strip-card small { font-size: 12px; color: var(--violet); font-weight: 600; }

/* ---------------------------------------------------------------- admin promos (/admin/blog/promos) */
.blog-promo-slots-table { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.blog-promo-slots-table b { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.blog-promo-slots-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.blog-promo-slots-table th, .blog-promo-slots-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }

@media (max-width: 1080px) {
  .blog-strip-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .blog-hub-layout { grid-template-columns: 1fr; }
  .blog-side-panel { position: static; }
}
@media (max-width: 700px) {
  .blog-promo-photo { min-height: 170px; }
  .blog-promo-photo.blog-promo-end { min-height: 200px; }
  .blog-promo-photo-scrim { padding: 18px; }
  .blog-promo-banner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; }
  .blog-promo-banner .btn { align-self: stretch; text-align: center; }
  .blog-strip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 2026-09-23 promo photo banner v2: text on a solid brand panel, photo on the right
   (desktop) / on top (mobile) - white text over a busy factory photo was unreadable. */
.blog-promo-photo { min-height: 240px; align-items: stretch; background-position: right center; background-color: #251F95; }
.blog-promo-photo-scrim {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 28px 30px; max-width: 100%;
  background: linear-gradient(90deg, #251F95 0%, #2F27C9 38%, rgba(47,39,201,.92) 55%, rgba(47,39,201,.35) 78%, rgba(47,39,201,0) 100%);
}
.blog-promo-photo-scrim .blog-promo-label { color: #C9C4FF; letter-spacing: .08em; }
.blog-promo-photo-scrim h3 { font-size: 22px; line-height: 1.2; max-width: 22ch; }
.blog-promo-photo.blog-promo-end .blog-promo-photo-scrim h3 { font-size: 26px; }
.blog-promo-photo-scrim p { max-width: 40ch; color: #E4E1FF; }
.blog-promo-photo-scrim .btn, .blog-promo-photo-scrim .btn.primary {
  background: #fff; color: #251F95; text-decoration: none; font-weight: 700; border: 0;
  box-shadow: 0 6px 18px rgba(10, 8, 30, .25);
}
.blog-promo-photo-scrim .btn:hover { background: #F1EFFF; text-decoration: none; }
@media (max-width: 640px) {
  .blog-promo-photo { flex-direction: column; justify-content: flex-end; padding-top: 150px; background-size: 100% auto; background-position: center top; background-repeat: no-repeat; }
  .blog-promo-photo-scrim { background: #251F95; padding: 20px 20px 22px; }
  .blog-promo-photo-scrim h3 { font-size: 19px; max-width: none; }
}
