* {
    box-sizing: border-box
}

html {
    scrollbar-gutter: stable;
    overflow-y: scroll
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(/vendor/fonts/open-sans.woff2) format("woff2")
}

:root {
    --header-h: 64px;
    --page-max: 1200px
}

body {
    margin: 0;
    font-family: "Segoe UI", "Open Sans", Roboto, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 36px;
    gap: 32px;
    height: 64px
}

.brand {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0f172a;
    text-decoration: none
}

header .brand {
    letter-spacing: 4px
}

header .nav {
    display: flex;
    align-items: center;
    gap: 22px
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #475569;
    font-size: .9375rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px
}

.bg-cars .nav a[href="/"], .bg-boats .nav a[href="/boats"] {
    background: #f1f5f9;
    color: #0f172a
}

.login {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: #0f172a;
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px
}

.login i {
    font-size: .875rem;
    display: block
}

.nav a i {
    font-size: .9375rem;
    display: block
}


.banner {
    width: 100%;
    min-height: min(26vw, 320px);
    padding: 0 36px;
    display: flex;
    align-items: center;
    justify-content: center
}

.content {
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% 37.5vw, 100% 37.5vw
}

.bg-cars .content, .bg-boats .content {
    min-height: 37.5vw
}

.bg-cars .content {
    background-image: linear-gradient(to bottom, rgba(241, 245, 249, .4), rgba(241, 245, 249, .4) 50%, rgba(241, 245, 249, 1)), url(/bg/cars.jpg)
}

.bg-boats .content {
    background-image: linear-gradient(to bottom, rgba(241, 245, 249, .4), rgba(241, 245, 249, .4) 50%, rgba(241, 245, 249, 1)), url(/bg/boats.jpg)
}

.searchbox {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 720px;
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px 4px 22px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .18)
}

.search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: #0f172a;
    padding: 12px 0
}

.search-input::placeholder {
    color: #94a3b8
}

.search-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #0f172a;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.05rem
}

.layout {
    width: 100%;
    position: relative;
    display: flex;
    gap: 28px;
    padding: 56px 36px 28px;
    align-items: flex-start;
    max-width: var(--page-max);
    margin: 0 auto
}

.layout .cards { flex: 1; min-width: 0 }

.layout .toolbar {
    position: absolute;
    top: 12px;
    right: 36px;
    margin: 0
}

.sidebar {
    flex: 0 0 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06)
}

.sidebar h2 {
    margin: 0 0 14px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px
}

.sidebar .field:first-child {
    margin-top: 0
}

.field label {
    font-size: .8125rem;
    font-weight: 600;
    color: #475569
}

.field-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px
}

.field select {
    width: 100%;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #0f172a;
    font-family: inherit;
    font-size: .875rem;
    cursor: pointer
}

.range {
    position: relative;
    height: 20px;
    margin-top: 2px
}

.range-val {
    font-size: .75rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap
}

.range-track {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px
}

.range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    border-radius: 2px
}

.range input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 20px;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none
}

.range input::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    height: 4px;
    background: transparent
}

.range input::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0f172a;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3)
}

.range input::-moz-range-track {
    height: 4px;
    background: transparent
}

.range input::-moz-range-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border: 2px solid #0f172a;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3)
}

.check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
    font-size: .875rem;
    color: #334155;
    cursor: pointer
}

.check input {
    accent-color: #0f172a
}

.filters {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: .875rem;
    color: #334155
}

.filters label {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer
}


.toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px
}

.view-toggle {
    display: inline-flex;
    background: #fff;
    border-radius: 9px;
    overflow: hidden
}

.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    background: none;
    border: 0;
    color: #0f172a;
    cursor: pointer;
    font-size: .9375rem
}

.view-btn i {
    color: inherit
}

.view-btn.active {
    background: #0f172a;
    color: #fff
}

.sort {
    position: relative
}

.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 0;
    border-radius: 9px;
    padding: 7px 12px;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer
}

.sort-btn i {
    font-size: .7rem;
    color: #64748b
}

.sort-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
    min-width: 180px;
    z-index: 5;
    display: none
}

