/*
|--------------------------------------------------------------------------
| ZAParo — стили сайта
|--------------------------------------------------------------------------
| Мотив: этикетка на коробке с запчастью. Жёлтая полоса — только у
| поискового блока и в логотипе. Номера деталей и цены — табличными
| цифрами узкого шрифта.
*/

@font-face {
    font-family: "Onest";
    src: url("../fonts/onest-var.woff") format("woff");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Sofia Sans Condensed";
    src: url("../fonts/sofia-condensed-var.woff") format("woff");
    font-weight: 1 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --steel: #E9ECEF;
    --steel-deep: #DDE1E6;
    --paper: #FFFFFF;
    --ink: #171A20;
    --ink-soft: #2B303A;
    --slate: #5B6472;
    --line: #D3D8DE;
    --cobalt: #1D3FD6;
    --cobalt-deep: #1531AE;
    --cobalt-tint: #E8ECFC;
    --signal: #FFC629;
    --ok: #1E7A45;
    --ok-tint: #E4F3EA;
    --err: #B42318;
    --err-tint: #FDECEA;

    --font-text: "Onest", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Sofia Sans Condensed", "Onest", "Arial Narrow", Arial, sans-serif;

    --r-s: 6px;
    --r-l: 12px;
    --container: 1200px;
    --gutter: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--cobalt);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--cobalt-deep);
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid var(--cobalt);
    outline-offset: 2px;
}

.container {
    width: min(var(--container), calc(100% - var(--gutter) * 2));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    padding: 10px 14px;
    border-radius: var(--r-s);
    background: var(--ink);
    color: #fff;
}

.skip-link:focus {
    top: 12px;
}

.num {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums lining-nums;
}

mark.todo {
    padding: 0 4px;
    border-radius: 3px;
    background: var(--signal);
    color: var(--ink);
    font-size: .9em;
}


/* ------------------------------------------------------------------ */
/* Кнопки                                                              */
/* ------------------------------------------------------------------ */

.btn,
.search-button,
.checkout-button,
.submit-order-button,
.offer-add-button,
.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 2px solid var(--cobalt);
    border-radius: var(--r-s);
    background: var(--cobalt);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover,
.search-button:hover,
.checkout-button:hover,
.submit-order-button:hover,
.offer-add-button:hover,
.details-button:hover {
    border-color: var(--cobalt-deep);
    background: var(--cobalt-deep);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--cobalt);
}

.btn-ghost:hover {
    background: var(--cobalt-tint);
    border-color: var(--cobalt);
    color: var(--cobalt-deep);
}

button:disabled,
.btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}


/* ------------------------------------------------------------------ */
/* Шапка                                                               */
/* ------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: baseline;
    flex: none;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1;
    text-decoration: none;
}

.logo:hover {
    color: var(--ink);
}

.logo-zap {
    position: relative;
    color: var(--cobalt);
    font-weight: 900;
    letter-spacing: .01em;
}

.logo-zap::after {
    content: "";
    position: absolute;
    left: 1px;
    right: 1px;
    bottom: -5px;
    height: 4px;
    border-radius: 1px;
    background: var(--signal);
}

.logo-aro {
    font-weight: 600;
    letter-spacing: .01em;
}

.logo-invert,
.logo-invert:hover {
    color: #fff;
}

.logo-invert .logo-zap {
    color: #9DB0FF;
}

.site-nav {
    display: flex;
    gap: 4px;
    margin-right: auto;
}

.site-nav a {
    padding: 8px 12px;
    border-radius: var(--r-s);
    color: var(--ink-soft);
    font-size: 15px;
    text-decoration: none;
}

.site-nav a:hover {
    background: var(--steel);
    color: var(--ink);
}

.site-nav a[aria-current="page"] {
    color: var(--cobalt);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-phone {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    white-space: nowrap;
}

.cart-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--paper);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.cart-button:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.cart-count {
    display: none;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--cobalt);
    color: #fff;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
}

.cart-count.visible {
    display: inline-flex;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--paper);
}

.menu-button-bars,
.menu-button-bars::before,
.menu-button-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--ink);
    transition: transform .2s ease;
}

.menu-button-bars {
    position: relative;
}

.menu-button-bars::before,
.menu-button-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-button-bars::before { top: -6px; }
.menu-button-bars::after { top: 6px; }

.nav-open .menu-button-bars { background: transparent; }
.nav-open .menu-button-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-button-bars::after { transform: translateY(-6px) rotate(-45deg); }


/* ------------------------------------------------------------------ */
/* Главная: первый экран и поиск                                       */
/* ------------------------------------------------------------------ */

