/* Баннер Midea на главной (views/site/_brand_banner.php): синяя карточка,
   текст | веер фото деталей из каталога | логотипы брендов. Заменил блок «Не нашли нужную
   деталь?» с фото — заявка осталась ссылкой. */
.home-brand {
    padding-top: 0;
    padding-bottom: 0;
}

.home-brand__card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px 220px;
    align-items: center;
    gap: 24px;
    min-height: 340px;
    padding: 40px 48px;
    border-radius: 20px;
    /* Фирменный синий Midea (#00a0e9) к тёмно-синему — белый текст читается по всей площади. */
    background: linear-gradient(115deg, #0b2d6b 0%, #0a4ea3 55%, #0086d1 100%);
    color: var(--color-white);
    overflow: hidden;
}

.home-brand__card--no-photos { grid-template-columns: minmax(0, 1fr) 220px; min-height: 0; }

/* Декоративный фон: свечение за веером и тонкое кольцо. */
.home-brand__card::before,
.home-brand__card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.home-brand__card::before {
    right: 160px;
    top: 50%;
    width: 520px;
    height: 520px;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(0, 176, 240, .5) 0%, rgba(0, 176, 240, 0) 65%);
}

.home-brand__card::after {
    right: 560px;
    bottom: -170px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.home-brand__body,
.home-brand__fan,
.home-brand__brands {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.home-brand__title {
    margin: 0 0 12px;
    color: var(--color-white);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.home-brand__text {
    max-width: 520px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, .88);
    font-size: 16px;
    line-height: 1.5;
}

.home-brand__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 10px;
    background: var(--color-white);
    color: #0a4ea3;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}

.home-brand__btn:hover,
.home-brand__btn:focus-visible { background: #e6f6fd; color: #0b2d6b; }

.home-brand__btn::after { content: " →"; margin-left: 6px; }

.home-brand__links {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    line-height: 1.5;
}

.home-brand__sep { color: rgba(255, 255, 255, .45); }

.home-brand__link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-white);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .5);
    text-underline-offset: 3px;
    cursor: pointer;
}

.home-brand__link:hover { color: var(--color-white); text-decoration-color: var(--color-white); }

/* Веер: карточки внахлёст под разными углами, при наведении выпрямляются. */
.home-brand__fan {
    height: 280px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-brand__part {
    position: absolute;
    width: var(--size, 150px);
    height: var(--size, 150px);
    left: var(--x);
    top: var(--y);
    z-index: var(--z, 1);
    transform: rotate(var(--r, 0deg));
    transition: transform .25s ease;
}

.home-brand__part a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    border-radius: 16px;
    background: var(--color-white);
    box-shadow: 0 14px 30px rgba(3, 20, 60, .35);
}

.home-brand__part a { overflow: hidden; }

.home-brand__part img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* У фото деталей широкие белые поля — без увеличения деталь мелкая. */
    transform: scale(1.15);
}

.home-brand__part:hover,
.home-brand__part:focus-within { z-index: 5; transform: rotate(0deg) scale(1.06); }

.home-brand__part--1 { --x: 0px;   --y: 70px;  --r: -9deg; --size: 135px; --z: 2; }
.home-brand__part--2 { --x: 105px; --y: 0px;   --r: 4deg;  --size: 155px; --z: 3; }
.home-brand__part--3 { --x: 235px; --y: 40px;  --r: 10deg; --size: 125px; --z: 2; }
.home-brand__part--4 { --x: 150px; --y: 145px; --r: -4deg; --size: 120px; --z: 4; }

/* Логотипы брендов — равные белые плашки, каждая ведёт в поиск по своей марке. */
.home-brand__brands {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-brand__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 20px 28px;
    border-radius: 16px;
    background: var(--color-white);
    box-shadow: 0 12px 32px rgba(3, 20, 60, .28);
    transition: transform .2s ease, box-shadow .2s ease;
}

.home-brand__brand:hover,
.home-brand__brand:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(3, 20, 60, .38); }

.home-brand__brand img { display: block; width: auto; max-width: 100%; height: 100%; object-fit: contain; }

.home-brand__brand--comfee img {
    height: 30px;
    /* Файл общий со Smart Finder, там серый знак на сером; на белом нужен темнее. */
    filter: brightness(.45);
}

/* Ритм главной: баннер между каталогом и «Популярными». */
.home-brand + .home-popular { padding-top: 48px; }

@media (max-width: 1100px) {
    .home-brand__card { grid-template-columns: minmax(0, 1fr) 290px 170px; gap: 20px; padding: 32px; }
    .home-brand__card--no-photos { grid-template-columns: minmax(0, 1fr) 170px; }
    .home-brand__card::before { right: 100px; width: 440px; height: 440px; }
    .home-brand__card::after { right: 440px; }
    .home-brand__title { font-size: 28px; }
    .home-brand__fan { height: 230px; }
    .home-brand__part--1 { --x: 0px;   --y: 60px;  --size: 105px; }
    .home-brand__part--2 { --x: 80px;  --y: 0px;   --size: 125px; }
    .home-brand__part--3 { --x: 190px; --y: 35px;  --size: 100px; }
    .home-brand__part--4 { --x: 120px; --y: 120px; --size: 100px; }
    .home-brand__brand { height: 80px; padding: 16px 20px; }
    .home-brand__brand--comfee img { height: 24px; }
}

@media (max-width: 767px) {
    .home-brand__card {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        min-height: 0;
        padding: 24px 20px;
        border-radius: 16px;
    }
    .home-brand__card--no-photos { grid-template-columns: minmax(0, 1fr); }
    /* Логотипы — первой строкой, в два столбца. */
    .home-brand__brands { order: -1; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
    .home-brand__brand { height: 60px; padding: 12px 16px; border-radius: 12px; box-shadow: none; }
    .home-brand__brand--comfee img { height: 22px; }
    .home-brand__card::before { top: auto; bottom: -260px; right: -160px; transform: none; }
    .home-brand__card::after { display: none; }
    .home-brand__title { font-size: 22px; }
    .home-brand__text { font-size: 15px; }
    /* Порядок на телефоне: текст, веер из трёх фото, кнопка, ссылки. */
    .home-brand__body { display: contents; }
    /* Без обёртки свечение ::before легло бы поверх текста. */
    .home-brand__body > * { position: relative; z-index: 1; }
    .home-brand__title, .home-brand__text { margin-bottom: 0; }
    .home-brand__fan { order: 1; width: 300px; height: 150px; margin: 12px auto 8px; }
    .home-brand__btn { order: 2; width: 100%; }
    .home-brand__links { order: 3; flex-direction: column; gap: 4px; margin-top: 8px; }
    .home-brand__sep { display: none; }
    .home-brand__part--1 { --x: 0px;   --y: 22px; --size: 105px; }
    .home-brand__part--2 { --x: 90px;  --y: 0px;  --size: 120px; }
    .home-brand__part--3 { --x: 195px; --y: 22px; --size: 100px; }
    .home-brand__part--4 { display: none; }
    .home-brand + .home-popular { padding-top: 40px; }
}
