:root {
    --sw-red: #c20d18;
    --sw-red-dark: #991019;
    --sw-black: #151515;
    --sw-dark: #252525;
    --sw-gray: #666a70;
    --sw-light: #f3f3f3;
    --sw-border: #dfdfdf;
    --sw-white: #ffffff;

    font-family: Arial, Helvetica, sans-serif;
    color: var(--sw-black);
    background: #ececec;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(180deg, #ededed 0, #f7f7f7 320px, #f4f4f4 100%);
}

button,
input,
select {
    font: inherit;
}

.page {
    min-height: 100vh;
    padding: 34px 18px 50px;
}

.finder {
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* Kopfbereich: bewusst näher an SW-Comnizept als an einer generischen App */
.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 8px 1fr;
    background: var(--sw-black);
    color: var(--sw-white);
    border-radius: 2px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    margin-bottom: 22px;
}

.hero__bar {
    background: var(--sw-red);
}

.hero__content {
    padding: 34px 38px 36px;
    background:
        linear-gradient(100deg, rgba(255,255,255,.025), transparent 60%),
        var(--sw-black);
}

.brandline {
    display: inline-block;
    padding: 6px 9px;
    margin-bottom: 15px;
    background: var(--sw-red);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(31px, 5vw, 50px);
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: -.02em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: #d5d5d5;
    font-size: 17px;
    line-height: 1.55;
}

.search-panel,
.results-panel {
    background: var(--sw-white);
    border: 1px solid var(--sw-border);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .055);
    margin-bottom: 20px;
}

.search-panel {
    padding: 28px 32px 24px;
}

.results-panel {
    padding: 28px 32px 32px;
}

.search-panel__heading,
.results-panel__heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.search-panel__heading h2,
.results-panel__heading h2 {
    margin: 0 0 4px;
    font-size: 22px;
    text-transform: uppercase;
}

.search-panel__heading p,
.results-panel__heading p {
    margin: 0;
    color: var(--sw-gray);
    line-height: 1.45;
}

.step {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--sw-red);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 22px;
}

.field {
    position: relative;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}

select,
input[type="search"] {
    width: 100%;
    height: 52px;
    border: 1px solid #bfc1c5;
    border-radius: 0;
    padding: 0 15px;
    background: #fff;
    color: var(--sw-black);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

select:focus,
input[type="search"]:focus {
    border-color: var(--sw-red);
    box-shadow: inset 4px 0 0 var(--sw-red);
}

input:disabled {
    background: #f0f0f0;
    color: #8a8a8a;
}

.suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    max-height: 350px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #bfc1c5;
    border-top: 3px solid var(--sw-red);
    box-shadow: 0 15px 34px rgba(0, 0, 0, .16);
}

.suggestion {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eeeeee;
    padding: 13px 15px;
    text-align: left;
    background: #fff;
    color: var(--sw-black);
    cursor: pointer;
    font-weight: 700;
}

.suggestion:hover,
.suggestion:focus {
    background: #f4f4f4;
    color: var(--sw-red-dark);
    box-shadow: inset 4px 0 0 var(--sw-red);
}

.suggestion-empty {
    padding: 15px;
    color: var(--sw-gray);
}

.selected-model {
    margin: 8px 0 0;
    color: var(--sw-red-dark);
    font-size: 13px;
    font-weight: 800;
}

.search-panel__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #ececec;
}

.hint {
    color: var(--sw-gray);
    font-size: 13px;
}

button {
    border: 0;
    border-radius: 0;
    padding: 12px 17px;
    background: var(--sw-red);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s;
}

button:hover {
    background: var(--sw-red-dark);
}

.button-secondary {
    background: var(--sw-dark);
}

.button-secondary:hover {
    background: #000;
}

.results {
    min-height: 170px;
}

.empty,
.loading {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    text-align: center;
    color: var(--sw-gray);
    background: #fafafa;
    border: 1px dashed #d7d7d7;
}

.empty--small {
    min-height: 110px;
}

.empty__icon {
    color: var(--sw-red);
    font-size: 37px;
    line-height: 1;
    font-weight: 300;
}

.empty strong {
    color: var(--sw-black);
    font-size: 17px;
}

.result-printer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 17px 19px;
    border-left: 5px solid var(--sw-red);
    background: var(--sw-light);
}