.hero {
    padding: 64px 0 56px;
    background: var(--steel);
}

.hero-title {
    max-width: 17ch;
    font-size: clamp(42px, 6.2vw, 72px);
    font-weight: 800;
    line-height: 1;
}

.hero-lead {
    max-width: 64ch;
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 18px;
}

.search-box {
    position: relative;
    max-width: 980px;
    margin-top: 36px;
    padding: 8px 28px 26px 40px;
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    background: var(--paper);
}

/* Жёлтая полоса этикетки */
.search-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    border-radius: var(--r-l) 0 0 var(--r-l);
    background: var(--signal);
}

.search-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.search-tab {
    margin-bottom: -1px;
    padding: 14px 6px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--slate);
    font-weight: 600;
}

.search-tab + .search-tab {
    margin-left: 18px;
}

.search-tab:hover {
    color: var(--ink);
}

.search-tab.active {
    border-bottom-color: var(--cobalt);
    color: var(--ink);
}

.search-row {
    display: flex;
    gap: 12px;
}

.search-input {
    flex: 1;
    min-width: 0;
    height: 64px;
    padding: 0 18px;
    border: 2px solid var(--line);
    border-radius: var(--r-s);
    background: var(--paper);
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 650;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: .02em;
    outline: none;
}

.search-input::placeholder {
    color: #9AA3AF;
    font-family: var(--font-text);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0;
}

.search-input:focus {
    border-color: var(--cobalt);
}

.search-button {
    height: 64px;
    min-width: 140px;
    font-size: 17px;
}

.search-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
    margin-top: 14px;
    color: var(--slate);
    font-size: 14px;
}

.example-article {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cobalt);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.search-hint {
    margin-top: 14px;
    color: var(--slate);
    font-size: 14px;
}

.page-home .search-hint:empty {
    display: none;
}


/* Подбор по автомобилю */

.car-search-panel {
    display: none;
}

.car-search-panel.visible {
    display: block;
}

.car-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.car-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.car-field label,
.form-label {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 600;
}

.form-label span,
.required {
    color: var(--err);
}

.car-field select,
.form-input,
.form-textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--paper);
    outline: none;
}

.car-field select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23171A20' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.car-field select:disabled {
    background-color: var(--steel);
    color: var(--slate);
    cursor: not-allowed;
}

.car-field select:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: var(--cobalt);
    box-shadow: 0 0 0 3px var(--cobalt-tint);
}

.form-textarea {
    min-height: 96px;
    resize: vertical;
}

.car-manual {
    margin-top: 16px;
}

.car-info {
    display: none;
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 4px solid var(--cobalt);
    background: var(--steel);
}

.car-info.visible {
    display: block;
}

.car-info-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
}

.car-info-text {
    color: var(--slate);
    font-size: 14px;
}

.car-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.car-clear-button {
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--slate);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Заявка на подбор (VIN / авто) и форма партнёров */

.request-panel {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
}

.car-search-panel:not(.visible) + .request-panel {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.request-panel.visible {
    display: block;
}

.request-title {
    margin-bottom: 14px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
}

.request-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.request-grid .full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vin-input {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.vin-input::placeholder {
    font-family: var(--font-text);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}

.request-vin-info {
    min-height: 20px;
    color: var(--slate);
    font-size: 13px;
}

.request-vin-info.bad { color: var(--err); }
.request-vin-info.good { color: var(--ok); }

.request-submit {
    margin-top: 16px;
}

.request-status {
    margin-top: 12px;
    font-size: 15px;
}

.request-status:empty {
    display: none;
}

.request-status.ok,
.form-status.ok {
    padding: 12px 14px;
    border-radius: var(--r-s);
    background: var(--ok-tint);
    color: var(--ok);
}

.request-status.err,
.form-status.err {
    padding: 12px 14px;
    border-radius: var(--r-s);
    background: var(--err-tint);
    color: var(--err);
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    color: var(--slate);
    font-size: 13px;
    line-height: 1.45;
}

.consent input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--cobalt);
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}


/* ------------------------------------------------------------------ */
/* Результаты поиска: строки, как в каталоге                           */
/* ------------------------------------------------------------------ */

