/* ═══════════════════════════════════════════════════════════════════
   وبلاگ (BLOG، B1–B5) — متن مطلب، بلوک‌های ویرایشگر، فهرست مطالب، باکس نویسنده،
   صفحه‌ی دسته/نویسنده. فقط متغیرهای store.base.css؛ گوشه‌ها صاف (زبان طراحی فروشگاه).
   ═══════════════════════════════════════════════════════════════════ */

.hb-wrap { max-width: 1280px; margin: 0 auto; padding: 18px 40px 64px; }
.hb-crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx2); min-height: 30px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.hb-crumbs a { color: var(--tx2); text-decoration: none; }
.hb-crumbs a:hover { color: var(--brand); }
.hb-crumbs svg { flex: 0 0 auto; }
.hb-crumbs [aria-current] { color: var(--tx); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* ── چیدمان مطلب ── */
.hb-grid { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 40px; align-items: start; justify-content: space-between; }
.hb-grid--notoc { grid-template-columns: minmax(0, 820px); justify-content: center; }
.hb-article { min-width: 0; }
.hb-h1 { margin: 6px 0 14px; font-size: 32px; line-height: 1.55; font-weight: 700; color: var(--tx); text-wrap: pretty; }
.hb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--tx2); margin-bottom: 20px; }
.hb-meta a { color: var(--tx2); }
.hb-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--tx); font-weight: 600; text-decoration: none; }
.hb-meta__author img, .hb-avatar { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; background: var(--brand05); }
.hb-avatar { display: inline-flex; align-items: center; justify-content: center; color: var(--brand7); font-weight: 700; font-size: 13px; }
.hb-meta__dot { width: 3px; height: 3px; border-radius: 99px; background: var(--n300); }
.hb-meta__cat { padding: 3px 10px; background: var(--surf2); color: var(--tx2); text-decoration: none; }
.hb-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--n50); margin: 0 0 22px; }
.hb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-excerpt { position: relative; background: var(--brand05); border-inline-start: 3px solid var(--brand); padding: 16px 18px; font-size: 14.5px; line-height: 2; color: var(--tx); margin: 0 0 26px; }
.hb-excerpt strong { display: block; font-size: 12px; color: var(--brand7); margin-bottom: 4px; }

/* ── متن ── */
.post-prose { font-size: 15.5px; line-height: 2.05; color: var(--tx2); overflow-wrap: anywhere; }
.post-prose > :first-child { margin-top: 0; }
.post-prose h2 { margin: 34px 0 12px; font-size: 21px; line-height: 1.6; font-weight: 700; color: var(--tx); scroll-margin-top: 110px; }
.post-prose h3 { margin: 26px 0 10px; font-size: 17px; line-height: 1.7; font-weight: 700; color: var(--tx); scroll-margin-top: 110px; }
.post-prose h4 { margin: 20px 0 8px; font-size: 15.5px; font-weight: 700; color: var(--tx); }
.post-prose p { margin: 0 0 16px; }
.post-prose strong, .post-prose b { color: var(--tx); }
.post-prose a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post-prose ul, .post-prose ol { margin: 0 0 18px; padding-inline-start: 24px; }
.post-prose ul { list-style: disc; }
.post-prose ol { list-style: decimal; }
.post-prose li { margin-bottom: 7px; }
.post-prose li::marker { color: var(--brand); }
.post-prose blockquote { margin: 0 0 20px; padding: 10px 18px; border-inline-start: 3px solid var(--brand); background: var(--surf2); color: var(--tx); font-size: 15px; }
.post-prose img { max-width: 100%; height: auto; }
.post-prose hr, .post-prose .hh-divider { border: 0; height: 1px; background: var(--bd2); margin: 30px 0; }
.post-prose .ql-align-center { text-align: center; }
.post-prose .ql-align-left { text-align: left; }
.post-prose .ql-align-right { text-align: right; }
.post-prose .ql-align-justify { text-align: justify; }
.post-prose .ql-direction-rtl { direction: rtl; }
.post-prose .ql-indent-1 { padding-inline-start: 2em; }
.post-prose .ql-indent-2 { padding-inline-start: 4em; }

