/* =========================================================
   Ultra Media 4.1.91
   Moderne Tricoma Search-Layer-Darstellung
   ========================================================= */

#tri_header .tri_searcher {
    position: relative;
    z-index: 520;
    overflow: visible;
}

#tri_header #warenkorb_suche_form {
    position: relative;
    z-index: 521;
    overflow: visible;
}

.um-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    background: rgba(20, 23, 27, 0.34);
}

body.um-search-layer-open {
    overflow: hidden;
}

#tri_header .warenkorb_suche_ausgabe {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    right: auto;
    z-index: 540 !important;
    display: none;
    width: min(1280px, calc(100vw - 40px));
    max-height: calc(100vh - 150px);
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    transform: translateX(-50%);
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
    color: #232323;
}

#tri_header .warenkorb_suche_ausgabe.aktiv {
    display: block;
}

.um-search-layer__header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 70px;
    padding: 16px 22px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
}

.um-search-layer__heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.um-search-layer__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #777;
}

.um-search-layer__query {
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.um-search-layer__count {
    font-size: 11px;
    font-weight: 400;
    color: #888;
}

.um-search-layer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #222;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.um-search-layer__close:hover,
.um-search-layer__close:focus-visible {
    background: #e7e7e7;
    transform: rotate(4deg);
    outline: none;
}

.um-search-layer__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    height: clamp(360px, calc(100vh - 270px), 620px);
    min-height: 0;
    overflow: hidden;
}

.um-search-layer__sidebar {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 14px 16px 16px;
    overflow-y: auto;
    border-left: 1px solid #e8e8e8;
    background: #fafafa;
    scrollbar-width: thin;
    scrollbar-color: #bfb1a1 #f1f1f1;
}

.um-search-layer__sidebar-label,
.um-search-layer__products-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: #555;
}

.um-search-layer__sidebar-label {
    margin: 0;
    line-height: 1.25;
}

.um-search-layer__query-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 7px 0;
    border: 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    background: transparent;
    color: #1f1f1f;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.um-search-layer__query-link:hover,
.um-search-layer__query-link:focus-visible {
    color: #8f7b65;
    outline: none;
}

.um-search-layer__sidebar-note {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    color: #777;
}

.um-search-layer__products {
    order: 1;
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 20px 16px 16px 24px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #bfb1a1 #f1f1f1;
}

.um-search-layer__products-title {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.um-search-layer__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
    padding-right: 10px;
    overflow: visible;
    align-items: stretch;
    align-content: start;
}

.um-search-layer__products::-webkit-scrollbar,
.um-search-layer__sidebar::-webkit-scrollbar {
    width: 10px;
}

.um-search-layer__products::-webkit-scrollbar-track,
.um-search-layer__sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 999px;
}

.um-search-layer__products::-webkit-scrollbar-thumb,
.um-search-layer__sidebar::-webkit-scrollbar-thumb {
    border: 2px solid #f1f1f1;
    border-radius: 999px;
    background: #bfb1a1;
}

.um-search-layer__products::-webkit-scrollbar-thumb:hover,
.um-search-layer__sidebar::-webkit-scrollbar-thumb:hover {
    background: #aa9a88;
}

.warenkorb_suche_artikel_ausgabe.um-search-product {
    min-width: 0;
    border: 1px solid #e7e7e7;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.warenkorb_suche_artikel_ausgabe.um-search-product:hover {
    border-color: #c8b8a7;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#tri_header .warenkorb_suche_ausgabe .um-search-product__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    color: inherit;
    text-decoration: none;
}

.um-search-product__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 190px;
    padding: 15px;
    box-sizing: border-box;
    border-bottom: 1px solid #efefef;
    background: #fff;
}

.um-search-product__image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.um-search-product__info {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 14px;
}

.um-search-product__title {
    display: -webkit-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #252525;
    text-align: left;
}

.um-search-product__number {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 11px;
    color: #929292;
}

.um-search-product__availability {
    display: block;
    width: 100%;
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    color: #555;
}

.um-search-product__pricing {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
}

.um-search-product__price {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.um-search-product__old-price {
    font-size: 12px;
    color: #999;
}

.um-search-layer__empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 30px;
    border: 1px dashed #d8d8d8;
    border-radius: 4px;
    background: #fafafa;
    color: #666;
    line-height: 1.6;
    text-align: center;
}


/* Kompakte Doofinder-aehnliche Filter in der Suchseitenleiste */
.um-search-layer__filters {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 1px;
    padding-top: 11px;
    border-top: 1px solid #e2e2e2;
}

.um-search-filter__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #444;
}

.um-search-filter__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #666;
}

.um-search-filter__field select {
    width: 100%;
    min-height: 34px;
    padding: 6px 30px 6px 9px;
    border: 1px solid #d8d8d8;
    border-radius: 3px;
    background-color: #fff;
    color: #282828;
    font-family: "Poppins", Arial, sans-serif !important;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
}

/* Native Select-Dropdowns verwenden sonst teilweise die Systemschrift. */
.um-search-filter__field select option,
.um-search-filter__manufacturer option {
    font-family: "Poppins", Arial, sans-serif !important;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.45;
    color: #282828;
    background: #fff;
}

.um-search-filter__select-wrap {
    position: relative;
    display: block;
}

.um-search-filter__select-wrap select {
    padding-right: 54px;
}

.um-search-filter__select-count {
    position: absolute;
    top: 50%;
    right: 28px;
    z-index: 1;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    color: #777;
}

.um-search-filter__select-count::before {
    content: '(';
}

.um-search-filter__select-count::after {
    content: ')';
}

.um-search-filter__field select:focus-visible,
.um-search-filter__price-range:focus-visible {
    border-color: #9d8b77;
    outline: 2px solid rgba(157, 139, 119, 0.2);
    outline-offset: 1px;
}