.results-section {
    padding: 48px 0 64px;
    scroll-margin-top: 80px;
}

.results-section[hidden] {
    display: none;
}

.results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.results-title {
    font-size: 36px;
}

.results-count {
    margin-top: 4px;
    color: var(--slate);
}

.sort-box {
    display: none;
    align-items: center;
    gap: 6px;
    color: var(--slate);
    font-size: 14px;
}

.sort-box.visible {
    display: flex;
}

.sort-button {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 14px;
}

.sort-button.active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.results-grid {
    border-top: 2px solid var(--ink);
}

.results-group {
    padding: 22px 0 10px;
    border-bottom: 1px solid var(--line);
    font-size: 22px;
}

.part-row {
    display: grid;
    grid-template-columns: minmax(170px, 1.1fr) minmax(0, 2fr) 110px 110px 120px 170px;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.part-brand {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.1;
}

.part-article {
    display: block;
    color: var(--slate);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.part-name {
    color: var(--ink-soft);
    font-size: 15px;
}

.part-cell-label {
    display: block;
    color: var(--slate);
    font-size: 12px;
}

.part-stock,
.part-time {
    font-size: 15px;
    font-weight: 600;
}

.part-stock.in-stock {
    color: var(--ok);
}

.part-price {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.part-price small {
    display: block;
    color: var(--slate);
    font-family: var(--font-text);
    font-size: 12px;
    font-weight: 400;
}

.details-button {
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
}

.results-message {
    padding: 48px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--slate);
    text-align: center;
}

.results-message strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 24px;
}

.loader {
    width: 32px;
    height: 32px;
    margin: 0 auto 14px;
    border: 3px solid var(--steel-deep);
    border-top-color: var(--cobalt);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ------------------------------------------------------------------ */
/* Разделы главной                                                     */
/* ------------------------------------------------------------------ */

.section {
    padding: 80px 0;
}

.section + .section {
    padding-top: 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 36px;
}

.section-title {
    font-size: clamp(32px, 4vw, 46px);
}

.section-link {
    font-weight: 600;
}

/* Как заказать: настоящая последовательность — поэтому с номерами */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    border-top: 2px solid var(--ink);
}

.step {
    padding: 22px 24px 0 0;
    counter-increment: step;
}

.step + .step {
    padding-left: 24px;
    border-left: 1px solid var(--line);
}

.step::before {
    content: counter(step);
    display: block;
    margin-bottom: 14px;
    color: var(--cobalt);
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
}

.step h3 {
    margin-bottom: 8px;
    font-size: 23px;
}

.step p {
    color: var(--slate);
}

/* Почему удобно: определения, а не карточки */
.reasons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 48px;
    padding: 72px 0;
    border-block: 1px solid var(--line);
}

.reasons-intro p {
    max-width: 36ch;
    margin-top: 16px;
    color: var(--slate);
}

.reasons-list {
    margin: 0;
}

.reasons-list div {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.reasons-list div:first-child {
    padding-top: 0;
}

.reasons-list dt {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.reasons-list dd {
    margin: 0;
    color: var(--slate);
}

/* Доставка и оплата — сводка */
.terms-grid {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.terms-block {
    padding: 28px;
    border-radius: var(--r-l);
    background: var(--steel);
}

.terms-block h3 {
    margin-bottom: 14px;
    font-size: 26px;
}

.plain-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.plain-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--steel-deep);
}

.plain-list li:last-child {
    border-bottom: 0;
}

.plain-list strong {
    display: block;
}

.plain-list span {
    color: var(--slate);
    font-size: 15px;
}

/* Вопросы и ответы */
.faq {
    max-width: 860px;
    border-top: 2px solid var(--ink);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    list-style: none;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    color: var(--cobalt);
    font-size: 28px;
    line-height: .8;
    transition: transform .2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-width: 70ch;
    padding: 0 0 22px;
    color: var(--ink-soft);
}

.faq-answer p + p {
    margin-top: 10px;
}

/* Партнёрам — короткий блок на главной */
.partner-teaser {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    padding: 40px;
    border-radius: var(--r-l);
    background: var(--ink);
    color: #fff;
}

.partner-teaser p {
    margin-top: 12px;
    color: #C5CAD3;
}

.partner-teaser .btn {
    justify-self: end;
}


/* ------------------------------------------------------------------ */
/* Блок «остались вопросы»                                             */
/* ------------------------------------------------------------------ */

.contact-strip {
    padding: 48px 0;
    border-top: 1px solid var(--line);
    background: var(--steel);
}

.contact-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
}

