.vcld-results {
    --vcld-orange: #FFDB08;
    --vcld-gutter: 14px;
    --vcld-row-gutter: var(--vcld-gutter);
    --vcld-logo-width: 58px;
    --vcld-row-gap: 14px;
    --vcld-row-background: #fff;
    display: block;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #000;
    background: var(--vcld-row-background);
    font: 700 12px/1.28 Raleway, sans-serif;
    text-align: left;
}

.vcld-results[data-vcld-surface="menu"] {
    --vcld-gutter: var(--vvm-text-gutter, 20px);
    --vcld-row-gutter: var(--vcld-gutter);
}

.vvm[data-vvm-compact] .vcld-results[data-vcld-surface="menu"] {
    --vcld-logo-width: 42px;
    --vcld-row-gap: 12px;
}

.vvm[data-vvm] .vvm-result-area:has(> .vvm-search-hits > .vcld-results[data-vcld-surface="menu"]:last-child) {
    padding-block-end: 0;
}

.vcld-results[data-vcld-surface="sidebar"] {
    --vcld-gutter: var(--vcs-gutter, 24px);
    --vcld-logo-width: 48px;
    --vcld-row-gap: 12px;
    --vcld-row-background: var(--vcld-orange);
}

.vicera-sidebar .sidebar-search-results:has(> .vcld-results[data-vcld-surface="sidebar"]:last-child) {
    padding-block-end: 0;
}

.vcld-results[data-vcld-surface="archive"] {
    --vcld-gutter: 18px;
    --vcld-row-gap: 24px;
    box-sizing: border-box;
    margin-block: 26px 0;
    border: 2px solid #000;
    scroll-margin-top: calc(10rem + var(--wp-admin--admin-bar--height, 0px));
}

.vcld-results > h3.vcld-heading {
    margin: 0;
    padding: 9px var(--vcld-gutter);
    border: 0;
    background: var(--vcld-orange);
    color: #000;
    font: 900 12px/1.35 Raleway, sans-serif !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: left;
    text-transform: uppercase;
}