.um-search-filter__price-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.um-search-filter__price-value {
    color: #222;
    font-size: 12px;
    font-weight: 500;
}

.um-search-filter__price-range {
    width: 100%;
    margin: 2px 0 0;
    accent-color: #8f7b65;
    cursor: pointer;
}

.um-search-filter__price-scale {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    font-weight: 400;
    color: #8a8a8a;
}

.um-search-filter__result-count {
    font-size: 9px;
    font-weight: 400;
    color: #777;
}

.um-search-filter__reset {
    width: 100%;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #d6d6d6;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.um-search-filter__reset:hover:not(:disabled),
.um-search-filter__reset:focus-visible:not(:disabled) {
    border-color: #8f7b65;
    background: #f7f4f1;
    color: #6f5d4b;
    outline: none;
}

.um-search-filter__reset:disabled {
    opacity: 0.45;
    cursor: default;
}

.um-search-layer__footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    justify-content: flex-end;
    padding: 14px 22px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

#tri_header .warenkorb_suche_ausgabe .um-search-layer__all-results {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 22px;
    border: 1px solid #bfb1a1;
    border-radius: 3px;
    background: #bfb1a1;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#tri_header .warenkorb_suche_ausgabe .um-search-layer__all-results:hover,
#tri_header .warenkorb_suche_ausgabe .um-search-layer__all-results:focus-visible {
    border-color: #aa9a88;
    background: #aa9a88;
    color: #fff;
    outline: none;
}

#warenkorb_suche_form > input[type="image"] {
    transition: opacity 0.25s;
}

#warenkorb_suche_form.loading > input[type="image"] {
    opacity: 0;
}

.lds-spinner {
    color: #232323;
    display: inline-block;
    position: absolute;
    z-index: 2;
    width: 20px;
    height: 20px;
    right: 17px;
    top: 50%;
    left: auto;
    transform: translateY(-50%);
}

.lds-spinner div {
    transform-origin: 10px 10px;
    animation: lds-spinner 1.2s linear infinite;
}

.lds-spinner div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 9px;
    width: 2px;
    height: 6px;
    border-radius: 20%;
    background: #777;
}

.lds-spinner div:nth-child(1) { transform: rotate(0deg); animation-delay: -1.1s; }
.lds-spinner div:nth-child(2) { transform: rotate(30deg); animation-delay: -1s; }
.lds-spinner div:nth-child(3) { transform: rotate(60deg); animation-delay: -0.9s; }
.lds-spinner div:nth-child(4) { transform: rotate(90deg); animation-delay: -0.8s; }
.lds-spinner div:nth-child(5) { transform: rotate(120deg); animation-delay: -0.7s; }
.lds-spinner div:nth-child(6) { transform: rotate(150deg); animation-delay: -0.6s; }
.lds-spinner div:nth-child(7) { transform: rotate(180deg); animation-delay: -0.5s; }
.lds-spinner div:nth-child(8) { transform: rotate(210deg); animation-delay: -0.4s; }
.lds-spinner div:nth-child(9) { transform: rotate(240deg); animation-delay: -0.3s; }
.lds-spinner div:nth-child(10) { transform: rotate(270deg); animation-delay: -0.2s; }
.lds-spinner div:nth-child(11) { transform: rotate(300deg); animation-delay: -0.1s; }
.lds-spinner div:nth-child(12) { transform: rotate(330deg); animation-delay: 0s; }

@keyframes lds-spinner {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@media screen and (max-width: 1180px) {
    .um-search-layer__content {
        height: clamp(340px, calc(100vh - 250px), 590px);
    }

    .um-search-layer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media screen and (max-width: 900px) {
    body.um-search-layer-open {
        overflow: hidden;
    }

    /* Mobil ist der Search-Layer bereits vollflächig. Deshalb darf der
       Desktop-Backdrop nicht über der Ergebnisansicht liegen. */
    .um-search-backdrop,
    #um-search-backdrop {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #tri_header .warenkorb_suche_ausgabe {
        z-index: 9999 !important;
        background: #fff !important;
        opacity: 1 !important;
    }

    #tri_header .warenkorb_suche_ausgabe {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        transform: none;
    }

    .um-search-layer__header {
        min-height: 62px;
        padding: 12px 16px;
    }

    .um-search-layer__query {
        max-width: 58vw;
        font-size: 16px;
    }

    .um-search-layer__content {
        display: block;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    .um-search-layer__sidebar {
        order: 1;
        padding: 16px;
        overflow: visible;
        border-left: 0;
        border-bottom: 1px solid #e8e8e8;
    }

    .um-search-layer__products {
        order: 2;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .um-search-layer__sidebar-note {
        display: none;
    }

    .um-search-layer__filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .um-search-filter__title,
    .um-search-filter__field--price,
    .um-search-filter__result-count,
    .um-search-filter__reset {
        grid-column: 1 / -1;
    }


    .um-search-layer__products {
        padding: 16px;
    }

    .um-search-layer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-right: 0;
        overflow: visible;
        scrollbar-gutter: auto;
    }

    .um-search-product__image {
        height: 150px;
        padding: 10px;
    }

    .um-search-product__info {
        padding: 11px;
    }

    .um-search-product__title {
        min-height: 42px;
        font-size: 13px;
    }

    .um-search-layer__footer {
        justify-content: stretch;
        padding: 12px 16px;
    }

    #tri_header .warenkorb_suche_ausgabe .um-search-layer__all-results {
        width: 100%;
    }
}

@media screen and (max-width: 420px) {
    .um-search-layer__eyebrow,
    .um-search-layer__count {
        display: none;
    }

    .um-search-layer__query {
        max-width: 68vw;
    }

    .um-search-product__image {
        height: 130px;
    }
}