.contact-strip-title {
    font-size: 30px;
}

.contact-strip-text {
    margin-top: 6px;
    color: var(--slate);
}

.contact-strip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* ------------------------------------------------------------------ */
/* Подвал                                                              */
/* ------------------------------------------------------------------ */

.site-footer {
    padding: 56px 0 32px;
    background: var(--ink);
    color: #C5CAD3;
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-brand p {
    max-width: 30ch;
    margin-top: 16px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h2 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 19px;
}

.footer-col a {
    color: #E4E7EC;
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-phone {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.footer-muted {
    color: #8C94A1;
}

.footer-legal {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid #343A45;
    color: #8C94A1;
    font-size: 13px;
}

.footer-legal p + p {
    margin-top: 4px;
}


/* ------------------------------------------------------------------ */
/* Внутренние страницы                                                 */
/* ------------------------------------------------------------------ */

.page-head {
    padding: 48px 0 40px;
    background: var(--steel);
}

.breadcrumbs {
    margin-bottom: 14px;
    color: var(--slate);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--slate);
}

.page-title {
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 800;
}

.page-lead {
    max-width: 62ch;
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 18px;
}

.page-body {
    padding: 56px 0 80px;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
}

.page-aside {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: var(--r-l);
    background: var(--steel);
}

.page-aside h2 {
    margin-bottom: 10px;
    font-size: 22px;
}

.page-aside p {
    color: var(--slate);
    font-size: 15px;
}

.page-aside .btn {
    width: 100%;
    margin-top: 12px;
}

.prose {
    max-width: 72ch;
}

.prose > * + * {
    margin-top: 16px;
}

.prose h2 {
    margin-top: 44px;
    font-size: 32px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 28px;
    font-size: 23px;
}

.prose ul,
.prose ol {
    padding-left: 22px;
}

.prose li + li {
    margin-top: 6px;
}

.prose .note {
    padding: 16px 18px;
    border-left: 4px solid var(--cobalt);
    background: var(--cobalt-tint);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.prose th,
.prose td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    color: var(--slate);
    font-weight: 600;
}

.legal {
    font-size: 15px;
}

.legal h2 {
    font-size: 24px;
}

.legal-updated {
    color: var(--slate);
    font-size: 14px;
}

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

.contact-card {
    padding: 28px;
    border-radius: var(--r-l);
    background: var(--steel);
}

.contact-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.contact-big {
    display: inline-block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.contact-card .btn {
    margin-top: 16px;
}

.requisites {
    margin: 0;
}

.requisites div {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--steel-deep);
}

.requisites dt {
    color: var(--slate);
}

.requisites dd {
    margin: 0;
}

/* Партнёрам */
.partner-layout {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 40px;
    margin: 0;
}

.benefits div {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.benefits dt {
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
}

.benefits dd {
    margin: 0;
    color: var(--slate);
}

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

.audience article {
    padding-top: 18px;
    border-top: 4px solid var(--signal);
}

.audience h3 {
    margin-bottom: 8px;
    font-size: 24px;
}

.audience p {
    color: var(--slate);
}

.form-card {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--r-l);
    background: var(--paper);
}

.form-card h2 {
    margin-bottom: 6px;
    font-size: 32px;
}

.form-card > p {
    margin-bottom: 20px;
    color: var(--slate);
}

.form-card .btn {
    margin-top: 18px;
}

.form-status {
    margin-top: 14px;
}

.form-status:empty {
    display: none;
}

.error-page {
    padding: 96px 0 120px;
}

.error-code {
    color: var(--cobalt);
    font-family: var(--font-display);
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
}


/* ------------------------------------------------------------------ */
/* Окно предложений, корзина, оформление                               */
/* ------------------------------------------------------------------ */

.modal-overlay,
.checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(23, 26, 32, .55);
}

.checkout-overlay {
    z-index: 1200;
}

.modal-overlay.visible,
.checkout-overlay.visible {
    display: flex;
}

.modal-window,
.checkout-window {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--r-l);
    background: var(--paper);
    box-shadow: 0 24px 64px rgba(23, 26, 32, .28);
}

