* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html,
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
}

:root {
    --main-width: min(450px, 100vw);
    --accent-color: #007aff;
    --name-color: #25242A;
    --main-bg: white;
    --nav-bg: rgba(255, 255, 255, 0.5);
    --main-color: #000;
    --secondary-color: #555;
    --alt-secondary-bg: #fff;
    --accent-bg-lite: rgb(230, 236, 255);
    --red-color: #ff0000;
    --red-bg-lite: #ffdada;
    --secondary-bg: #f2f4f7;
    --search-bg: #ffffff7b;
    --search-bg-active: #fff;
    --search-plh: #fff;
    --header-bg: linear-gradient(70deg, #5D44FF 0%, #2E97FF 70%, #00D9FF 100%);
    --border-color: #e3e3e3;
}

/* @media (prefers-color-scheme:dark) { */
:root {
    --name-color: white;
    --accent-color: #0A84FF;
    --alt-secondary-bg: #111;
    --secondary-color: #999999;
    --main-bg: #171717;
    --secondary-bg: #222222;
    --nav-bg: rgba(28, 28, 28, 0.7);
    --accent-bg-lite: rgba(185, 198, 255, 0.087);
    --main-color: #fff;
    --search-bg: #37373769;
    --red-color: #ff0000;
    --red-bg-lite: #ffdada1b;
    --search-plh: #7d7d7d;
    --header-bg: #191919;
    --search-bg-active: #4a4a4a69;
    --border-color: #272727;
}


/* } */

body {
    width: var(--main-width);
    background-color: var(--main-bg);
    max-width: var(--main-width);
    margin: 0 auto !important;
    position: relative;
    color: var(--main-color);
}

.loader {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--main-bg);
}

.loader-2 {
    position: fixed;
    left: 0;
}

.loader svg {
    width: 50px;
    height: 50px;
    transform: scaleX(-1);
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 65px;
    border-bottom: 1px solid var(--border-color);
    /* margin-bottom: 10px; */
    background: var(--header-bg);
    background-size: 160%;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 2;
    border-radius: 0 0 15px 15px;
    padding: 10px;
    gap: 10px;
}

.btn {
    color: #000;
    width: fit-content;
    transition: width .3s;
    background-color: #fff;
    font-size: 16px;
    font-weight: normal;
    border-radius: 8px;
    padding: 7px 18px;
    border: none;
    text-decoration: none;
    display: block;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.btn:disabled {
    opacity: 0.5;
}

.flex {
    display: flex;
    gap: 10px;
}

.flex.vertical {
    flex-direction: column;
}

.flex.jcc {
    justify-content: center;
}

.flex.aic {
    align-items: center;
}

.flex.wrap {
    flex-wrap: wrap;
}

.btn-icon {
    padding-left: 10px;
}

.btn-icon svg {
    margin-right: 7px;
}

.btn i {
    margin-right: 10px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: var(--accent-bg-lite);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.btn-outline-primary {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-red {
    background: var(--red-bg-lite);
    color: var(--red-color);
}

.label-primary {
    font-size: 10px;
    color: var(--secondary-color);
    margin-bottom: 5px;
    display: block;
}

.container-check {
    display: flex;
    align-items: center;
    margin: 10px;

}

.img-label {
    margin-top: 5px;
    text-align: center;
}

label[for='image_product'] {
    display: flex;
    align-items: center;
    padding-left: 10px;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

label[for='image_product'] svg {
    margin-right: 8px;
}

hr {
    border: 1px solid var(--border-color);
}

#preview_img {
    margin-top: 10px;
    display: block;
    height: 0;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    object-fit: cover;
    transition: height .3s ease;
    position: relative;
}

#preview_img.active {
    height: auto;
}

.input {
    background: var(--alt-secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    padding: 7px 12px;
    display: block;
    color: var(--main-color);
    width: 100%;
    margin-bottom: 10px;
}

.input[disabled] {
    background: var(--secondary-bg);
    color: #808080;
}

#checkbox-discount {
    display: none;
    border-color: var(--border-color);
    border-radius: 2px;
    cursor: pointer;

}

.checkbox_ {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
    margin-right: 10px;
    cursor: pointer;
    transition: border .2s ease;

}

.section_discount:has(#checkbox-discount:not(:checked)) .container-input-discount {
    display: none;
}

.section_discount:has(#checkbox-discount:checked) .checkbox_ {

    border: 3px solid var(--accent-color);
    background: radial-gradient(white, var(--accent-color));
    background-size: 90%;
    background-position: center;

}

.discount-label {
    font-size: 16px;
    color: var(--main-color);
    cursor: pointer;
    user-select: none;
}

label[for='discount_product'] {
    display: block;
}

section {
    padding: 10px;
}

.search-input {
    border-radius: 12px;
    background: var(--search-bg);
    border: none;
    outline: none;
    height: 100%;
    width: 100%;
    font-size: 18px;
    padding: 5px 10px;
    color: var(--main-color);
    transition: border-radius .4s, background .4s, color .3s;

}

.search-input::placeholder {
    color: var(--search-plh);
    font-weight: bold;
}

.search-input:not(:focus) {
    /* color: white; */
    font-weight: bold;
}

.search-input:focus {
    background: var(--search-bg-active);
    border-radius: 10px;

}

.search-input:not(:placeholder-shown) {
    background: var(--search-bg-active);
}

.quick-filters-container {
    width: fit-content;
}

.sorting_label {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: fit-content;
    color: var(--search-plh);

}

.filters-item {
    width: fit-content;
}

.sorting_label svg {
    width: 24px;
    height: 24px;
    pointer-events: none;

}

.sorting_label select {
    display: block;
    background: transparent;
    border: none;
    font-size: 12px;
    color: var(--search-plh);
    outline: none;
    width: fit-content;
    text-align: center;
    text-align-last: center;
    font-weight: 600;
}

nav.bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    width: var(--main-width);
    height: 65px;
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    backdrop-filter: blur(50px) saturate(180%);
    z-index: 10;
}

a#cart {
    position: relative;
}

