/* Stage 124: visual related-article cards on single posts. */
.kh-single-article-content .kh-related-articles {
    margin: 38px 0 0;
    padding-top: 30px;
    border-top: 1px solid #e5edf8;
}

.kh-single-article-content .kh-related-articles > h2 {
    margin: 0 0 18px;
    color: #111827;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
}

.kh-related-articles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(176px, 100%), 1fr));
    gap: 16px;
}

.kh-single-article-content .kh-related-article-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dce6f3;
    border-radius: 14px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(42, 78, 127, .08);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.kh-single-article-content .kh-related-article-card:hover,
.kh-single-article-content .kh-related-article-card:focus-visible {
    border-color: #9fc7ff;
    color: #111827;
    box-shadow: 0 16px 34px rgba(42, 96, 170, .16);
    transform: translateY(-3px);
}

.kh-single-article-content .kh-related-article-card:focus-visible {
    outline: 3px solid rgba(49, 85, 220, .26);
    outline-offset: 3px;
}

.kh-related-article-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #eef5ff, #f8fbff);
}

.kh-single-article-content .kh-related-article-card__image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    transition: transform .25s ease;
}

.kh-related-article-card:hover .kh-related-article-card__image,
.kh-related-article-card:focus-visible .kh-related-article-card__image {
    transform: scale(1.025);
}

.kh-related-article-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: #3155dc;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 12px 24px rgba(49, 85, 220, .22);
}

.kh-related-article-card__body {
    display: flex;
    min-height: 116px;
    flex: 1;
    flex-direction: column;
    padding: 13px 14px 12px;
}

.kh-related-article-card__title {
    display: -webkit-box;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.kh-related-article-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.kh-related-article-card__category {
    overflow: hidden;
    color: #66809e;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .055em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.kh-related-article-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #f0f5ff;
    color: #3155dc;
    font-size: 15px;
    font-weight: 900;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.kh-related-articles__footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.kh-single-article-content .kh-related-articles__all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid #cfdbeb;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(42, 78, 127, .07);
    transition: color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.kh-single-article-content .kh-related-articles__all:hover,
.kh-single-article-content .kh-related-articles__all:focus-visible {
    border-color: #9fc7ff;
    color: #3155dc;
    box-shadow: 0 10px 24px rgba(42, 96, 170, .13);
    transform: translateY(-2px);
}

.kh-single-article-content .kh-related-articles__all:focus-visible {
    outline: 3px solid rgba(49, 85, 220, .26);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .kh-single-article-content .kh-related-articles {
        margin-top: 30px;
        padding-top: 24px;
    }

    .kh-single-article-content .kh-related-articles > h2 {
        margin-bottom: 16px;
        font-size: 22px;
    }

    .kh-related-articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .kh-related-article-card__body {
        min-height: 112px;
        padding: 12px;
    }
}

@media (max-width: 460px) {
    .kh-related-articles__grid {
        grid-template-columns: 1fr;
    }

    .kh-related-article-card__media {
        aspect-ratio: 16 / 8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-single-article-content .kh-related-article-card,
    .kh-single-article-content .kh-related-articles__all,
    .kh-related-article-card__image,
    .kh-related-article-card__arrow {
        transition: none;
    }
}

/* Stage 125: in-article product recommendation grid. */
.kh-single-article-content .kh-article-product-ads {
    --kh-ad-accent: #3155dc;
    --kh-ad-accent-bright: #35bdf5;
    --kh-ad-text: #111827;
    --kh-ad-muted: #64748b;
    --kh-ad-border: #dce7f4;
    --kh-ad-surface: #ffffff;
    margin: 36px 0;
    padding: 26px 0 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--kh-ad-text);
    line-height: 1.4;
}

.kh-article-product-ads__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.kh-single-article-content .kh-article-product-ads__head > span {
    order: 2;
    color: var(--kh-ad-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .025em;
}

.kh-single-article-content .kh-article-product-ads__head h2 {
    margin: 0;
    color: var(--kh-ad-text);
    font-size: 23px;
    font-weight: 900;
    line-height: 1.2;
}

.kh-article-product-ads__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(154px, 100%), 1fr));
    gap: 20px;
}

.kh-article-product-ad {
    display: flex;
    min-width: 0;
    padding: 0;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: transform .2s ease;
}

.kh-article-product-ad:hover {
    transform: translateY(-3px);
}

.kh-article-product-ad__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 154px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}

.kh-single-article-content .kh-article-product-ad__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 154px;
    color: inherit;
}

.kh-single-article-content .kh-article-product-ad__image img {
    display: block;
    width: auto;
    max-width: 88%;
    height: 142px;
    border-radius: 0;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(38, 57, 84, .13));
    transition: transform .22s ease;
}

.kh-article-product-ad:hover .kh-article-product-ad__image img {
    transform: scale(1.035);
}

.kh-article-product-ad__discount {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 39px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ff5264;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 7px 15px rgba(255, 82, 100, .22);
}