/* جدول: همیشه داخل ظرف اسکرول افقی (BlogHtml) */
.post-prose .hh-table { margin: 0 0 22px; }
.post-prose .hh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 22px; border: 1px solid var(--bd2); background: var(--surf);
  background-image: linear-gradient(to left, var(--surf) 30%, transparent), linear-gradient(to right, var(--surf) 30%, transparent),
                    linear-gradient(to left, rgba(0,0,0,.08), transparent), linear-gradient(to right, rgba(0,0,0,.08), transparent);
  background-position: right center, left center, right center, left center; background-repeat: no-repeat;
  background-size: 30px 100%, 30px 100%, 12px 100%, 12px 100%; background-attachment: local, local, scroll, scroll; }
.post-prose .hh-table .hh-scroll { margin: 0; }
.post-prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.8; min-width: 460px; background: transparent; }
.post-prose caption { caption-side: bottom; padding: 8px 12px; font-size: 12px; color: var(--mut); text-align: start; border-top: 1px solid var(--bd); }
.post-prose th, .post-prose td { border: 1px solid var(--bd); padding: 10px 14px; text-align: start; vertical-align: top; }
.post-prose table tr > :first-child { border-inline-start: 0; }
.post-prose table tr > :last-child { border-inline-end: 0; }
.post-prose thead th { background: var(--surf2); color: var(--tx); font-weight: 700; white-space: nowrap; border-top: 0; }
.post-prose tbody th { background: var(--surf2); color: var(--tx); font-weight: 700; }
.post-prose .hh-table--striped tbody tr:nth-child(even) > * { background: color-mix(in oklab, var(--brand05) 70%, var(--surf)); }
.post-prose .hh-table--compare thead th { background: var(--brand); color: #fff; border-color: color-mix(in oklab, var(--brand) 80%, #fff); }
.post-prose .hh-table--compare tbody th[scope="row"], .post-prose .hh-table--firstcol tbody tr > :first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surf2); color: var(--tx); font-weight: 700; }
.post-prose .hh-table--compare tbody td { text-align: center; }
.post-prose .hh-table--compare tbody tr:hover > * { background: var(--brand05); }
.post-prose .hh-yes { color: var(--ok); font-weight: 700; }
.post-prose .hh-no { color: var(--dang); font-weight: 700; }

/* تصویر و ویدیو */
.post-prose figure { margin: 0 0 24px; }
.post-prose figure img, .post-prose figure video { display: block; width: 100%; height: auto; background: var(--n50); }
.post-prose figcaption { padding-top: 8px; font-size: 12.5px; line-height: 1.8; color: var(--mut); text-align: center; }
.post-prose .hh-figure--center { max-width: 72%; margin-inline: auto; }
.post-prose .hh-figure--small { max-width: 46%; margin-inline: auto; }
.post-prose .hh-figure--wide { margin-inline: -20px; }
.post-prose .hh-video video { aspect-ratio: 16/9; background: #000; }
.post-prose .hh-embed { position: relative; aspect-ratio: 16/9; background: #000; margin: 0 0 16px; }
.post-prose .hh-video .hh-embed { margin: 0; }
.post-prose .hh-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* نکته / هشدار */
.post-prose .hh-callout { --c: var(--info); --cb: var(--info50); margin: 0 0 22px; padding: 14px 18px 14px 16px; border-inline-start: 4px solid var(--c); background: var(--cb); color: var(--tx); font-size: 14.5px; line-height: 1.95; }
.post-prose .hh-callout--tip { --c: var(--ok); --cb: var(--ok50); }
.post-prose .hh-callout--warn { --c: var(--warn); --cb: var(--warn50); }
.post-prose .hh-callout--danger { --c: var(--dang); --cb: var(--dang50); }
.post-prose .hh-callout p { margin: 0 0 6px; }
.post-prose .hh-callout p:last-child { margin: 0; }
.post-prose .hh-callout .hh-callout__title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c); margin-bottom: 4px; }
.post-prose .hh-callout .hh-callout__title::before { content: "i"; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 99px; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; font-family: Georgia, serif; }
.post-prose .hh-callout--tip .hh-callout__title::before { content: "✓"; font-family: inherit; }
.post-prose .hh-callout--warn .hh-callout__title::before, .post-prose .hh-callout--danger .hh-callout__title::before { content: "!"; }