.cart-count {
    border-radius: 30px;
    font-size: 10px;
    color: white;
    background: var(--red-color);
    padding: 3px 6px;
    display: flex;
    position: absolute;
    top: 0;
    right: calc(50% - 25px);
    height: 18px;
    min-width: 18px;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

.cart-count:empty {
    width: 0;
    height: 0;
    opacity: 0;
}

.catalog-svg {
    transform: translateY(-1px);
}

main {
    padding-bottom: 75px;
}

.bottom-bar-item {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #9ca7b1;
    text-decoration: none;
    z-index: 1;
    width: 100%;

}

.bottom-bar-item.active {
    color: var(--accent-color);
}

.bottom-bar-item svg {
    height: 29px;
    width: 29px;

}

.bottom-bar-item label {
    margin-top: 5px;
    font-size: 12px;
}

.product-grid {
    display: grid;
    width: 100%;
    gap: 20px 1px;
    padding: 0;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));


}

.p-info {
    padding: 12px;
    pointer-events: none;
}

.product-price {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--accent-color);
}

.product-price.discounted {
    color: rgb(255, 37, 85);
    display: flex;
    align-items: center;
}

.product-price.discounted svg {
    margin-right: 2px;
}

.product-name {
    font-size: 12px;
    margin: 0;
    font-weight: normal;
    color: var(--name-color);
    display: block;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.product-price del {
    color: var(--secondary-color);
    margin-left: 7px;
    font-size: 14px;
    margin-top: 0;
    font-weight: normal;
}

.product-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    /* border-radius: 20px; */
    background: transparent;
    /* box-shadow: 0 0 10px 0 #ccc; */
    overflow: hidden;
    max-width: calc(50vw - 1px);
    height: fit-content;

}

.product-item img {
    width: 100%;
    object-fit: cover;
    height: auto;
    aspect-ratio: 0.8;
    overflow: hidden;
    border-radius: 24px;
}

