/* ============================================================
   TERRA PRO — Footer (редизайн)
   Макеты: Figma «Terra Pro редизайн», фреймы 1920 / 1440 / 768 / 375
   Зависит от css/new-root.css (переменные, сброс, .button).
   Брейкпоинты: >1600 — 1920; ≤1600 — 1440; ≤1024 — 768; ≤576 — 375
   ============================================================ */

.footer {
    padding: 40px;
    background: var(--color-black);
    color: var(--color-white);
}

.footer__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 56px;
}

.footer__logo img {
    width: 310px;
    height: 50px;
}

.footer__menu {
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 1fr 0.9fr auto;
    grid-template-areas:
        "links menu menu contacts social"
        "copy  pay  pay  pay      .";
    gap: 32px;
    align-items: start;
}

.footer__links {
    grid-area: links;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

/* Меню футера: одно Bitrix-меню, раскладывается в 2 колонки средствами CSS
   (как в старой версии: columns: 2 auto). */
.footer__col--menu {
    grid-area: menu;
    display: block;
    columns: 2 auto;
    gap: 0;
}

.footer__col--menu .footer__link {
    display: block;
    width: fit-content;
    break-inside: avoid;
    margin-bottom: 18px;
}

.footer__contacts {
    grid-area: contacts;
}

.footer__social {
    grid-area: social;
    display: flex;
    gap: 16px;
}

.footer__copyright {
    grid-area: copy;
    align-self: end;
    font-size: var(--fs-text);
    color: var(--color-white-40);
    line-height: 1.1;
}

.footer__payments {
    grid-area: pay;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* платёжные логотипы: серые, по ховеру — фирменные цвета */
.footer__pay {
    position: relative;
    display: block;
    background: center / contain no-repeat;
}

.footer__pay:hover .footer__pay-svg--hover {
    opacity: 1;
}

.footer__pay-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease-in-out;
}

.footer__pay--payme {
    width: 87px;
    height: 28px;
}

.footer__pay--click {
    width: 85px;
    height: 20px;
}

.footer__pay-svg--hover {
    opacity: 0;
}

.footer__pay--uzum {
    width: 97px;
    height: 33px;
}

.footer__pay--alif {
    width: 64px;
    height: 31px;
}

.footer__col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer__link {
    line-height: 1.1;
    transition: border-color 0.25s ease;
    border-bottom: 1px solid transparent;
}

.footer__link:hover {
    border-color: var(--color-white);
}

.footer__contact {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
    transition: opacity 0.25s ease;
    transition: border-bottom 0.2s ease-in-out;
}

a.footer__contact span {
	border-bottom: 1px solid transparent;
}

a.footer__contact:hover span {
    border-color: var(--color-white);
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-white);
    border: 1px solid var(--color-white);
    transition: all 0.25s ease;
}

.footer__social-link:hover {
    background: var(--color-black);
}

.footer__social-link svg {
    width: 32px;
    height: 32px;
    color: var(--color-black);
    transition: color 0.25s ease;
}

.footer__social-link:hover svg {
    color: var(--color-white);
}

@media (max-width: 1600px) {
    .footer {
        padding: 40px var(--container-pad);
    }
}

@media (max-width: 1400px) {
    .footer__menu {
        grid-template-columns: 1fr 1fr auto;
        grid-template-areas:
            "menu  menu  contacts"
            "links links social"
            "copy  pay   pay";
        gap: 32px 24px;
    }
}

/* 768: логотип меньше, сетка перестраивается */
@media (max-width: 1024px) {
    .footer__logo {
        margin-bottom: 32px;
    }

    .footer__logo img {
        width: 214px;
        height: 34px;
    }

    .footer__links {
        gap: 16px;
    }

    .footer__social {
        align-self: center;
        justify-self: end;
    }

    .footer__payments {
        justify-self: end;
        gap: 16px;
    }

    .footer__pay--payme {
        width: 76px;
        height: 25px;
    }

    .footer__pay--click {
        width: 75px;
        height: 17px;
    }

    .footer__pay--uzum {
        width: 86px;
        height: 29px;
    }

    .footer__pay--alif {
        width: 58px;
        height: 28px;
    }
}

@media (max-width: 768px) {
    .footer__menu {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "menu     menu"
            "contacts links"
            "contacts social"
            "copy     pay";
        gap: 32px 16px;
    }

    .footer__social {
        align-self: start;
        justify-self: start;
    }

    .footer__payments {
        justify-self: start;
    }

    .footer__links .button {
        font-size: 18px;
    }

    .footer__copyright {
        font-size: 16px;
    }
}

/* 375: всё в одну колонку */
@media (max-width: 576px) {
    .footer {
        padding: 40px 16px;
    }

    .footer__links {
        gap: 24px;
    }

    .footer__menu {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "menu     menu"
            "contacts contacts"
            "social   social"
            "links    links"
            "pay      pay"
            "copy     copy";
        gap: 32px 16px;
    }
}

/* отступ под фиксированный таб-бар, чтобы футер не перекрывался */
@media (max-width: 1024px) {
    body {
        padding-bottom: 0;
    }

    .footer {
        padding-bottom: calc(40px + var(--tabbar-height));
    }
}
/* ============================================================
   Мобильный таб-бар (768 и 375)
   ============================================================ */
.tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    padding: 16px 15px;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.1;
    color: var(--color-gray-2);
    position: relative;
}

.tabbar__item img {
    width: 20px;
    height: 20px;
    /* белые иконки затемняются до серого #7c7f7f */
    filter: brightness(0.49);
}

.tabbar__item--active {
    color: var(--color-white);
}

.tabbar__item--active img {
    filter: none;
}

@media (max-width: 1024px) {
    .tabbar {
        display: flex;
    }
}
.tabbar .indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    font-weight: 400;
    font-size: 11px;
    color: #000000;
    line-height: 1;
    position: absolute;
    right: 12px;
    top: -9px;
}

.tabbar .mobile-favicon-btn .indicator {
    background-color: #FFFFFF;
}
.tabbar .mob-basket-btn .indicator {
    background-color: #FFFFFF;
    right: 7px;
    top: -9px;
}

.footer-margin {
    margin-top: 60px;
}