/**
 * Единый адаптив таблиц предложений (Getchips API + ETM API + Bitrix склад).
 * Десктоп не затрагивается; карточки — только на экранах ≤991px.
 */

/* Общие контейнеры мобильного рендера */
.lvt-offers-mobile-host .getchips-offers__brand-logo-wrap,
.lvt-offers-mobile-host .getchips-offers__brand-logo,
.lvt-supplier-offers .getchips-offers__brand-logo-wrap,
.lvt-supplier-offers .getchips-offers__brand-logo,
.getchips-offers-section .getchips-offers__brand-logo-wrap,
.getchips-offers-section .getchips-offers__brand-logo,
.store-prices-block.lvt-etm-store-offers .getchips-offers__brand-logo-wrap,
.store-prices-block.lvt-etm-store-offers .getchips-offers__brand-logo {
    display: none !important;
}

.lvt-offers-mobile-host .getchips-offers__brand-link,
.lvt-offers-mobile-host .getchips-offers__brand-fallback,
.lvt-supplier-offers .getchips-offers__brand-link,
.lvt-supplier-offers .getchips-offers__brand-fallback,
.getchips-offers-section .getchips-offers__brand-link,
.getchips-offers-section .getchips-offers__brand-fallback {
    gap: 0;
}

.getchips-offers__brand-inline,
.getchips-offers__lead-inline {
    display: none;
}