.kh-single-article-content .kh-article-product-ad__title {
    display: -webkit-box;
    min-height: 57px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--kh-ad-text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.kh-single-article-content .kh-article-product-ad__title a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.kh-single-article-content .kh-article-product-ad__title a:hover,
.kh-single-article-content .kh-article-product-ad__title a:focus-visible {
    color: var(--kh-ad-accent);
}

.kh-article-product-ad__price {
    display: flex;
    min-height: 25px;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--kh-ad-accent);
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.kh-article-product-ad__price del {
    order: 2;
    color: #9aa9bc;
    font-size: 11px;
    font-weight: 700;
    opacity: 1;
}

.kh-article-product-ad__price ins {
    order: 1;
    color: var(--kh-ad-accent);
    text-decoration: none;
}

.kh-article-product-ad__actions {
    display: grid;
    gap: 7px;
    margin-top: auto;
}

.kh-single-article-content .kh-article-product-ad__cart,
.kh-single-article-content .kh-article-product-ad__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    touch-action: manipulation;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}

.kh-single-article-content .kh-article-product-ad__cart {
    gap: 6px;
    border: 0;
    background: linear-gradient(135deg, #6f5cff 0%, var(--kh-ad-accent-bright) 100%);
    color: #fff;
    box-shadow: 0 9px 18px rgba(67, 126, 241, .22);
}

.kh-single-article-content .kh-article-product-ad__cart:hover,
.kh-single-article-content .kh-article-product-ad__cart:focus-visible {
    color: #fff;
    box-shadow: 0 12px 23px rgba(67, 126, 241, .3);
    transform: translateY(-1px);
}

.kh-article-product-ad__cart-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4H3V2h5.5l1 3H21l-2 9H9.1L7 4Zm3 3 1.2 5h6.2l1.1-5H10Zm1 9a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 4H3V2h5.5l1 3H21l-2 9H9.1L7 4Zm3 3 1.2 5h6.2l1.1-5H10Zm1 9a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kh-single-article-content .kh-article-product-ad__more {
    border: 1px solid #cfdbeb;
    background: #fff;
    color: #334155;
}

.kh-single-article-content .kh-article-product-ad__more:hover,
.kh-single-article-content .kh-article-product-ad__more:focus-visible {
    border-color: #9fc7ff;
    color: var(--kh-ad-accent);
    background: #f8fbff;
}

.kh-single-article-content .kh-article-product-ad__cart:focus-visible,
.kh-single-article-content .kh-article-product-ad__more:focus-visible,
.kh-single-article-content .kh-article-product-ad__title a:focus-visible {
    outline: 3px solid rgba(49, 85, 220, .26);
    outline-offset: 2px;
}

.kh-single-article-content .kh-article-product-ad__cart:active,
.kh-single-article-content .kh-article-product-ad__more:active {
    transform: scale(.98);
}

@media (max-width: 767px) {
    .kh-single-article-content .kh-article-product-ads {
        margin: 30px 0;
        padding: 22px 0 26px;
        border-radius: 0;
    }

    .kh-article-product-ads__head {
        display: block;
        margin-bottom: 16px;
    }

    .kh-single-article-content .kh-article-product-ads__head > span {
        display: block;
        margin-top: 6px;
    }

    .kh-single-article-content .kh-article-product-ads__head h2 {
        font-size: 21px;
    }

    .kh-article-product-ads__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .kh-article-product-ad {
        padding: 0;
    }

    .kh-article-product-ad__visual,
    .kh-single-article-content .kh-article-product-ad__image {
        min-height: 132px;
        height: 132px;
    }

    .kh-single-article-content .kh-article-product-ad__image img {
        height: 122px;
    }
}

@media (max-width: 460px) {
    .kh-article-product-ads__grid {
        grid-template-columns: 1fr;
    }

    .kh-article-product-ad {
        padding: 0;
    }

    .kh-article-product-ad__visual,
    .kh-single-article-content .kh-article-product-ad__image {
        min-height: 190px;
        height: 190px;
    }

    .kh-single-article-content .kh-article-product-ad__image img {
        height: 178px;
    }

    .kh-single-article-content .kh-article-product-ad__title {
        min-height: 0;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-article-product-ad,
    .kh-article-product-ad__image img,
    .kh-single-article-content .kh-article-product-ad__cart,
    .kh-single-article-content .kh-article-product-ad__more {
        transition: none;
    }
}
.kh-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 0;
    margin: 2px 0 13px;
    color: #66758d;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.kh-article-meta__item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.kh-article-meta__item + .kh-article-meta__item::before {
    content: "";
    width: 3px;
    height: 3px;
    margin: 0 10px;
    border-radius: 50%;
    background: #a8b4c5;
}

.kh-article-meta time {
    display: inline-flex !important;
}

.kh-article-meta__views-label {
    margin-left: 4px;
}

@media (max-width: 600px) {
    .kh-article-meta {
        font-size: 12px;
    }

    .kh-article-meta__item + .kh-article-meta__item::before {
        margin: 0 7px;
    }
}
