body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #F7F7F7;
    color: #464646;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: inherit;
    text-decoration: none;
}

.site-footer {
    margin-top: 40px;
    padding: 23px 15px;
    text-align: center;
    color: #666666;
    font-size: 15px;
    border-top: 1px solid #dddddd;
    background: #FF9500; //#FCAA36;
   /* background: #DC3545;*/
    background-image: url(/misc/bg.png);
    background-repeat: repeat;
    color: white;
}

/*.site-header {
    background: #FF9500; //#FCAA36;

    background-image: url(/misc/bg.png);
    background-repeat: repeat;
    color: white;
    padding: 13px 0px 13px 0px;
}*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #FF9500; //#FCAA36;
   /* background: #DC3545;*/
    background-image: url(/misc/bg.png);
    background-repeat: repeat;
    color: white;
    padding: 13px 0px 13px 0px;
}

.header-inner {
    margin-left: 380px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 24px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 40px;
    padding: 0 8px;
    box-sizing: border-box;

    background: #ffffff;
    border-radius: 7px;

    text-decoration: none;
    flex-shrink: 0;
}


.site-logo {
    display: block;
    height: 28px;
    width: auto;
}

.header-actions {
    margin-left: 0;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 20px;
    padding-right: 0;
    flex-shrink: 0;
}

/* Корзина в хедере: сумма + белая кнопка с иконкой + счетчик */
/*.header-cart-link {
    width: auto;
    height: auto;
    min-width: 0;

    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;

    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}*/


/* Корзина в хедере */

.header-cart-link,
.header-cart-link.has-items {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding-left: 2px;
    gap: 0;

    background: transparent;
    border: none;

    color: #ffffff;
    text-decoration: none;
}

.header-cart-link:hover {
    color: #ffffff;
}

.header-cart-link:focus {
    outline: none;
    box-shadow: none;
}

/* Сумма корзины пока скрыта */
.header-cart-sum {
    display: none !important;
}

.header-cart-icon-wrap {
    position: relative;
   /* filter: drop-shadow(0 1px 2px rgba(120, 70, 0, 0.35));     */
    width: 40px;
    height: 40px;
    flex: 0 0 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    color: #FF9500; //#FCAA36;
    border-radius: 50%;

    font-size: 20px;
    line-height: 1;
}

.header-cart-icon-wrap i {
    position: relative;
    top: 1px;
}

.header-main-link,
.header-contacts-link {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(120, 70, 0, 0.45);
    font-weight: 500;
}





.header-cart-count {
   /* filter: drop-shadow(0 1px 2px rgba(120, 70, 0, 0.35));    */
    position: absolute;
    top: -4px;
    right: -10px;

    min-width: 20px;
    height: 20px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    border-radius: 50%;

    background: #ffffff;
    border: 1px solid #FF9500; // #FCAA36;
    color: #FF9500; //#FCAA36;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}


.site-header h1 {
    margin: 0;
    font-size: 24px;
}

.layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    padding: 20px;
}

.sidebar,
.content {
    background: white;
    border-radius: 10px;
    padding: 16px;
}

/* Левая панель категорий */

.sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    padding-right: 4px;
}

@media (min-width: 801px) {
    .sidebar {
        position: fixed;
        left: 20px;
        top: 86px;
        bottom: 20px;
        width: 340px;
        box-sizing: border-box;
    }

    .category-scroll {
        flex: 1;
        min-height: 0;
    }

    .content.home-content {
        grid-column: 2;
    }

    .site-footer {
    margin-left: 380px;
    margin-right: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
}
}

/* Старый поиск внутри страницы, пока оставлен на случай отката */

