/* Во избежание проблем с обновлениями, измения в стилях следует производить в этом файле */

/* BPA-CMS 2026-05-01: убрать sidebar-блоки на странице статьи Компания (route article-front-view) */
.afterContentDiv .block.dayProduct,
.afterContentDiv .block.lastNews {
    display: none !important;
}

/* ==== T-0154 (28.09.2026): адаптивная сетка списка брендов (/brand/all/) ==== */
/* Разметка вью: .row.row-cols-xl-6 > div > a.brand-item > .brand-item__img/.brand-item__title */
.contentDiv .row-cols-xl-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin: 0 0 28px 0;
    padding: 0;
    list-style: none;
}
.contentDiv .row-cols-xl-6 > div {
    margin: 0;
    min-width: 0;
}
.contentDiv .brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    height: 100%;
    padding: 14px 10px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    color: #333;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.contentDiv .brand-item:hover {
    border-color: #d0021b;
    box-shadow: 0 2px 12px rgba(0,0,0,.09);
}
.contentDiv .brand-item__img {
    height: 62px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.contentDiv .brand-item__img img {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.contentDiv .brand-item__title {
    font-size: 13px;
    line-height: 1.3;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
@media (max-width: 1200px) { .contentDiv .row-cols-xl-6 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .contentDiv .row-cols-xl-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .contentDiv .row-cols-xl-6 { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
/* ==== /T-0154 ==== */

/* ==== T-0154 (28.09.2026): контент во всю ширину, когда левый сайдбар пуст ==== */
/* Класс .noSidebar навешивает JS (scripts.tpl), если в afterContentDiv нет видимых блоков */
/* (только скрытые dayProduct/lastNews). Страницы с recommended/lastViewed/topProducts не затрагиваются. */
.mainContent.noSidebar > .afterContentDiv {
    display: none !important;
}
.mainContent.noSidebar > .contentDiv {
    float: none !important;
    display: block !important;
    width: auto !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}
/* ==== /T-0154 noSidebar ==== */
