/* AI part finder — GAIPARTS industrial style */

.finder-page {
    background: #F4F7FA;
}

/* —— Hero —— */
.finder-hero {
    background:
        linear-gradient(115deg, #0B2540 0%, #123A66 55%, #17518E 100%);
    color: #FFFFFF;
    padding: 30px 0 34px;
}
.finder-hero .breadcrumb,
.finder-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 18px;
}
.finder-eyebrow {
    margin: 0 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #F5B04C;
}
.finder-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: #FFFFFF;
}
.finder-hero-lead {
    margin: 0 0 22px;
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}
.finder-lanes {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
}
.finder-lane {
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.finder-lane:hover {
    background: rgba(255, 255, 255, 0.12);
}
.finder-lane.is-active {
    background: #FFFFFF;
    color: #0B2540;
}

/* —— Layout —— */
.finder-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 312px;
    gap: 26px;
    align-items: start;
    padding: 28px 0 56px;
}

/* —— Chat card —— */
.finder-chat-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #D8E0EA;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(11, 37, 64, 0.07);
    overflow: hidden;
}
.finder-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #E2EAF2;
    background: #FBFCFE;
}
.finder-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.finder-chat-title strong {
    display: block;
    font-size: 0.94rem;
    color: #0B2540;
}
.finder-chat-title span {
    display: block;
    font-size: 0.78rem;
    color: #64748B;
}
.finder-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
    flex-shrink: 0;
}
.finder-reset {
    padding: 7px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    background: #FFFFFF;
    color: #475569;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.finder-reset:hover {
    border-color: #17518E;
    color: #17518E;
}

/* —— Log —— */
.finder-log {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 360px;
    max-height: 58vh;
    padding: 20px 18px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.finder-msg {
    max-width: 88%;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.94rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.finder-msg-user {
    align-self: flex-end;
    background: #17518E;
    color: #FFFFFF;
    border-bottom-right-radius: 2px;
}
.finder-msg-ai {
    align-self: flex-start;
    background: #F4F7FA;
    color: #1E293B;
    border: 1px solid #E2EAF2;
    border-bottom-left-radius: 2px;
}
.finder-msg-ai strong { color: #0B2540; }
.finder-msg-ai a { color: #17518E; font-weight: 600; }
.finder-msg-meta {
    display: block;
    margin-top: 8px;
    font-size: 0.74rem;
    color: #94A3B8;
}

/* typing */
.finder-typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}
.finder-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94A3B8;
    animation: finderBlink 1.1s infinite ease-in-out;
}
.finder-typing i:nth-child(2) { animation-delay: 0.15s; }
.finder-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes finderBlink {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

/* —— Result cards —— */
.finder-results {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    align-self: stretch;
}
.finder-result {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid #D8E0EA;
    border-radius: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.finder-result:hover {
    border-color: #17518E;
    box-shadow: 0 8px 20px rgba(11, 37, 64, 0.1);
}
.finder-result img {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 4px;
    background: #F4F7FA;
}
.finder-result-title {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    color: #0B2540;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.finder-result-why {
    margin: 0 0 4px;
    font-size: 0.78rem;
    color: #64748B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.finder-result-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0B2540;
}
.finder-result-cta {
    padding: 8px 12px;
    border-radius: 4px;
    background: #17518E;
    color: #FFFFFF !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.finder-result-cta:hover { background: #0D3F73; }

/* —— Quick replies —— */
.finder-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 18px;
}
.finder-quick:not(:empty) { padding-bottom: 14px; }
.finder-chip {
    padding: 7px 13px;
    border: 1px solid #CBD5E1;
    border-radius: 999px;
    background: #FFFFFF;
    color: #1E293B;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.finder-chip:hover {
    border-color: #17518E;
    background: #E7EFF7;
    color: #17518E;
}

/* —— Composer —— */
.finder-composer {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 14px 18px 8px;
    border-top: 1px solid #E2EAF2;
    background: #FBFCFE;
}
.finder-composer textarea {
    flex: 1;
    min-height: 46px;
    max-height: 140px;
    padding: 12px 14px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    color: #0F172A;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.45;
    resize: none;
}
.finder-composer textarea:focus {
    outline: none;
    border-color: #17518E;
    box-shadow: 0 0 0 3px rgba(23, 81, 142, 0.12);
}
.finder-send {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 6px;
    background: #17518E;
    color: #FFFFFF;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}
.finder-send:hover { background: #0D3F73; }
.finder-send:disabled { background: #94A3B8; cursor: not-allowed; }
.finder-note {
    margin: 0;
    padding: 0 18px 16px;
    background: #FBFCFE;
    font-size: 0.76rem;
    line-height: 1.5;
    color: #64748B;
}
.finder-note a { color: #17518E; font-weight: 600; }

/* —— Aside —— */
.finder-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.finder-panel {
    padding: 18px;
    background: #FFFFFF;
    border: 1px solid #D8E0EA;
    border-radius: 8px;
}
.finder-panel h2 {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #17518E;
}
.finder-steps {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: 0.86rem;
    line-height: 1.5;
}
.finder-steps li { margin-bottom: 10px; }
.finder-steps li:last-child { margin-bottom: 0; }
.finder-steps strong { display: block; color: #0B2540; font-size: 0.9rem; }
.finder-steps span { color: #64748B; }
.finder-tips {
    margin: 0;
    padding-left: 16px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.55;
}
.finder-tips li { margin-bottom: 7px; }
.finder-tips li:last-child { margin-bottom: 0; }
.finder-cat-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.finder-cat-links a {
    padding: 6px 11px;
    border: 1px solid #D8E0EA;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
}
.finder-cat-links a:hover {
    border-color: #17518E;
    color: #17518E;
    background: #E7EFF7;
}

/* —— Responsive —— */
@media (max-width: 960px) {
    .finder-main {
        grid-template-columns: minmax(0, 1fr);
    }
    .finder-aside {
        order: 2;
    }
    .finder-log {
        max-height: none;
    }
}
@media (max-width: 560px) {
    .finder-hero { padding: 22px 0 26px; }
    .finder-main { padding: 18px 0 40px; }
    .finder-msg { max-width: 100%; }
    .finder-result {
        grid-template-columns: 62px minmax(0, 1fr);
        grid-template-areas:
            "img body"
            "cta cta";
    }
    .finder-result img { width: 62px; height: 62px; grid-area: img; }
    .finder-result-body { grid-area: body; }
    .finder-result-cta { grid-area: cta; text-align: center; }
    .finder-send span { display: none; }
    .finder-send { padding: 0 14px; }
}