/* مراحل */
.post-prose .hh-steps { margin: 0 0 24px; padding: 18px 18px 6px; border: 1px solid var(--bd2); }
.post-prose .hh-steps__title { font-weight: 700; color: var(--tx); font-size: 16px; margin-bottom: 14px; }
.post-prose .hh-steps ol { list-style: none; padding: 0; margin: 0; counter-reset: hhstep; }
.post-prose .hh-steps li { position: relative; counter-increment: hhstep; padding-inline-start: 46px; padding-bottom: 16px; margin: 0; }
.post-prose .hh-steps li::before { content: counter(hhstep); position: absolute; inset-inline-start: 0; top: 2px; width: 30px; height: 30px; border-radius: 99px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.post-prose .hh-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 14.5px; top: 36px; bottom: 4px; width: 1px; background: var(--bd2); }
.post-prose .hh-steps li > strong { display: block; color: var(--tx); font-size: 15px; }
.post-prose .hh-steps li > p { margin: 2px 0 0; }

/* مزایا / معایب */
.post-prose .hh-pros { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 24px; }
.post-prose .hh-pros__col { border: 1px solid var(--bd2); padding: 14px 16px 6px; }
.post-prose .hh-pros__col--pro { border-top: 3px solid var(--ok); }
.post-prose .hh-pros__col--con { border-top: 3px solid var(--dang); }
.post-prose .hh-pros__head { font-weight: 700; color: var(--tx); margin-bottom: 8px; }
.post-prose .hh-pros ul { list-style: none; padding: 0; margin: 0 0 8px; }
.post-prose .hh-pros li { position: relative; padding-inline-start: 24px; }
.post-prose .hh-pros li::before { position: absolute; inset-inline-start: 0; top: 0; font-weight: 800; }
.post-prose .hh-pros__col--pro li::before { content: "✓"; color: var(--ok); }
.post-prose .hh-pros__col--con li::before { content: "✕"; color: var(--dang); }

/* خلاصه‌ی نکات */
.post-prose .hh-summary { margin: 0 0 24px; padding: 16px 18px 8px; background: var(--surf2); border: 1px solid var(--bd2); }
.post-prose .hh-summary__title { font-weight: 700; color: var(--tx); margin-bottom: 8px; }
.post-prose .hh-summary ul { margin-bottom: 8px; }

/* پرسش‌وپاسخ */
.post-prose .hh-faq { margin: 0 0 26px; }
.post-prose .hh-faq details { border: 1px solid var(--bd2); margin-bottom: -1px; background: var(--surf); }
.post-prose .hh-faq summary { list-style: none; cursor: pointer; padding: 14px 16px; padding-inline-end: 44px; position: relative; font-weight: 700; color: var(--tx); font-size: 14.5px; line-height: 1.8; }
.post-prose .hh-faq summary::-webkit-details-marker { display: none; }
.post-prose .hh-faq summary::after { content: "+"; position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 400; color: var(--brand); }
.post-prose .hh-faq details[open] summary::after { content: "−"; }
.post-prose .hh-faq details[open] summary { color: var(--brand7); }
.post-prose .hh-faq details > :not(summary) { padding: 0 16px; margin: 0 0 14px; }

