* {
    box-sizing: border-box;
}

:root {
    --blue: #1769e0;
    --blue-dark: #0e55bd;
    --blue-light: #eaf2ff;
    --dark: #101828;
    --gray: #667085;
    --border: #e4e7ec;
    --background: #f7f9fc;
    --white: #ffffff;
    --green: #12a150;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--dark);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* HEADER */

.header {
    height: 76px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 180px;
}

.logo-main {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-main span {
    color: var(--blue);
}

.logo-sub {
    margin-top: 5px;
    font-size: 10px;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.navigation a {
    font-size: 14px;
    color: #475467;
    transition: .2s;
}

.navigation a:hover {
    color: var(--blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-link {
    border: 0;
    background: transparent;
    color: #475467;
    padding: 10px 12px;
}

.cart-button {
    border: 1px solid var(--border);
    background: white;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #344054;
}

.cart-button:hover {
    border-color: #b8c7dd;
}

.cart-icon {
    font-size: 16px;
}

.cart-count {
    min-width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* HERO */

.hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(23, 105, 224, .14), transparent 30%),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
    border-bottom: 1px solid #e3ebf7;
}

.hero-inner {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    width: 680px;
    max-width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 30px;
    background: #e5efff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 5vw, 62px);
    line-height: 1.04;
    letter-spacing: -2.5px;
    font-weight: 800;
}

.hero h1 span {
    color: var(--blue);
}

.hero-description {
    max-width: 600px;
    margin: 22px 0 30px;
    font-size: 18px;
    line-height: 1.6;
    color: #667085;
}


/* SEARCH */

.search-box {
    background: white;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 35px rgba(25, 60, 100, .08);
}

.search-tabs {
    display: flex;
    gap: 4px;
    padding: 3px 5px 8px;
}

.search-tab {
    border: 0;
    background: transparent;
    color: #667085;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.search-tab.active {
    background: #edf4ff;
    color: var(--blue);
}

.search-row {
    display: flex;
    gap: 8px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 25px;
    color: #98a2b3;
    line-height: 1;
}

.search-input-wrapper input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    padding: 0 18px 0 48px;
    font-size: 16px;
    color: var(--dark);
}

.search-input-wrapper input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .10);
}

.search-button {
    height: 54px;
    padding: 0 27px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    font-weight: 700;
    white-space: nowrap;
    transition: .2s;
}

.search-button:hover {
    background: var(--blue-dark);
}

.search-button:disabled {
    opacity: .6;
    cursor: wait;
}

.search-hint {
    color: #98a2b3;
    font-size: 11px;
    padding: 9px 7px 3px;
}


/* HERO VISUAL */

.hero-visual {
    width: 330px;
    min-width: 300px;
}

.car-card {
    background: white;
    border: 1px solid #dce5f1;
    border-radius: 24px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(36, 75, 120, .10);
}

.car-circle {
    width: 155px;
    height: 155px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: #edf4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 68px;
}

.car-card-title {
    font-size: 21px;
    font-weight: 750;
}

.car-card-text {
    margin-top: 7px;
    color: #98a2b3;
    font-size: 14px;
}

.car-card-button {
    width: 100%;
    margin-top: 25px;
    padding: 13px;
    border-radius: 9px;
    border: 1px solid #cddcf2;
    color: var(--blue);
    background: white;
    font-weight: 600;
}

.car-card-button:hover {
    background: #f4f8ff;
}


/* ADVANTAGES */

.advantages {
    background: white;
    border-bottom: 1px solid var(--border);
}

.advantages-grid {
    min-height: 100px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}

.advantage {
    display: flex;
    align-items: center;
    gap: 14px;
}

.advantage-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--blue-light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
}

.advantage strong,
.advantage span {
    display: block;
}

.advantage strong {
    font-size: 14px;
}

.advantage span {
    margin-top: 4px;
    color: #98a2b3;
    font-size: 12px;
}


/* CATALOG */

.catalog-section {
    padding: 75px 0;
    background: white;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 30px;
}

.section-heading.centered {
    display: block;
    text-align: center;
}

.section-label {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

h2 {
    margin: 8px 0 0;
    font-size: 31px;
    letter-spacing: -.8px;
}

.all-link {
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
}

.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.category {
    min-height: 112px;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: .2s;
}

.category:hover {
    border-color: #b9cef0;
    box-shadow: 0 8px 25px rgba(23, 105, 224, .07);
    transform: translateY(-2px);
}

.category-icon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 11px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 20px;
}

.category strong,
.category small {
    display: block;
}

.category strong {
    font-size: 14px;
}

.category small {
    margin-top: 5px;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.35;
}


/* RESULTS */

.results-section {
    padding: 55px 0;
}

.results-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .04);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.results-header p {
    margin: 8px 0 0;
    color: #98a2b3;
    font-size: 14px;
}

.results-count {
    color: #667085;
    font-size: 13px;
}

.offer-block {
    margin-top: 30px;
}

.offer-block-title {
    font-size: 18px;
    font-weight: 750;
    margin-bottom: 13px;
}

.offer {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) 170px 130px 125px;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 17px;
    margin-bottom: 10px;
    background: white;
    transition: .15s;
}

.offer:hover {
    border-color: #c3d5ef;
    box-shadow: 0 5px 20px rgba(16, 24, 40, .05);
}

.offer.best {
    border-color: #a9d8be;
    background: #fbfffc;
}

.offer-main {
    min-width: 0;
}