.result-printer__brand {
    display: block;
    margin-bottom: 3px;
    color: var(--sw-red-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.result-printer h3 {
    margin: 0;
    font-size: 23px;
}

.result-count {
    flex: 0 0 auto;
    padding: 7px 11px;
    background: var(--sw-black);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.material-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dddddd;
    background: #fff;
    min-width: 0;
}

.material-card__accent {
    height: 4px;
    background: var(--sw-red);
}

.material-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 13px;
    padding: 18px 18px 13px;
}

.material-card__title {
    min-width: 0;
}

.material-type {
    display: block;
    margin-bottom: 5px;
    color: var(--sw-gray);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.material-card h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.badge {
    flex: 0 0 auto;
    padding: 5px 7px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge--confirmed {
    background: var(--sw-red);
    color: #fff;
}

.badge--legacy {
    background: #e7e7e7;
    color: #555;
}

.material-card__body {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    border-top: 1px solid #eeeeee;
}

.oem-number,
.color-info {
    min-width: 0;
    padding: 14px 18px;
}

.oem-number {
    border-right: 1px solid #eeeeee;
}

.oem-number span,
.color-info div span {
    display: block;
    margin-bottom: 4px;
    color: #747474;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.oem-number strong,
.color-info strong {
    display: block;
    overflow-wrap: anywhere;
}

.color-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid #bbb;
    border-radius: 50%;
    background: #ddd;
}

.color--black { background: #161616; border-color: #161616; }
.color--cyan { background: #00a8d9; border-color: #0089b4; }
.color--magenta { background: #d60072; border-color: #ad005c; }
.color--yellow { background: #ffd600; border-color: #d0b100; }
.color--gray { background: #8d8d8d; border-color: #757575; }
.color--multi {
    background: conic-gradient(#00a8d9 0 33%, #d60072 33% 66%, #ffd600 66% 100%);
}
.color--neutral { background: #ececec; }

.loading {
    flex-direction: row;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #dddddd;
    border-top-color: var(--sw-red);
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 15px 17px;
}

.alert--error {
    border-left: 5px solid var(--sw-red);
    background: #f8e8e9;
    color: #7d2026;
}

.service-note {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 17px 20px;
    background: var(--sw-black);
    color: #d7d7d7;
    font-size: 14px;
}

.service-note strong {
    color: #fff;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .page {
        padding: 15px 9px 30px;
    }

    .hero__content {
        padding: 27px 22px 29px;
    }

    .hero h1 {
        font-size: 31px;
    }

    .search-panel,
    .results-panel {
        padding: 22px 18px;
    }

    .search-grid,
    .material-grid {
        grid-template-columns: 1fr;
    }

    .search-panel__footer,
    .result-printer,
    .service-note {
        align-items: stretch;
        flex-direction: column;
    }

    .material-card__body {
        grid-template-columns: 1fr;
    }

    .oem-number {
        border-right: 0;
        border-bottom: 1px solid #eeeeee;
    }
}


/* ==========================================================
   Version 1.3 – Suchrichtung / Tabs / Rückwärtssuche
   ========================================================== */

.finder-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
    background: var(--sw-black);
    border-bottom: 4px solid var(--sw-red);
}

.finder-tab {
    min-height: 56px;
    padding: 12px 18px;
    background: var(--sw-black);
    color: #d8d8d8;
    border: 0;
    border-right: 1px solid #3a3a3a;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.finder-tab:last-child {
    border-right: 0;
}

.finder-tab:hover {
    background: #242424;
    color: #fff;
}

.finder-tab.is-active {
    background: var(--sw-red);
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.reverse-search {
    max-width: 760px;
}

.suggestion small {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 11px;
    font-weight: 400;
}

.suggestion--material:hover small,
.suggestion--material:focus small {
    color: #666;
}

.result-subline {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-weight: 700;
}

.printer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.printer-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dddddd;
}

.printer-card__accent {
    height: 4px;
    background: var(--sw-red);
}

.printer-card__body {
    padding: 17px 18px 18px;
}

.printer-brand {
    display: block;
    margin-bottom: 5px;
    color: var(--sw-red-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .075em;
}

.printer-card h4 {
    min-height: 44px;
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.3;
}

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

@media (max-width: 620px) {
    .finder-tabs {
        grid-template-columns: 1fr;
    }

    .finder-tab {
        border-right: 0;
        border-bottom: 1px solid #3a3a3a;
        text-align: left;
    }

    .printer-grid {
        grid-template-columns: 1fr;
    }
}