.modal-header,
.checkout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-title,
.checkout-title {
    font-size: 28px;
}

.modal-subtitle {
    margin-top: 4px;
    color: var(--slate);
}

.modal-close,
.checkout-close,
.cart-close {
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--r-s);
    background: var(--steel);
    font-size: 24px;
    line-height: 1;
}

.modal-close:hover,
.checkout-close:hover,
.cart-close:hover {
    background: var(--steel-deep);
}

.modal-body,
.checkout-body {
    padding: 20px 24px 24px;
}

.offer-list {
    display: flex;
    flex-direction: column;
}

.offer-row {
    display: grid;
    grid-template-columns: 1fr 120px 110px auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.offer-row:first-child {
    padding-top: 0;
}

.offer-price {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.offer-meta,
.offer-delivery,
.offer-quantity {
    color: var(--slate);
    font-size: 14px;
}

.offer-delivery strong,
.offer-quantity strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
}

.offer-add-button {
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
}

.offer-note {
    margin-top: 16px;
    color: var(--slate);
    font-size: 13px;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    background: rgba(23, 26, 32, .45);
}

.cart-overlay.visible {
    display: block;
}

.cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(480px, 100%);
    height: 100%;
    background: var(--paper);
    box-shadow: -18px 0 48px rgba(23, 26, 32, .18);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
}

.cart-title {
    font-size: 30px;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 24px;
}

.cart-empty {
    padding: 64px 12px;
    color: var(--slate);
    text-align: center;
}

.cart-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 24px;
}

.cart-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item-top,
.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.cart-item-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 750;
}

.cart-item-article {
    color: var(--slate);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}

.cart-item-info {
    margin-top: 6px;
    color: var(--slate);
    font-size: 14px;
}

.cart-item-price {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cart-item-bottom {
    align-items: center;
    margin-top: 12px;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    overflow: hidden;
}

.quantity-button {
    width: 38px;
    height: 38px;
    border: 0;
    background: var(--steel);
    font-size: 18px;
}

.quantity-button:hover {
    background: var(--steel-deep);
}

.quantity-value {
    min-width: 42px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.remove-cart-item {
    border: 0;
    background: none;
    color: var(--slate);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--line);
}

.cart-total-row,
.checkout-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cart-total {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.checkout-button,
.submit-order-button {
    width: 100%;
    min-height: 54px;
    font-size: 17px;
}

.clear-cart-button {
    width: 100%;
    margin-top: 10px;
    border: 0;
    background: none;
    color: var(--slate);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-summary {
    padding: 16px 18px;
    border-radius: var(--r-s);
    background: var(--steel);
}

.checkout-summary-title {
    margin-bottom: 6px;
    font-weight: 700;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px solid var(--steel-deep);
    font-size: 14px;
}

.checkout-summary-total {
    margin: 10px 0 0;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 750;
}

.checkout-note {
    color: var(--slate);
    font-size: 14px;
}

.order-success {
    padding: 28px 8px;
    text-align: center;
}

.order-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--ok-tint);
    color: var(--ok);
    font-size: 32px;
    font-weight: 700;
}

.order-success-title {
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
}

.order-success-text {
    max-width: 44ch;
    margin: 0 auto;
    color: var(--slate);
}


/* ------------------------------------------------------------------ */
/* Кнопка звонка, «найдём под заказ», cookie, статус заказа             */
/* ------------------------------------------------------------------ */

.call-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-s);
    background: var(--cobalt);
    color: #fff;
}

.call-button:hover {
    background: var(--cobalt-deep);
    color: #fff;
}

.notfound {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
}

.notfound-text h3 {
    margin-bottom: 12px;
    font-size: 28px;
}

.notfound-text p {
    max-width: 48ch;
    color: var(--ink-soft);
}

.notfound-text .notfound-hint {
    margin-top: 10px;
    color: var(--slate);
    font-size: 14px;
}

.notfound-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border-radius: var(--r-l);
    background: var(--steel);
}

.notfound-form .consent {
    margin-top: 0;
}

.notfound-form .btn {
    align-self: flex-start;
}

.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 16px 14px 20px;
    border-radius: var(--r-l);
    background: var(--ink);
    color: #E4E7EC;
    font-size: 14px;
    box-shadow: 0 12px 32px rgba(23, 26, 32, .25);
}

