.mini-basket-wrapper button {
    display: flex;
    width: 36px;
    height: 36px;
    padding: 6px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 21px;
    border: 1px solid #E2E4EC;
    background: #fff;
}

.grid-selection {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 10px 0 0 0;;
}

.grid-selection button {
    border: 1px solid var(--color-primary-seconday);
    border-radius: 8px;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
    transition: all 0.3s ease;
    box-shadow: #6c757d33 0 1px 0;
    background-color: var(--color-primary-seconday)
}


.grid-selection button svg {
    width: 24px;
    height: 24px;
    color: black;
    background-color: var(--color-primary-seconday)
}

.grid-selection button:hover {
    box-shadow: #6c757d33 0 3px 0;
    svg {
        color: white;
    }
}

.grid-selection button:active{
    transform: scale(0.95);
    box-shadow: #6c757d33 0 1px 0;

}



.vostok-auto-brand a {
    color: var(--color-primary-brand);
}

.btn.btn-primary.btn-lg.search-button {
    background-color: var(--color-primary);
    color: white;
    border: var(--color-primary);
}


.log-in-wrapper {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.log-in-wrapper svg {
    width: 24px;
    height: 24px;
}

.layout_page {
    min-height: 100vh; /* тянем на высоту окна */
    display: flex;
    flex-direction: column;
}

@media (min-width: 1460px) {
    header {
        display: block;
        margin: 0 20px;
        padding: 0 12px;
    }

    .aside-menu-wrapper {
        display: none !important;
    }

    .page_inner_1 {
        padding: 15px 0;
        margin: 0 80px;
    }

    .page_inner {
        /*padding: 0 20px;*/
        margin: 0 80px 20px;
        border: none !important;
        box-shadow: none !important;
    }

    .primary_inner,
    .mini-basket-wrapper,
    .primary-nav-bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
    }

    .search_bar {
        display: flex;
        width: 1100px;
        align-items: center;
    }

    .nav-primary-other-dimensions {
        display: none;
    }

    .mini-basket-wrapper button img {
        background: none !important;
    }

    .container {
        max-width: 1900px !important;
    }

    .container.page {
        padding: 0 !important;
        margin: 0 20px !important;
        width: 100% !important;

    }


    /* По умолчанию - базовый grid */
    .products-grid.grid-net {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        width: 100%;
        overflow: hidden;
        gap: 0;
    }

    /* Очень большие экраны: 7 колонок */
    @media (min-width: 1700px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(7, 1fr);
        }
    }

    /* Большие экраны: 6 колонок */
    @media (min-width: 1460px) and (max-width: 1699px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(6, 1fr);
        }
    }

    /* Средние-большие экраны: 5 колонок */
    @media (min-width: 1200px) and (max-width: 1459px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(5, 1fr);
        }
    }

    /* Средние экраны: 4 колонки */
    @media (min-width: 1024px) and (max-width: 1199px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    /* Планшеты: 3 колонки */
    @media (min-width: 768px) and (max-width: 1023px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    /* Маленькие планшеты: 2 колонки */
    @media (min-width: 480px) and (max-width: 767px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    /* Мобильные: 1 колонка */
    @media (max-width: 479px) {
        .products-grid.grid-net {
            grid-template-columns: repeat(1, 1fr);
        }
    }

    .log-in-wrapper {
        display: flex;
        flex-direction: row;
        gap: 5px;
    }

    .footer-content {
        left: 40%;
    }

    .pagination {
        margin-top: 10px !important;
    }

    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }

    .products-grid.grid-net > .col:nth-child(7) .product-card {
        border-top-right-radius: 12px;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+7):nth-child(7n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+7):nth-child(7n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


/* Очень большие экраны: 7 колонок */
@media (min-width: 1700px) {
    .products-grid.grid-net {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-child(7) .product-card {
        border-top-right-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+7):nth-child(7n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+7):nth-child(7n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


/* Большие экраны: 6 колонок */
@media (min-width: 1451px) and (max-width: 1699px) {
    .products-grid.grid-net {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-child(6) .product-card {
        border-top-right-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+6):nth-child(6n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+6):nth-child(6n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


/* Средние экраны: 5 колонок */
@media (min-width: 1025px) and (max-width: 1450px) {
    .products-grid.grid-net {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-child(5) .product-card {
        border-top-right-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+5):nth-child(5n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+5):nth-child(5n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


@media (max-width: 1450px) {
    header {
        display: block;
        margin: 0 65px !important;
        padding: 0 12px;
    }

    .aside-menu-wrapper {
        display: none !important;
    }

    .page_inner_1 {
        padding: 10px 0;
    }

    .primary_inner,
    .mini-basket-wrapper,
    .primary-nav-bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
    }

    .search_bar {
        display: flex;
        width: 750px;
        align-items: center;
    }

    .container.page {
        padding: 0 !important;
        margin-top: 0 !important;
    }

    .page .page_inner {
        border: none !important;
        box-shadow: none !important;
    }


    .footer-content {
        left: 36%;
    }

    .pagination {
        margin-top: 10px !important;
    }
}


@media (max-width: 1024px) {

    body header {
        margin: 0 !important;
        padding: 0 12px;

    }

    .aside-menu-wrapper {
        display: none !important;
    }

    .row {
        flex-wrap: wrap;
    }

    .sidebar,
    .brand,
    .navbar-details {
        display: none !important;
    }

    .col-sm-8.col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .page_inner_1 {
        display: flex;
        padding: 15px 0;
    }

    #first {
        order: 1;
    }

    #second {
        order: 0;
    }


    .primary_inner,
    .mini-basket-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }

    .search_bar {
        display: flex;
        width: 530px;
        align-items: center;
        margin-right: 10px;
    }

    .container.page {
        padding: 0 !important;
        margin-top: 0 !important;
    }

    .page .page_inner {
        border: none !important;
        box-shadow: none !important;
    }

    .log-in-wrapper {
        display: flex;
        flex-direction: row;
        gap: 5px;
    }

    .footer-content {
        left: 33%;
    }
}


/* Планшеты: 3 колонки */
@media (min-width: 821px) and (max-width: 1024px) {
    .products-grid.grid-net {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-child(3) .product-card {
        border-top-right-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+3):nth-child(3n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+3):nth-child(3n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


@media (max-width: 820px) {
    body header {
        margin: 0 !important;
        padding: 0 14px 0 0;

    }

    .row {
        flex-wrap: wrap;
    }

    .sidebar,
    .brand,
    .navbar-details {
        display: none !important;
    }

    .col-sm-8.col-md-9 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .page_inner_1 {
        padding: 15px 0;
    }

    .primary_inner {
        display: flex;
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }

    .search_bar {
        display: flex;
        flex: 1 1 auto;
        width: 400px;
        align-items: center;
    }

    .mini-basket-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }

    .container.page {
        width: 100% !important;
        padding: 0 !important;
    }

    .page .page_inner {
        border: none !important;
        box-shadow: none !important;
    }

    .search_bar input {
        width: 100%;
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 8px !important;
        border: 1px solid #ccc;
    }

    .search_bar button {
        display: none;
    }

    .custom-dropdown-toggle {
        width: 170px;
        height: 43px;
        font-size: 25px !important;
    }

    .custom-dropdown-toggle span {
        padding: 0 10px !important;
    }

    .custom-dropdown-toggle svg {
        display: none;
    }

    .footer-content {
        left: 20%;
    }


}


/* Маленькие планшеты/большие смартфоны: 2 колонки */
@media (min-width: 401px) and (max-width: 820px) {
    .products-grid.grid-net {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-child(2) .product-card {
        border-top-right-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+2):nth-child(2n + 1) .product-card {
        border-bottom-left-radius: 12px;
    }
    
    .products-grid.grid-net > .col:nth-last-child(-n+2):nth-child(2n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 12px;
    }
}


@media (max-width: 400px) {

    html, body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        width: 100%;
    }

    .grid-selection{
        display: none;
    }

    .aside-menu-wrapper {
        display: block !important;
    }

    .text-secondary {
        padding-left: 10px;
    }

    .contact-phone {
        display: none !important;
    }

    /*.catalogue-browse-content-container .container {*/
    /*    width: 100% !important;*/
    /*}*/
    .container.page {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .layout2_subcontent_container {
        margin: 0 !important;
    }

    #messages {
        margin: 0 10px;
    }


    .alertinner a:last-child {
        margin-top: 5px;

    }

    .products-grid.grid-net {
        display: grid;
        grid-template-columns: repeat(1, 1fr) !important;
        margin-top: 7px !important;
    }

    .products-grid .col {
        padding: 0;
    }

    .browse-pre-form,
    .custom-dropdown-toggle span,
    .custom-dropdown-toggle button:first-of-type,
    .custom-dropdown-toggle svg:last-of-type,
    .log-in-wrapper {
        display: none !important;
    }

    .custom-dropdown-toggle svg:first-of-type {
        display: block !important;
        width: 20px;
        height: 20px;
    }

    .page_inner {
        padding: 5px !important;
    }

    .primary_inner {
        display: flex;
        overflow: visible;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px 8px 5px !important;
        height: 56px;
        background-color: #fff;
        gap: 0;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        background: none;
        border: none;
    }

    .search_bar {
        flex: 1 1 auto;
        margin: 0 8px;
        width: 310px;
        max-width: 100%;
    }

    .cart-button {
        position: relative;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        padding: 0;
    }

    .cart-button img {
        width: 24px;
        height: 24px;
    }

    .cart-button .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background-color: red;
        color: white;
        border-radius: 999px;
        padding: 2px 6px;
        font-size: 11px;
        font-weight: bold;
    }

    .custom-navbar {
        padding: 10px 0 10px 10px !important;
    }

    .custom-dropdown-toggle {
        width: auto;
        padding: 14px !important;;
    }

    .nav-primary {
        display: none;
    }

    .mini-basket-wrapper {
        display: none;
    }

    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 0;
    }

    .products-grid.grid-net > .col:nth-child(5) .product-card {
        border-top-right-radius: 0;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+5):nth-child(5n + 1) .product-card {
        border-bottom-left-radius: 0;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+5):nth-child(5n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 0;
    }

    .products-grid.grid-net > .col:nth-child(1) .product-card {
        border-top-left-radius: 0;
    }

    .products-grid.grid-net > .col:nth-child(3) .product-card {
        border-top-right-radius: 0;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+3):nth-child(3n + 1) .product-card {
        border-bottom-left-radius: 0;
    }

    .products-grid.grid-net > .col:nth-last-child(-n+3):nth-child(3n),
    .products-grid.grid-net > .col:last-child .product-card {
        border-bottom-right-radius: 0;
    }

    /* первая карточка на странице */
    .products-grid.grid-net > .col:first-of-type > .product-card {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    /* последняя карточка на странице */
    .products-grid.grid-net > .col:last-of-type > .product-card {
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }


}
