:root {
    --bg: #eef2f4;
    --surface: #ffffff;
    --surface-strong: #111827;
    --text: #17202a;
    --muted: #657282;
    --line: #d9e0e7;
    --brand: #c62828;
    --brand-dark: #931f1f;
    --accent: #0f766e;
    --warning: #b45309;
    --ink: #0b1118;
    --radius: 8px;
    --shadow: 0 18px 50px rgba(16, 24, 40, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand,
.desktop-nav,
.header-actions,
.hero-actions,
.section-heading {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #ffffff;
    background: var(--brand);
    border-radius: var(--radius);
}

.desktop-nav {
    gap: 8px;
    padding: 6px;
    color: var(--text);
    background: #eef2f5;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 700;
}

.desktop-nav a {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 6px;
}

.desktop-nav a:hover {
    color: #ffffff;
    background: var(--brand);
}

.header-actions {
    gap: 10px;
}

.login-button,
.cart-button,
.vehicle-finder button,
.product-card button,
.package-card button,
.ai-chat-input button,
.login-modal button {
    border: 0;
    cursor: pointer;
}

.login-button {
    min-height: 42px;
    padding: 0 15px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 900;
}

.cart-button,
.vehicle-finder button,
.product-card button,
.package-card button,
.primary-action,
.ai-chat-input button,
.login-modal form button {
    color: #ffffff;
    background: var(--brand);
    border-radius: var(--radius);
    font-weight: 800;
}

.cart-button {
    min-height: 42px;
    padding: 0 16px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1.2fr);
    gap: 28px;
    align-items: center;
    min-height: 630px;
    padding: 64px 32px 46px;
    background:
        linear-gradient(90deg, rgba(8, 13, 21, 0.94) 0%, rgba(8, 13, 21, 0.82) 43%, rgba(8, 13, 21, 0.36) 100%),
        url("../img/hero-garage.png") center / cover no-repeat,
        #151b24;
    color: #ffffff;
}

.hero-copy,
.showcase-band,
.check-section,
.site-footer {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffb4a8;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 4.9rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.lead {
    max-width: 680px;
    margin: 22px 0 0;
    color: #d9e3ea;
    font-size: 1.15rem;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    color: #e5edf3;
    backdrop-filter: blur(10px);
}

.hero-proof strong {
    color: #ffffff;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
}

.secondary-action {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius);
    font-weight: 800;
}

.vehicle-finder {
    width: min(100%, 330px);
    justify-self: start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid #f59e0b;
    outline: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
}

.finder-label {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 9px;
    color: #ffffff;
    background: var(--accent);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

.vehicle-finder h2 {
    margin: 0 0 12px;
    font-size: 1.06rem;
}

.vehicle-type-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 12px;
}

.vehicle-type {
    display: grid;
    align-items: center;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    min-height: 64px;
    padding: 7px 4px;
    color: #5c3900;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1.08;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.vehicle-type.is-active {
    color: #ffffff;
    background: #ea580c;
    border-color: #ea580c;
    box-shadow: 0 8px 18px rgba(234, 88, 12, 0.25);
}

.vehicle-type-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
}

.vehicle-type-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.field-grid {
    display: grid;
    gap: 9px;
}

label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

select,
input {
    min-height: 38px;
    padding: 0 10px;
    color: var(--text);
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.vehicle-finder button {
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
}

.section-heading {
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-heading h2,
.check-section h2,
.not-found h1 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.showcase-band {
    margin-top: 34px;
    padding: 30px 28px 34px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.band-categories {
    background: #ffffff;
}

.band-categories .section-heading {
    align-items: start;
    justify-content: start;
    flex-direction: column;
    gap: 2px;
}

.band-products {
    background: #f3f7f8;
}

.band-packages {
    background: #fff7f2;
}

.marquee {
    position: relative;
    overflow: hidden;
}

.marquee::before,
.marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 68px;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(90deg, var(--fade-color), transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(270deg, var(--fade-color), transparent);
}

.band-categories .marquee {
    --fade-color: #ffffff;
}

.band-products .marquee {
    --fade-color: #f3f7f8;
}

.band-packages .marquee {
    --fade-color: #fff7f2;
}

.marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    will-change: transform;
}

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

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

.marquee-right .marquee-track {
    animation: scroll-right 58s linear infinite;
}

.marquee-left .marquee-track {
    animation: scroll-left 56s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 8px));
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(calc(-50% - 8px));
    }

    to {
        transform: translateX(0);
    }
}

.category-card,
.product-card,
.package-card {
    width: 282px;
    min-height: 260px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.category-card-compact {
    width: auto;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 132px;
    padding: 16px 18px;
    border-color: #dbe4ee;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card-compact:hover {
    border-color: #f2b2b2;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.category-card-compact .category-icon {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    min-width: 82px;
    border-radius: 10px;
    background: #f8fafc;
    border-color: #e5edf5;
}

.category-content {
    display: grid;
    min-width: 0;
    align-content: center;
}

.category-card-compact h3 {
    margin: 0 0 6px;
    color: #061a33;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.18;
}

.category-card-compact p {
    margin: 0 0 12px;
    color: #51677f;
    font-size: 0.86rem;
    line-height: 1.34;
}

.category-card-compact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    min-height: 32px;
    padding: 6px 16px;
    justify-self: start;
    color: #cf2428;
    background: #ffffff;
    border: 1px solid #ef9a9a;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.category-card-compact:hover a,
.category-card-compact a:hover {
    color: #ffffff;
    background: #cf2428;
    border-color: #cf2428;
}

.category-card-compact.category-futomu .category-icon img,
.category-card-compact.category-hutes .category-icon img,
.category-card-compact.category-szijak .category-icon img {
    width: 94%;
    height: 94%;
}

.package-card-large {
    width: auto;
    min-height: 330px;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    column-gap: 20px;
}

.package-card-large .package-image {
    grid-row: span 5;
    min-height: 270px;
    margin: 0;
}

.package-card-large h3 {
    font-size: 1.45rem;
}

.package-card-large p {
    max-width: 360px;
}

.category-card:not(.category-card-compact) {
    display: grid;
    align-content: start;
    gap: 10px;
}

.product-image,
.package-image {
    min-height: 118px;
    margin: -2px -2px 6px;
    background: var(--package-image, url("../img/parts-showcase.png")) center / cover no-repeat;
    border-radius: var(--radius);
}

.product-image.oil {
    background-position: 12% 45%;
}

.product-image.brake {
    background-position: 42% 46%;
}

.product-image.wiper {
    background-position: 94% 48%;
}

.package-image {
    background-position: center;
}

.category-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius);
    overflow: hidden;
}