.search {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.search input {
    flex: 1;
    padding: 10px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.search button {
    padding: 10px 16px;
    cursor: pointer;
    border: 0;
    border-radius: 6px;
    background: #575757;
    color: white;
}

.search button:hover {
    background: #444;
}

.reset-link {
    color: #777;
    text-decoration: none;
    font-size: 14px;
}

.reset-link:hover {
    text-decoration: underline;
}

/* Поиск в хедере */

.header-search {
    flex: 1;
    max-width: 760px;
    min-width: 0;
}

.header-search-box {
    position: relative;
    width: 100%;
}

.header-search-box input {
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 14px;
    background: #fff;
    padding: 0 52px 0 16px;
    font-size: 15px;
    color: #444;
}

.header-search-box input:focus {
    border: none;
    outline: none;
    box-shadow: none;
    background: #fff;
}

.header-search-box input::placeholder {
    color: #7a7a7a;
}

.header-search-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #BCBCBC;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search-btn:hover {
    color: #8B8B8B;
}

.header-search-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Строка навигации и результата */

.result-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin: 2px 0 18px 0;
}

.result-text {
    color: #777;
    font-size: 15px;
}

/* Категории */

.category-level {
    margin: 0;
}

.category-node {
    margin-bottom: 2px;
}

.category-row {
    display: flex;
    align-items: center;
    min-height: 30px;
    border-radius: 6px;
    color: #222;
}

.category-row:hover {
    background: #eee;
}

.category-row.active {
    background:#655845;     /*   #575757; #655845*/
    color: white;
}

.category-toggle {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    line-height: 22px;
    padding: 0;
    margin-right: 4px;
    color: #655845;
    transition: transform 0.15s ease;
}

.category-row.active .category-toggle {
    color: white;
}

.category-toggle.open {
    transform: rotate(90deg);
}

.category-toggle-placeholder {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 4px;
    flex-shrink: 0;
}

.category-link {
    flex: 1;
    display: block;
    padding: 6px 8px 6px 0;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
}

.category-children {
    display: none;
}

.category-children.open {
    display: block;
}

/* Пагинация */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 12px 0 18px 0;
}

.pagination-inline {
    margin: 0;
    justify-content: flex-start;
}

.pagination-bottom {
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #655845; // #575757;
    background: #fff;
    font-size: 14px;
}

.pagination a:hover {
    background: #eee;
}

.pagination .current {
    background: #655845;     /* #575757; */
    color: white;
    border-color: #655845;   /* #575757; */
}

.pagination .disabled {
    color: #aaa;
    background: #f5f5f5;
    cursor: default;
}