/* ── فهرست مطالب ── */
.hb-toc { position: sticky; top: 96px; border: 1px solid var(--bd); background: var(--surf); max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.hb-toc__head { display: flex; align-items: center; gap: 8px; padding: 13px 15px; border-bottom: 1px solid var(--bd); background: var(--surf2); font-size: 12.5px; font-weight: 700; color: var(--tx); }
.hb-toc__head span { margin-inline-start: auto; font-weight: 400; color: var(--mut); font-size: 11.5px; }
.hb-toc__progress { height: 2px; background: var(--bd); }
.hb-toc__progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .15s linear; }
.hb-toc ol { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; scrollbar-width: thin; }
.hb-toc a { position: relative; display: block; padding: 8px 15px; font-size: 12.5px; line-height: 1.8; color: var(--tx2); text-decoration: none; transition: background .15s, color .15s; }
.hb-toc a:hover { background: var(--surf2); color: var(--tx); }
.hb-toc a.is-sub { padding-inline-start: 30px; font-size: 12px; color: var(--mut); }
.hb-toc a.on { background: var(--brand05); color: var(--brand7); font-weight: 700; }
.hb-toc a.on::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; bottom: 6px; width: 3px; background: var(--brand); }
.hb-toc__foot { border-top: 1px solid var(--bd); padding: 12px 15px; display: flex; align-items: center; gap: 8px; }
.hb-toc__foot span { flex: 1 1 0%; font-size: 12px; color: var(--tx2); }
.hb-share { width: 32px; height: 32px; border: 1px solid var(--bd2); background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--tx2); cursor: pointer; }
.hb-share:hover { color: var(--brand); border-color: var(--brand); }
.hb-tocm { display: none; border: 1px solid var(--bd2); margin: 0 0 22px; background: var(--surf); }
.hb-tocm summary { padding: 12px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--tx); }
.hb-tocm ol { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--bd); }
.hb-tocm a { display: block; padding: 8px 14px; font-size: 13px; color: var(--tx2); text-decoration: none; }
.hb-tocm a.is-sub { padding-inline-start: 28px; font-size: 12.5px; }

/* ── برچسب‌ها، سری، نویسنده ── */
.hb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.hb-tags a { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; background: var(--surf2); color: var(--tx2); font-size: 12px; text-decoration: none; }
.hb-tags a:hover { color: var(--brand); }
.hb-series { border: 1px solid var(--bd2); padding: 16px 18px; margin: 26px 0 0; }
.hb-series strong { font-size: 13.5px; color: var(--tx); }
.hb-series ol { margin: 10px 0 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.hb-author { display: grid; grid-template-columns: 72px 1fr; gap: 16px; border: 1px solid var(--bd2); padding: 18px; margin: 0 0 24px; background: var(--surf); }
.hb-author__img { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; background: var(--brand05); display: flex; align-items: center; justify-content: center; color: var(--brand7); font-size: 24px; font-weight: 700; }
.hb-author__kicker { font-size: 11.5px; color: var(--mut); margin-bottom: 2px; }
.hb-author__name { font-size: 16px; font-weight: 700; color: var(--tx); text-decoration: none; }
.hb-author__role { font-size: 12.5px; color: var(--brand7); margin-top: 2px; }
.hb-author__bio { font-size: 13px; line-height: 2; color: var(--tx2); margin: 8px 0 0; }
.hb-author__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.hb-author__links a { font-size: 12px; color: var(--tx2); border: 1px solid var(--bd2); padding: 4px 10px; text-decoration: none; }
.hb-author__links a:hover { color: var(--brand); border-color: var(--brand); }
.hb-author__links a.hb-author__more { border: 0; color: var(--brand); padding-inline: 0; margin-inline-start: auto; }

.hb-rel-products { margin: 34px 0 30px; padding-top: 26px; border-top: 1px solid var(--bd2); }
.hb-sec-title { font-size: 22px; font-weight: 700; color: var(--tx); margin: 0 0 16px; }
.hb-rail { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.hb-rail > * { flex: 0 0 auto; width: 220px; }
.hb-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.hb-nav a { border: 1px solid var(--bd2); padding: 14px; display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--tx); }
.hb-nav a span { font-size: 11px; color: var(--mut); }
.hb-nav a strong { font-size: 13px; }
.hb-nav a[rel="next"] { text-align: end; }
.hb-rate { border: 1px solid var(--bd2); padding: 16px; text-align: center; margin-bottom: 24px; }

/* ── صفحه‌ی دسته / نویسنده ── */
.hb-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin: 8px 0 22px; }
.hb-head h1 { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.6; color: var(--tx); }
.hb-head__count { font-size: 13px; color: var(--tx2); white-space: nowrap; }
.hb-head__desc { margin: 8px 0 0; font-size: 14px; line-height: 2; color: var(--tx2); max-width: 780px; }
.hb-intro { margin: 0 0 26px; max-width: 900px; }
.hb-intro.post-prose { font-size: 14.5px; }
.hb-subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 28px; }
.hb-subcat { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--bd2); background: var(--surf); text-decoration: none; color: var(--tx); transition: border-color .15s, background .15s; }
.hb-subcat:hover { border-color: var(--brand); background: var(--brand05); }
.hb-subcat img, .hb-subcat__ph { width: 48px; height: 48px; object-fit: cover; flex: 0 0 auto; background: var(--brand05); display: flex; align-items: center; justify-content: center; color: var(--brand7); font-weight: 700; }
.hb-subcat strong { display: block; font-size: 13.5px; }
.hb-subcat small { font-size: 11.5px; color: var(--mut); }
.hb-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 22px; padding-bottom: 2px; scrollbar-width: none; }
.hb-chips a { flex: 0 0 auto; height: 36px; display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--bd2); color: var(--tx2); font-size: 12.5px; text-decoration: none; }
.hb-chips a[aria-current] { border-color: var(--brand); background: var(--brand05); color: var(--brand7); font-weight: 700; }
.hb-pinned { margin: 0 0 30px; }
.hb-pinned__label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--brand7); margin-bottom: 12px; }
.hb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hb-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; text-align: center; }
.hb-seo-text { margin: 56px 0 0; background: var(--surf2); padding: 22px; }
.hb-seo-text h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.hb-seo-text p { margin: 0; font-size: 14px; line-height: 2; color: var(--tx2); }
.hb-profile { display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: center; border: 1px solid var(--bd2); padding: 22px; margin: 10px 0 30px; }
.hb-profile .hb-author__img { width: 112px; height: 112px; font-size: 36px; }
.hb-profile h1 { margin: 0; font-size: 26px; font-weight: 700; }

