/* Карточка товара — стили с vostok.ru/product, без бандла шапки */

.product-slider {
    height: auto;
    position: relative;
}

@media (min-width: 768px) {
    .product-slider {
        height: auto;
    }
}

@media (min-width: 1024px) {
    .product-slider {
        height: 410px;
        display: flex;
        gap: 20px;
    }
}

@media (min-width: 1280px) {
    .product-slider {
        gap: 32px;
        height: 512px;
    }
}

@media (min-width: 1440px) {
    .product-slider {
        height: 587px;
    }
}

.product-slider__main {
    width: 100%;
    max-width: 456px;
    height: auto;
    aspect-ratio: 1;
    flex-shrink: 0;
    border: 1px solid #dadada;
    border-radius: 8px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

@media (min-width: 1024px) {
    .product-slider__main {
        width: 410px;
        height: 100%;
        aspect-ratio: auto;
        margin: 0;
    }
}

@media (min-width: 1280px) {
    .product-slider__main {
        width: 512px;
    }
}

@media (min-width: 1440px) {
    .product-slider__main {
        width: 587px;
    }
}

.product-slider__wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.product-slider__slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: zoom-in;
}

.product-slider__slide--active {
    display: block;
}

.product-slider__img-small {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.product-slider__img-original {
    display: none;
}

@media (min-width: 1280px) {
    .product-slider__img-original {
        width: auto;
        height: auto;
        max-width: none;
        position: absolute;
        top: 0;
        left: 0;
        background-color: #fff;
        will-change: transform;
        transform: translate(var(--move-x, 0), var(--move-y, 0));
    }

    .product-slider__slide:hover .product-slider__img-original {
        display: block;
    }
}

.product-slider__preview {
    display: none;
}

@media (min-width: 1024px) {
    .product-slider__preview {
        display: block;
        order: -1;
        flex-shrink: 0;
        height: 100%;
        overflow: auto;
        scrollbar-width: none;
        position: relative;
    }

    .product-slider__preview::after,
    .product-slider__preview::before {
        content: "";
        width: 100%;
        height: 80px;
        position: absolute;
        left: 0;
        z-index: 1;
        pointer-events: none;
    }

    .product-slider__preview::before {
        top: 0;
        background-image: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0));
    }

    .product-slider__preview::after {
        bottom: 0;
        background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    }

    .product-slider__preview--end::after,
    .product-slider__preview--start::before {
        content: none;
    }
}

.product-slider__preview-wrapper {
    height: 100%;
    overflow: auto;
    scrollbar-width: none;
}

.product-slider__preview-button {
    background: 0 0;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    cursor: pointer;
    border: 1px solid #dadada;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: border-color .3s;
}

.product-slider__preview-button:not(:first-child),
.product-static li:not(:first-child) {
    margin: 10px 0 0;
}

.product-slider__preview-button:hover {
    border: 1px solid #1d4e9e;
}

.product-slider__preview-button::after {
    background: #1d4e9e;
    content: "";
    width: 100%;
    height: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 1;
    transform: translateY(100%);
    transition: transform .3s;
}

.product-slider__preview-button--active::after {
    transform: translateY(0);
}

@media (min-width: 1280px) {
    .product-slider__preview-button {
        width: 112px;
        height: 112px;
    }
}

@media (min-width: 1440px) {
    .product-slider__preview-button {
        width: 130px;
        height: 130px;
        border-radius: 8px;
    }
}

.product-slider__preview-button img {
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    object-fit: contain;
}

.product-slider__pagination {
    height: 32px;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 1024px) {
    .product-slider__pagination {
        display: none;
    }
}

.product-slider__bullet {
    background: rgba(0, 0, 0, .2);
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    transform: scale(.8);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .3s, transform .3s;
}

.product-slider__bullet--active {
    background: #000;
    transform: scale(1);
}

.product-color__header {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    margin: 0 0 8px;
}