.product-btn {
    background: linear-gradient(70deg, #5D44FF 0%, #2E97FF 70%, #00D9FF 100%);
    background-size: 120%;
    width: calc(100% - 16px);
    margin: 0 8px;
    /* padding: 14px; */
    font-size: 14px;
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: bold;
    margin-top: auto;
    /* pointer-events: none; */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;

}

.product-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.product-window {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    /* max-height: -webkit-fill-available; */
    z-index: 10;
    background: #00000039;
    display: none;
    max-width: var(--main-width);
    /* padding-bottom: 65px; */

}

body:has(.product-window.active) {
    overflow: hidden;
}

.main-section-window {
    width: 100%;
    height: 100%;
    background: var(--main-bg);
    border-radius: 15px 15px 0 0;
    z-index: 2;
    overflow: auto;
    position: relative;



}

.main-section-window {
    transition: all .3s ease;
    top: 0;
    padding: 0;
    padding-bottom: 20px;
    padding-bottom: 75px;
}


.product-window.active {
    display: block;
}

/* .close-btn-product-window {
    background: transparent;
    color: white;
    width: 30px;
    height: 30px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 5px;
} */

.close-btn-product-window svg {
    width: 100%;
    height: 100%;
}

.product-window .header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 100%;
    max-width: var(--main-width);
    height: 50px;
    padding-right: 10px;
    padding-bottom: 10px;
    background: linear-gradient(to bottom, #0000008c, transparent);
    z-index: 2;
}

.product-window img.main-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    z-index: 1;
    position: relative;
    object-fit: cover;
    aspect-ratio: 0.8;

}

.product-window .price {
    color: var(--accent-color);
    margin: 0;
    display: block;
    white-space: nowrap;
}

.product-window .price.discounted {
    color: rgb(255, 37, 85);
    display: flex;
    align-items: center;

}

.product-window .price.discounted del {
    color: var(--secondary-color);
    margin-left: 7px;
    font-size: 16px;
    margin-top: 0;
    font-weight: normal;
}

.main-section-window section {
    padding: 10px 00px;
    padding-top: 0;
    position: relative;
    z-index: 1;
    /* background: #0000004d; */
}

.main-section-window .blurred-bg {
    filter: blur(140px) saturate(3);
    position: absolute;
    user-select: none;
    pointer-events: none;
    /* transform: scale(2); */
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    margin: auto;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
}

.container_price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    padding: 5px 20px;
    padding-top: 15px;
    /* transform: translateY(-10px); */
    border-radius: 0 0 15px 15px;
    /* background: var(--secondary-bg); */
    padding-bottom: 10px;

}

.container_price .amount {
    margin: 0;
    color: var(--secondary-color);
}

.product-window .name,
.product-window .description {
    margin: 0;
}

.product-window .name {
    margin-bottom: 10px;
    font-size: 24px;
}

.product-window .description {
    font-size: 16px;
    font-weight: normal;
    color: var(--secondary-color);
}

.container_info_window {
    padding: 10px 20px;
    /* background: var(--secondary-bg); */
    /* border-radius: 15px; */
}

.product-grid.search_c:has(.product-item) {
    min-height: calc(100% - 56px);
    position: fixed;
    background: var(--secondary-bg);
    padding-top: 10px;
    top: 56px;
    max-height: calc(100% - 56px);
    overflow: auto;
    padding-bottom: 75px;

}

.grid_catalog {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    /* Автоматическая высота строк */
    gap: 12px;
    width: 100%;
    max-width: var(--main-width);
    align-items: stretch;
    padding: 40px;
    background: var(--secondary-bg);
}

/* Общий стиль */
.grid_item {
    border-radius: 30px;
    background-color: var(--main-bg);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}



.grid_item.category {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column-reverse;
    overflow: hidden;
    font-size: 11px;
}

/* 
.grid_item.category:nth-of-type(3),
.grid_item.category:nth-of-type(4) {
    height: calc(50vw - 46px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    flex-direction: row-reverse;
    grid-column: span 2;
} */

.grid_item span {
    width: 100%;
    text-align: center;
}

.grid_catalog::after {
    content: "";
    width: 100%;
    grid-column: span 2;
    aspect-ratio: 1 / 1;
    visibility: hidden;
}

.grid_catalog h1 {
    display: block;
    width: 100%;
    grid-column: span 2;
}

.category_img {
    height: 100%;
    width: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 15px;

}

.grid_item .category_img {
    max-width: 100%;
    height: auto;
}