@media (max-width: 1100px) {
  .hb-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; }
}
@media (max-width: 900px) {
  .hb-wrap { padding: 12px 16px 48px; }
  .hb-grid, .hb-grid--notoc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hb-toc { display: none; }
  .hb-tocm { display: block; }
  .hb-h1 { font-size: 24px; }
  .hb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .hb-head { grid-template-columns: 1fr; gap: 6px; }
  .hb-head h1 { font-size: 24px; }
  .post-prose .hh-figure--wide { margin-inline: 0; }
}
@media (max-width: 600px) {
  .post-prose { font-size: 15px; }
  .post-prose h2 { font-size: 19px; }
  .post-prose .hh-pros { grid-template-columns: 1fr; }
  .post-prose .hh-figure--center, .post-prose .hh-figure--small { max-width: 100%; }
  .hb-cards { grid-template-columns: minmax(0, 1fr); }
  .hb-author { grid-template-columns: 56px 1fr; padding: 14px; gap: 12px; }
  .hb-author__img { width: 56px; height: 56px; font-size: 20px; }
  .hb-profile { grid-template-columns: 72px 1fr; padding: 14px; gap: 14px; }
  .hb-profile .hb-author__img { width: 72px; height: 72px; font-size: 24px; }
  .hb-nav { grid-template-columns: 1fr; }
  .hb-rail > * { width: 180px; }
}

/* بلوک «محصول در متن» (کارشناس سئو): کارت‌های واقعی وسط مقاله */
.hb-inline-products { margin: 26px 0; padding: 16px 0 10px; border-top: 1px solid var(--bd2); border-bottom: 1px solid var(--bd2); }
.hb-inline-products__title { margin: 0 0 12px; font-weight: 600; font-size: 15px; }
.post-prose .hb-inline-products .hb-rail > * { width: 200px; }
