/* ==========================================================================
   Cheetah Single Post — Editorial Layout
   ========================================================================== */

/* A dedicated width keeps long-form articles independent from the normal
   page container configured under Theme Options → Layout. */
body.single-post .cheetah-single-post-container {
    max-width: var(--cheetah-single-post-container-width, 1500px);
}

/* Preserve explicit per-post Layout metabox choices. When its width remains
   Default, the independent 1500px Theme Options value is used instead of the
   normal-page container width. */
body.single-post.cheetah-container--narrow .cheetah-single-post-container {
    max-width: 800px;
}

body.single-post.cheetah-container--wide .cheetah-single-post-container {
    max-width: 1400px;
}

body.single-post.cheetah-container--full .cheetah-single-post-container {
    max-width: none;
}

body.single-post.cheetah-container--custom .cheetah-single-post-container {
    max-width: var(--cheetah-page-container-width, var(--cheetah-single-post-container-width, 1500px));
}

.cheetah-single-post-layout {
    display: grid;
    /* Desktop editorial balance: TOC 23%, article 54%, products 23%. */
    grid-template-columns: minmax(220px, 23fr) minmax(0, 54fr) minmax(220px, 23fr);
    align-items: start;
    gap: clamp(1.25rem, 2vw, 2rem);
    margin: 0.3rem 0 clamp(2.75rem, 5vw, 4.5rem);
}

/* If the TOC shortcode is unavailable, let the article use the first two
   tracks while keeping the product rail in the third desktop column. */
.cheetah-single-post-layout--no-toc .cheetah-single-post-layout__main {
    grid-column: 1 / span 2;
}

.cheetah-single-post-layout--no-toc .cheetah-single-post-sidebar--products {
    grid-column: 3;
}

/* Breadcrumbs sit close to the article grid and use a clean colour-only
   hover state, with no underline. The subtle hover surface improves feedback
   without introducing another pill/chip visual language. */
body.single-post .cheetah-breadcrumbs {
    margin: 0;
    padding: 0.35rem 0 0.15rem;
}

