/* RedParts template adaptation for uParts. */
:root {
    --bg: #f5f6f7;
    --surface: #ffffff;
    --surface-2: #f2f4f7;
    --text: #262626;
    --muted: #6c757d;
    --border: #e1e5ea;
    --primary: #1a79ff;
    --primary-dark: #0064f0;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #20242a;
    --radius: 2px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .06);
    --container: 1410px;
}

[data-theme="dark"] {
    --bg: #f5f6f7;
    --surface: #ffffff;
    --surface-2: #f2f4f7;
    --text: #262626;
    --muted: #6c757d;
    --border: #e1e5ea;
    --primary: #1a79ff;
    --primary-dark: #0064f0;
    --dark: #20242a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

html,
body {
    background: var(--bg);
}

body {
    color: var(--text);
    font-family: Roboto, Inter, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a:hover {
    color: var(--primary);
}

.container {
    width: 100%;
    max-width: var(--container);
    padding-right: 15px;
    padding-left: 15px;
}

.card,
.list-card,
.product-card,
.category-card,
.brand-card,
.selection-tile,
.action-tile,
.empty-state,
.search-panel,
.summary-card,
.product-gallery,
.card-buy,
.card-heavy,
.checkout-form,
.auth-card,
.details-card,
.product-brand-card {
    border-color: var(--border);
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.redparts-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border: 0;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    backdrop-filter: none;
}

.redparts-header .topbar {
    background: #f7f7f7;
    color: #555;
    border-bottom: 1px solid #ebebeb;
}

.redparts-header .topbar-inner {
    min-height: 38px;
    font-size: 13px;
}

.redparts-header .topbar-copy,
.redparts-header .topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.redparts-header .topbar-copy strong,
.redparts-header .topbar-copy span,
.redparts-header .topbar-links a {
    color: #555;
    font-weight: 400;
}

.redparts-header .header_middel {
    background: #fff;
}

.redparts-header .header-main {
    display: grid;
    grid-template-columns: minmax(172px, 230px) minmax(280px, 1fr) auto auto;
    gap: 18px;
    align-items: center;
    min-height: 92px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.redparts-header .logo {
    min-width: 0;
}

.redparts-header .logo-image {
    width: clamp(152px, 13vw, 218px);
    max-width: 100%;
    height: auto;
}

.redparts-header .search_bar {
    min-width: 0;
}

.redparts-header .header-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    width: 100%;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    border: 2px solid var(--primary);
    border-radius: 2px;
    background: #fff;
}

.redparts-header .header-search input {
    height: 48px;
    padding: 0 18px;
    color: #333;
}

.redparts-header .header-search button {
    min-height: 48px;
    height: 48px;
    padding: 0 28px;
    border-radius: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.header-vehicle-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 54px;
    max-width: 280px;
    padding: 7px 12px;
    border: 1px solid #d7e7ff;
    border-radius: 2px;
    background: #f5f9ff;
    color: var(--text);
}

.header-vehicle-chip:hover {
    border-color: var(--primary);
    color: var(--text);
}

.header-vehicle-chip__logo {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #fff;
}

.header-vehicle-chip__logo img {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.header-vehicle-chip__body {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.header-vehicle-chip__body small,
.header-vehicle-chip__body em {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-vehicle-chip__body strong {
    overflow: hidden;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.redparts-header .header-actions {
    gap: 8px;
}

.redparts-header .header-pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 2px;
    border-color: var(--border);
    background: #fff;
    color: #333;
    font-weight: 700;
}

.redparts-header .header-pill--accent {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.redparts-header .navline {
    background: #23282f;
    border-top: 0;
}

.redparts-header .navline-shell {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.redparts-header .navline-inner {
    min-height: 48px;
    gap: 24px;
    color: #d5dce6;
    font-size: 14px;
    font-weight: 500;
}

.redparts-header .navline-inner a {
    color: #d5dce6;
}

.redparts-header .navline-inner a:hover {
    color: #fff;
}

.redparts-header .categories_title {
    min-height: 48px;
    min-width: 230px;
    justify-content: flex-start;
    padding: 0 18px;
    border-radius: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.redparts-header .categori_toggle {
    width: 100%;
    justify-content: space-between;
    font-size: 15px;
}

.redparts-header .categori_toggle::before {
    content: "";
    width: 18px;
    height: 14px;
    margin-right: 8px;
    background:
        linear-gradient(#fff, #fff) 0 0 / 18px 2px no-repeat,
        linear-gradient(#fff, #fff) 0 6px / 18px 2px no-repeat,
        linear-gradient(#fff, #fff) 0 12px / 18px 2px no-repeat;
}

.redparts-header .category-dropdown {
    left: 0;
    top: 100%;
    width: min(1040px, calc(100vw - 40px));
    max-height: min(78vh, 720px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #d8dde4;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .16);
}

.redparts-header .category-dropdown__head {
    min-height: 42px;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: #f7f7f7;
}

.redparts-header .category-dropdown__vehicle {
    margin: 0;
    padding: 12px 16px;
    border-width: 0 0 1px;
    border-radius: 0;
    border-color: #d7e7ff;
    background: #f5f9ff;
}

.redparts-header .category-dropdown__mega {
    min-height: 380px;
    max-height: min(64vh, 620px);
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
}

.redparts-header .category-dropdown__parents {
    max-height: inherit;
    overflow: auto;
    padding: 8px 0;
    border-right: 1px solid var(--border);
    background: #fbfbfb;
}

.redparts-header .category-dropdown__parent-link {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.redparts-header .category-dropdown__parent-link:hover,
.redparts-header .category-dropdown__parent:hover > .category-dropdown__parent-link,
.redparts-header .category-dropdown__parent:focus-within > .category-dropdown__parent-link {
    background: #eef5ff;
    color: var(--primary);
}

.redparts-header .category-dropdown__parent--service > .category-dropdown__parent-link {
    background: #eaf3ff;
    color: var(--primary);
    font-weight: 700;
}

.redparts-header .category-dropdown__panel {
    left: 282px;
    padding: 16px;
}

.redparts-header .category-dropdown__panel-head {
    min-height: 38px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.redparts-header .category-dropdown__panel-head strong {
    font-size: 18px;
    color: #222;
}

.redparts-header .category-dropdown__children-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.redparts-header .category-dropdown__children-grid--level-1,
.redparts-header .category-dropdown__children-grid--level-2,
.redparts-header .category-dropdown__children-grid--level-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 5px 0 0;
    padding-left: 10px;
    border-left: 2px solid #edf1f6;
}

.redparts-header .category-dropdown__child > a {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 2px;
    background: #f6f7f9;
    color: #333;
    font-size: 13px;
    font-weight: 500;
}

.redparts-header .category-dropdown__child > a:hover {
    background: #eaf3ff;
    color: var(--primary);
}

.redparts-header .category-dropdown__empty {
    margin: 16px;
    border-radius: 2px;
}

.brator-home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: 28px;
    align-items: stretch;
    padding-top: 28px;
}

.brator-hero-main {
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    min-height: 560px;
    padding: clamp(34px, 4vw, 58px);
    overflow: hidden;
    border-radius: 2px;
    background: #fff;
}

.brator-hero-main::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 160px;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(26, 121, 255, .06), rgba(26, 121, 255, 0));
}

.brator-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.brator-hero-copy h1 {
    max-width: 11ch;
    margin: 0 0 18px;
    color: #222;
    font-size: clamp(44px, 5.8vw, 82px);
    line-height: .98;
    letter-spacing: 0;
}

.brator-hero-copy .hero-text {
    max-width: 52ch;
    margin-bottom: 24px;
    color: #666;
    font-size: 18px;
    line-height: 1.45;
}

.brator-hero-search {
    max-width: 620px;
    border: 2px solid var(--primary);
    border-radius: 2px;
    background: #fff;
}

.brator-hero-search button,
.brator-hero-links a,
.service-review-card button,
.checkout-form button,
.auth-card button,
.buy-form button,
.btn-primary {
    border-radius: 2px;
}

.brator-hero-product {
    position: relative;
    z-index: 1;
    align-self: stretch;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 14px;
    min-width: 0;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #f6f8fb;
    text-align: center;
}

.brator-hero-product img {
    width: min(260px, 100%);
    height: 220px;
    object-fit: contain;
}

.brator-fitment-card {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow);
}

.brator-fitment-card__catalog {
    min-height: 92px;
    padding: 20px 24px;
    border-radius: 2px;
    background: var(--primary);
    color: #fff;
}

.brator-fitment-card__catalog:hover {
    background: var(--primary-dark);
    color: #fff;
}

.brator-fitment-card__steps {
    border: 1px solid var(--border);
    border-radius: 2px;
    background: #fff;
}

.brator-fitment-step {
    min-height: 68px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    color: #222;
}

.brator-fitment-step:hover {
    background: #eef5ff;
    color: #222;
}

.brator-selected-car {
    border-radius: 2px;
    background: #f5f9ff;
}

.brator-mark-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brator-mark-cloud a {
    min-height: 54px;
    border-radius: 2px;
    background: #fff;
}

.brator-section-head,
.section-head {
    align-items: end;
}

.brator-top-product-card,
.brator-category-card,
.brator-service-card {
    border-radius: 2px;
}

.catalog-tree--page {
    gap: 12px;
}

.catalog-tree__level--0 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-tree__link {
    min-height: 48px;
    border-radius: 2px;
    box-shadow: var(--shadow);
}

.catalog-tree__level--1,
.catalog-tree__level--2,
.catalog-tree__level--3 {
    border-left-color: #e6ebf1;
}

.product-card {
    border-radius: 2px;
}

.product-card:hover,
.category-card:hover,
.brand-card:hover,
.selection-tile:hover,
.brator-top-product-card:hover,
.brator-category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.site-footer {
    margin-top: 42px;
    background: #23282f;
    color: #cfd8e3;
}

.site-footer .footer_top {
    border-top: 4px solid var(--primary);
}

.site-footer .footer-grid {
    padding: 42px 15px 30px;
}

.site-footer h3 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.site-footer .footer-links {
    gap: 8px;
}

.site-footer .footer-links a,
.site-footer .footer-company-line,
.site-footer .muted {
    color: #cfd8e3;
}

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

.site-footer .footer_logo img {
    width: 210px;
    max-width: 100%;
}

.site-footer .footer_bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: #1f242a;
}

.site-footer .footer-copy {
    padding: 16px 15px;
    border: 0;
    color: #aeb8c5;
}

@media (max-width: 1279px) {
    .redparts-header .header-main {
        grid-template-columns: minmax(150px, 200px) minmax(260px, 1fr) auto;
    }

    .header-vehicle-chip {
        grid-column: 1 / -1;
        max-width: none;
    }

    .brator-home-hero,
    .brator-hero-main {
        grid-template-columns: 1fr;
    }

    .brator-hero-product {
        min-height: 320px;
    }

    .catalog-tree__level--0 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .redparts-header .header-main {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas: "burger logo" "search search" "vehicle vehicle";
        min-height: 0;
    }

    .redparts-header .burger {
        grid-area: burger;
        display: block;
    }

    .redparts-header .logo {
        grid-area: logo;
    }

    .redparts-header .search_bar {
        grid-area: search;
    }

    .header-vehicle-chip {
        grid-area: vehicle;
    }

    .redparts-header .header-actions {
        display: none;
    }

    .redparts-header .navline {
        display: none;
    }

    .redparts-header .navline.is-open {
        display: block;
    }

    .redparts-header .navline-shell {
        display: block;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .redparts-header .categories_title {
        width: 100%;
    }

    .redparts-header .category-dropdown {
        position: static;
        width: 100%;
        max-height: none;
        margin-top: 8px;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
    }

    .redparts-header .categories_menu.is-open .category-dropdown {
        display: block;
    }

    .redparts-header .category-dropdown__mega {
        display: block;
        max-height: none;
        min-height: 0;
    }

    .redparts-header .category-dropdown__parents {
        max-height: none;
        border-right: 0;
    }

    .redparts-header .category-dropdown__panel {
        position: static;
        display: none;
        padding: 10px 14px 14px;
    }

    .redparts-header .category-dropdown__parent:hover > .category-dropdown__panel,
    .redparts-header .category-dropdown__parent:focus-within > .category-dropdown__panel {
        display: block;
    }

    .redparts-header .category-dropdown__children-grid {
        grid-template-columns: 1fr;
    }

    .redparts-header .navline-inner {
        display: grid;
        gap: 0;
        padding-top: 8px;
    }

    .redparts-header .navline-inner a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

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

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .redparts-header .topbar {
        display: none;
    }

    .redparts-header .header-main {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .redparts-header .logo-image {
        width: 138px;
    }

    .redparts-header .header-search {
        min-height: 44px;
    }

    .redparts-header .header-search input,
    .redparts-header .header-search button {
        height: 44px;
        min-height: 44px;
    }

    .redparts-header .header-search button {
        padding: 0 16px;
    }

    .brator-home-hero {
        padding-top: 16px;
    }

    .brator-hero-main,
    .brator-fitment-card {
        padding: 20px;
    }

    .brator-hero-copy h1 {
        max-width: none;
        font-size: 42px;
    }

    .brator-hero-copy .hero-text {
        font-size: 15px;
    }

    .brator-hero-search {
        grid-template-columns: 1fr;
    }

    .brator-hero-search button {
        width: 100%;
    }

    .brator-mark-cloud,
    .catalog-tree__level--0 {
        grid-template-columns: 1fr;
    }
}