.firms-scroll {
    display: flex;
    max-width: 100%;
    overflow: auto;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.firm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--secondary-bg);
    border: none;
    border-radius: 40px;
    padding: 14px 20px;
    color: var(--main-color);
    margin: 0 2.5px;
    transition: all .3s;
    -webkit-tap-highlight-color: transparent;
    /* overflow: hidden;  */
    /* width: fit-content; */
}

.firm-btn svg {
    /* display: none; */
    width: 0;
    height: 0;
    transition: all .3s;
}

.firms-scroll:has(.firm-btn.active) .firm-btn:not(.active) {
    /* display: none; */
    width: 0;
    /* font-size: 0; */
    padding: 0;
    opacity: 0;
    margin: 0;
    transition: all .3s;
    pointer-events: none;

}

.firm-btn.active {
    display: flex !important;
    font-weight: bold;
    background: var(--accent-bg-lite);
    color: var(--accent-color);
}

.firm-btn.active svg {
    width: 14px;
    height: 14px;
    color: var(--accent-color);
    display: block;
    margin-right: 5px;
}

body:has(.top_products) {
    background: var(--secondary-bg);
}

.categories_grid {
    display: grid;
    margin-bottom: 10px;
    gap: 10px;
    /* grid-template-columns: fit-content(300px) fit-content(300px); */
    grid-template-columns: repeat(2, calc(50% - 5px));
    width: 100%;
    overflow: hidden;

}

@supports (-webkit-touch-callout: none) {

    @media (display-mode: standalone) {

        /* this will  apply on IOS/IPadOS on installed PWA */
        nav {
            padding-bottom: 30px;
            height: 95px !important;
        }

        .main-section-window {
            padding-bottom: 100px;
        }

        .btns_cart {
            bottom: 95px !important;
        }

        main {
            padding-bottom: 105px !important;

        }
    }
}

.category_item {
    display: block;
    background: var(--border-color);
    width: 100%;
    text-align: center;
    border-radius: 24px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    /* max-width: calc(50% - 5px); */
    justify-content: space-evenly;
}

.category_item .category_name {
    margin: 0;
    font-size: 16px;
    color: var(--main-color);

}

body:has([data-bs-theme="dark"]) {
    background: var(--main-bg);
    color: var(--main-color);
}

.top_products {
    display: flex;
    overflow: auto;
    padding: 15px;
    padding-top: 20px;
    padding-bottom: 20px;
    /* border-radius: 0 0 15px 15px; */
    border-radius: 20px;
    background: var(--main-bg);
    column-gap: 1px;

}

.top_products .product-item {
    min-width: 193px;
}

.top_products .product-item img {
    aspect-ratio: 3/4;
    height: auto;

}

.top_products .product-item .product-name {
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
}

body:has(.cart_item) {
    background: var(--secondary-bg);
}

.cart_items {
    padding: 10px;
    padding-bottom: 65px;
}

.cart_item {
    display: flex;
    width: 100%;
    height: 85px;
    border-radius: 20px;
    padding: 10px;
    background: var(--main-bg);
    margin-bottom: 5px;

}