@media (max-width: 991px) {
    .catalog-detail__bottom-info .getchips-offers__table th:nth-child(1),
    .catalog-detail__bottom-info .getchips-offers__table td:nth-child(1),
    .lvt-offers-mobile-host .getchips-offers__table th:nth-child(1),
    .lvt-offers-mobile-host .getchips-offers__table td:nth-child(1),
    .lvt-supplier-offers .getchips-offers__table th:nth-child(1),
    .lvt-supplier-offers .getchips-offers__table td:nth-child(1),
    .getchips-offers-section .getchips-offers__table th:nth-child(1),
    .getchips-offers-section .getchips-offers__table td:nth-child(1),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table th:nth-child(1),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table td:nth-child(1),
    .catalog-detail__bottom-info .getchips-offers__table th:nth-child(n+2),
    .catalog-detail__bottom-info .getchips-offers__table td:nth-child(n+2),
    .lvt-offers-mobile-host .getchips-offers__table th:nth-child(n+2),
    .lvt-offers-mobile-host .getchips-offers__table td:nth-child(n+2),
    .lvt-supplier-offers .getchips-offers__table th:nth-child(n+2),
    .lvt-supplier-offers .getchips-offers__table td:nth-child(n+2),
    .getchips-offers-section .getchips-offers__table th:nth-child(n+2),
    .getchips-offers-section .getchips-offers__table td:nth-child(n+2),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table th:nth-child(n+2),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table td:nth-child(n+2) {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .catalog-detail__bottom-info .getchips-offers__table,
    .lvt-offers-mobile-host .getchips-offers__table,
    .lvt-supplier-offers .getchips-offers__table,
    .getchips-offers-section .getchips-offers__table,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    .lvt-supplier-offers {
        margin-bottom: 1rem;
    }

    .lvt-supplier-offers__title,
    .store-prices__title-new {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .lvt-offers-mobile-host .getchips-offers__note,
    .lvt-offers-mobile-host .getchips-offers__warn,
    .lvt-supplier-offers .getchips-offers__note,
    .lvt-supplier-offers .getchips-offers__warn,
    .getchips-offers-section .getchips-offers__note,
    .getchips-offers-section .getchips-offers__warn {
        display: none;
    }

    .lvt-offers-mobile-host .getchips-offers__table-wrap,
    .lvt-supplier-offers .getchips-offers__table-wrap,
    .getchips-offers-section .getchips-offers__table-wrap,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table-wrap {
        overflow: visible;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .lvt-offers-mobile-host .getchips-offers__table,
    .lvt-supplier-offers .getchips-offers__table,
    .getchips-offers-section .getchips-offers__table,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table {
        border: 0;
        font-size: 0.8125rem;
        min-width: 0;
        width: 100%;
    }

    .lvt-offers-mobile-host .getchips-offers__table thead,
    .lvt-supplier-offers .getchips-offers__table thead,
    .getchips-offers-section .getchips-offers__table thead,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table thead {
        display: none !important;
    }

    .getchips-offers__toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.35rem 0.5rem;
        margin-bottom: 0.5rem;
    }

    .getchips-offers__toolbar-sort {
        display: flex;
        flex: 1 1 auto;
        flex-wrap: wrap;
        gap: 0.3rem;
        min-width: 0;
    }

    .getchips-offers__toolbar-currency {
        flex: 0 0 auto;
        margin-left: auto;
        overflow: visible;
    }

    .getchips-offers__sort-pill {
        min-height: 32px;
        padding: 0.28rem 0.55rem;
        flex: 0 1 auto;
    }

    .lvt-etm-stores-under-desc,
    .getchips-offers-section,
    .store-prices-block.lvt-etm-store-offers,
    .lvt-supplier-offers {
        position: relative;
        z-index: 0;
        clear: both;
        width: 100%;
        min-height: 0;
        overflow: visible;
    }

    .catalog-detail__bottom-info .lvt-etm-stores-under-desc {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .lvt-offers-mobile-host .getchips-offers__table tbody,
    .lvt-supplier-offers .getchips-offers__table tbody,
    .getchips-offers-section .getchips-offers__table tbody,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row,
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row,
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row,
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto minmax(0, max-content);
        grid-template-areas: 'name price stock qty';
        align-items: center;
        column-gap: 0.4rem;
        row-gap: 0;
        margin: 0;
        padding: 0.32rem 0.45rem;
        border: 1px solid var(--stroke_black, #dce5dd);
        border-radius: 8px;
        background: var(--card_bg_black, #fff);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        position: relative;
        flex: 0 0 auto;
    }

    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row:nth-child(even) td,
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row:nth-child(even) td,
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row:nth-child(even) td,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row:nth-child(even) td {
        background: transparent;
    }

    .lvt-offers-mobile-host .getchips-offers__table--collapsible:not(.is-expanded) tr.getchips-offers__row--extra,
    .lvt-supplier-offers .getchips-offers__table--collapsible:not(.is-expanded) tr.getchips-offers__row--extra,
    .getchips-offers-section .getchips-offers__table--collapsible:not(.is-expanded) tr.getchips-offers__row--extra {
        display: none;
    }

    .lvt-offers-mobile-host .getchips-offers__table--collapsible.is-expanded tr.getchips-offers__row--extra,
    .lvt-supplier-offers .getchips-offers__table--collapsible.is-expanded tr.getchips-offers__row--extra,
    .getchips-offers-section .getchips-offers__table--collapsible.is-expanded tr.getchips-offers__row--extra {
        display: grid !important;
        animation: getchips-offers-row-open 0.35s ease-out;
    }

    /* Компактная строка в одну линию: название | цена | наличие | заказ */
    .lvt-offers-mobile-host .getchips-offers__table td::before,
    .lvt-supplier-offers .getchips-offers__table td::before,
    .getchips-offers-section .getchips-offers__table td::before,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table td::before {
        display: none !important;
    }

    .lvt-offers-mobile-host .getchips-offers__table td,
    .lvt-supplier-offers .getchips-offers__table td,
    .getchips-offers-section .getchips-offers__table td,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table td {
        display: block;
        padding: 0 !important;
        border-radius: 0;
        background: transparent !important;
        min-width: 0;
    }

    .lvt-offers-mobile-host .getchips-offers__name-cell,
    .lvt-supplier-offers .getchips-offers__name-cell,
    .getchips-offers-section .getchips-offers__name-cell,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell {
        grid-area: name;
        max-width: none;
        border-bottom: none !important;
        margin-bottom: 0;
        overflow: hidden;
    }

    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__meta-line,
    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__supplier,
    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__brand-inline,
    .lvt-supplier-offers .getchips-offers__name-cell .getchips-offers__supplier,
    .lvt-supplier-offers .getchips-offers__name-cell .getchips-offers__brand-inline,
    .getchips-offers-section .getchips-offers__name-cell .getchips-offers__supplier,
    .getchips-offers-section .getchips-offers__name-cell .getchips-offers__brand-inline,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell .getchips-offers__supplier,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell .getchips-offers__brand-inline {
        display: inline !important;
        margin-top: 0;
        font-size: 0.64rem;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        vertical-align: baseline;
    }

    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__brand-inline::before,
    .lvt-supplier-offers .getchips-offers__name-cell .getchips-offers__brand-inline::before,
    .getchips-offers-section .getchips-offers__name-cell .getchips-offers__brand-inline::before,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell .getchips-offers__brand-inline::before {
        content: ' · ';
        color: #8a958c;
    }

    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__part,
    .lvt-supplier-offers .getchips-offers__name-cell .getchips-offers__part,
    .getchips-offers-section .getchips-offers__name-cell .getchips-offers__part,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell .getchips-offers__part {
        font-size: 0.78rem;
        line-height: 1.15;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .catalog-detail__bottom-info .getchips-offers__price-cell,
    .lvt-offers-mobile-host .getchips-offers__price-cell,
    .lvt-supplier-offers .getchips-offers__price-cell,
    .getchips-offers-section .getchips-offers__price-cell,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__price-cell {
        grid-area: price;
        white-space: nowrap;
        font-size: 0.7rem;
        line-height: 1.15;
    }

    .catalog-detail__bottom-info .getchips-offers__price-cell .getchips-offers__lead-inline,
    .lvt-offers-mobile-host .getchips-offers__price-cell .getchips-offers__lead-inline,
    .lvt-supplier-offers .getchips-offers__price-cell .getchips-offers__lead-inline,
    .getchips-offers-section .getchips-offers__price-cell .getchips-offers__lead-inline,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__price-cell .getchips-offers__lead-inline {
        display: none;
    }

    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4) {
        grid-area: stock;
        font-size: 0.7rem;
        font-weight: 600;
        white-space: nowrap;
        text-align: right;
    }

    .lvt-offers-mobile-host .getchips-offers__qty-cell,
    .lvt-supplier-offers .getchips-offers__qty-cell,
    .getchips-offers-section .getchips-offers__qty-cell,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-cell {
        grid-area: qty;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: 0;
    }

    .lvt-offers-mobile-host .getchips-offers__order-cell,
    .lvt-supplier-offers:not(:has(.lvt-offers-layout--mobile)) .getchips-offers__order-cell,
    .getchips-offers-section:not(.lvt-offers-layout--mobile) .getchips-offers__order-cell,
    .store-prices-block.lvt-etm-store-offers:not([data-layout="mobile"]) .getchips-offers__order-cell {
        display: contents;
    }

    .lvt-offers-mobile-host .getchips-offers__qty-input-row,
    .lvt-supplier-offers .getchips-offers__qty-input-row,
    .getchips-offers-section .getchips-offers__qty-input-row,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-input-row {
        flex-wrap: nowrap;
        gap: 0.25rem;
        width: auto;
    }

    .lvt-offers-mobile-host .getchips-offers__counter,
    .lvt-supplier-offers .getchips-offers__counter,
    .getchips-offers-section .getchips-offers__counter,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__counter {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
        min-height: 32px;
        height: 32px;
    }

    .lvt-offers-mobile-host .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .lvt-supplier-offers .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .getchips-offers-section .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn {
        min-height: 34px;
        padding: 0.28rem 0.5rem;
        font-size: 0.72rem;
        width: auto;
    }

    .lvt-offers-mobile-host .getchips-offers__qty-meta,
    .lvt-supplier-offers .getchips-offers__qty-meta,
    .getchips-offers-section .getchips-offers__qty-meta,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-meta,
    .lvt-offers-mobile-host .getchips-offers__qty-hint,
    .lvt-supplier-offers .getchips-offers__qty-hint,
    .getchips-offers-section .getchips-offers__qty-hint,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-hint {
        display: none !important;
    }

    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row > .getchips-offers__brand-cell,
    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(2),
    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(5),
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row > .getchips-offers__brand-cell,
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(2),
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(5),
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row > .getchips-offers__brand-cell,
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(2),
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(5),
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row > .getchips-offers__brand-cell,
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(2),
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(5),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row > .getchips-offers__brand-cell,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(2),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(5) {
        display: none !important;
    }

    .lvt-offers-mobile-host .getchips-offers__show-all,
    .lvt-supplier-offers .getchips-offers__show-all,
    .getchips-offers-section .getchips-offers__show-all {
        margin-top: 0.55rem;
        padding: 0.55rem 0.75rem;
    }

    .lvt-supplier-offers .lvt-supplier-offers__tail-loading {
        font-size: 0.78rem;
        padding: 0.5rem 0;
    }

    .lvt-offers-mobile-host .lvt-supplier-skeleton .getchips-offers__table thead,
    .lvt-supplier-offers .lvt-supplier-skeleton .getchips-offers__table thead {
        display: none;
    }

    .lvt-offers-mobile-host .lvt-supplier-skeleton .getchips-offers__table tbody tr,
    .lvt-supplier-offers .lvt-supplier-skeleton .getchips-offers__table tbody tr {
        display: block;
        margin-bottom: 0.5rem;
        border: 1px solid #eef2f6;
        border-radius: 8px;
        padding: 0.5rem;
    }
}

@media (max-width: 575px) {
    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row,
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row,
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row,
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, max-content);
        grid-template-areas: 'name price qty';
        padding: 0.28rem 0.38rem;
        column-gap: 0.3rem;
    }

    .catalog-detail__bottom-info .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .lvt-offers-mobile-host .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .lvt-supplier-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .getchips-offers-section .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4),
    .store-prices-block.lvt-etm-store-offers .getchips-offers__table tr.js-getchips-offer-row > td:nth-child(4) {
        display: none !important;
    }

    .getchips-offers__toolbar-sort {
        flex: 1 1 100%;
    }

    .getchips-offers__toolbar-currency {
        margin-left: 0;
    }

    .lvt-offers-mobile-host .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .lvt-supplier-offers .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .getchips-offers-section .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__qty-cell .getchips-offers__cart-btn-wrap .btn {
        padding: 0.28rem 0.4rem;
        font-size: 0.68rem;
    }

    .catalog-detail__bottom-info .getchips-offers__name-cell .getchips-offers__brand-inline .getchips-offers__brand-name,
    .lvt-offers-mobile-host .getchips-offers__name-cell .getchips-offers__brand-inline .getchips-offers__brand-name,
    .lvt-supplier-offers .getchips-offers__name-cell .getchips-offers__brand-inline .getchips-offers__brand-name,
    .getchips-offers-section .getchips-offers__name-cell .getchips-offers__brand-inline .getchips-offers__brand-name,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__name-cell .getchips-offers__brand-inline .getchips-offers__brand-name {
        font-size: 0.72rem;
    }

    .catalog-detail__bottom-info .getchips-offers__price-cell,
    .lvt-offers-mobile-host .getchips-offers__price-cell,
    .lvt-supplier-offers .getchips-offers__price-cell,
    .getchips-offers-section .getchips-offers__price-cell,
    .store-prices-block.lvt-etm-store-offers .getchips-offers__price-cell {
        font-size: 0.7rem;
    }

    .lvt-offers-mobile-host .getchips-currency-rate,
    .lvt-supplier-offers .getchips-currency-rate,
    .getchips-offers-section .getchips-currency-rate,
    .store-prices-block.lvt-etm-store-offers .getchips-currency-rate {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .lvt-offers-mobile-host .getchips-currency-switch__trigger,
    .lvt-supplier-offers .getchips-currency-switch__trigger,
    .getchips-offers-section .getchips-currency-switch__trigger,
    .store-prices-block.lvt-etm-store-offers .getchips-currency-switch__trigger {
        padding: 2px 6px;
        font-size: 0.68rem;
    }

    .lvt-offers-mobile-host .getchips-currency-alert,
    .lvt-supplier-offers .getchips-currency-alert,
    .getchips-offers-section .getchips-currency-alert,
    .store-prices-block.lvt-etm-store-offers .getchips-currency-alert {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}
