/* ═══════════════════════════════════════════════════
   ARTICLE AEO / GEO  (loaded on article.php only)
   Quick answer, "In this guide", in-article product
   grids, "Where to buy in Kenya", hero badge fix.
   Uses the tokens defined in style.css (:root).
   ═══════════════════════════════════════════════════ */

/* ── Hero: badge no longer sits on top of the breadcrumb ──
   .kb-card__category is absolutely positioned (it is a card overlay), so in
   the hero it covered the breadcrumb. The hero badge is its own static class. */
.page-banner--article .page-banner__content {
    width: 100%;
    /* .page-banner__content's "padding: 2rem 0" wiped the container gutter */
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    text-align: left;
}
.page-banner--article .breadcrumb {
    flex-wrap: wrap;
    row-gap: .25rem;
    position: relative;
    z-index: 1;
}
.page-banner--article .breadcrumb span {
    color: rgba(255, 255, 255, .9);
    overflow-wrap: anywhere;
}
/* Shared breadcrumb markup (includes/breadcrumbs.php: ol > li): the last
   crumb is the full article title, so let it wrap inside the banner. */
.page-banner--article .agz-bc__list { row-gap: .25rem; }
.page-banner--article .agz-bc__item { min-width: 0; max-width: 100%; }
.article-hero__badge {
    display: inline-block;
    position: static;
    margin: 0 0 var(--s-4, 1rem);
    background: var(--clr-red);
    color: var(--clr-white);
    padding: .3rem .8rem;
    border-radius: 4px;
    font-size: var(--t-xs);
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.article-hero__title {
    font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.8rem);
    overflow-wrap: break-word;
}
@media (max-width: 480px) {
    .article-hero__title { letter-spacing: 1px; }
    .page-banner--article .article-meta { gap: .5rem 1rem; }
}

/* ── Quick answer (upgraded excerpt box) ── */
.article-quick-answer {
    padding: var(--s-4, 1rem) var(--s-5, 1.5rem);
}
.article-quick-answer__label {
    margin: 0 0 .35rem;
    font-family: var(--ff-subheading);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--clr-red);
}
.article-quick-answer__label i { margin-right: .25rem; }
.article-quick-answer__text {
    margin: 0;
    color: var(--clr-grey-900);
}

/* ── In this guide ── */
.article-toc {
    margin: 0 0 var(--s-6, 2rem);
    padding: var(--s-4, 1rem) var(--s-5, 1.5rem);
    border: 1px solid var(--clr-accent-light);
    border-radius: var(--radius-lg);
    background: var(--clr-grey-100);
}
.article-toc__title {
    margin: 0 0 .5rem;
    font-family: var(--ff-subheading);
    font-size: var(--t-sm);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--clr-dark);
}
.article-toc__title i { margin-right: .3rem; color: var(--clr-red); }
.article-toc__list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: .35rem;
    font-size: var(--t-base);
    line-height: 1.5;
}
.article-toc__list a {
    color: var(--clr-red-dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.article-toc__list a:hover,
.article-toc__list a:focus-visible { border-bottom-color: currentColor; }
.article-body h2[id] { scroll-margin-top: calc(var(--header-h, 80px) + 1rem); }

/* ── In-article product grids ── */
.article-body .article-grid {
    margin: var(--s-6, 2rem) 0;
    padding: var(--s-5, 1.5rem) 0 0;
    border-top: 1px solid var(--clr-accent-light);
    clear: both;
}
.article-body .article-grid + * { margin-top: var(--s-5, 1.5rem); }
.article-body .article-grid__head { margin-bottom: var(--s-4, 1rem); }
.article-body .article-grid__title {
    margin: 0;
    font-size: var(--t-xl);
    line-height: 1.25;
    color: var(--clr-dark);
}
.article-body .article-grid .article-shop__all { color: var(--clr-red); }
.article-body .article-grid__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-4, 1rem);
    overflow: visible;
}
/* Cards inside copy: undo article typography (line-height, h3 margins, links). */
.article-body .article-grid .product-card { line-height: 1.4; }
.article-body .article-grid .product-card__title {
    margin: 0 0 .35rem;
    font-size: var(--t-sm);
    line-height: 1.35;
}
.article-body .article-grid .product-card__title a { color: inherit; text-decoration: none; }
.article-body .article-grid ul.product-card__specs { margin: 0 0 .4rem; padding: 0; list-style: none; }
.article-body .article-grid ul.product-card__specs li { margin: 0; }
.article-body .article-grid img { margin: 0; border-radius: 0; }

@media (max-width: 1199px) {
    .article-body .article-grid__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .article-body .article-grid__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .article-body .article-grid__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3, .75rem); }
    .article-body .article-grid__title { font-size: var(--t-lg); }
    .article-body .article-grid__head { flex-direction: column; align-items: flex-start; gap: .25rem; }
}

/* ── Where to buy in Kenya ── */
.article-buy {
    margin: var(--s-6, 2rem) 0;
    padding: var(--s-5, 1.5rem);
    border-radius: var(--radius-lg);
    background: var(--clr-grey-100);
    border-left: 4px solid var(--clr-accent);
}
.article-buy__title {
    margin: 0 0 var(--s-3, .75rem);
    font-size: var(--t-lg);
    color: var(--clr-dark);
}
.article-buy__title i { color: var(--clr-red); margin-right: .25rem; }
.article-buy__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .5rem;
    font-size: var(--t-base);
    color: var(--clr-grey-700);
}
.article-buy__list li { display: flex; gap: .6rem; align-items: flex-start; }
.article-buy__list i { color: var(--clr-red); margin-top: .2rem; flex: none; }
.article-buy__list a { color: var(--clr-red-dark); font-weight: 600; }

/* ── Heading levels (audit ONP-04, 2026-11-22) ──
   "Related Articles" is now an h2 and the sidebar widget titles are <p>
   (page chrome, not article outline). These rules repeat what the old
   h3 / h4 tags got from style.css, so the page looks exactly the same. */
.article-related .article-related__title {
    font-size: var(--t-xl);
    margin-bottom: 1.5rem;
    color: var(--clr-dark);
}
.kb-sidebar p.kb-widget__title,
.kb-sidebar p.kb-widget__cta-title {
    font-family: var(--ff-heading);
    font-weight: 700;
    line-height: 1.2;
    font-optical-sizing: auto;
}
.kb-sidebar p.kb-widget__cta-title {
    margin: .8rem 0 .4rem;
    font-size: var(--t-lg);
    letter-spacing: -.015em;
    color: var(--clr-black);
}

/* ── Mobile overflow: wide tables in the article body ──
   A grid/flex child defaults to min-width:auto, so a wide <table> pushed the
   whole .kb-main column past the viewport (and clipped the quick answer,
   "In this guide" and product grids). Let the column shrink and scroll tables
   inside their own box instead. */
.kb-layout > *,
.kb-main { min-width: 0; max-width: 100%; }
.article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.article-body img,
.article-body iframe,
.article-body video { max-width: 100%; height: auto; }
.article-body pre { max-width: 100%; overflow-x: auto; }
