.catalog-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100%;
    min-height: 700px;
}

.sidebar {
    background: #EFF2F7;
    padding: 1rem;
    height: 100%;
}

.sidebar__menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem;
    border-radius: 8px;
    color: #17367F;
    white-space: nowrap;
    font-size: 1rem;
}

.sidebar__link_active,
.sidebar__link:hover {
    font-weight: 800;
}

.sidebar__submenu {
    padding-left: 4vw;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.sidebar__submenu-link {
    padding: 0.3rem;
    font-size: 0.8rem;
    color: #17367F;
}

.sidebar__submenu-link:hover {
    color: var(--color-primary);
}

.sidebar__icon {
    height: 2.5vw;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 2rem;
    align-content: start; /* или flex-start */
}


/* DESKTOP */
.mobile-category__toggle {
    display: none;
}

/* MOBILE */
@media (max-width: 768px) {

    /* .header__menu-btn_m {
      font-size: 2rem;
      border-radius: 3rem;
      padding: 0.4rem 1rem;
      
    } */

    .catalog-page {
      display: flex;
      flex-direction: column;
      padding: 1rem;
      /* height: 100%; */
  }
    .mobile-category {
        width: 80%;
        margin: 2rem auto;
    }

    .mobile-category__toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 0.5rem 1rem;
        border: none;
        border-radius: 1.5rem 0 1.5rem 0rem;
        background: #eef0f5;

        cursor: pointer;
    }

    .mobile-category__left {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .mobile-category__left img {
        width: 42px;
    }

    .mobile-category__left span {
        font-size: 1.5rem;
        color: #2f3d8f;
        font-weight: 500;
    }

    .mobile-category__arrow {
        font-size: 24px;
        color: #2f3d8f;
        transition: transform 0.3s ease;
    }

    /* Поворот стрелки */
    .mobile-category__arrow.active {
        transform: rotate(180deg);
    }

    /* Скрытое меню */
    .sidebar {
        max-height: 0;
        padding: 0;
        overflow: hidden;

        transition:
            max-height 0.3s ease,
            margin-top 0.3s ease;
    }

    /* Открытое меню */
    .sidebar.active {
        max-height: 1000px;
        margin-top: 15px;
    }
} 

/* MOBILE */
@media (max-width: 552px) {
    /* .header__menu-btn_m {
        font-size: 2rem;
    }
    .header__menu-btn-bars {
        font-size: 2rem;
        color: black;
    } */

    .catalog-page {
        padding: 1rem;
    }
    .mobile-category {
        width: 100%;
    }

    .mobile-category__toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 20px;
        border: none;
        border-radius: 24px;
        background: #eef0f5;

        cursor: pointer;
    }

    .mobile-category__left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-category__left img {
        width: 42px;
    }

    .mobile-category__left span {
        font-size: 20px;
        color: #2f3d8f;
        font-weight: 500;
    }

    .mobile-category__arrow {
        font-size: 24px;
        color: #2f3d8f;
        transition: transform 0.3s ease;
    }

    /* Поворот стрелки */
    .mobile-category__arrow.active {
        transform: rotate(180deg);
    }
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Скрытое меню */
    .sidebar {
        max-height: 0;
        overflow: hidden;

        transition:
            max-height 0.3s ease,
            margin-top 0.3s ease;
    }

    /* Открытое меню */
    .sidebar.active {
        max-height: 1000px;
        margin-top: 15px;
    }
} 

@media (max-width: 400px) {

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
} 