.sort.open .sort-menu {
    display: block
}

.sort-menu li {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: .875rem;
    color: #0f172a;
    cursor: pointer
}

.sort-menu li:hover {
    background: #f1f5f9
}

.sort-menu li.active {
    background: #0f172a;
    color: #fff
}

.auth {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 16px
}

.auth .auth-register {
    display: none
}

.auth.show-register .auth-login {
    display: none
}

.auth.show-register .auth-register {
    display: flex
}

.link-btn {
    background: none;
    border: 0;
    color: #475569;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 0
}

.auth-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .06)
}

.auth-card h2 {
    margin: 0 0 4px;
    font-size: 1.125rem
}

.auth-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .8125rem;
    font-weight: 600;
    color: #475569
}

.auth-card input {
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    font-family: inherit;
    font-size: .875rem;
    color: #0f172a
}

.primary-btn {
    background: #0f172a;
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 11px 16px;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: bold;
    cursor: pointer
}

.detail {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 32px;
    align-items: start
}

.detail-photo img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: block;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12)
}

.detail-info h1 {
    margin: 0 0 8px;
    font-size: 1.875rem
}

.detail-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 18px
}

.specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px
}

.spec {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: .9375rem
}

.spec-label {
    color: #475569
}

.spec-value {
    font-weight: 600
}

@media (max-width: 720px) {
    .detail {
        grid-template-columns:1fr
    }
}

.cards {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(min(220px, calc(50% - 9px)), 1fr));
    gap: 18px;
    align-items: start
}

.card {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12)
}

.card .photo {
    display: block;
    width: 100%;
    height: auto;
    background: #0f172a
}

.card .info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 8px
}

.card .top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .65)
}

.card .meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .95), 0 0 14px rgba(0, 0, 0, .65)
}

.card .title {
    font-size: 17px;
    font-weight: bold
}

.card .year {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap
}

.card .price {
    font-size: 17px;
    font-weight: bold
}

.card .km {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap
}

.cards.list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.cards.list .card {
    width: 100%;
    display: flex;
    align-items: stretch;
    color: #0f172a;
    background: #fff
}

.cards.list .card .photo {
    width: 280px;
    height: 170px;
    flex: none;
    object-fit: cover
}

.cards.list .card .info {
    position: static;
    flex: 1;
    min-width: 0;
    padding: 16px 22px
}

.cards.list .card .top, .cards.list .card .meta {
    text-shadow: none
}

.card .desc {
    display: none
}

.cards.list .card .info {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px
}

.cards.list .card .top {
    display: block;
    padding-right: 100px
}

.cards.list .card .top .title {
    line-height: 1
}

.cards.list .card .top .year {
    display: none
}

.cards.list .card .meta {
    display: contents
}

.cards.list .card .meta .price {
    position: absolute;
    top: 16px;
    right: 22px;
    font-size: 1.125rem;
    font-weight: bold
}

.cards.list .card .meta .km {
    display: none
}

.cards.list .card .desc {
    margin: 0;
    color: #475569;
    font-size: .875rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 28px 16px;
    color: #94a3b8;
    font-size: 13px
}

@media (max-width: 1000px) {
    .layout {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
        align-items: stretch
    }

    .layout .toolbar {
        position: static;
        order: 0;
        right: auto;
        top: auto
    }

    .sidebar {
        position: static;
        flex: none;
        width: 100%;
        display: grid;
        grid-template-columns:1fr 1fr;
        column-gap: 18px
    }

    .sidebar .check {
        grid-column: 1 / -1
    }
}

@media (max-width: 600px) {
    .sidebar {
        grid-template-columns:1fr
    }
}

@media (max-width: 640px) {
    header {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        row-gap: 8px;
        column-gap: 18px;
        padding: 12px 16px 10px
    }

    header .brand {
        flex-basis: 100%;
        text-align: center
    }

    header .nav {
        gap: 18px
    }

    .login {
        margin-left: 0
    }

    .banner {
        padding-left: 16px;
        padding-right: 16px
    }

    .cards.list .card .photo {
        width: 130px;
        height: 104px
    }
}