.vcld-results > ul.vcld-list,
.vcld-results .vcld-list > li.vcld-item {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vcld-results .vcld-list > li.vcld-item::before,
.vcld-results .vcld-item > :is(a.vcld-link, a.vcld-open)::after {
    content: none;
}

.vcld-results .vcld-list > li.vcld-item {
    display: grid;
    grid-template-columns: minmax(0, 100px) minmax(0, 180px) minmax(0, 1fr);
    column-gap: 8px;
    box-sizing: border-box;
    padding: 0 var(--vcld-row-gutter) 10px;
    border-bottom: 1px solid #c8c8c8;
    background: var(--vcld-row-background);
}

.vcld-results .vcld-item > a.vcld-link {
    --vvm-control-bg: var(--vcld-row-background);
    display: grid;
    grid-column: 1 / -1;
    grid-row: 1;
    grid-template-columns: var(--vcld-logo-width) minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--vcld-row-gap);
    box-sizing: border-box;
    min-height: 61px;
    width: 100%;
    margin: 0;
    padding: 13px 0;
    border: 0;
    border-radius: 0;
    color: #000;
    background: var(--vcld-row-background);
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.vcld-results[data-vcld-surface="header"] .vcld-item > a.vcld-link,
.vcld-results[data-vcld-surface="ivory"] .vcld-item > a.vcld-link,
.vcld-results[data-vcld-surface="legacy"] .vcld-item > a.vcld-link,
.vcld-results[data-vcld-surface="menu"] .vcld-item > a.vcld-link {
    min-height: 72px;
    padding-block: 11px;
}

.vcld-results[data-vcld-surface="menu"] .vcld-item > a.vcld-link {
    min-height: 71px;
    padding-block: 10px;
}

.vvm[data-vvm-compact] .vcld-results[data-vcld-surface="menu"] .vcld-item > a.vcld-link {
    padding-block: 11px;
}

.vcld-results[data-vcld-surface="menu"] .vcld-thumbnail {
    height: 50px;
}

.vvm[data-vvm-compact] .vcld-results[data-vcld-surface="menu"] .vcld-thumbnail {
    height: 44px;
}

.vvm[data-vvm-compact] .vcld-results[data-vcld-surface="menu"] .vcld-logo {
    max-width: 40px;
    max-height: 42px;
}

.vcld-results[data-vcld-surface="sidebar"] .vcld-thumbnail {
    height: 34px;
}

.vcld-results[data-vcld-surface="sidebar"] .vcld-list > li.vcld-item {
    border-bottom-color: var(--vcs-search-line, rgba(0, 0, 0, .22));
}

.vcld-results .vcld-thumbnail {
    display: grid;
    place-items: center start;
    width: 100%;
    height: 50px;
}

.vcld-results .vcld-thumbnail > img.vcld-logo {
    display: block;
    max-width: calc(100% - 4px);
    max-height: 46px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.vcld-results[data-vcld-surface="sidebar"] .vcld-thumbnail > img.vcld-logo {
    max-height: 34px;
}

.vcld-results .vcld-logo + .vcld-file-icon {
    display: none;
}

.vcld-results .vcld-file-icon {
    width: 17px;
    height: 22px;
    border: 1.5px solid #555;
    border-radius: 0;
    background:
        linear-gradient(#555, #555) 3px 9px / 8px 1px no-repeat,
        linear-gradient(#555, #555) 3px 13px / 8px 1px no-repeat;
}

.vcld-results .vcld-name,
.vcld-results .vcld-details {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.vcld-results .vcld-details {
    text-align: right;
    white-space: nowrap;
}

.vcld-results .vcld-supplier,
.vcld-results .vcld-page {
    font: 900 13px/1.28 Raleway, sans-serif !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* Use the menu/sidebar typography on every catalogue search surface.
   Explicit leaf styles prevent Elementor and archive link styles leaking in. */
.vcld-results .vcld-title,
.vcld-results .vcld-language {
    font: 700 12px/1.28 Raleway, sans-serif !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

.vcld-results .vcld-supplier,
.vcld-results .vcld-title {
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.vcld-results .vcld-title .vcld-size {
    white-space: nowrap;
    font: inherit !important;
}

.vcld-results .vcld-page,
.vcld-results .vcld-language {
    text-transform: none;
}

.vcld-results .vcld-title:empty,
.vcld-results .vcld-language:empty {
    display: none;
}

.vcld-results .vcld-item > a.vcld-link:is(:focus-visible, .is-selected) {
    outline: 2px solid #000;
    outline-offset: -2px;
}

.vcld-results:not([data-vcld-surface="sidebar"]) .vcld-item:has(> :is(.vcld-link, .vcld-open, .vcld-quote):is(:focus-visible, .is-selected)) {
    --vcld-row-background: var(--vcld-orange);
}

@media (any-hover: hover) {
    .vcld-results:not([data-vcld-surface="sidebar"]) .vcld-item:hover {
        --vcld-row-background: var(--vcld-orange);
    }
}

.vcld-results[data-vcld-surface="archive"] > h3.vcld-heading {
    padding-block: 13px;
    border-bottom: 2px solid #000;
}

.vcld-results[data-vcld-standalone]:not([data-vcld-surface="archive"]) > h3.vcld-heading {
    padding-block: 8px 0;
    border-bottom: 0;
    background: transparent;
}

.vcld-results[data-vcld-surface="sidebar"][data-vcld-standalone] > h3.vcld-heading {
    padding-block: 9px;
    background: var(--vcld-orange);
}

.vcld-results[data-vcld-surface="archive"] .vcld-item:last-child {
    border-bottom: 0;
}

.vcld-results[data-vcld-surface="archive"] .vcld-item > a.vcld-link {
    grid-template-columns: var(--vcld-logo-width) minmax(0, 1fr) auto;
    min-height: 74px;
    padding-block: 14px;
}

.vcld-results[data-vcld-surface="archive"] .vcld-thumbnail {
    height: 46px;
}

/* Shared action row: PDF first, product list second, aligned to the logo.
   The quote plugin can still append its button directly to the result item. */
body .vcld-results .vcld-item > :is(a.vcld-open, button.vcld-quote) {
    --vvm-control-bg: #000;
    --vvm-ink: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    grid-row: 2;
    box-sizing: border-box;
    inline-size: 100%;
    min-inline-size: 0;
    max-inline-size: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 6px;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    color: #fff !important;
    font: 800 var(--vcld-action-font-size, 12px)/1.2 Raleway, sans-serif !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase !important;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

body .vcld-results .vcld-item > a.vcld-open {
    grid-column: 1;
}

body .vcld-results .vcld-item > button.vcld-quote {
    grid-column: 2;
}

body .vcld-results .vcld-item > :is(a.vcld-open, button.vcld-quote):is(:hover, :focus, :active, .is-selected) {
    background: #000 !important;
    color: #fff !important;
}

body .vcld-results .vcld-item > a.vcld-open::after {
    content: none !important;
}

/* Match the visible text even when the product-list plugin or theme
   specifies its own typography on the nested label. */
body .vcld-results .vcld-item > button.vcld-quote .vql-add-label {
    font: inherit !important;
    letter-spacing: inherit !important;
    word-spacing: inherit !important;
    text-transform: inherit !important;
    min-width: 0;
    overflow-wrap: anywhere;
}

body .vcld-results .vcld-item > :is(a.vcld-open, button.vcld-quote):is(:focus-visible, .is-selected) {
    outline: 2px solid #fff !important;
    outline-offset: -4px !important;
}

.vcld-results[data-vcld-surface]:not([data-vcld-surface="header"]) > a.vcld-more {
    --vvm-control-bg: #000;
    --vvm-ink: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 48px;
    margin: 0;
    padding: 12px 14px;
    border: 0 !important;
    border-top: 1px solid #000 !important;
    border-radius: 0;
    background: #000 !important;
    color: #fff !important;
    font: 900 13px/1.2 Raleway, sans-serif !important;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.vcld-results[data-vcld-surface]:not([data-vcld-surface="header"]) > a.vcld-more:focus-visible {
    outline: 2px solid var(--vcld-orange) !important;
    outline-offset: -2px !important;
    box-shadow: none;
}

.vcld-results > a.vcld-more::after {
    content: none;
}

.vcld-results[data-vcld-surface="archive"] > button.vcld-more {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8px;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-height: 44px;
    width: 100%;
    margin: 0;
    padding: 12px var(--vcld-gutter);
    border: 0 !important;
    border-top: 3px solid #000 !important;
    border-radius: 0;
    box-shadow: none;
    background: var(--vcld-orange) !important;
    color: #000 !important;
    font: 900 13px/1.2 Raleway, sans-serif !important;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.vcld-results[data-vcld-surface="archive"] > button.vcld-more:is(:hover, :focus, :active) {
    outline: none !important;
    box-shadow: none;
}

.vcld-results > button.vcld-more > .vcld-more-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vcld-results > button.vcld-more:is(:hover, :focus-visible) > .vcld-more-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.vcld-results > button.vcld-more::after {
    content: "";
    display: block;
    grid-column: 2;
    grid-row: 1;
    box-sizing: border-box;
    width: 8px;
    height: 8px;
    margin: 0;
    border: solid currentColor;
    border-width: 0 1.6px 1.6px 0;
    transform: translateY(-2px) rotate(45deg);
}

@media (max-width: 767px) {
    .vcld-results[data-vcld-surface="header"] { --vcld-gutter: 12px; }
    .vcld-results:is([data-vcld-surface="header"], [data-vcld-surface="ivory"], [data-vcld-surface="legacy"]) {
        --vcld-logo-width: 54px;
        --vcld-row-gap: 12px;
    }
    .vcld-results:is([data-vcld-surface="header"], [data-vcld-surface="ivory"], [data-vcld-surface="legacy"]) .vcld-item > a.vcld-link {
        min-height: 68px;
        padding-block: 10px;
    }
    .vcld-results .vcld-thumbnail { height: 48px; }
    .vcld-results .vcld-thumbnail > img.vcld-logo { max-height: 44px; }
}

@media (max-width: 480px) {
    .vcld-results[data-vcld-surface="archive"] {
        --vcld-gutter: 12px;
        --vcld-logo-width: 42px;
        --vcld-row-gap: 12px;
    }
    .vcld-results[data-vcld-surface="archive"] .vcld-item > a.vcld-link {
        grid-template-columns: var(--vcld-logo-width) minmax(0, 1fr) auto;
        align-items: start;
        row-gap: 6px;
        padding-block: 10px;
    }
    .vcld-results[data-vcld-surface="sidebar"] {
        --vcld-logo-width: 40px;
        --vcld-row-gap: 8px;
    }
}

@media (max-width: 360px) {
    .vcld-results[data-vcld-surface="archive"] :is(.vcld-thumbnail, .vcld-name) {
        grid-row: 1;
    }
    .vcld-results[data-vcld-surface="archive"] .vcld-name {
        grid-column: 2 / -1;
    }
    .vcld-results[data-vcld-surface="archive"] .vcld-details {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 8px;
        grid-column: 1 / 3;
        grid-row: 2;
        align-self: center;
        text-align: left;
    }
}

[data-vcld-suppressed] { display: none !important; }
form.is-form-id-4904:has(.vcld-legacy-results:not([hidden])) { position: relative; }
.vcld-legacy-results {
    position: absolute;
    z-index: 999999;
    inset-block-start: 100%;
    inset-inline: 0;
    max-height: min(60vh, 390px);
    overflow: auto;
}
.vcld-legacy-results[hidden] { display: none !important; }

/* Narrow result panels, including the category sidebar on desktop. */
.vcld-results .vcld-list > li.vcld-item {
    container-type: inline-size;
}
@container (max-width: 280px) {
    body .vcld-results .vcld-item > :is(a.vcld-open, button.vcld-quote) {
        --vcld-action-font-size: 11px;
        padding-inline: 5px;
    }
}

/* Compact desktop category sidebar: reduce only the two action labels. */
@media (min-width: 1025px) and (max-width: 1130px) {
    body .vcld-results[data-vcld-surface="sidebar"] .vcld-item > :is(a.vcld-open, button.vcld-quote) {
        --vcld-action-font-size: 10px;
    }
    @container (max-width: 280px) {
        body .vcld-results[data-vcld-surface="sidebar"] .vcld-item > :is(a.vcld-open, button.vcld-quote) {
            --vcld-action-font-size: 9px;
        }
    }
}

/* Let the product name use all available text width in narrow result panels.
   PDF metadata gets a compact line below it, rather than a permanent third column. */
@container (max-width: 480px) {
    .vcld-results .vcld-item > a.vcld-link,
    .vcld-results[data-vcld-surface="archive"] .vcld-item > a.vcld-link,
    .vcld-results:is([data-vcld-surface="header"], [data-vcld-surface="ivory"], [data-vcld-surface="legacy"], [data-vcld-surface="menu"]) .vcld-item > a.vcld-link {
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 8px;
        row-gap: 4px;
        align-items: start;
        min-height: 0;
        padding-block: 10px;
    }
    .vcld-results .vcld-item .vcld-thumbnail {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        height: 38px;
    }
    .vcld-results .vcld-item .vcld-name {
        grid-column: 2;
        grid-row: 1;
    }
    .vcld-results .vcld-item .vcld-details {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 8px;
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        white-space: normal;
    }
    .vcld-results .vcld-item .vcld-details :is(.vcld-page, .vcld-language) {
        font-size: 11px !important;
    }
}

/* Last opened row: keep analytics and the actual product title separate. */
.vcld-results .vcld-title-line {
    min-width: 0;
    overflow-wrap: anywhere;
    font: 700 12px/1.28 Raleway, sans-serif !important;
}
.vcld-results .vcld-title-line:has(> .vcld-title:empty):not(:has(> .vcld-last-viewed)) { display: none; }
.vcld-results .vcld-last-viewed {
    font: 900 12px/1.28 Raleway, sans-serif !important;
    text-transform: none !important;
    color: inherit;
    letter-spacing: normal !important;
    overflow-wrap: normal;
}
