.store-site-header {
    position: relative;
    z-index: 50;
    border-bottom: 1px solid var(--store-border);
    background: var(--store-white);
}

.store-site-header__main {
    border-bottom: 1px solid var(--store-border);
}

.store-site-header__main-inner {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    gap: 28px;
    align-items: center;
    min-height: 88px;
}

.store-site-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.store-preview-toggle {
    flex: 0 0 auto;
    margin: 0;
}

.store-preview-toggle button {
    display: inline-flex;
    width: 40px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--store-radius-small);
    color: var(--store-dark);
    background: transparent;
    cursor: pointer;
}

.store-preview-toggle button:hover,
.store-preview-toggle button[aria-pressed="true"] {
    color: var(--store-red-action);
}

.store-preview-toggle button:focus-visible {
    outline: 2px solid var(--store-red-action);
    outline-offset: 2px;
}

.store-preview-toggle svg {
    width: 24px;
    height: 24px;
}

.store-logo {
    display: inline-flex;
    align-items: baseline;
    color: var(--store-dark);
    font-size: 31px;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.store-logo__moto {
    color: var(--store-dark);
}

.store-logo__dash {
    padding-inline: 2px;
    color: var(--store-red-action);
}

.store-logo__116 {
    color: var(--store-red-action);
}

.store-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
}

.store-search__input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--store-border);
    border-right: 0;
    border-radius: var(--store-radius-small) 0 0 var(--store-radius-small);
    color: var(--store-dark);
    background: var(--store-white);
    outline: 0;
}

.store-site-header .store-search__input:focus {
    border-color: var(--store-red-action);
    outline: none;
    box-shadow: none;
}

.store-search__button {
    min-width: 94px;
    height: 48px;
    padding-inline: 18px;
    border: 1px solid var(--store-red-action);
    border-radius: 0 var(--store-radius-small) var(--store-radius-small) 0;
    color: var(--store-white);
    background: var(--store-red-action);
    font-weight: 800;
    cursor: pointer;
}

.store-search__button:hover {
    border-color: var(--store-red-hover);
    background: var(--store-red-hover);
}

.store-account-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: var(--store-dark);
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.store-account-link:hover {
    color: var(--store-red-action);
}

.store-sections {
    background: var(--store-dark);
}

.store-sections__inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #59626a var(--store-dark);
}

.store-sections__link {
    display: inline-flex;
    min-height: 48px;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--store-white);
    font-size: 14px;
    font-weight: 760;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.store-sections__link:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.store-sections__link:hover,
.store-sections__link.is-active {
    color: var(--store-dark);
    background: var(--store-yellow);
}

.store-footer {
    margin-top: 64px;
    border-top: 1px solid var(--store-border);
    color: #d8dde0;
    background: var(--store-dark);
}

.store-footer__inner {
    display: flex;
    min-height: 104px;
    align-items: center;
    gap: 22px;
}

.store-footer__inner strong {
    color: var(--store-white);
    font-size: 20px;
}

.store-footer__inner span {
    color: #bfc5c9;
}

.store-footer__inner a {
    margin-left: auto;
    color: var(--store-white);
    font-weight: 700;
    text-decoration: none;
}

.store-footer__inner a:hover {
    color: var(--store-yellow);
}

@media (max-width: 900px) {
    .store-site-header__main-inner {
        grid-template-columns: auto 1fr;
        gap: 14px 20px;
        padding-block: 16px;
    }

    .store-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .store-account-link {
        justify-self: end;
    }
}

@media (max-width: 560px) {
    .store-site-header__main-inner {
        min-height: 0;
        gap: 12px 8px;
    }

    .store-site-header__brand {
        gap: 6px;
    }

    .store-logo {
        font-size: 27px;
    }

    .store-account-link {
        font-size: 14px;
    }

    .store-search__input,
    .store-search__button {
        height: 44px;
    }

    .store-search__button {
        min-width: 78px;
        padding-inline: 12px;
    }

    .store-sections__link {
        min-height: 44px;
        padding-inline: 15px;
    }

    .store-footer__inner {
        min-height: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
        padding-block: 28px;
    }

    .store-footer__inner a {
        margin-left: 0;
    }
}

/* Match the actual parts URL so existing headers need no extra class. */
.store-sections a.store-sections__link[href$="/parts/"],
.store-sections a.store-sections__link[href$="/parts"] {
    color: var(--store-white);
    background: var(--store-red-action);
}

.store-sections a.store-sections__link[href$="/parts/"]:hover,
.store-sections a.store-sections__link[href$="/parts"]:hover,
.store-sections a.store-sections__link[href$="/parts/"]:focus-visible,
.store-sections a.store-sections__link[href$="/parts"]:focus-visible {
    color: var(--store-white);
    background: var(--store-red-hover);
}

/* Корзина используется и на витрине, и в личном кабинете. */
.store-header-actions { display: flex; align-items: center; justify-self: end; gap: 22px; min-width: 0; }
.store-cart-link { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; color: var(--store-dark); text-decoration: none; font-weight: 750; white-space: nowrap; }
.store-cart-link:hover { color: var(--store-red-action); }
.store-cart-link svg { width: 23px; height: 23px; flex: 0 0 auto; }
.store-cart-count { display: inline-flex; min-width: 23px; height: 23px; align-items: center; justify-content: center; padding-inline: 5px; border-radius: 20px; color: var(--store-dark); background: var(--store-yellow); font-size: 12px; }
.store-cart-toast { position: fixed; z-index: 1000; inset-inline: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; width: auto; max-width: none; padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); border: 1px solid var(--store-border); border-width: 1px 0 0; border-radius: 0; color: var(--store-white); background: var(--store-dark); box-shadow: var(--store-shadow); text-align: center; overflow-wrap: anywhere; }
.store-cart-toast[hidden] { display: none; }
.store-cart-toast a { color: var(--store-yellow); font-weight: 700; white-space: nowrap; }
.catalog-product-card__cart { font: inherit; cursor: pointer; }
.catalog-product-card__cart:disabled { opacity: .6; cursor: wait; }
@media (max-width: 600px) {
    .store-header-actions { gap: 12px; }
    .store-cart-link > span:not(.store-cart-count) { display: none; }
    .store-header-actions .store-account-link { font-size: 13px; white-space: normal; max-width: 118px; text-align: right; justify-content: flex-end; line-height: 1.25; }
    .store-cart-link { gap: 4px; }
}
@media (max-width: 380px) {
    .store-site-header__main-inner { grid-template-columns: minmax(0, 1fr) auto; }
    .store-header-actions { gap: 8px; }
    .store-header-actions .store-account-link { max-width: 92px; font-size: 12px; }
    .store-site-header .store-logo { font-size: 23px; }
    .store-preview-toggle button { width: 28px; }
}
.catalog-product-card__cart { border: 0; padding: 8px 0; background: transparent; }
.store-price-normal,
.store-price-discount { display: inline-block; white-space: nowrap; }
.store-price-discount { color: #16813a; }
.store-price-asterisk { color: inherit; margin-left: 1px; font-size: .7em; }
.catalog-product-card__delivery-note { margin: 8px 0 0; color: var(--store-muted, #666); font-size: 12px; line-height: 1.4; }