@media (min-width: 768px) {
    .product-color__header {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.product-color__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-color__item {
    flex-shrink: 0;
}

.product-color__variant {
    display: block;
    width: 32px;
    height: 32px;
    border: 1px solid #dadada;
    border-radius: 50%;
    opacity: .4;
    transition: opacity .3s;
}

.product-color__variant--active,
.product-color__variant:hover {
    opacity: 1;
}

.product-page-price__wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.product-page-price__current {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 768px) {
    .product-page-price__current {
        font-size: 28px;
        line-height: 34px;
        font-weight: 500;
    }
}

@media (min-width: 1280px) {
    .product-page-price__current {
        font-size: 32px;
        line-height: 40px;
        font-weight: 500;
    }
}

.product-page-price__description {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    margin: 0;
    color: #8f8f8f;
}

@media (min-width: 768px) {
    .product-page-price__description {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.product-buy-sizes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

@media (min-width: 768px) {
    .product-buy-sizes {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .product-buy-sizes {
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .product-buy-sizes {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

.product-buy-sizes__select-toggler {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    min-height: 56px;
    padding: 15px 19px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition-duration: .3s;
    transition-property: background-color, border-color, color;
    border: 1px solid #1d4e9e;
    background-color: #1d4e9e;
    color: #fff;
    width: 100%;
}

.product-buy-sizes__select-toggler:hover {
    border: 1px solid #1266b1;
    background-color: #1266b1;
}

@media (min-width: 1280px) {
    .product-buy-sizes__select-toggler {
        width: auto;
        min-width: 300px;
    }
}

.product-buy-sizes__size-chart {
    order: -1;
}

@media (min-width: 1280px) {
    .product-buy-sizes__size-chart {
        order: 0;
    }
}

.size-chart-button {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    border: none;
    padding: 0;
    background-color: transparent;
    cursor: pointer;
    color: #1d4e9e;
    text-decoration: none;
    transition: .3s color;
}

@media (min-width: 768px) {
    .size-chart-button {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.size-chart-button:hover {
    color: #1266b1;
}

.size-chart-button--static {
    cursor: default;
    pointer-events: none;
}

.size-chart-button--static:hover {
    color: #1d4e9e;
}

/* Временно скрыто: «Проверить наличие в магазинах» (desktop + mobile) */
.product-services__item--check-availability,
button.product-services__item--check-availability {
    display: none !important;
}

.product-services {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .product-services {
        gap: 10px 32px;
    }
}

.product-services__item {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d4e9e;
    transition: color .3s;
}

@media (min-width: 768px) {
    .product-services__item {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.authorization-notification__text button:hover,
.product-features__name a:hover,
.product-services__item:hover {
    color: #1266b1;
}

.authorization-notification__text button,
button.product-services__item {
    background: 0 0;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.product-services__icon {
    flex-shrink: 0;
}

.authorization-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-top: 1px solid #dadada;
    padding: 23px 0 0;
}

.authorization-notification__icon {
    flex-shrink: 0;
    color: #424242;
}

.authorization-notification__text {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    margin: 0;
    color: #8f8f8f;
}

@media (min-width: 768px) {
    .authorization-notification__text {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.authorization-notification__text button {
    font: inherit;
    color: #1d4e9e;
    transition: color .3s;
}

.product-info {
    --product-info-gap: 16px;
}

@media (min-width: 768px) {
    .product-info {
        --product-info-gap: 20px;
    }
}

@media (min-width: 1024px) {
    .product-info {
        --product-info-gap: 16px;
    }
}

@media (min-width: 1280px) {
    .product-info {
        --product-info-gap: 24px;
    }
}

.product-info__name {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 768px) {
    .product-info__name {
        font-size: 28px;
        line-height: 34px;
        font-weight: 500;
    }
}

@media (min-width: 1280px) {
    .product-info__name {
        font-size: 32px;
        line-height: 40px;
        font-weight: 500;
    }
}

.product-info__article {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    color: #8f8f8f;
    margin: 0 0 var(--product-info-gap);
}

@media (min-width: 768px) {
    .product-info__article {
        font-size: 14px;
        line-height: 22px;
        font-weight: 400;
    }
}

.product-info__price-block {
    margin: 0 0 var(--product-info-gap);
}

.product-info__prices {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.product-info__price {
    min-width: 160px;
}

.product-info__color {
    margin: 0 0 var(--product-info-gap);
}

.product-info__buy {
    min-height: 56px;
}

.product-info__services {
    margin: 16px 0 0;
}

.product-info__authorization-notification {
    margin: var(--product-info-gap) 0 0;
}

.tabs__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

@media (min-width: 768px) {
    .tabs__list {
        gap: 8px;
    }
}

.tabs__item {
    flex-shrink: 0;
}

.tabs__button {
    background: #f4f6fa;
    font-size: 10px;
    line-height: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border: 0;
    padding: 10px 16px;
    cursor: pointer;
    transition-duration: .3s;
    transition-property: color, background-color;
    border-radius: 16px;
}

@media (min-width: 768px) {
    .tabs__button {
        font-size: 12px;
        line-height: 14px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 9px 16px;
    }
}

.tabs__button:not(.tabs__button--active):active {
    background: #1d4e9e;
    color: #fff;
}

@media (hover: hover) {
    .tabs__button:not(.tabs__button--active):focus,
    .tabs__button:not(.tabs__button--active):hover {
        color: #1266b1;
        background-color: #dbe8ff;
    }
}

.tabs__button--active {
    background: #1d4e9e;
    cursor: default;
    color: #fff;
}

.tabs__tab-content {
    display: none;
}

.tabs__tab-content--active {
    display: block;
}

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

.product-characteristics__item {
    padding: 8px 0;
    margin: 0;
}

@media (min-width: 1024px) {
    .product-characteristics__item {
        padding: 4px 0;
        display: flex;
        align-items: flex-start;
        gap: 20px;
    }
}

.product-characteristics__name {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #8f8f8f;
    padding: 0;
    margin: 0;
    width: 221px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .product-characteristics__name {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

@media (min-width: 1280px) {
    .product-characteristics__name {
        width: 325px;
    }
}

.product-characteristics__value {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .product-characteristics__value {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

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

@media (min-width: 1024px) {
    .product-features__list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 40px;
        row-gap: 20px;
    }
}

.product-features__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.product-features__item:not(:first-child) {
    margin: 16px 0 0;
}

@media (min-width: 768px) {
    .product-features__item:not(:first-child) {
        margin: 20px 0 0;
    }
}

@media (min-width: 1024px) {
    .product-features__item:not(:first-child) {
        margin: 0;
    }
}

.product-features__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.product-features__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-features__text {
    padding: 6px 0 0;
}

.product-features__name {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 768px) {
    .product-features__name {
        font-size: 18px;
        line-height: 26px;
        font-weight: 500;
    }
}

.product-features__description {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: #8f8f8f;
    margin: 8px 0 0;
}

@media (min-width: 768px) {
    .product-features__description {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

.product-static {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
}

@media (min-width: 768px) {
    .product-static {
        font-size: 16px;
        line-height: 24px;
        font-weight: 400;
    }
}

.product-static > * {
    margin: 0;
}

.product-static > * + * {
    margin: 16px 0 0;
}

.product-static > p + p {
    margin: 20px 0 0;
}

.product-detailed__header {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin: 0 0 20px;
}

@media (max-width: 767px) {
    .product-detailed .tabs__list {
        flex-wrap: nowrap;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
        padding: 0 0 8px;
    }
}

.product-detailed__content {
    max-width: 1015px;
    margin: calc(56px / 3) 0 0;
}

@media (min-width: 768px) {
    .product-detailed__content {
        margin: 40px 0 0;
    }
}

.product-page__main {
    position: relative;
    padding: 0;
}

@media (min-width: 768px) {
    .product-page__main {
        padding: 0;
    }
}

@media (min-width: 1024px) {
    .product-page__main {
        display: flex;
        gap: 48px;
    }
}

@media (min-width: 1280px) {
    .product-page__main {
        gap: 56px;
    }
}

.product-page__slider {
    width: 100%;
    padding: 0;
    margin: 0 0 24px;
}

@media (min-width: 1024px) {
    .product-page__slider {
        width: auto;
        padding: 0;
        margin: 0;
    }
}

@media (min-width: 1024px) {
    .product-page__info {
        flex-grow: 1;
    }
}

.product-page__detailed {
    margin: calc(64px / 3) 0 0;
}

@media (min-width: 768px) {
    .product-page__detailed {
        margin: 56px 0 0;
    }
}

@media (min-width: 1024px) {
    .product-page__detailed {
        margin: 40px 0 0;
    }
}

@media (min-width: 1280px) {
    .product-page__detailed {
        margin: 64px 0 0;
    }
}

.product-page__legal-entity-banners {
    margin: calc(56px / 3) 0 0;
}

@media (min-width: 768px) {
    .product-page__legal-entity-banners {
        margin: calc(64px / 3) 0 0;
    }
}

.product-page__main-features {
    margin: 64px 0 0;
}

@media (max-width: 767px) {
    .product-page__main-features {
        margin-top: calc(64px / 3);
    }

    body[data-url^="/product/"] .page-footer {
        margin-top: calc(56px / 3);
    }
}

/* Блок преимуществ внутри контейнера карточки — без второго .container */
.product-page__main-features .shop-main__block {
    margin: 0;
}

.product-page__main-features .container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 767px) {
    .product-page__main-features .main-features__list {
        padding-top: 0;
    }
}

.product-page {
    padding-bottom: 0;
}

@media (min-width: 768px) {
    .product-page {
        padding-bottom: 80px;
    }
}

/* Панель выбора размера и количества — по макету vostok.ru */
.product-sizes-popup {
    position: fixed;
    inset: 0;
    z-index: 110;
}

.product-sizes-popup[hidden] {
    display: none;
}

.product-sizes-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.product-sizes-popup__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100dvh - 40px);
    padding: 20px 16px 0;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .product-sizes-popup__panel {
        top: 0;
        left: auto;
        width: 400px;
        max-width: calc(100% - 56px);
        height: 100dvh;
        max-height: none;
        padding: 24px 24px 0;
        border-radius: 12px 0 0 12px;
    }
}

.product-sizes-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    cursor: pointer;
    transition: color .3s;
}

.product-sizes-popup__close:hover {
    color: #1266b1;
}

.product-sizes-popup__close svg {
    display: block;
}

.product-sizes-popup__head {
    padding: 8px 32px 0 0;
    margin: 0 0 24px;
}

.product-sizes-popup__title {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 768px) {
    .product-sizes-popup__title {
        font-size: 28px;
        line-height: 34px;
    }
}

.product-sizes-popup__product {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 24px;
}

.product-sizes-popup__product-name {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    margin: 0 0 8px;
}

@media (min-width: 768px) {
    .product-sizes-popup__product-name {
        font-size: 18px;
        line-height: 26px;
    }
}

.product-sizes-popup__product-price {
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
    margin: 0;
}

@media (min-width: 768px) {
    .product-sizes-popup__product-price {
        font-size: 28px;
        line-height: 34px;
    }
}

.product-sizes-popup__product-vat {
    font-size: 12px;
    line-height: 20px;
    font-weight: 400;
    color: #8f8f8f;
    margin: 4px 0 0;
}

@media (min-width: 768px) {
    .product-sizes-popup__product-vat {
        font-size: 14px;
        line-height: 22px;
    }
}

.product-sizes-popup__product-thumb {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.product-sizes-popup__color {
    margin: 0;
    flex-shrink: 0;
}

.product-sizes-popup__head,
.product-sizes-popup__product {
    flex-shrink: 0;
}

.product-sizes-popup__list {
    list-style: none;
    padding: 0 0 8px;
    margin: 16px 0 0;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.product-sizes-popup__footer {
    flex-shrink: 0;
    margin: 0 -16px;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .06);
}

@media (min-width: 768px) {
    .product-sizes-popup__footer {
        margin: 0 -24px;
        padding: 16px 24px 24px;
    }
}

.product-sizes-popup__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 15px 19px;
    border: 1px solid #1d4e9e;
    border-radius: 8px;
    background: #1d4e9e;
    color: #fff;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .3s, border-color .3s, color .3s;
}

.product-sizes-popup__submit svg {
    flex-shrink: 0;
    display: block;
}

.product-sizes-popup__submit:hover:not(:disabled) {
    background: #1266b1;
    border-color: #1266b1;
}

.product-sizes-popup__submit:disabled {
    background: #e3e6ea;
    border-color: #e3e6ea;
    color: #8f8f8f;
    cursor: default;
}

.product-sizes-popup__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #dadada;
}

.product-sizes-popup__size {
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    margin: 0;
}

@media (min-width: 768px) {
    .product-sizes-popup__size {
        font-size: 16px;
        line-height: 24px;
    }
}

.counter {
    border-radius: 4px;
    border: 1px solid #dadada;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
    background-color: #fff;
    flex-shrink: 0;
}

.counter--medium {
    gap: 8px;
    min-height: 44px;
    padding: 7px;
}

.counter__control {
    border: none;
    padding: 0;
    background-color: transparent;
    color: #dadada;
    transition: color .3s;
}

.counter__control:not(:disabled) {
    cursor: pointer;
}

.counter__control:not(:disabled):hover {
    color: #424242;
}

.counter__control svg {
    display: block;
}

.counter__input-wrapper {
    position: relative;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-grow: 1;
}

.counter__input-wrapper::before,
.counter__input-wrapper::after {
    content: "";
    width: 1px;
    height: calc(100% - 3px);
    background-color: #dadada;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.counter__input-wrapper::before {
    left: 0;
}

.counter__input-wrapper::after {
    right: 0;
}

.counter--medium .counter__input-wrapper {
    padding: 0 9px;
}

.counter--medium .counter__input-wrapper::before,
.counter--medium .counter__input-wrapper::after {
    height: 100%;
}

.counter__input {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    border: none;
    caret-color: #dadada;
    width: 44px;
    flex-grow: 1;
    padding: 0;
    min-height: 28px;
    background: transparent;
}

@media (min-width: 768px) {
    .counter__input {
        font-size: 18px;
        line-height: 28px;
    }
}

.counter--medium .counter__input {
    font-size: 12px;
    line-height: 20px;
    min-height: 25px;
}

@media (min-width: 768px) {
    .counter--medium .counter__input {
        font-size: 14px;
        line-height: 22px;
    }
}

body.is-sizes-popup-open,
body.is-availability-popup-open,
body.is-legal-entity-popup-open {
    overflow: hidden;
}

/* Модалка «Наличие в магазинах» — широкая правая панель (список + карта) */
.product-availability-popup {
    position: fixed;
    inset: 0;
    z-index: 2100;
}

.product-availability-popup[hidden] {
    display: none;
}

.product-availability-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 0;
}

.product-availability-popup__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100dvh - 40px);
    padding: 20px 16px 0;
    overflow: hidden;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .product-availability-popup__panel {
        top: 0;
        left: auto;
        width: 1170px;
        max-width: calc(100% - 56px);
        height: 100dvh;
        max-height: none;
        padding: 24px 24px 0;
        border-radius: 12px 0 0 12px;
    }
}

.product-availability-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #000;
    cursor: pointer;
    transition: color .3s;
}

.product-availability-popup__close:hover {
    color: #1266b1;
}

.product-availability-popup__close svg {
    display: block;
}

@media (min-width: 768px) {
    .product-availability-popup__close {
        top: 0;
        right: calc(100% + 16px);
        width: 40px;
        height: 40px;
        background: #fff;
        border-radius: 8px;
    }
}

.product-availability {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: calc(100dvh - 80px);
}

@media (min-width: 768px) {
    .product-availability {
        display: grid;
        grid-template-areas:
            "head map"
            "list map";
        grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        height: 100%;
        column-gap: 24px;
    }
}

.product-availability__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    padding-right: 32px;
}

@media (min-width: 768px) {
    .product-availability__head {
        grid-area: head;
        padding-right: 0;
        margin-bottom: 20px;
    }
}

.product-availability__title {
    margin: 0;
    font-size: 24px;
    line-height: 30px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .product-availability__title {
        font-size: 28px;
        line-height: 34px;
    }
}

.product-availability__size {
    width: 100%;
    max-width: 220px;
    z-index: 9;
}

@media (min-width: 768px) {
    .product-availability__tabs {
        display: none;
    }
}

.product-availability__body {
    position: relative;
    flex: 1;
    min-height: 0;
}

@media (min-width: 768px) {
    .product-availability__body {
        display: contents;
    }
}

.product-availability .tabs__tab-content {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
}

.product-availability .tabs__tab-content--active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

@media (min-width: 768px) {
    .product-availability .tabs__tab-content,
    .product-availability .tabs__tab-content:not(.tabs__tab-content--active) {
        position: relative;
        inset: auto;
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

/* display:grid + gap перебивают display:block у .tabs__tab-content */
.product-availability__list.tabs__tab-content,
.product-availability__list {
    display: grid;
    gap: 16px;
    min-height: 0;
    overflow: auto;
    align-content: start;
}

.product-availability__list .agcy-block__item:not(:last-child) {
    padding-bottom: 16px;
    border-bottom: 1px solid #e8ecf1;
}

@media (min-width: 768px) {
    .product-availability__list {
        grid-area: list;
        max-height: none;
        padding-bottom: 24px;
    }

    .product-availability__list::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    .product-availability__list::-webkit-scrollbar-track {
        background-color: #f4f6fa;
        border-radius: 8px;
    }

    .product-availability__list::-webkit-scrollbar-thumb {
        background-color: #dadada;
        border: 1px solid transparent;
        border-radius: 8px;
        background-clip: content-box;
    }

    .product-availability__list:hover::-webkit-scrollbar-thumb {
        background-color: #8f8f8f;
    }
}

.product-availability__map {
    min-height: 280px;
    overflow: hidden;
    background: #f4f6fa;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .product-availability__map {
        grid-area: map;
        height: auto;
        min-height: 0;
        margin-bottom: 24px;
        border-radius: 8px;
    }
}

.product-availability__map-leaflet,
.product-availability__map .agcy-block__leaflet {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

@media (min-width: 768px) {
    .product-availability__map-leaflet,
    .product-availability__map .agcy-block__leaflet {
        min-height: 0;
        height: 100%;
        border-radius: 8px;
    }
}

.product-availability .agcy-block__item-address a {
    color: #1266b1;
    text-decoration: none;
}

.product-availability .agcy-block__item-address a:hover {
    text-decoration: underline;
}