.category-icon img {
    display: block;
    width: 88%;
    height: 88%;
    object-fit: contain;
}

.category-card:not(.category-card-compact) h3,
.product-card h3,
.package-card h3 {
    margin: 0;
    font-size: 1.12rem;
}

.category-card:not(.category-card-compact) p,
.product-card p,
.package-card p,
.check-section p,
.not-found p,
.site-footer p {
    color: var(--muted);
}

.category-card:not(.category-card-compact) a {
    margin-top: auto;
    color: var(--brand);
    font-weight: 900;
}

.product-recommendation {
    margin-top: 30px;
}

.product-card,
.package-card {
    display: grid;
    gap: 12px;
}

.status-badge,
.package-card span {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

.compatible {
    color: #065f46;
    background: #d1fae5;
}

.check {
    color: #92400e;
    background: #fef3c7;
}

.neutral,
.package-card span {
    color: #334155;
    background: #e2e8f0;
}

.product-card strong,
.package-card strong {
    font-size: 1.35rem;
}

.product-card button,
.package-card button {
    min-height: 44px;
    align-self: end;
}

.check-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 72px;
    padding: 36px 32px;
    background: var(--surface-strong);
    color: #ffffff;
    border-radius: var(--radius);
}

.check-section p {
    max-width: 760px;
    color: #cbd5e1;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 56px 32px 28px;
}

.site-footer nav {
    display: flex;
    gap: 16px;
    color: var(--muted);
    font-weight: 700;
}

.ai-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
}

.ai-chat-toggle {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 18px 36px rgba(15, 118, 110, 0.34);
    cursor: pointer;
}

.ai-chat-toggle span {
    font-size: 1.15rem;
    font-weight: 900;
}

.ai-chat-toggle strong {
    margin-top: -14px;
    font-size: 0.74rem;
}

.ai-chat-panel {
    position: absolute;
    right: 0;
    bottom: 92px;
    display: none;
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ai-chat-panel.is-open {
    display: block;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    color: #ffffff;
    background: var(--ink);
}

.ai-chat-header div {
    display: grid;
    gap: 2px;
}

.ai-chat-header span {
    color: #b7c4cf;
    font-size: 0.82rem;
}

.ai-chat-header button,
.modal-close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: inherit;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 900;
}

.ai-chat-body {
    display: grid;
    gap: 10px;
    max-height: 310px;
    padding: 16px;
    overflow: auto;
    background: #f8fafc;
}

.chat-message {
    max-width: 88%;
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.92rem;
}

.chat-message.assistant {
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
}

.chat-message.customer {
    justify-self: end;
    color: #ffffff;
    background: var(--brand);
}

.ai-chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.ai-chat-input input {
    min-width: 0;
}

.ai-chat-input button {
    min-height: 44px;
    padding: 0 14px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 17, 24, 0.64);
}

.modal-backdrop[hidden] {
    display: none;
}

.login-modal {
    position: relative;
    width: min(440px, 100%);
    padding: 28px;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-modal h2 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.12;
}

.login-modal p {
    color: var(--muted);
}

.login-modal form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.login-modal form button {
    min-height: 46px;
}

.login-modal a {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand);
    font-weight: 900;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--text);
    background: #eef2f5;
}

.not-found {
    width: min(720px, calc(100% - 32px));
    margin: 80px auto;
    padding: 42px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

@media (max-width: 920px) {
    .site-header {
        padding: 0 16px;
    }

    .desktop-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 44px 16px 28px;
    }

    .vehicle-finder {
        justify-self: start;
    }

    .showcase-band {
        width: calc(100% - 32px);
        padding: 24px 16px 28px;
    }

    .package-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .package-card-large {
        grid-template-columns: 1fr;
    }

    .package-card-large .package-image {
        grid-row: auto;
        min-height: 180px;
    }

    .check-section,
    .site-footer,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }
}

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

@media (max-width: 640px) {
    .category-matrix {
        grid-template-columns: 1fr;
    }

    .category-card-compact {
        gap: 14px;
        min-height: 120px;
        padding: 14px;
    }

    .category-card-compact .category-icon {
        flex-basis: 74px;
        width: 74px;
        height: 74px;
        min-width: 74px;
    }

    .category-card-compact h3 {
        font-size: 1rem;
    }

    .category-card-compact p {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 560px) {
    .brand span:last-child {
        display: none;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .cart-button {
        padding: 0 12px;
    }

    .login-button {
        padding: 0 10px;
    }

    .package-feature-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat {
        right: 14px;
        bottom: 14px;
    }

    .ai-chat-toggle {
        width: 64px;
        height: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
        transform: none;
    }
}