.offer-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.offer-meta {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #667085;
    font-size: 12px;
}

.offer-meta span {
    display: inline-block;
}

.provider {
    font-size: 13px;
    font-weight: 650;
}

.price {
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.price-label {
    margin-bottom: 3px;
    color: #98a2b3;
    font-size: 10px;
}

.stock {
    color: var(--green);
    font-size: 13px;
    font-weight: 650;
}

.delivery {
    color: #475467;
    font-size: 13px;
    margin-top: 4px;
}

.buy-button {
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.buy-button:hover {
    background: var(--blue-dark);
}

.best-label {
    display: inline-block;
    margin-bottom: 5px;
    padding: 4px 7px;
    border-radius: 5px;
    background: #e6f7ed;
    color: #08763a;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.empty {
    padding: 25px;
    border-radius: 10px;
    background: #f8fafc;
    color: #667085;
    text-align: center;
}


/* MANUFACTURERS */

.manufacturer-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 25px;
}

.manufacturer-button {
    text-align: left;
    border: 1px solid var(--border);
    background: white;
    border-radius: 11px;
    padding: 17px;
    transition: .2s;
}

.manufacturer-button:hover {
    border-color: var(--blue);
    background: #f8fbff;
}

.manufacturer-brand {
    font-weight: 700;
}

.manufacturer-count {
    margin-top: 5px;
    color: #98a2b3;
    font-size: 12px;
}


/* HOW IT WORKS */

.how-section {
    padding: 80px 0;
    background: #f7f9fc;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 45px;
}

.step {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 27px;
}

.step-number {
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.step h3 {
    margin: 17px 0 8px;
    font-size: 17px;
}

.step p {
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
}


/* STATUS */

.status {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    background: #101828;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
    font-size: 13px;
    z-index: 100;
}

.status.error {
    background: #b42318;
}

.hidden {
    display: none !important;
}


/* FOOTER */

.footer {
    background: #101828;
    color: white;
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 800;
}

.footer-logo span {
    color: #5d9df3;
}

.footer p {
    margin: 8px 0 0;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 25px;
    color: #d0d5dd;
    font-size: 13px;
}

.footer-copy {
    color: #667085;
    font-size: 12px;
}


/* TABLET */

@media (max-width: 1000px) {

    .navigation {
        display: none;
    }

    .hero-visual {
        display: none;
    }

    .hero-content {
        width: 100%;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .offer {
        grid-template-columns: 1fr 130px 110px;
    }

    .offer .delivery {
        display: none;
    }

    .offer .buy-button {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
        padding: 25px 0;
        gap: 18px;
    }
}


/* MOBILE */

@media (max-width: 650px) {

    .container {
        width: min(100% - 24px, 1180px);
    }

    .header {
        height: 65px;
    }

    .logo-main {
        font-size: 21px;
    }

    .header-link {
        display: none;
    }

    .cart-button span:nth-child(2) {
        display: none;
    }

    .hero-inner {
        min-height: auto;
        padding: 55px 0 60px;
    }

    .hero h1 {
        font-size: 39px;
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 15px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    h2 {
        font-size: 26px;
    }

    .results-card {
        padding: 18px;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
    }

    .offer {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .offer .buy-button {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
    }

    .price {
        font-size: 20px;
    }

    .manufacturer-list {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

/* Checkout extends the existing palette and spacing without changing the storefront. */
.cart-panel { max-width:1200px; margin:40px auto; padding:32px; background:white; border:1px solid #e2e8f0; border-radius:22px; }
.cart-heading,.cart-totals { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:24px; }
.cart-panel button { padding:10px 16px; border-radius:10px; border:1px solid #cbd5e1; background:#f8fafc; color:#0f172a; cursor:pointer; }
.cart-panel button:disabled { opacity:.5; cursor:default; }
.cart-line { display:grid; grid-template-columns:minmax(180px,1fr) 120px 150px 120px 100px; gap:16px; align-items:center; padding:20px 0; border-bottom:1px solid #e2e8f0; }
.cart-line p { color:#64748b; margin:6px 0; font-size:14px; }
.cart-quantity { display:flex; gap:4px; align-items:center; }
.cart-quantity button { padding:8px 12px; }
.cart-quantity input { width:58px; padding:8px; border:1px solid #cbd5e1; border-radius:8px; }
.cart-totals { margin-top:24px; }
.buyer-fields { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:20px 0; }
.buyer-fields label { display:grid; gap:8px; color:#334155; }
.buyer-fields input { width:100%; padding:14px; border-radius:10px; border:1px solid #cbd5e1; box-sizing:border-box; font:inherit; }
.cart-panel .checkout-submit { background:#ef4444; color:white; border:none; padding:16px 26px; font-weight:700; }
.checkout-note { color:#64748b; margin:18px 0; }
#checkoutMessage { margin-top:20px; color:#0f172a; font-weight:600; }
@media(max-width:800px) { .cart-panel { margin:20px 12px; padding:20px; } .cart-line { grid-template-columns:1fr 1fr; } .cart-line>div:first-child { grid-column:1/-1; } .buyer-fields { grid-template-columns:1fr; } .cart-heading,.cart-totals { flex-wrap:wrap; } }

@media(max-width:650px) {
    .header-inner { flex-wrap:wrap; gap:12px; }
    .header-actions { width:100%; justify-content:space-between; gap:12px; }
    #accountButton { display:inline-flex; padding:8px 0; }
}