/* Товары */

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.product {
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.product-main-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-main-link:hover .product-image-wrap {
    opacity: 0.92;
}

.product:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.product-image-wrap {
    width: 100%;
    height: 170px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.product-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.product-code {
    color: #777;
    font-size: 13px;
    margin-bottom: 8px;
}

.product-info {
    margin-bottom: 10px;
    font-size: 14px;
}

.product-bottom {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.product-buy-info {
    min-width: 0;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
}

.product-qty {
    color: #555;
    margin-top: 6px;
    font-size: 14px;
}

.cart-button {
    width: 45px;   /*54 */
    height: 45px;
    flex-shrink: 0;
    border: 0px solid #E3E3E3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.cart-button:hover {
    background: #F7F7F7;
}

.cart-button img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.muted {
    color: #777;
}

.not-found {
    padding: 16px;
    border: 1px dashed #ccc;
    border-radius: 10px;
    background: #fafafa;
    color: #555;
}

/* Всплывающее сообщение корзины */
.cart-add-message {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);

    color: #fff;

    padding: 12px 20px;
    border-radius: 8px;

    font-size: 15px;
    font-weight:400;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;
    z-index: 9999;

    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-add-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cart-add-message.success {
    background: #1CA252;
}

.cart-add-message.warning {
    background: #FF9500; ///#FCAA36;
}

.header-contacts-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0px 1px 0px 5px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.header-contacts-link:hover {
  /*  text-decoration: underline; */
}

.header-main-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
     padding: 0px 2px 0px 5px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.header-main-link:hover {
   /* text-decoration: underline; */
}

.header-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-menu-button {
    display: none;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: #ffffff;
    color: #FF9500;
    cursor: pointer;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.header-menu-button:focus {
    outline: none;
    box-shadow: none;
}

.scroll-top-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #FF9500;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    box-shadow: 0 3px 2px rgba(0, 0, 0, 0.25);
}

.scroll-top-button.show {
    display: flex;
}

.scroll-top-button:hover {
    background: #FF9500;
}

.scroll-top-button:focus {
    outline: none;
    /*box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25); */
}

/* чтобы отключить скроллер для компа */
/*@media (min-width: 801px) {
    .scroll-top-button {
        display: none !important;
    }
}*/
.payment-success-actions {
    margin-top: 24px;
}

.payment-success-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: #1CA252;
    color: #ffffff;
    font-size: 15px;
    text-decoration: none;
    font-weight: 400;
}

.payment-success-button:hover {
    background: #24B25D;
    color: #ffffff;
    text-decoration: none;
}

.payment-success-text {
  font-size: 16px !important;
}

.home-marquee {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.home-marquee-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    will-change: transform;
}

.home-marquee-text {
    flex: none;
    padding-right: 6px; /*расстояние между склейкой строки*/
    font-size: 16px;
    font-weight: 400;
   /* text-transform: uppercase;*/

}.content.home-content {
    background: transparent;
    border-radius: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-top-block,
.home-products-block {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
}

.home-top-block {
    margin: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.content.home-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-message {
    padding: 12px 18px 10px 18px;
    border-radius: 0px;
  /*  background: #FF9500; */
    background: #27A536;
  /*  background: #1CA252;    */
    color: #ffffff;
    font-size: 16px;
    line-height: 1.5;
     text-align: center;
}

.home-marquee + .home-message {
    margin-top: 14px;
}

/*  */
.home-slider {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    margin-top: 14px;
   /* border-radius: 6px;    */
}

.home-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.6s ease;
    will-change: transform;
}

.home-slider-slide {
    flex: 0 0 100%;
    min-width: 0;
    aspect-ratio: 63 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: bold
}

.home-slider-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/*  */

/* ------------------------------------------------------------
   Адаптация под телефон
------------------------------------------------------------ */

@media (max-width: 800px) {
    .site-header {
        padding: 14px 10px;
    }

    .header-inner {
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;

        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;

        position: relative;
    }

    .logo-link {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
        flex-shrink: 0;
    }

    .site-logo {
        max-width: 95px;
        height: auto;
    }

    .header-search {
        grid-column: 2;
        grid-row: 1;

        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .header-search-box input {
        height: 30px;
        border-radius: 9px;
        padding: 0 32px 0 10px;
        font-size: 14px;
    }

    .header-search-btn {
        right: 5px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .header-actions {
        grid-column: 3;
        grid-row: 1;

        margin-left: 0;
        padding-right: 0;

        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;

        align-self: center;
        flex-shrink: 0;
    }

    .header-cart-link,
    .header-cart-link.has-items {
        margin-right: 0;
        padding: 0;

        width: 30px;
        min-width: 30px;
        height: 30px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        gap: 0;
        background: transparent;
        border: none;
        border-radius: 0;

        flex: 0 0 30px;
    }


    .header-cart-icon-wrap {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;

        border-radius: 8px;
        font-size: 17px;
    }

    .header-cart-icon-wrap i {
        position: relative;
        top: 1px;
    }

    .header-cart-count {
        display: none !important;
    }

    .header-menu-button {
        display: inline-flex;

        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .header-nav-links {
        display: none;
        grid-column: 1 / 4;
        grid-row: 2;
        width: 100%;
        box-sizing: border-box;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-top: 6px;
    }

    .site-header.menu-open .header-nav-links {
        display: flex;
    }

    .header-main-link,
    .header-contacts-link {
        height: 36px;
        justify-content: flex-start;
        padding: 0 12px;
        margin: 0;
        border-radius: 8px;
        /*background: rgba(255, 255, 255, 0.18);*/
       /* background: red;  */
        color: #ffffff;
        font-size: 15px;
        text-decoration: none;
    }

    .layout {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }

    .sidebar {
        max-height: none;
        overflow: visible;
    }

    .category-scroll {
        overflow: visible;
        padding-right: 0;
    }

    .search {
        flex-wrap: wrap;
    }

    .search input {
        min-width: 100%;
    }

    .result-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pagination-inline {
        justify-content: flex-start;
    }

    .products {
        grid-template-columns: 1fr;
    }

     .scroll-top-button {
        right: 12px;
        bottom: 12px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }
}