.cart_item_info {
    width: 100%;
    max-width: calc(100% - 75px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.cart_item img {
    aspect-ratio: 1;
    width: auto;
    height: 100%;
    border-radius: 12px;
    margin-right: 10px;

}

.cart_item .price {
    margin-right: auto;
    padding: 7px 10px;
    background-color: var(--accent-bg-lite);
    color: var(--accent-color);
    border-radius: 8px;
}

.cart_item_info h3,
.cart_item_info p {
    margin: 0;
}

.cart_item_info h3 {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart_item_actions {
    overflow: hidden;
    gap: 1px;
    border-radius: 8px;
}

.cart_item_actions button {
    background: var(--secondary-bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px
}

.pabtns {
    align-items: center;
}

.quantity {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px;
    min-width: 34px;
    background: var(--secondary-bg);
}

.cart_item_actions svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.btns_cart {
    position: fixed;
    bottom: 65px;
    width: 100%;
    left: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    gap: 10px;
    background: var(--nav-bg);
    backdrop-filter: blur(30px);
}

.btns_cart button {
    width: 100%;
    height: 100%;

    text-align: center;
    justify-content: center;
    border-radius: 15px;
    font-size: 16px;
    padding: 10px;
    font-weight: bold;

}

header button {
    border: 1px solid var(--border-color);
    height: 100%;
    width: auto;
    aspect-ratio: 1;
    background: var(--search-bg);
    border-radius: 50px;
    color: var(--accent-color);
    padding: 10px;
}

@media (prefers-color-scheme:light) {
    header button {
        color: white;
    }


}

header button svg {
    width: 100%;
    height: 100%;

}

.cart_items:has(.empty_cart) {
    display: flex;
    height: calc(100vh - 185px);
    align-items: center;
    justify-content: center;
}

.empty_cart {
    text-align: center;
    font-size: 1.5em;
    opacity: 0.5;
    color: var(--secondary-color);
}

.title_screen {
    display: flex;
    align-items: center;
}

.title_screen svg {
    color: var(--accent-color);
    height: 1.5em;

}

.grid_item.firm {
    font-weight: bold;
}

.paymethod {
    width: 50%;
    text-align: center;
    padding: 10px;
}

.paymethod:first-of-type {
    border-right: 1px solid var(--border-color);
}

.paymethod img {
    width: 120px;
    max-width: 100%;
}

.payMethodDialog h3 {
    text-align: center;
}

.payMethodDialog[open] {
    padding: 0;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--main-color);
}

.payMethodDialog[open]::backdrop {
    background-color: var(--nav-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);


}

.cancel-payment {
    width: 100%;
    text-align: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    padding: 15px 15px;
    margin-top: 10px;
}

.p-methods-container {
    gap: 0;
}

.name_order_short {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.dialog_more_info {
    border-radius: 20px;
    padding: 40px;
    border: 2px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--main-color);

}

.dialog_more_info::backdrop {
    background: #00000073;
}

.dialog_more_info section {
    display: grid;
    gap: 10px;
    align-items: center;
    grid-template-columns: 1fr auto auto;
}

.dialog_more_info span {
    width: fit-content;
    display: block;

}

span.art-badge,
.mybadge {
    --bs-badge-padding-x: 0.65em;
    --bs-badge-padding-y: 0.35em;
    --bs-badge-font-size: 0.75em;
    --bs-badge-font-weight: 700;
    --bs-badge-color: #fff;
    --bs-badge-border-radius: var(--bs-border-radius);
    display: inline-block;
    padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
    font-size: var(--bs-badge-font-size);
    font-weight: var(--bs-badge-font-weight);
    line-height: 1;
    color: var(--bs-badge-color);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--bs-badge-border-radius);
    background: #1d6fac !important;
    border-radius: 50rem;
    margin-left: 0.25rem;
    color: white !important;
}

.mybadge.error {
    background: #ce2a2a !important;

}

.title_screen p {
    margin: 0;
}

.moreinfo {
    cursor: pointer;
}

#category-list>ul {
    list-style-type: none;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin: auto;

}

.category_edit_tree summary {
    display: flex;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    padding: 5px 0;
    user-select: none;
    cursor: pointer;

}

.category_edit_tree ul {
    padding: 0 !important;
}

.category_edit_tree .actions {
    margin-left: auto;
    display: flex;
}

.imgInput {
    display: flex;
    cursor: pointer;

}

.imgInput img,
.categoryImg {
    height: 24px;
    width: auto;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-left: 10px;
    border: 1px solid var(--border-color);
}

.categoryImg {
    margin-left: 0;
    margin-right: 8px;

}

.table_links {
    outline: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    border-collapse: collapse;
}

.table_links a {
    color: #a8d2ff;
}

.table_links thead {
    background: #2f2f2f;

}

.table_links th {
    padding: 15px;
    border-right: 2px solid #171717;

}

.table_links th:last-of-type {
    border-right: none;
}

.previewImgMini {
    display: block;
    width: 40px;
    height: 25px;
    border-radius: 6px;
    object-fit: cover;
}

.table_links td {
    padding: 10px 15px;
    border-right: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.btns_act_category {

    display: flex;
}

.btns_act_category .btn:first-of-type {
    border-radius: 10px 0 0 10px;
}

.btns_act_category .btn:nth-of-type(2) {
    border-radius: 0 10px 10px 0;
}


.btn.toggleBtn {
    height: 25px;
    width: 40px;
    border-radius: 50px;
    display: block;
    padding: 0;
    transition: all .2s;
}

.toggleBtn span {
    height: 25px;
    width: 25px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #ccc;
    display: block;
    transition: all .2s;
    transform: translateX(0px);
}

.toggleBtn.deactived {

    background: #9f9f9f;
}

.toggleBtn.actived {

    background: #3be90f;
}

.toggleBtn.actived span {

    transform: translateX(15px);
}

/* __________________________ */

.users-list {
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
}

.users_item select {
    width: fit-content;
}

.users_item {
    border-bottom: 1px solid #444;
    padding: 5px 0;

}

.users_item .input {
    margin-bottom: 0;
}

.users-list .btn {
    margin-top: 10px;
}

.bot_settings,
.section_fg {
    padding: 15px;
    background: var(--secondary-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}



.container-product {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding-right: 10px;
    margin-bottom: 5px;
}

.container-product .product-info {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.container-product .product-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 10px;
    object-fit: cover;
}

.container-product .product-info-name h3 {
    font-size: 16px;
    margin: 0;

}

.container-product .product-info-name p {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-color);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.nowrap {
    white-space: nowrap;
}

.container-product .product-price {
    display: block;
    width: fit-content;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 14px;
    color: var(--accent-color);
    background: var(--accent-bg-lite);
    margin: 0;
}

.h-scroll {
    width: 100%;
    overflow: auto;
}

#inactivityModal {
    font-size: 24px;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: black;
    color: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid red;
    z-index: 1000;
}

#inactivityModal .progress-bar {
    height: 10px;
    background: red;
    display: block;
    width: 100%;


}

#index-category-list {
    background: var(--ul-1-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.index_cat_item {
    border-bottom: 1px solid var(--border-color);
    height: 40px;

}

.index_cat_item input {
    margin-left: auto;
    font-size: 16px;
    color: white;
    background: #333;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 3px 10px;
}

*[hidden] {
    display: none;
}

.methodP-card {
    background: rgb(0, 107, 0);
    padding: 5px;
    border-radius: 8px;
    color: white;
}


:root {
    /* --main-width: calc(100vw - 500px); */
    /* --nav-bg: #f4f4f4; */
    /* --red-color: #ff0000;
    --red-bg-lite: #ffdada;
    --accent-bg-lite: rgb(230, 236, 255); */
    --ul-1-bg: #202020;
    --ul-2-bg: #3333337d;
}


.product-actions .btn-red {
    margin-left: 1px;
    border-radius: 0 10px 10px 0;
}

.product-actions {
    display: flex;
    margin-left: auto;
}

.product-actions .btn {
    font-size: 14px;
}

.product-actions .btn:first-of-type {
    font-size: 14px;
    border-radius: 10px 0 0 10px;
}

details li {
    list-style-type: none;


}

details li span,
summary span {
    cursor: pointer;
    user-select: none;
    color: var(--secondary-color);
}

details li span:hover,
summary span:hover {
    opacity: 0.7;
}

details:not(:has(a)) summary,
details:not(:has(a)) span {
    pointer-events: none;
    cursor: not-allowed !important;
    color: #9d9d9d;
}

details:not(:has(a)) {
    cursor: not-allowed;
    opacity: 0.8;
}

summary {
    padding: 7px 0;
    border-bottom: 1px solid #313131;
    /* border-top: 1px solid #313131; */
}

.parent_category {
    border-bottom: none;
}

details[open]>summary>span {
    color: var(--main-color);
}

details li a,
details li a span {
    color: #d3e9ff !important;
}

ul:has(summary) {
    padding: 7px;
    padding-left: 14px;
    margin-left: 30px;
    border-radius: 8px;
    background: var(--ul-1-bg);
}

li.sortable {
    cursor: grab;
    position: relative;
}

li.sortable::after {
    content: '＝';
    color: var(--secondary-color);
    right: 20px;
    position: absolute;
}

li.sortable-chosen {
    background: #7777771e;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    cursor: grabbing;
    opacity: 1 !important;
}

.p-c-ul {
    margin-left: 0;
}

.items-tree {
    background: #7777771e;
    border-radius: 8px;
    padding-left: 5px;

}

.items-tree li {
    border-bottom: 1px solid var(--border-color);
    padding: 5px 10px;
}

.items-tree li:last-of-type {
    border-bottom: none;
}

.ccitem {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.ccitem h3 {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    margin-right: auto;
}

#list-categories,
#list-firms {
    padding: 0;
    background: var(--secondary-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

#list-categories .ccitem:last-of-type,
#list-firms .ccitem:last-of-type {
    border-bottom: none;
}

#black-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
}

.top-product-container.sorting-item {
    display: flex;
    align-items: center;
    justify-content: start;
    margin-top: 10px;
    border-bottom: 1px solid #4c4c4c;
    cursor: grab;

}

.top-product-container.sorting-item img {
    width: auto;
    height: 70px;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;

}

.rating-badge {
    background: #555555;
    border-radius: 15px;
    padding: 4px 8px;
}

@media screen and (min-width:900px) {
    :root {
        --main-width: calc(100vw - 500px);
        --nav-bg: #f4f4f4;
        --red-color: #ff0000;
        --red-bg-lite: #ffdada;
        --accent-bg-lite: rgb(230, 236, 255);
        --ul-1-bg: #ececec;
        --ul-2-bg: #fff;
    }

    /* .grid_item.category:nth-of-type(3),
    .grid_item.category:nth-of-type(4) {
        height: calc((100vw - 500px - 82px) / 2);
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 0;
        flex-direction: row-reverse;
        grid-column: span 2;
    } */

    /* @media screen and (prefers-color-scheme:dark) { */
    :root {
        --nav-bg: #272727;
        --red-color: #ff0000;
        --red-bg-lite: #ffdada1b;
        --accent-bg-lite: rgba(185, 198, 255, 0.087);
        --ul-1-bg: #202020;
        --ul-2-bg: #3333337d;
    }

    /* } */

    .top_products .product-item {
        max-height: 302px;
        max-width: 193px;
    }

    nav.bottom-bar {
        position: fixed;
        margin: auto;
        flex-direction: column;
        top: 0;
        bottom: 0;
        /* left: max(calc(50vw - var(--main-width)/2 - 230px), 10px); */
        left: 20px;
        height: fit-content;
        padding: 10px;
        width: 200px;
        border-radius: 15px;
        border: 1px solid var(--border-color);

    }

    .cart-count {
        right: auto;
        left: 25px;
        top: 5px;
    }

    .btn {
        border-radius: 10px;
    }

    .bottom-bar-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: start;
        height: fit-content;
        width: 100%;
        padding: 5px;
        padding-left: 10px;
        border-radius: 10px;
    }

    .bottom-bar-item:hover {
        background: #5e5e5e24;
    }

    .bottom-bar-item label {
        margin: 0;
        margin-left: 10px;
        font-size: 17px;
        user-select: none;
        cursor: pointer;
    }

    .container-product {
        display: flex;
        align-items: center;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding-right: 10px;
        margin-bottom: 5px;
    }

    .container-product .product-info {
        display: flex;
        align-items: center;
    }

    .container-product .product-img {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        margin-right: 10px;
        object-fit: cover;
    }

    .container-product .product-info-name h3 {
        font-size: 16px;
        margin: 0;

    }

    .container-product .product-info-name p {
        margin: 0;
        font-size: 14px;
        color: var(--secondary-color);
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 300px;
    }

    .container-product .product-price {
        display: block;
        width: fit-content;
        padding: 3px 6px;
        border-radius: 5px;
        font-size: 14px;
        color: var(--accent-color);
        background: var(--accent-bg-lite);
        margin: 0;
    }

    .btn-red {
        background: var(--red-bg-lite);
        color: var(--red-color);
    }

    *[hidden] {
        display: none;
    }




    #productsTable {
        font-size: 12px;
    }









}

