﻿:root {
    --container: 1200px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 10px 30px rgba(2,6,23,.07);
    --shadow-lg: 0 20px 40px rgba(2,6,23,.1);
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #475569;
    --bg: #ffffff;
    --alt: #f8fafc;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --primary-50: #eff6ff;
    --dark: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: min(var(--container),92%);
    margin-inline: auto;
}

/* Hero (slimmer than index) */
.hero {
    background: linear-gradient(135deg,#0f172a 0%,#1e293b 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

    .hero:before {
        content: '';
        position: absolute;
        inset: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,1000 1000,0 1000,1000"/></svg>') center/cover no-repeat;
    }

.hero-inner {
    display: grid;
    gap: 36px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(32px,4.5vw,48px);
    margin: 0 0 12px;
    line-height: 1.1;
}

.hero .lead {
    color: #cbd5e1;
    margin: 0 0 24px;
    font-size: 1.1rem;
}

.grad {
    background: linear-gradient(90deg,#2563eb,#60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 18px;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow);
    transition: all .25s ease;
}

    .button:hover {
        background: var(--primary-600);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.button-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
}

    .button-outline:hover {
        background: var(--primary-50);
    }

.button-preorder {
    background: var(--primary);
    color: #fff !important;
}

.button-ghost {
    background: transparent;
    color: var(--text);
    border: 1px dashed var(--border);
}

.hero-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255,255,255,.08);
}

    .hero-media img {
        width: 150%;
    }

.section {
    padding: 64px 0;
}

    .section.alt {
        background: var(--alt);
    }

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-50);
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 260px;
    flex: 1;
}

    .search-box input {
        border: 0;
        outline: 0;
        background: transparent;
        font: inherit;
        width: 100%;
    }

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: var(--muted);
    margin-right: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .9rem;
    cursor: pointer;
    user-select: none;
    background: #fff;
}

    .chip input {
        accent-color: var(--primary);
    }

.filter-actions {
    display: flex;
    gap: 8px;
}

/* Brand chips row */
.brand-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.brand-chip {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: .9rem;
}

    .brand-chip.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

/* Results */
.results-count {
    margin: 10px 2px 0;
    color: var(--muted);
}

/* List grid + cards */
.ecu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 18px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

/* IMPORTANT: scope brand styles to cards so header/footer logo is NOT affected */
.card .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

    .card .brand img {
        height: 40px;
        width: auto;
        object-fit: contain;
        display: block;
    }

.card .brand-avatar {
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 12px;
    background: var(--primary-50);
    color: var(--primary);
    border: 1px solid var(--primary-600);
}

.card .brand-name {
    font-weight: 800;
    font-size: 1.05rem;
}

.card .brand-actions {
    display: flex;
    gap: 8px;
}

.card .anchor {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
}

    .card .anchor:hover {
        color: var(--primary);
    }

/* Modules list */
.modules {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    position: relative;
}

.module {
    list-style: none;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
}

.module-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-title {
    font-weight: 700;
}

.module-note {
    color: var(--muted);
    font-size: .95rem;
}

/* Tag chips */
.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: .75rem;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: #fff;
}

    .tag.petrol {
        color: #0ea5e9;
        border-color: #bae6fd;
        background: #f0f9ff;
    }

    .tag.diesel {
        color: #10b981;
        border-color: #bbf7d0;
        background: #ecfeff;
    }

    .tag.tcu {
        color: #f59e0b;
        border-color: #fde68a;
        background: #fff7ed;
    }

    .tag.other {
        color: #64748b;
        border-color: #cbd5e1;
        background: #f8fafc;
    }

/* Long lists: fade + toggle */
.module.is-hidden {
    display: none;
}

.modules.collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}

/* Footer row */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 8px;
    color: var(--muted);
    font-size: .9rem;
}

.copyable {
    cursor: pointer;
    border-bottom: 1px dashed var(--border);
}

.more-toggle {
    cursor: pointer;
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .more-toggle i {
        font-size: .9rem;
    }

.cta-center {
    text-align: center;
    margin-top: 28px;
}

.legal-note {
    color: var(--muted);
    font-size: .9rem;
    margin-top: 12px;
}

/* ===== Brand-specific logo sizes (ONLY on this page, inside #ecus) ===== */
#ecus .bosch-logo {
    height: 35px;
}

#ecus .siemens-logo {
    height: 25px;
}

#ecus .delphi-logo {
    height: 40px;
}

#ecus .marelli-logo {
    height: 50px;
}

#ecus .continental-logo {
    height: 55px;
}

#ecus .denso-logo {
    height: 25px;
}

#ecus .temic-logo {
    height: 45px;
}

#ecus .valeo-logo {
    height: 50px;
}

/* ===== Footer (added so it’s styled on this page) ===== */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    margin-bottom: 20px;
}

.brand-logo {
    height: 60px;
    display: block;
}

.site-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color .2s ease;
}

    .site-footer a:hover {
        color: #ffffff;
    }

.footer-about {
    font-size: .9rem;
    line-height: 1.6;
    max-width: 400px;
}

.footer-links h4 {
    color: #ffffff;
    margin: 0 0 16px;
    font-size: 1.125rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

    .footer-bottom p {
        margin: 0;
    }

.footer-social {
    display: flex;
    gap: 16px;
}

    .footer-social a {
        color: #94a3b8;
        font-size: 1.25rem;
        transition: color .2s ease;
    }

        .footer-social a:hover {
            color: #ffffff;
        }

/* Responsive */
@media (max-width:1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ecu-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width:768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
