/* Р170. Выбор состава и количества использует цвета и размеры блока покупки. */
.hg-store .hg-steel-storefront-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.hg-store .hg-steel-storefront-link,
.hg-store .hg-steel-storefront-choice > [aria-current] {
    display: inline-flex;
    box-sizing: border-box;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--hg-line);
    border-radius: var(--hg-radius-control, 8px);
    color: var(--hg-ink);
    font-size: 14px;
    line-height: 1.35;
}

.hg-store .hg-steel-storefront-link:hover,
.hg-store .hg-steel-storefront-choice > [aria-current] {
    border-color: var(--hg-ink);
}

.hg-store .hg-steel-storefront-link:focus-visible {
    outline: 2px solid var(--hg-red);
    outline-offset: 2px;
}

.hg-store :is(.hg-card-buy, .hg-qv-buy) > a.hg-steel-storefront-link {
    width: 100%;
    height: auto;
    justify-content: space-between;
}

.hg-store .hg-qv-buy > .hg-steel-storefront-link {
    margin-top: 8px;
}

.hg-store .hg-steel-storefront-unavailable {
    display: block;
    color: var(--hg-muted);
    font-size: 14px;
}

.hg-store .hg-steel-storefront-choice > .hg-steel-storefront-unavailable {
    flex-basis: 100%;
}

/* Подпись сборки переносится только между частями «スチールホイール / 組付け済み / 4本»: слово и число с 本 не рвутся. */
.hg-store .hg-steel-storefront-nb {
    white-space: nowrap;
}

/* r6 (P3-4). «本数» в режиме сборки — те же «таблетки», что у выбора количества в режиме шин (.hg-buy__qty, pdp-v3.css). */
.hg-store .hg-steel-storefront-qty {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

.hg-store .hg-steel-storefront-qty legend {
    float: left;
    margin: 0 6px 0 0;
    padding: 0;
    color: var(--hg-muted);
    font-size: 13px;
    font-weight: 700;
}

.hg-store .hg-steel-storefront-qty > :is(a.hg-steel-storefront-link, [aria-current]) {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    min-height: 42px;
    padding: 6px 18px;
    border: 1px solid var(--hg-line);
    border-radius: 999px;
    color: var(--hg-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.hg-store .hg-steel-storefront-qty > a.hg-steel-storefront-link:hover {
    border-color: var(--hg-ink);
}

.hg-store .hg-steel-storefront-qty > [aria-current] {
    border-color: var(--hg-ink);
    box-shadow: inset 0 0 0 1px var(--hg-ink);
}

@media (prefers-reduced-motion: reduce) {
    .hg-store .hg-steel-storefront-qty > :is(a.hg-steel-storefront-link, [aria-current]) {
        transition: none;
    }
}

/* r6 (P3-2). В режиме сборки строки «1本あたり» нет: третья строка шапки (pdp-r440.css) не держит пустое место. */
html .hg-store .hg-pdp-r440 .hg-buy--pdp .hg-buy__head[data-hg-steel-storefront-head]:has(> .hg-buy__label) {
    grid-template-rows: minmax(26px, auto) auto;
}

@media (max-width: 680px) {
    html .hg-store .hg-pdp-r440 .hg-buy--pdp:has(> [data-hg-steel-storefront-head])
        > .hg-buy__ask-row--fav:has(.hg-catalog-like-nojs) > .hg-catalog-likes > .hg-catalog-like {
        display: none;
    }
}

@media (max-width: 680px) and (scripting: none) {
    html body.hg-store .hg-pdp-r440 .hg-buy--pdp:has(> [data-hg-steel-storefront-head])
        > .hg-buy__ask-row--fav:has(> .hg-fav-pdp[hidden]:only-child),
    html body.hg-store .hg-pdp-r440 .hg-buy--pdp:has(> [data-hg-steel-storefront-head])
        > .hg-buy__ask-row--fav > .hg-fav-pdp[hidden] {
        display: none;
    }
}

.hg-store .hg-buybar[data-hg-steel-storefront-bar] {
    display: none;
}

@media (max-width: 1024px) and (scripting: none) {
    .hg-store .hg-buybar[data-hg-steel-storefront-bar] {
        display: flex;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    html:has([data-hg-steel-storefront-bar]) {
        scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom));
    }

    body.hg-store:has([data-hg-steel-storefront-bar]) {
        padding-bottom: calc(100px + env(safe-area-inset-bottom) + var(--hg-bottom-stack, 0px));
    }
}