.cookie-bar a {
    color: #9DB0FF;
}

.cookie-bar .btn {
    flex: none;
    min-height: 40px;
}

.cookie-bar[hidden] {
    display: none !important;
}

.status-form .btn {
    margin-top: 18px;
}

.status-result {
    margin-top: 24px;
    padding: 28px;
    border-left: 6px solid var(--cobalt);
    border-radius: var(--r-l);
    background: var(--steel);
}

.status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.status-label {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
}

.status-label[data-status="done"] { color: var(--ok); }
.status-label[data-status="cancelled"] { color: var(--slate); }

.status-number {
    color: var(--slate);
}

.status-result p {
    margin-bottom: 12px;
    color: var(--ink-soft);
}


/* ------------------------------------------------------------------ */
/* Адаптив                                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {

    .header-phone {
        display: none;
    }

    .call-button {
        display: inline-flex;
    }

    .part-row {
        grid-template-columns: minmax(150px, 1fr) minmax(0, 1.6fr) 100px 100px 110px;
        grid-template-areas: "id name stock time price" ". . . . action";
    }

    .part-id { grid-area: id; }
    .part-name { grid-area: name; }
    .part-stock { grid-area: stock; }
    .part-time { grid-area: time; }
    .part-price { grid-area: price; }
    .part-action { grid-area: action; justify-self: end; }
}

@media (max-width: 960px) {

    :root {
        --gutter: 18px;
    }

    .menu-button {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px var(--gutter) 16px;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
    }

    .nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 14px 0;
        border-bottom: 1px solid var(--steel);
        border-radius: 0;
        font-size: 17px;
    }

    .header-actions {
        margin-left: auto;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 32px;
    }

    .step:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .reasons,
    .page-layout,
    .partner-teaser {
        grid-template-columns: 1fr;
    }

    .reasons {
        gap: 28px;
    }

    .partner-teaser .btn {
        justify-self: start;
    }

    .page-aside {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .audience {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {

    body {
        font-size: 15px;
    }

    .header-inner {
        min-height: 62px;
        gap: 12px;
    }

    .logo {
        font-size: 28px;
    }

    .cart-label {
        display: none;
    }

    .hero {
        padding: 36px 0 32px;
    }

    .hero-lead {
        font-size: 16px;
    }

    .search-box {
        margin-top: 24px;
        padding: 4px 16px 20px 24px;
    }

    .search-box::before {
        width: 8px;
    }

    .search-tabs {
        overflow-x: auto;
        margin-bottom: 16px;
    }

    .search-tab {
        flex: none;
        font-size: 15px;
    }

    .search-tab + .search-tab {
        margin-left: 10px;
    }

    /* На телефоне короткие подписи вкладок, чтобы все три помещались */
    .tab-long {
        display: none;
    }

    .search-row {
        flex-direction: column;
    }

    .search-input {
        height: 58px;
        font-size: 24px;
    }

    .search-button {
        width: 100%;
        height: 54px;
    }

    .notfound {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .notfound-form {
        padding: 18px;
    }

    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .car-fields,
    .request-grid,
    .terms-grid,
    .contacts-grid,
    .benefits {
        grid-template-columns: 1fr;
    }

    .part-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "id price"
            "name name"
            "stock time"
            "action action";
        gap: 8px 16px;
    }

    .part-time {
        text-align: right;
    }

    .part-action .details-button {
        width: 100%;
    }

    .part-action {
        justify-self: stretch;
    }

    .section {
        padding: 56px 0;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .step,
    .step + .step {
        padding: 18px 0 0;
        border-left: 0;
    }

    .step + .step {
        border-top: 1px solid var(--line);
    }

    .step::before {
        font-size: 44px;
    }

    .reasons {
        padding: 48px 0;
    }

    .reasons-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .partner-teaser,
    .terms-block,
    .contact-card,
    .form-card {
        padding: 24px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .requisites div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .modal-overlay,
    .checkout-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-window,
    .checkout-window {
        max-height: 92vh;
        border-radius: var(--r-l) var(--r-l) 0 0;
    }

    .offer-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px 16px;
    }

    .offer-row > div:first-child {
        grid-column: 1 / -1;
    }

    .offer-add-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .contact-strip-actions,
    .contact-strip-actions .btn {
        width: 100%;
    }

    .error-code {
        font-size: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

[hidden] {
    display: none !important;
}
