/* Первый экран карточки в три колонки: фото 3:4 · выбор · покупка (от 1100 px).
   Только раскладка: обёртки Aspro «растворены» через display:contents, узлы остаются на своих местах в DOM,
   поэтому корзина, торг, наличие, обмен предложений и цели Метрики работают как в двухколоночной карточке.
   Включается классом html.altx-3c (ставит altx_masterline_card.php по флагу). Ниже 1100 px карточка прежняя. */
@media(min-width:1100px){
html.altx-3c{--c3-thumbs:64px;--c3-photo:480px;--c3-buy:360px;--c3-gap:24px}
html.altx-3c .altx-ml-card{display:grid!important;grid-template-columns:var(--c3-thumbs) var(--c3-photo) minmax(0,1fr) var(--c3-buy);grid-template-rows:auto auto auto 1fr;column-gap:var(--c3-gap);row-gap:0;align-items:start;position:relative}
html.altx-3c .altx-ml-card>.item_main_info,
html.altx-3c .altx-ml-card>.item_main_info>.img_wrapper,
html.altx-3c .altx-ml-card>.item_main_info>.right_info,
html.altx-3c .altx-ml-card>.item_main_info>.right_info>.info_item,
html.altx-3c .altx-ml-card>.item_main_info>.right_info>.info_item>.middle_info,
html.altx-3c .altx-ml-card>.item_main_info>.right_info>.info_item>.middle_info>.row{display:contents!important}
/* Клирфиксы растворённых обёрток иначе стали бы пустыми ячейками сетки. */
html.altx-3c .altx-ml-card>.item_main_info::before,html.altx-3c .altx-ml-card>.item_main_info::after,
html.altx-3c .altx-ml-card>.item_main_info>.img_wrapper::before,html.altx-3c .altx-ml-card>.item_main_info>.img_wrapper::after,
html.altx-3c .altx-ml-card>.item_main_info>.right_info::before,html.altx-3c .altx-ml-card>.item_main_info>.right_info::after,
html.altx-3c .altx-ml-card .right_info>.info_item::before,html.altx-3c .altx-ml-card .right_info>.info_item::after,
html.altx-3c .altx-ml-card .info_item>.middle_info::before,html.altx-3c .altx-ml-card .info_item>.middle_info::after,
html.altx-3c .altx-ml-card .middle_info>.row::before,html.altx-3c .altx-ml-card .middle_info>.row::after,
html.altx-3c .altx-ml-card::before,html.altx-3c .altx-ml-card::after{display:none!important;content:none!important}
/* Всё, что ниже первого экрана, идёт под фото и выбором; колонка покупки — справа на всю высоту. */
html.altx-3c .altx-ml-card>*{grid-column:1/span 3;min-width:0}
html.altx-3c .altx-ml-card>.item_main_info>.clearleft,html.altx-3c .altx-ml-card .img_wrapper>.genesis-tools-slot{display:none!important}

/* Колонка 1–2: миниатюры столбиком и фото 3:4. */
html.altx-3c .altx-ml-card .img_wrapper>.item_slider:not(.flex){grid-column:2;grid-row:1/span 4;width:auto!important;margin:0!important;padding:0!important;float:none!important;min-width:0}
html.altx-3c .altx-ml-card .img_wrapper>.item_slider:not(.flex)>.slides{aspect-ratio:3/4;height:auto!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;line-height:normal!important;box-sizing:border-box;border:1px solid var(--ml-line);border-radius:14px;background:#fff;overflow:hidden;position:relative}
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .offers_img{height:100%!important;line-height:normal!important;margin:0!important}
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .offers_img>a,
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .slides>ul:not(.flex-direction-nav)>li>a,
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .slides>.item>a{display:flex!important;align-items:center;justify-content:center;width:100%;height:100%;line-height:normal!important;cursor:zoom-in}
/* Фото не растягиваем сверх собственного размера: мелкие остаются по центру, card-3col.js подменяет уменьшенную копию оригиналом. */
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .offers_img img,
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .slides>ul:not(.flex-direction-nav)>li img,
html.altx-3c .altx-ml-card .img_wrapper .item_slider:not(.flex) .slides>.item img{max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;object-fit:contain;position:static!important;transform:none!important;margin:0!important}
html.altx-3c .altx-ml-card .img_wrapper>.altx-ml-gallery-toolbar:not([hidden]){display:contents!important}
html.altx-3c .altx-ml-card .altx-ml-photo-picker:not([hidden]){grid-column:1;grid-row:1/span 4;display:block;max-height:calc(var(--c3-photo)*4/3);overflow:hidden}
html.altx-3c .altx-ml-card .altx-ml-photo-thumbs{flex-direction:column;gap:8px;max-height:calc(var(--c3-photo)*4/3);overflow:hidden auto;padding:0;scrollbar-width:none;overscroll-behavior:contain}
html.altx-3c .altx-ml-card .altx-ml-photo-thumbs::-webkit-scrollbar{display:none}
html.altx-3c .altx-ml-card .altx-ml-photo-thumbs>button{flex:0 0 auto;width:var(--c3-thumbs);height:auto;aspect-ratio:3/4;padding:3px;border-radius:8px}
html.altx-3c .altx-ml-card .altx-ml-thumbs-arrow{display:none!important}
html.altx-3c .altx-ml-card .altx-ml-zoom-button:not([hidden]){grid-column:2;grid-row:1/span 4;align-self:end;justify-self:end;z-index:4;margin:0 12px 12px 0;min-height:32px;padding:4px 12px;border:1px solid var(--ml-line);border-radius:20px;background:#fff}
html.altx-3c .altx-ml-card .img_wrapper>.stickers{grid-column:2;grid-row:1/span 4;align-self:start;justify-self:start;position:relative!important;left:auto!important;top:auto!important;margin:14px 60px 0 14px;z-index:4;max-width:none}
html.altx-3c .altx-ml-card .img_wrapper>.like_wrapper{grid-column:2;grid-row:1/span 4;align-self:start;justify-self:end;position:relative!important;right:auto!important;top:auto!important;margin:12px 12px 0 0}
/* Одно фото — ленты миниатюр нет, фото занимает и её место. */
html.altx-3c .altx-ml-card .img_wrapper:not(:has(.altx-ml-photo-picker:not([hidden])))>.item_slider:not(.flex),
html.altx-3c .altx-ml-card .img_wrapper:not(:has(.altx-ml-photo-picker:not([hidden])))>.stickers{grid-column:1/span 2}

/* Колонка 3: название, рейтинг и артикул, свойства предложения, главные характеристики. */
html.altx-3c .altx-ml-card .info_item>.altx-ml-titleblock{grid-column:3;grid-row:1}
html.altx-3c .altx-ml-card .info_item>.top_info{grid-column:3;grid-row:2}
html.altx-3c .altx-ml-card .middle_info>.row>.col-md-6:first-child{grid-column:3;grid-row:3;width:auto!important;float:none!important;padding:0!important;min-width:0}
html.altx-3c .altx-ml-card .img_wrapper>.top_props{grid-column:3;grid-row:4;margin:0!important;padding:16px 0 0!important;border-top:1px solid var(--ml-line)}
html.altx-3c .altx-ml-card .altx-ml-heading{font-size:26px;letter-spacing:-.6px}
html.altx-3c .altx-ml-card .altx-ml-quick-specs{grid-template-columns:minmax(0,1fr);gap:10px}
html.altx-3c .altx-ml-card .altx-ml-bases,html.altx-3c .altx-ml-card .wrapper_sku ul{flex-wrap:wrap}

/* Колонка 4: цена, корзина, торг, инструменты, получение, Сплит и бренд. Прилипает при прокрутке. */
html.altx-3c .altx-ml-card .middle_info>.row>.col-md-6:last-child{grid-column:4;grid-row:1/span 60;align-self:start;position:sticky;top:var(--c3-top,calc(var(--altx-lower-top,0px) + 16px));width:auto!important;float:none!important;padding:0!important;min-width:0;z-index:3}
html.altx-3c .altx-ml-card .right_info .prices_block{grid-template-columns:minmax(0,1fr) auto!important;row-gap:6px}
html.altx-3c .altx-ml-card .right_info .prices_block>.cost{grid-column:1;grid-row:1}
html.altx-3c .altx-ml-card .right_info .prices_block>.quantity_block_wrapper{grid-column:2;grid-row:1}
html.altx-3c .altx-ml-card .right_info .prices_block>.altx-ml-unit-price{grid-column:1/-1;grid-row:2}
html.altx-3c .altx-ml-card .right_info .prices_block>.altx-coverage{grid-column:1/-1;grid-row:3}
html.altx-3c .altx-ml-card .right_info .prices_block>.view_sale_block{grid-column:1/-1;grid-row:4}
html.altx-3c .altx-ml-card .genesis-buy-tools__button{min-width:0;padding-inline:8px!important;gap:6px!important;font-size:12px!important;line-height:1.25!important;white-space:normal!important;text-align:left}
html.altx-3c .altx-ml-card .altx-c3-brand{margin-top:14px!important}
/* Бренд переехал в колонку покупки — закреплённая сводка справа внизу больше не нужна. */
html.altx-3c.altx-3c-brand .altx-ml-card .altx-lower-column{display:none!important}
html.altx-3c .altx-ml-card .altx-lower-buy{display:none!important}
html.altx-3c .altx-ml-card>.row{margin-left:0!important;margin-right:0!important}
html.altx-3c.altx-3c-brand .altx-ml-card>.row>.col-md-9{width:100%!important;float:none!important;padding-left:0!important;padding-right:0!important}
html.altx-3c .altx-ml-card>.genesis-tools.altx-ml-genesis-band{margin-top:28px!important}
}
@media(min-width:1100px) and (max-width:1359px){html.altx-3c{--c3-thumbs:56px;--c3-photo:420px;--c3-buy:332px;--c3-gap:20px}}
