.ipk-product-table {
    min-width: 0;
    color: #07194b;
}

.ipk-product-table * { box-sizing: border-box; }

.ipk-catalog-bulk {
    display: grid;
    min-height: 50px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: 5px;
    background: #edf5ff;
}
.ipk-catalog-bulk label { display: flex; align-items: center; gap: 8px; }
.ipk-catalog-bulk input,
.ipk-product-row__check input { width: 18px; height: 18px; accent-color: #0864f9; }
.ipk-catalog-bulk button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 4px;
    background: #0864f9;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.ipk-catalog-bulk button svg { width: 19px; height: 19px; flex: 0 0 19px; fill: currentColor; }
.ipk-catalog-bulk button:disabled { opacity: .45; }

.ipk-product-table__head,
.ipk-product-row {
    display: grid;
    grid-template-columns: 26px minmax(228px, 1fr) var(--ipk-property-tracks, repeat(3, minmax(50px,76px))) 110px 190px;
    align-items: center;
    gap: 8px;
}
.ipk-product-table__head {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #d9e3f2;
    border-radius: 5px 5px 0 0;
    color: #607195;
    font-size: 11px;
    line-height: 1.2;
}
.ipk-product-table__head > .ipk-table-column:not([data-column="name"]):not([data-column="price"]) {
    padding-inline: 3px;
    text-align: center;
}
.ipk-product-table__rows {
    overflow: hidden;
    border: 1px solid #d9e3f2;
    border-top: 0;
    border-radius: 0 0 5px 5px;
}
.ipk-product-row {
    min-height: 112px;
    padding: 9px 10px;
    border-bottom: 1px solid #d9e3f2;
    background: #fff;
}
.ipk-product-row:last-child { border-bottom: 0; }
.ipk-product-row__select { display: flex; min-height: 82px; align-items: center; flex-direction: column; justify-content: center; gap: 12px; }
.ipk-product-row__check { display: flex; justify-content: center; }

.ipk-product-row__product {
    display: grid;
    min-width: 0;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
.ipk-product-row__image {
    position: relative;
    display: flex;
    width: 80px;
    height: 82px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0864f9;
    cursor: zoom-in;
}
.ipk-product-row__image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ipk-product-row__image:hover .ipk-gallery-trigger__icon,
.ipk-product-row__image:focus-visible .ipk-gallery-trigger__icon { opacity: 1; transform: translateY(0); }
.ipk-product-row__image:focus-visible { border-radius: 6px; outline: 2px solid #0864f9; outline-offset: 2px; }
.ipk-product-row__name {
    display: block;
    color: #07194b !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.24;
    text-decoration: none !important;
}
.ipk-product-row__article-line { display: flex; min-width: 0; align-items: center; gap: 5px; margin-top: 4px; }
.ipk-product-row__article { min-width: 0; overflow: hidden; color: #607195; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ipk-product-row__copy { display: inline-flex; flex: 0 0 22px; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 1px solid #cad8ea; border-radius: 5px; background: #fff; color: #607195; cursor: pointer; }
.ipk-product-row__copy:hover, .ipk-product-row__copy:focus-visible, .ipk-product-row__copy.is-copied { border-color: #0864f9; color: #0864f9; outline: none; }
.ipk-product-row__copy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.ipk-product-row__property { min-width: 0; padding-inline: 3px; text-align: center; }
.ipk-product-row__property span { display: none; }
.ipk-product-row__property b {
    display: block;
    color: #07194b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.ipk-product-row__property[data-property="VID_OBRABOTKI"] b {
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
}
.ipk-product-row__property span:only-child { display: block; color: #9aa6b9; }

.ipk-product-row__price { display: flex; flex-direction: column; min-height: 82px; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.ipk-product-row__price strong { display: block; }
.ipk-product-row__price strong { font-size: 16px; white-space: nowrap; }
.ipk-product-row__price strong.is-request { color: #9a6500; font-size: 12px; white-space: normal; }
.ipk-product-row__stock { display: block; font-size: 11px; line-height: 1.25; }
.ipk-product-row__stock.is-stock { color: #14923e; }
.ipk-product-row__stock.is-order { color: #a66b00; }
.ipk-product-row__transit { display: block; margin-top: 3px; color: #2876a8; font-size: 11px; line-height: 1.25; font-weight: 700; }
.ipk-product-row__stock.is-transit { color: #2876a8; }
.ipk-product-row__transit--price { display: block; margin: 0; font-size: 11px; line-height: 1.25; }

.ipk-product-row__buy {
    display: grid;
    grid-template-columns: 84px minmax(100px, 1fr);
    align-items: center;
    gap: 6px;
}
.ipk-product-row__counter {
    display: grid;
    width: 84px;
    height: 38px;
    grid-template-columns: 26px 32px 26px;
    overflow: hidden;
    border: 1px solid #d9e3f2;
    border-radius: 4px;
}
.ipk-product-row__counter button,
.ipk-product-row__counter input {
    min-width: 0;
    border: 0;
    background: #f8f9fb;
    text-align: center;
}
.ipk-product-row__counter input { background: #fff; -moz-appearance: textfield; }
.ipk-product-row__counter input::-webkit-inner-spin-button { display: none; }
.ipk-product-row__buy > [data-ipk-add] {
    height: 38px;
    border: 0;
    border-radius: 4px;
    background: #0864f9;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.ipk-product-row__buy > [data-ipk-add]:disabled { opacity: .55; }
.ipk-product-row__buy small { grid-column: 1 / -1; min-height: 0; color: #14923e; font-size: 11px; }
.ipk-product-table__pagination { margin-top: 18px; }
.ipk-product-table button { cursor: pointer; }

@media (max-width: 1250px) {
    .ipk-product-table__head,
    .ipk-product-row {
        grid-template-columns: 28px minmax(250px, 1.45fr) repeat(3, minmax(62px, .45fr)) minmax(125px, .7fr) 118px;
        gap: 6px;
    }
    .ipk-product-row__buy { grid-template-columns: 1fr; }
    .ipk-product-row__counter { width: 84px; }
    .ipk-product-row__buy > [data-ipk-add] { width: 112px; }
}

@media (max-width: 1050px) {
    .ipk-product-table__head { display: none; }
    .ipk-product-table__rows { border-top: 1px solid #d9e3f2; border-radius: 5px; }
    .ipk-product-row {
        min-height: 0;
        grid-template-columns: 28px 96px minmax(0, 1fr) minmax(125px, auto);
        grid-template-areas:
            'check product product price'
            'check props props buy';
    }
    .ipk-product-row__select { grid-area: check; }
    .ipk-product-row__product { grid-area: product; grid-template-columns: 80px minmax(0, 1fr); }
    .ipk-product-row__property { display: none; }
    .ipk-product-row__property:nth-child(3) { display: block; grid-area: props; }
    .ipk-product-row__property:nth-child(3) span { display: block; color: #75839d; font-size: 10px; }
    .ipk-product-row__price { grid-area: price; }
    .ipk-product-row__buy { grid-area: buy; grid-template-columns: 84px 112px; }
}

@media (max-width: 900px) {
    .ipk-product-row {
        grid-template-areas:
            'check product product price'
            'check buy buy buy';
    }
    .ipk-product-row__property,
    .ipk-product-row__property:nth-child(3) { display: none; }
}

@media (max-width: 650px) {
    .ipk-catalog-bulk { grid-template-columns: 1fr auto; gap: 8px; }
    .ipk-catalog-bulk button { grid-column: 1 / -1; }
    .ipk-product-row {
        display: grid;
        grid-template-columns: 26px 70px minmax(0, 1fr);
        grid-template-areas:
            'check product product'
            'price price buy';
        gap: 9px;
        padding: 10px 8px;
    }
    .ipk-product-row__product { grid-template-columns: 66px minmax(0, 1fr); gap: 8px; }
    .ipk-product-row__image { width: 66px; height: 68px; }
    .ipk-product-row__name { font-size: 13px; }
    .ipk-product-row__property { margin-right: 8px; }
    .ipk-product-row__price { padding-left: 3px; }
    .ipk-product-row__buy { grid-template-columns: 78px minmax(100px, 1fr); }
    .ipk-product-row__counter { width: 78px; grid-template-columns: 23px 32px 23px; }
}
.ipk-product-row__product { position: relative; }
.ipk-product-row__quick { display: inline-flex; width: 30px; height: 30px; flex: 0 0 30px; align-items: center; justify-content: center; padding: 0; border: 1px solid #b9cff4; border-radius: 50%; background: #f7faff; color: #0864f9; cursor: pointer; }
.ipk-product-row__quick:hover, .ipk-product-row__quick:focus-visible { border-color: #0864f9; background: #0864f9; color: #fff; outline: none; }
.ipk-product-row__quick svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ipk-product-table { scroll-margin-top: 190px; }
.ipk-table-controls { margin: 0; }
.ipk-table-column { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.ipk-table-column[data-column="name"] { align-items: flex-start; }
.ipk-table-column[data-column="price"] { align-items: flex-start; text-align: left; }
.ipk-table-column__label { overflow-wrap: anywhere; }
.ipk-table-column__actions { display: flex; align-items: center; gap: 4px; }
.ipk-table-icon { display: inline-flex; position: relative; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 3px; border: 1px solid #d9e3f2; border-radius: 4px; background: #fff; color: #607195; cursor: pointer; list-style: none; }
.ipk-table-icon::-webkit-details-marker { display: none; }
.ipk-table-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ipk-table-icon:hover,.ipk-table-icon:focus-visible { border-color: #0864f9; color: #0864f9; outline: 2px solid #b9cff4; outline-offset: 1px; }
.is-sorted [data-table-sort],.is-filtered summary,.ipk-table-filter[open] summary { color: #0864f9; background: #edf5ff; border-color: #0864f9; }
.ipk-table-direction { display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1; }
.is-sorted [data-table-sort] svg { display: none; }
.ipk-table-icon[hidden] { display: none; }
.ipk-table-filter-control { display: inline-flex; position: relative; }
.ipk-table-reset { position: absolute; z-index: 2; top: -6px; right: -5px; width: 14px; height: 14px; padding: 0; border-color: #0864f9; border-radius: 50%; background: #fff; color: #0864f9; box-shadow: 0 0 0 1px #fff; }
.ipk-table-reset svg { width: 9px; height: 9px; stroke-width: 2; }
.ipk-table-filter__panel { position: absolute; z-index: 45; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: 270px; padding: 16px; background: #fff; border: 1px solid #b9cff4; border-radius: 8px; box-shadow: 0 8px 28px #07194b26; text-align: left; color: #07194b; font-size: 13px; line-height: 1.4; }
.ipk-table-filter__panel--search { left: 0; transform: none; width: 330px; }
.ipk-table-filter.is-above .ipk-table-filter__panel { top: auto; bottom: calc(100% + 6px); }
.ipk-table-filter__panel strong { display: block; margin-bottom: 12px; font-size: 14px; }
.ipk-table-filter__panel label { display: block; }
.ipk-table-filter__panel input[type="text"],.ipk-table-filter__panel input[type="search"] { display: block; width: 100%; min-width: 0; margin-top: 5px; padding: 9px; height: 38px; border: 1px solid #b9cff4; border-radius: 4px; background: #fff; color: #07194b; font: inherit; }
.ipk-table-filter__panel input:focus-visible { outline: 2px solid #0864f9; outline-offset: 1px; }
.ipk-table-filter__panel small { display: block; margin-top: 7px; color: #607195; }
.ipk-table-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ipk-table-options { max-height: 220px; margin-top: 10px; overflow-y: auto; overscroll-behavior: contain; }
.ipk-table-options label { display: flex; gap: 7px; align-items: flex-start; padding: 6px 3px; cursor: pointer; }
.ipk-table-options label[hidden] { display: none; }
.ipk-table-options input { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; accent-color: #0864f9; }
.ipk-table-filter__buttons { display: flex; gap: 8px; margin-top: 14px; }
.ipk-table-filter__buttons button { flex: 1; padding: 9px 7px; border: 1px solid #0864f9; border-radius: 4px; background: #0864f9; color: #fff; font: inherit; cursor: pointer; }
.ipk-table-filter__buttons [data-table-clear] { background: #fff; color: #0864f9; }
.ipk-table-status { display: flex; justify-content: space-between; gap: 12px; padding: 10px; border-inline: 1px solid #d9e3f2; background: #f7faff; font-size: 13px; }
.ipk-table-empty { padding: 25px 15px; font-size: 14px; }
@media (max-width: 1050px) { .ipk-table-controls { display: none; } }

/* Six editorial columns, preserving product photographs and the sidebar. */
@media (min-width: 1251px) and (max-width: 1440px) {
    .ipk-product-table__head, .ipk-product-row {
        grid-template-columns: 26px minmax(228px,1fr) var(--ipk-property-tracks-compact,repeat(3,minmax(50px,76px))) 110px 190px;
        column-gap: 5px; padding-inline: 8px;
    }
    .ipk-product-row__property { padding-inline: 3px; }
    .ipk-product-table__head > .ipk-table-column:not([data-column="name"]):not([data-column="price"]) { padding-inline: 2px; }
    .ipk-table-column__actions { gap: 2px; }
    .ipk-table-column__actions > .ipk-table-icon, .ipk-table-filter > summary { width: 23px; }
}
@media (min-width: 1051px) {
    .ipk-product-row__article { overflow-wrap: anywhere; }
}
@media (min-width: 1051px) and (max-width: 1250px) {
    .ipk-product-table__head, .ipk-table-controls { display: none; }
    .ipk-product-table__rows { border-top: 1px solid #d9e3f2; border-radius: 5px; }
    .ipk-product-row { grid-template-columns: 28px 96px minmax(0,1fr) minmax(125px,auto); grid-template-areas: 'check product product price' 'check buy buy buy'; }
    .ipk-product-row__select { grid-area: check; }
    .ipk-product-row__product { grid-area: product; }
    .ipk-product-row__property, .ipk-product-row__property:nth-child(3) { display: none; }
    .ipk-product-row__price { grid-area: price; }
    .ipk-product-row__buy { grid-area: buy; }
}
.ipk-product-row__property b > .ipk-material-code { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 21px; margin: 2px 1px; border-radius: 3px; font-size: 12px; font-weight: 700; color: #fff; background: #536785; }
.ipk-product-row__property b > .ipk-material-code--p { background: #2872b8; }
.ipk-product-row__property b > .ipk-material-code--m { background: #f3cc18; color: #17233c; }
.ipk-product-row__property b > .ipk-material-code--k { background: #d34a44; }
.ipk-product-row__property b > .ipk-material-code--n { background: #319461; }
.ipk-product-row__property b > .ipk-material-code--s { background: #ab7855; }
.ipk-product-row__property b > .ipk-material-code--h { background: #777b88; }
@media (min-width: 651px) and (max-width: 1250px) {
    .ipk-catalog-bulk { grid-template-columns: auto 1fr; gap: 8px; }
    .ipk-catalog-bulk > button { grid-column: 1 / -1; justify-self: end; }
}

/* Compact desktop tracks share the same available width as the site header. */
@media (min-width: 1251px) {
    .ipk-product-table__head, .ipk-product-row { column-gap: 5px; padding-inline: 8px; }
    .ipk-product-table__head > .ipk-table-column:not([data-column="name"]):not([data-column="price"]) { padding-inline: 0; }
}
/* Availability follows quantity without adding another grid track. */
.ipk-table-quantity-stock { display: flex; min-width: 0; align-items: center; justify-content: center; white-space: nowrap; }
.ipk-product-table__head > .ipk-table-column { align-self: stretch; justify-content: space-between; }
/* Availability uses the same blue, border and rounded corners as catalogue controls. */
.ipk-table-stock { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 32px; margin: 0; padding: 6px 8px; border: 1px solid #d5e0f1; border-radius: 6px; background: #f4f8ff; color: #607195; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(7,25,75,.04); transition: background-color .15s, border-color .15s, color .15s; }
.ipk-table-stock:hover { border-color: #8fb7ff; background: #eaf3ff; color: #0864f9; }
.ipk-table-stock input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; flex: 0 0 16px; width: 16px; height: 16px; margin: 0; border: 1px solid #a8bfdf; border-radius: 4px; background: #fff; cursor: pointer; }
.ipk-table-stock input::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.ipk-table-stock input:checked { border-color: #0864f9; background: #0864f9; }
.ipk-table-stock input:checked::after { opacity: 1; }
.ipk-table-stock:has(input:checked) { border-color: #8fb7ff; background: #eaf3ff; color: #0864f9; }
.ipk-table-stock:has(input:focus-visible) { outline: 2px solid #0864f9; outline-offset: 2px; }
.ipk-table-stock input:focus-visible { outline: none; }
.ipk-table-stock:has(input:disabled) { opacity: .5; cursor: default; }

/* Denser desktop rows preserve the existing 80x82 product photos. */
@media (min-width: 1251px) {
    .ipk-product-row { min-height: 96px; padding-block: 6px; }
    .ipk-product-row__price { padding-right: 0; text-align: center; }
    .ipk-product-table__head > .ipk-table-column[data-column="price"] { align-items: center; padding-right: 0; text-align: center; }
}