.main-section-window .blurred-bg {
    /* display: none; */
}

.main-section-window button {
    font-size: 17px;
    display: block;
    margin: 0 10px;
    margin-top: 10px;
    border-radius: 20px;
    width: calc(100% - 20px);
    padding: 15px 20px;
    height: auto;
    font-weight: 500;



}

.category_item img {
    border-radius: 15px;
}

.main-section-window .pictures.grid-item {
    display: none;
}

.waiting_order>td {

    background: #00129d !important;

}

@media screen and (max-width: 900px) and (min-width:450px) {
    :root {
        --main-width: 100vw;
        --nav-bg: #00000095;
    }

    nav.bottom-bar {
        bottom: 20px;
        border-radius: 35px;
        border: 1px solid var(--border-color);
        height: 95px !important;
        width: 400px;
        right: 0;
        left: 0;
        margin: auto !important;
        padding-bottom: 0 !important;
        transform: scale(1.3);

    }

    .categories_grid {
        grid-template-columns: repeat(3, calc(33% - 5px));

    }

    .empty_msg {
        color: #7d7d7d;
    }

    .category_item {
        justify-content: center;
    }

    .category_item img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 15px;
    }

    .bottom-bar-item svg {
        transform: scale(1.4);
    }

    .top_products .product-item {
        height: 365px;
        width: 193px;
        margin-right: 10px;
    }

    .category_img {
        border-radius: 23px;
    }


    .product-window img.main-img {
        height: 350px;
        margin: 0 auto;
        /* margin-top: 40px; */
        border-radius: 20px;
        max-width: 100%;
        display: block;
        width: auto;
        aspect-ratio: 3/4;
    }

    .main-section-window .pictures.grid-item {
        display: block;
        border-radius: 25px;
        border: 1px solid var(--border-color);
        background: #17171799;
        backdrop-filter: saturate(1.8);
        z-index: 1;
        overflow: hidden;
    }

    .main-section-window .pictures.grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .main-section-window {
        padding: 30px;
        padding-bottom: 100px;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: 1fr 1fr;
        grid-column-gap: 20px;
        grid-row-gap: 20px
    }

    .main-section-window>.grid-item:nth-child(2) {
        grid-column: 1/3;

    }


    .main-section-window>.grid-item:nth-child(4) {
        grid-column: 1/1;

    }


    .main-section-window>.grid-item:nth-child(5) {
        grid-column: 2/2;

    }

    .product-window .header {
        display: none;
    }

    .btns_cart {
        bottom: 130px !important;
        width: 390px;
        border-radius: 25px;
        margin: auto;
        left: 0;
        right: 0;
        font-size: 20px !important;
        height: 90px;
    }

    .btns_cart button {
        font-size: 20px;
    }

    .btns_cart:not(:has(button)) {
        display: none;
    }

    .main-section-window button {
        font-size: 20px;
        display: block;
        margin: 0;
        margin-top: 10px;
        border-radius: 20px;
        width: 100%;
        padding: 15px 20px;
        height: auto;
        font-weight: 500;



    }

    .grid_item {
        border-radius: 45px;
        padding: 30px;
        font-size: 24px;


    }

    .grid_item.category {
        font-size: 16px;
    }

    .main-section-window .blurred-bg {
        filter: blur(140px);
        position: absolute;
        user-select: none;
        pointer-events: none;
        /* transform: scale(2); */
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        margin: auto;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.45;
        z-index: 0;
    }

    .main-section-window button:nth-of-type(1) {
        margin-top: auto;
    }

    .main-section-window section {
        height: 350px;
        width: 100%;
        backdrop-filter: saturate(1.8);
        padding: 10px;
        background: #171717b3;
        border: 1px solid var(--border-color);
        border-radius: 25px;
        display: flex;
        flex-direction: column;
        z-index: 2;
        position: relative;
    }

    main {
        padding-bottom: 120px;
    }

    .container_price {
        border-radius: 20px;
    }

    .product-grid {
        /* width: max-content; */
        grid-template-columns: repeat(3, 1fr);
        /* Всегда 3 колонки */
    }


}

@media screen and (max-width: 1140px) and (min-width:900px) {
    body {
        max-width: calc(100% - 230px);
        margin-left: 220px !important;

    }
}