body.single-post .cheetah-breadcrumbs__link {
    display: inline-block;
    padding: 0.08rem 0.2rem;
    margin: -0.08rem -0.2rem;
    color: var(--cheetah-text-muted, #64748b);
    border-radius: 4px;
    text-decoration: none !important;
    transition: color var(--cheetah-transition-fast, 150ms ease), background-color var(--cheetah-transition-fast, 150ms ease);
}

body.single-post .cheetah-breadcrumbs__link:hover,
body.single-post .cheetah-breadcrumbs__link:focus-visible {
    color: var(--cheetah-primary, #2563eb);
    background-color: rgba(37, 99, 235, 0.07);
    text-decoration: none !important;
    outline: none;
}

.cheetah-single-post-layout__main,
.cheetah-single-post,
.cheetah-single-post-sidebar {
    min-width: 0;
}

.cheetah-single-post-sidebar {
    align-self: start;
}

.cheetah-single-post-sidebar--toc,
.cheetah-single-post-sidebar--products {
    position: sticky;
    /* JavaScript tracks the header's visible/hidden state: 6px below the
       visible header, or 6px from the viewport top while it is hidden. */
    top: var(--cheetah-single-post-sticky-top, calc(var(--cheetah-header-offset, var(--cheetah-header-height, 82px)) + 6px));
    transition: top 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Both sidebar rails begin at the same grid row. Keep their outer wrappers
   free of extra spacing so the TOC card's top border aligns with the product
   panel's top border. The shortcode can retain its own inner padding. */
.cheetah-single-post-sidebar--toc,
.cheetah-single-post-sidebar--products {
    margin-block-start: 0;
    padding-block-start: 0;
}

.cheetah-single-post-sidebar__toc-content {
    display: flow-root;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* The TOC plugin owns this card's border. Reset only the first shortcode
   block's outer top margin, rather than compensating with a negative margin
   on the theme's sidebar wrapper. */
.cheetah-single-post-sidebar--toc .cheetah-single-post-sidebar__toc-content > :first-child,
.cheetah-single-post-sidebar--toc .cheetah-single-post-sidebar__toc-content .cheetah-toc {
    margin-block-start: 0 !important;
}

.cheetah-single-post-sidebar__panel {
    min-width: 0;
    padding: clamp(1rem, 1.5vw, 1.35rem);
    background: var(--cheetah-bg, #ffffff);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: var(--cheetah-radius-lg, 12px);
    box-shadow: var(--cheetah-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.05));
}

.cheetah-single-post-sidebar__header {
    margin: 0 0 1rem;
}

.cheetah-single-post-sidebar__eyebrow,
.cheetah-single-related__eyebrow {
    display: block;
    margin: 0 0 0.4rem;
    color: var(--cheetah-primary, #2563eb);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    line-height: 1.35;
    text-transform: uppercase;
}

.cheetah-single-post-sidebar__title {
    margin: 0;
    color: var(--cheetah-heading, #0f172a);
    font-size: clamp(1.05rem, 1.2vw, 1.2rem);
    font-weight: 700;
    line-height: 1.3;
}

/* TOC plugin owns the card, title, progress indicator, and interactions.
   The theme only constrains its output to the width of the left rail. */
.cheetah-single-post-sidebar--toc .cheetah-toc,
.cheetah-single-post-sidebar--toc nav,
.cheetah-single-post-sidebar--toc ul {
    max-width: 100%;
}

.cheetah-single-post-sidebar--toc :where(a, button) {
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Article header and metadata
   -------------------------------------------------------------------------- */
.cheetah-single-post__header {
    padding: 0;
    margin: 0 0 1.6rem;
}

/* Categories and tags now live together in the article footer taxonomy row. */
.cheetah-single-post__title {
    margin: 0 0 1.15rem;
    color: var(--cheetah-heading, #0f172a);
    font-family: var(--cheetah-font-heading, inherit);
    font-size: clamp(2rem, 1.7rem + 1vw, 2.5rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

/* Freshness is retained as machine-readable metadata next to the date, not
   as a second visible badge competing with the article header. */
.cheetah-single-post__meta .geo-freshness-badge {
    display: none !important;
}

.cheetah-single-post__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 0.5rem 0;
    color: var(--cheetah-secondary, #64748b);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.cheetah-single-post__meta-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.35rem;
    padding: 0.08rem 0.55rem;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
}

.cheetah-single-post__meta-item--author {
    justify-content: flex-start;
    text-align: left;
}

.cheetah-single-post__meta-item--date {
    justify-content: center;
    text-align: center;
}

.cheetah-single-post__meta-item--reading-time {
    justify-content: flex-end;
    text-align: right;
}

.cheetah-single-post__meta-item + .cheetah-single-post__meta-item {
    border-left: 0;
}

.cheetah-single-post__meta-label,
.cheetah-single-post__meta-value {
    display: inline;
    min-width: 0;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.cheetah-single-post__meta-label {
    flex: 0 0 auto;
    color: var(--cheetah-text-muted, #64748b);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.cheetah-single-post__meta-value {
    overflow: hidden;
    color: var(--cheetah-heading, #0f172a);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cheetah-single-post__meta-value a {
    color: inherit;
    text-decoration: none;
}

.cheetah-single-post__meta-value a:hover,
.cheetah-single-post__meta-value a:focus-visible {
    color: var(--cheetah-primary, #2563eb);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Featured image and article body
   -------------------------------------------------------------------------- */
.cheetah-single-post__featured-image {
    width: 100%;
    margin: 0 0 2rem;
    overflow: hidden;
    background: var(--cheetah-bg-alt, #f8fafc);
    border-radius: var(--cheetah-radius-xl, 16px);
}

.cheetah-single-post__featured-image-element {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 540px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.cheetah-single-post__content {
    color: var(--cheetah-text, #1e293b);
    font-family: var(--cheetah-font-body, inherit);
    font-size: clamp(1rem, 0.97rem + 0.18vw, 1.075rem);
    line-height: 1.82;
    overflow-wrap: break-word;
}

.cheetah-single-post__content > *:first-child {
    margin-top: 0;
}

.cheetah-single-post__content p {
    margin: 0 0 1.35em;
}

.cheetah-single-post__content h1,
.cheetah-single-post__content h2,
.cheetah-single-post__content h3,
.cheetah-single-post__content h4,
.cheetah-single-post__content h5,
.cheetah-single-post__content h6 {
    margin: 2.1em 0 0.7em;
    color: var(--cheetah-heading, #0f172a);
    font-family: var(--cheetah-font-heading, inherit);
    font-weight: 720;
    letter-spacing: -0.025em;
    line-height: 1.25;
    scroll-margin-top: calc(var(--cheetah-header-offset, var(--cheetah-header-height, 82px)) + 1.25rem);
}

.cheetah-single-post__content h1 { font-size: clamp(1.7rem, 1.55rem + 0.65vw, 1.95rem); }
.cheetah-single-post__content h2 { font-size: clamp(1.5rem, 1.35rem + 0.55vw, 1.8rem); }
.cheetah-single-post__content h3 { font-size: clamp(1.28rem, 1.2rem + 0.3vw, 1.5rem); }
.cheetah-single-post__content h4 { font-size: 1.2rem; }
.cheetah-single-post__content h5 { font-size: 1.08rem; }
.cheetah-single-post__content h6 { font-size: 1rem; }

.cheetah-single-post__content a {
    color: var(--cheetah-primary, #2563eb);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.cheetah-single-post__content a:hover,
.cheetah-single-post__content a:focus-visible {
    color: var(--cheetah-primary-hover, #1d4ed8);
}

.cheetah-single-post__content ul,
.cheetah-single-post__content ol {
    margin: 0 0 1.4em;
    padding-left: 1.55em;
    list-style-position: outside;
}

.cheetah-single-post__content ul { list-style: disc; }
.cheetah-single-post__content ol { list-style: decimal; }

.cheetah-single-post__content li {
    margin: 0 0 0.45em;
    padding-left: 0.15em;
}

.cheetah-single-post__content li > ul,
.cheetah-single-post__content li > ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.cheetah-single-post__content blockquote {
    margin: 1.75rem 0;
    padding: 1rem 1.35rem;
    color: var(--cheetah-heading, #0f172a);
    background: var(--cheetah-bg-alt, #f8fafc);
    border: 0;
    border-left: 3px solid var(--cheetah-primary, #2563eb);
    border-radius: 0 var(--cheetah-radius-md, 8px) var(--cheetah-radius-md, 8px) 0;
    font-size: 1.08em;
    line-height: 1.7;
}

.cheetah-single-post__content blockquote > :last-child { margin-bottom: 0; }

.cheetah-single-post__content img,
.cheetah-single-post__content video,
.cheetah-single-post__content iframe,
.cheetah-single-post__content embed {
    max-width: 100%;
}

.cheetah-single-post__content img {
    height: auto;
    border-radius: var(--cheetah-radius-md, 8px);
}

.cheetah-single-post__content figure {
    max-width: 100%;
    margin: 1.6rem 0;
}

.cheetah-single-post__content figcaption {
    margin-top: 0.55rem;
    color: var(--cheetah-text-muted, #64748b);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.cheetah-single-post__content pre {
    max-width: 100%;
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    color: #e2e8f0;
    background: #0f172a;
    border-radius: var(--cheetah-radius-md, 8px);
    font-size: 0.86rem;
    line-height: 1.65;
}

.cheetah-single-post__content code {
    font-family: var(--cheetah-font-mono, monospace);
    font-size: 0.88em;
}

.cheetah-single-post__content :not(pre) > code {
    padding: 0.12em 0.35em;
    color: #334155;
    background: var(--cheetah-bg-alt, #f1f5f9);
    border-radius: 4px;
}

.cheetah-single-post__content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.6rem 0;
    overflow-x: auto;
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: var(--cheetah-radius-md, 8px);
    -webkit-overflow-scrolling: touch;
}

.cheetah-single-post__content th,
.cheetah-single-post__content td {
    min-width: 110px;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--cheetah-border, #e2e8f0);
    text-align: left;
    vertical-align: top;
}

.cheetah-single-post__content th {
    color: var(--cheetah-heading, #0f172a);
    background: var(--cheetah-bg-alt, #f8fafc);
    font-weight: 700;
}

.cheetah-single-post__content tr:last-child td { border-bottom: 0; }

.cheetah-single-post__content hr {
    margin: 2.25rem 0;
    border: 0;
    border-top: 1px solid var(--cheetah-border, #e2e8f0);
}

.cheetah-single-post__content .wp-block-button__link {
    text-decoration: none;
}

.cheetah-single-post__page-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.cheetah-single-post__page-links a,
.cheetah-single-post__page-links > span:not(.page-links__label) {
    display: inline-flex;
    min-width: 2.25rem;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 7px;
    text-decoration: none;
}

.cheetah-single-post__footer {
    margin: 1.45rem 0 0;
    padding: 0;
    border: 0;
}

.cheetah-single-post__taxonomy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.5rem;
    width: 100%;
    padding: 0.2rem 0;
}

.cheetah-single-post__categories,
.cheetah-single-post__tags {
    display: flex;
    min-width: 0;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.cheetah-single-post__categories {
    justify-content: flex-start;
    text-align: left;
}

.cheetah-single-post__tags {
    justify-content: flex-end;
    margin-left: auto;
    text-align: right;
}

.cheetah-single-post__taxonomy-label {
    flex: 0 0 auto;
    color: var(--cheetah-text-muted, #64748b);
    font-size: 0.8rem;
    font-weight: 600;
}

.cheetah-single-post__taxonomy-links {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.65rem;
}

.cheetah-single-post__taxonomy-link {
    display: inline;
    padding: 0;
    color: var(--cheetah-secondary, #64748b);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: color var(--cheetah-transition-fast, 150ms ease);
}

.cheetah-single-post__taxonomy-link:hover,
.cheetah-single-post__taxonomy-link:focus-visible {
    color: var(--cheetah-primary, #2563eb);
    background: transparent;
    text-decoration: none;
    outline: none;
}

/* --------------------------------------------------------------------------
   Previous / next article navigation
   -------------------------------------------------------------------------- */
.cheetah-single-post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 2.35rem 0 0;
}

.cheetah-single-post-navigation__item {
    display: flex;
    min-width: 0;
    min-height: 104px;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    color: var(--cheetah-heading, #0f172a);
    background: var(--cheetah-bg, #ffffff);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: var(--cheetah-radius-lg, 12px);
    text-decoration: none;
    transition: border-color var(--cheetah-transition-fast, 150ms ease), box-shadow var(--cheetah-transition-fast, 150ms ease), transform var(--cheetah-transition-fast, 150ms ease);
}

a.cheetah-single-post-navigation__item:hover,
a.cheetah-single-post-navigation__item:focus-visible {
    border-color: var(--cheetah-primary, #2563eb);
    box-shadow: var(--cheetah-shadow-md, 0 4px 8px rgba(15, 23, 42, 0.08));
    color: var(--cheetah-heading, #0f172a);
    text-decoration: none;
    transform: translateY(-2px);
}

.cheetah-single-post-navigation__item--unavailable {
    color: var(--cheetah-text-muted, #64748b);
    background: var(--cheetah-bg-alt, #f8fafc);
    border-color: var(--cheetah-border-light, #f1f5f9);
    box-shadow: none;
    cursor: default;
}

.cheetah-single-post-navigation__item--unavailable .cheetah-single-post-navigation__direction,
.cheetah-single-post-navigation__item--unavailable .cheetah-single-post-navigation__title {
    color: var(--cheetah-text-muted, #64748b);
}

.cheetah-single-post-navigation__item--next { text-align: right; }

.cheetah-single-post-navigation__direction {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--cheetah-primary, #2563eb);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-transform: uppercase;
}

.cheetah-single-post-navigation__item--next .cheetah-single-post-navigation__direction {
    justify-content: flex-end;
}

.cheetah-single-post-navigation__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--cheetah-heading, #0f172a);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* --------------------------------------------------------------------------
   Right sidebar — product showcase
   -------------------------------------------------------------------------- */
.cheetah-single-post-sidebar__panel--products .cheetah-single-post-sidebar__header,
.cheetah-single-post-sidebar__panel--topics .cheetah-single-post-sidebar__header {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--cheetah-border-light, #f1f5f9);
}

.cheetah-single-post-products__list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.cheetah-single-post-products__empty {
    margin: 0;
    padding: 0.85rem 0;
    color: var(--cheetah-text-muted, #64748b);
    font-size: 0.86rem;
    line-height: 1.6;
}

.cheetah-single-post-products__item {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    list-style: none !important;
}

.cheetah-single-post-sidebar--products .cheetah-product-card {
    border-radius: 10px;
    box-shadow: none;
}

.cheetah-single-post-sidebar--products .cheetah-product-card:hover {
    box-shadow: var(--cheetah-shadow-md, 0 4px 8px rgba(15, 23, 42, 0.08));
    transform: translateY(-2px);
}

.cheetah-single-post-sidebar--products .cheetah-product-card__body {
    padding: 0.75rem;
}

.cheetah-single-post-sidebar--products .cheetah-product-card__title {
    font-size: 0.91rem;
    line-height: 1.35;
}

.cheetah-single-post-sidebar--products .cheetah-product-card__meta {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-bottom: 0.35rem;
}

.cheetah-single-post-sidebar--products .cheetah-product-price {
    font-size: 0.95rem;
}

.cheetah-single-post-sidebar--products .cheetah-product-card__actions,
.cheetah-single-post-sidebar--products .cheetah-product-card__actions .cheetah-product-actions {
    min-height: 34px;
}

/* The Explore products sidebar renders RFQ forms as direct siblings of the
 * WooCommerce action wrapper. Keep both slots on the same theme width token. */
.cheetah-single-post-sidebar--products .cheetah-product-card__actions .cheetah-product-actions,
.cheetah-single-post-sidebar--products .cheetah-product-card__actions > .chrfq-loop-add.chrfq-quote-button-width--match {
    box-sizing: border-box;
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
    width: var(--cheetah-wc-add-to-cart-loop-width, 220px);
}

.cheetah-single-post-sidebar--products .cheetah-product-card__actions .cheetah-product-actions > .button,
.cheetah-single-post-sidebar--products .cheetah-product-card__actions > .chrfq-loop-add.chrfq-quote-button-width--match .chrfq-add-to-quote {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
}
.cheetah-single-post-sidebar--products .cheetah-product-card__actions .button,
.cheetah-single-post-sidebar--products .cheetah-product-card__actions .added_to_cart {
    height: 36px;
    padding: 0 0.6rem;
    font-size: 0.76rem;
}

.cheetah-single-post-sidebar__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    color: var(--cheetah-primary, #2563eb);
    border-top: 1px solid var(--cheetah-border-light, #f1f5f9);
    font-size: 0.83rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: color var(--cheetah-transition-fast, 150ms ease);
}

.cheetah-single-post-sidebar__more:hover,
.cheetah-single-post-sidebar__more:focus-visible {
    color: var(--cheetah-primary-hover, #1d4ed8);
    text-decoration: none;
}

.cheetah-single-post-sidebar__topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cheetah-single-post-sidebar__topic {
    display: inline-flex;
    max-width: 100%;
    padding: 0.42rem 0.65rem;
    color: var(--cheetah-secondary, #64748b);
    background: var(--cheetah-bg-alt, #f8fafc);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 999px;
    font-size: 0.77rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.cheetah-single-post-sidebar__topic:hover,
.cheetah-single-post-sidebar__topic:focus-visible {
    color: var(--cheetah-primary, #2563eb);
    border-color: var(--cheetah-primary, #2563eb);
}

.cheetah-single-post-product {
    overflow: hidden;
    background: var(--cheetah-bg, #ffffff);
    border: 1px solid var(--cheetah-border, #e2e8f0);
    border-radius: 10px;
}

.cheetah-single-post-product__link {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: var(--cheetah-heading, #0f172a);
    font-weight: 700;
    text-decoration: none;
}

.cheetah-single-post-product__link img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.cheetah-single-post-product__name,
.cheetah-single-post-product__price {
    padding: 0 0.75rem;
}

.cheetah-single-post-product__price {
    display: block;
    padding-bottom: 0.75rem;
    color: var(--cheetah-primary, #2563eb);
    font-size: 0.9rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Related articles
   -------------------------------------------------------------------------- */
.cheetah-single-related {
    margin: clamp(2.75rem, 5vw, 4.5rem) 0 0;
    padding-top: clamp(1.6rem, 3vw, 2.5rem);
    border-top: 1px solid var(--cheetah-border, #e2e8f0);
}

.cheetah-single-related__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 1.35rem;
}

.cheetah-single-related__title {
    margin: 0;
    color: var(--cheetah-heading, #0f172a);
    font-size: clamp(1.55rem, 1.3rem + 0.8vw, 2.05rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.cheetah-single-related__grid {
    --cheetah-blog-columns: 3;
    gap: clamp(0.85rem, 1.8vw, 1.35rem);
}

.cheetah-single-related__grid .cheetah-blog-card {
    height: 100%;
}

.cheetah-single-related__grid .cheetah-blog-card__title {
    font-size: clamp(1.05rem, 1.15vw, 1.28rem);
}

.cheetah-single-related__grid .cheetah-blog-card__body {
    padding: 1rem;
}

/* Related cards share the archive's text-only metadata language. */
.cheetah-single-related .cheetah-blog-card__meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    line-height: 1.4;
}

.cheetah-single-related .cheetah-blog-card__meta-icon {
    display: none !important;
}

.cheetah-single-related .cheetah-blog-card__meta-item {
    display: inline-flex;
    min-width: 0;
    align-items: baseline;
    gap: 0.28rem;
    min-height: 0;
    line-height: 1.4;
}

.cheetah-single-related .cheetah-blog-card__taxonomy-link {
    min-height: 0;
    padding: 0;
    color: var(--cheetah-text, #334155);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.cheetah-single-related .cheetah-blog-card__meta a[href]:hover,
.cheetah-single-related .cheetah-blog-card__meta a[href]:focus-visible {
    color: var(--cheetah-primary, #2563eb);
    background: transparent;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Responsive layout
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    /* Keep categories on the left and tags on the right at tablet/mobile widths.
       Each group gets half of the available row and its links wrap internally. */
    .cheetah-single-post__taxonomy {
        align-items: flex-start;
        gap: 0.55rem 0.8rem;
    }

    .cheetah-single-post__categories,
    .cheetah-single-post__tags {
        flex: 0 1 calc(50% - 0.4rem);
        width: calc(50% - 0.4rem);
        max-width: calc(50% - 0.4rem);
        min-width: 0;
    }

    .cheetah-single-post__categories {
        justify-content: flex-start;
        margin-left: 0;
        text-align: left;
    }

    .cheetah-single-post__tags {
        justify-content: flex-end;
        margin-left: auto;
        text-align: right;
    }

    .cheetah-single-post__tags .cheetah-single-post__taxonomy-links {
        justify-content: flex-end;
        text-align: right;
    }

    /* Tablet: TOC and article share the first row; product cards sit below. */
    .cheetah-single-post-layout {
        grid-template-columns: minmax(175px, 31fr) minmax(0, 69fr);
        gap: 1.35rem;
    }

    .cheetah-single-post-layout--no-toc .cheetah-single-post-layout__main {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 1100px;
        margin-inline: auto;
    }

    .cheetah-single-post-sidebar--products,
    .cheetah-single-post-layout--no-toc .cheetah-single-post-sidebar--products {
        position: static;
        grid-column: 1 / -1;
        margin-top: 1.25rem;
    }

    .cheetah-single-post-products__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cheetah-single-post-sidebar--products .cheetah-product-card__image-wrap {
        aspect-ratio: 5 / 4;
    }
}

@media (max-width: 900px) {
    .cheetah-single-post-products__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cheetah-single-post-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.15rem;
        margin-top: 0.85rem;
    }

    /* The full TOC remains available on desktop and tablet; on phones it is
       omitted to keep the reading flow focused and avoid a long preamble. */
    .cheetah-single-post-sidebar--toc {
        display: none !important;
    }

    .cheetah-single-post-sidebar--products,
    .cheetah-single-post-layout--no-toc .cheetah-single-post-sidebar--products {
        position: static;
        grid-column: 1 / -1;
        margin-top: 0.25rem;
    }

    .cheetah-single-post-layout--no-toc .cheetah-single-post-layout__main {
        grid-column: 1 / -1;
    }

    .cheetah-single-post__header {
        margin-bottom: 1.25rem;
    }

    .cheetah-single-post__title {
        font-size: clamp(1.85rem, 6.5vw, 2.2rem);
        letter-spacing: -0.035em;
    }

    .cheetah-single-post__meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        padding: 0.55rem 0.05rem;
        font-size: 0.68rem;
    }

    .cheetah-single-post__meta-item {
        min-width: 0;
        gap: 0.12rem;
        padding: 0.08rem 0.1rem;
        font-size: inherit;
    }

    .cheetah-single-post__meta-item--author { justify-content: flex-start; text-align: left; }
    .cheetah-single-post__meta-item--date { justify-content: center; text-align: center; }
    .cheetah-single-post__meta-item--reading-time { justify-content: flex-end; text-align: right; }

    .cheetah-single-post__meta-label,
    .cheetah-single-post__meta-value {
        font-size: inherit;
    }

    .cheetah-single-post__featured-image {
        /* Keep the opening paragraph visually connected to the featured image. */
        margin-bottom: 0.4rem;
        border-radius: 12px;
    }

    .cheetah-single-post__content {
        font-size: 1rem;
        line-height: 1.78;
    }

    .cheetah-single-post__content > p:first-child {
        margin-top: 0;
    }

    .cheetah-single-post__content h1,
    .cheetah-single-post__content h2,
    .cheetah-single-post__content h3,
    .cheetah-single-post__content h4,
    .cheetah-single-post__content h5,
    .cheetah-single-post__content h6 {
        margin-top: 1.35em;
        margin-bottom: 0.55em;
    }

    /* Preserve a clear heading hierarchy on narrow screens. The previous
       H1/H2 clamps were close enough in size to look almost interchangeable. */
    .cheetah-single-post__content h1 {
        font-size: clamp(1.6rem, 5.2vw, 1.75rem);
    }

    .cheetah-single-post__content h2 {
        font-size: clamp(1.3rem, 4.6vw, 1.5rem);
    }

    .cheetah-single-post__content h3 {
        font-size: clamp(1.15rem, 4.1vw, 1.3rem);
    }

    .cheetah-single-post__content h4 { font-size: 1.1rem; }
    .cheetah-single-post__content h5 { font-size: 1.02rem; }
    .cheetah-single-post__content h6 { font-size: 0.96rem; }

    .cheetah-single-post-navigation {
        gap: 0.6rem;
        margin-top: 1.8rem;
    }

    .cheetah-single-post-navigation__item {
        min-height: 94px;
        padding: 0.8rem;
    }

    .cheetah-single-post-navigation__title {
        font-size: 0.83rem;
    }

    .cheetah-single-post-products__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .cheetah-single-related__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }

}

@media (max-width: 767px) {
    /* Keep the article trail on one line and give the current title the
       remaining width so it truncates cleanly rather than wrapping. */
    body.single-post .cheetah-breadcrumbs {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    body.single-post .cheetah-breadcrumbs__list {
        flex-wrap: nowrap;
        min-width: 0;
        overflow: hidden;
    }

    body.single-post .cheetah-breadcrumbs__item {
        flex: 0 0 auto;
        min-width: 0;
    }

    body.single-post .cheetah-breadcrumbs__item--current {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    body.single-post .cheetah-breadcrumbs__text {
        display: block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cheetah-single-related .cheetah-blog-card__read-more {
        align-self: center;
        margin-inline: auto;
    }
}

@media (max-width: 420px) {
    /* Keep the previous/next pair in a stable left/right arrangement even on
       narrow phones; compact padding preserves two usable tap-sized panels. */
    .cheetah-single-post-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .cheetah-single-post-navigation__item {
        min-height: 88px;
        padding: 0.65rem;
    }

    .cheetah-single-post-navigation__direction {
        font-size: 0.62rem;
        letter-spacing: 0.025em;
    }

    .cheetah-single-post-navigation__title {
        font-size: 0.76rem;
        overflow-wrap: anywhere;
    }

    .cheetah-single-post-products__list {
        gap: 0.55rem;
    }

    .cheetah-single-post-sidebar--products .cheetah-product-card__body {
        padding: 0.6rem;
    }

    .cheetah-single-post-sidebar--products .cheetah-product-card__title {
        font-size: 0.83rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cheetah-single-post-layout *,
    .cheetah-single-related *,
    .cheetah-single-post-layout *::before,
    .cheetah-single-related *::before,
    .cheetah-single-post-layout *::after,
    .cheetah-single-related *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


@media (prefers-reduced-motion: reduce) {
    .cheetah-single-post-sidebar--toc,
    .cheetah-single-post-sidebar--products {
        transition: none;
    }
}


