/* Match the product-photo treatment in the catalog. */
html.kl-related-preview :is(.goodpage-same-item > a, .kl-viewed-image) > img {
    mix-blend-mode: multiply;
}

.kl-viewed[hidden],
.kl-viewed-controls[hidden] {
    display: none !important;
}

section.kl-viewed {
    background-color: transparent;
    max-width: 1500px;
    margin: 38px auto 48px;
    padding: 0 24px;
    color: #1d1d19;
    font-family: "KL4 Onest", "Segoe UI", Arial, sans-serif;
}

.goodpage-same + .kl-viewed {
    padding: 0;
}

.kl-viewed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    background: transparent;
}

.kl-viewed-heading h2 {
    margin: 0;
    color: inherit;
    background: transparent;
    font: 400 clamp(26px, 2.4vw, 36px)/1.15 Georgia, serif;
}

.kl-viewed-heading h2::after {
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 10px;
    background: #c9142b;
    content: "";
}

.kl-viewed-controls {
    display: flex;
    gap: 6px;
}

.kl-viewed-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d7d2c8;
    background: #f8f7f3;
    color: #c9142b;
    font: 28px/1 Georgia, serif;
}

.kl-viewed-controls button:disabled {
    opacity: .38;
}

.kl-viewed :is(button, a):focus-visible {
    outline: 2px solid #c9142b;
    outline-offset: -2px;
}

.kl-viewed ul {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #a8a196 transparent;
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
}

.kl-viewed-card {
    scroll-snap-align: start;
    min-width: 0;
}

.kl-viewed-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.kl-viewed-link:is(:hover, :focus) {
    color: inherit;
    text-decoration: none;
}

.kl-viewed-name {
    overflow-wrap: anywhere;
}

.kl-viewed-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kl-viewed-price {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kl-viewed-arrow {
    flex: 0 0 24px;
    height: 24px;
}

@media (max-width: 600px) {
    .kl-viewed { margin-block: 28px 34px; padding-inline: 16px; }
    .kl-viewed .kl-viewed-controls { display: none; }
    .kl-viewed ul { grid-auto-columns: 78%; gap: 12px; }
}
