:root {
    --tg-primary: #ebcc00;
    --tg-dark: #231f20;
    --tg-gray: #666;
    --tg-light-gray: #f5f5f5;
    --tg-border: #e8e8e8;
    --tg-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --tg-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --tg-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tg-header-height: 70px;
    --tg-topbar-height: 35px;
}
button {
    font-family: inherit;
}
/* Эффекты при скролле */
.tg-header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tg-header--scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tg-header--hidden {
    transform: translateY(-100%);
}

/* Улучшенная анимация для мобильного меню */
.tg-mobile {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Плавное появление overlay */
.tg-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Анимация результатов поиска */
.tg-search__results {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Адаптивные отступы */
@media (max-width: 768px) {
    .site-content {
        padding-top: calc(var(--tg-topbar-height) + var(--tg-header-height));
    }
}



/* Typography */
:root {
    --tg-primary: #ebcc00;
    --tg-dark: #231f20;
    --tg-gray: #666;
    --tg-light-gray: #f5f5f5;
    --tg-border: #e8e8e8;
    --tg-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --tg-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --tg-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tg-header-height: 70px;
    --tg-topbar-height: 44px;
}



/* Top Bar */


.tg-topbar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}





/* Top bar right section */
.tg-topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tg-topbar__info {
    display: none;
}

.tg-topbar__social {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tg-topbar__social-link {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tg-transition);
}

.tg-topbar__social-link:hover {
    background: var(--tg-primary);
}



.tg-topbar__social-link:hover svg {
    fill: var(--tg-dark);
}

.tg-topbar__phone {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #1c2126;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

.tg-topbar__phone:hover {
    opacity: 0.8;
}

.tg-topbar__phone svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Mobile logo in topbar */
.tg-topbar__logo {
    display: none;
}

/* Main Header */
.tg-header {
    background: #fff;
    box-shadow: var(--tg-shadow);
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tg-header--hidden {
    transform: translateY(-100%);
}
.tg-header__container {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
}

/* Mobile menu button */
.tg-header__menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--tg-dark);
}

.tg-header__menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Catalog */
.tg-catalog {
    position: relative;
}



.tg-catalog__btn:hover {
    background: #d4b700;
}

.tg-catalog__btn svg {
    width: 20px;
    height: 20px;
}

/* Catalog Menu */
.tg-catalog__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--tg-shadow-lg);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--tg-transition);
}

.tg-catalog__menu--active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tg-catalog__item {
    position: relative;
}

.tg-catalog__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: var(--tg-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--tg-transition);
    border-bottom: 1px solid var(--tg-border);
}

.tg-catalog__link:hover {
    background: var(--tg-light-gray);
    color: var(--tg-primary);
}

.tg-catalog__item:last-child .tg-catalog__link {
    border-bottom: none;
}

.tg-catalog__link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    opacity: 0.5;
}

/* Level 2 Menu */
.tg-catalog__submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 5px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--tg-shadow-lg);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: var(--tg-transition);
}

.tg-catalog__item:hover > .tg-catalog__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Level 3 Menu */
.tg-catalog__submenu--level3 {
    min-width: 220px;
}

/* Logo */
.tg-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 55px;
}

.tg-header__logo svg {
    height: 100%;
    width: auto;
}

/* Search */
.tg-search {
    flex: 1;
    position: relative;
}


.tg-search__btn, .tg-header__action {
    color: #484f55;}

.tg-search__btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
}

.tg-search__btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--tg-gray);
    stroke-width: 2;
    fill: none;
}

.tg-search__btn:hover svg {
    stroke: var(--tg-primary);
}

/* Search Results */
.tg-search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--tg-shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--tg-transition);
}

.tg-search__results--active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tg-search__loader {
    padding: 20px;
    text-align: center;
    color: var(--tg-gray);
}

.tg-search__loader::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--tg-border);
    border-top-color: var(--tg-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Search Results Sections */
.tg-search__section {
    border-bottom: 1px solid var(--tg-border);
}

.tg-search__section:last-child {
    border-bottom: none;
}

.tg-search__section-title {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tg-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tg-search__result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tg-border);
    cursor: pointer;
    transition: var(--tg-transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-search__result-item:hover {
    background: var(--tg-light-gray);
}

.tg-search__result-item:last-child {
    border-bottom: none;
}

.tg-search__result-img {
    width: 40px;
    height: 40px;
    background: var(--tg-light-gray);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tg-search__result-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tg-search__result-info {
    flex: 1;
}

.tg-search__result-info h4 {
    color: var(--tg-dark);
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

.tg-search__result-info p {
    color: var(--tg-gray);
    font-size: 13px;
}

/* User Actions */
.tg-header__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.tg-header__action {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: var(--tg-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px;
    height: 40px;
    width: auto;
    margin-right: 12px;
}

.tg-header__action p{
    font-size: 13px;
    color:#1c2126;
}

.tg-header__action:hover * {
    color: var(--tg-primary);
}
.tg-header__action :is(svg, path, circle, rect, line, polyline, polygon) {
    stroke: currentColor;

}
.tg-header__action:last-child{
    margin-right: 0;
    padding: 0;
    width: auto;}
.tg-header__action svg {
    width: 22px;
    height: 22px;
    stroke: #1c2126;
    stroke-width: 2;
    fill: none;
}



/* Mobile Menu */
.tg-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
}

.tg-mobile--active {
    left: 0;
}

.tg-mobile__header {
    background: var(--tg-dark);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tg-mobile__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-mobile__content {
    padding: 20px;
}

.tg-mobile__search {
    margin-bottom: 20px;
    position: relative;
}

/* Mobile Accordion */
.tg-accordion__item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--tg-border);
    padding-bottom: 15px;
}

.tg-accordion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    color: var(--tg-dark);
    font-weight: 600;
    font-size: 15px;
    user-select: none;
}

.tg-accordion__header svg {
    width: 20px;
    height: 20px;
    stroke: var(--tg-gray);
    stroke-width: 2;
    transition: transform 0.3s;
}

.tg-accordion__header--active svg {
    transform: rotate(180deg);
}

.tg-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tg-accordion__content--active {
    max-height: 2000px;
}

.tg-accordion__link {
    display: block;
    padding: 8px 0 8px 20px;
    color: var(--tg-gray);
    text-decoration: none;
    font-size: 14px;
    transition: var(--tg-transition);
}

.tg-accordion__link:hover {
    color: var(--tg-primary);
}

/* Mobile submenu */
.tg-accordion__subitem {
    padding-left: 20px;
}

.tg-accordion__subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    color: var(--tg-gray);
    font-size: 14px;
}

.tg-accordion__subheader svg {
    width: 16px;
    height: 16px;
}

/* Overlay */
.tg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--tg-transition);
    z-index: 800;
}

.tg-overlay--active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 1200px) {




    .tg-catalog__menu {
        min-width: 240px;
    }

    .tg-catalog__submenu {
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .tg-header__container {
        gap: 14px;
    }

    .tg-search {
        max-width: 350px;
    }

    /* Hide overflow nav items */




    /* Mobile catalog */
    .tg-catalog__submenu {
        position: static;
        margin-left: 0;
        margin-top: 0;
        box-shadow: none;
        border-left: 3px solid var(--tg-primary);
        border-radius: 0;
        padding-left: 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .tg-catalog__item:hover > .tg-catalog__submenu {
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --tg-header-height: 60px;
        --tg-topbar-height: 36px;
    }
    .tg-header__container{
        gap: 0;
    }
    .tg-topbar {
        height: var(--tg-topbar-height);
    }

    .tg-header {
        height: var(--tg-header-height);
        box-shadow: none;
    }

    .tg-topbar__info {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        font-size: 13px;
        cursor: pointer;
        padding: 6px;
        background: transparent;
        border: none;
    }

    .tg-topbar__info svg {
        width: 16px;
        height: 16px;
    }

    .tg-topbar__phone span {
        display: none;
    }

    /* Move logo to topbar on mobile */
    .tg-topbar__logo {
        display: flex;
        align-items: center;
        text-decoration: none;
        height: 28px;
        margin-right: auto;
    }

    .tg-topbar__logo svg {
        height: 100%;
        width: auto;
    }

    .tg-header__menu-btn {
        display: block;
        padding: 0;
    }

    .tg-catalog {
        display: none;
    }

    .tg-header__logo {
        display: none;
    }

    .tg-search {
        display: flex;
        max-width: none;
    }

    /* Full width search results on mobile */
    .tg-search__results {
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--tg-topbar-height) + var(--tg-header-height) + 8px);
        border-radius: 0;
        max-height: calc(100vh - var(--tg-topbar-height) - var(--tg-header-height) - 16px);
    }


    .tg-header__action p {
        display: none;
    }
    button.tg-header__action {
        height: auto;
        margin-right: 0;
    }
    /* Show mobile search button */
    .tg-header__search-btn {
        display: none;
    }
}

@media (max-width: 480px) {


    .tg-topbar__logo {
        height: 24px;
    }

    .tg-header__action {
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .tg-header__action svg {
        width: 20px;
        height: 20px;
    }

    .tg-topbar__social-link {
        width: 28px;
        height: 28px;
    }


}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--tg-primary);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .tg-topbar,
    .tg-header__menu-btn,
    .tg-header__actions,
    .tg-mobile {
        display: none;
    }
}
.tg-topbar{height:35px;}
.tg-header{height:70px;background:#fff}
@media(max-width:768px){
    .tg-header{height:60px}
    .tg-topbar{height:36px}
}

/*POPUP ФОРМЫ*/

.universal-form-trigger {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    color: #231f20;
    background: #ebcc00;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.universal-form-trigger:hover {
    background: #d4b800;
    transform: translateY(-2px);
}

.universal-form-trigger.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.universal-form-trigger.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(35, 31, 32, 0.3);
    border-top-color: #231f20;
    border-radius: 50%;
    animation: form-spin 0.6s linear infinite;
}

.universal-form-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    display: none;
    align-items: center;
    justify-content: center;
}

.universal-form-popup.active {
    display: flex;
}

.universal-form-popup__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(35, 31, 32, 0.8);
    animation: form-fadeIn 0.3s ease;
}

.universal-form-popup__container {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: #ffffff;
    z-index: 1;
    animation: form-slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.universal-form-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #231f20;
    transition: all 0.3s ease;
    z-index: 2;
}

.universal-form-popup__close:hover {
    color: #ebcc00;
    transform: rotate(90deg);
}

.universal-form--popup {
    padding: 50px 30px 30px;
}

.universal-form--popup .universal-form__title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #231f20;
    text-align: center;
}

.universal-form--popup .universal-form__description {
    margin: 0 0 25px;
    font-size: 16px;
    color: #666;
    text-align: center;
}

.universal-form--popup .universal-form__field {
    margin-bottom: 20px;
}

.universal-form--popup .universal-form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #231f20;
}

.universal-form--popup .universal-form__required {
    color: #e74c3c;
}

.universal-form--popup .universal-form__input,
.universal-form--popup .universal-form__textarea {
    font-family: inherit;
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    color: #231f20;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.universal-form--popup .universal-form__input:focus,
.universal-form--popup .universal-form__textarea:focus {
    border-color: #ebcc00;
}

.universal-form--popup .universal-form__textarea {
    resize: vertical;
    min-height: 100px;
}

.universal-form--popup .universal-form__agreement {
    margin-bottom: 20px;
}

.universal-form--popup .universal-form__checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.universal-form--popup .universal-form__checkbox input[type="checkbox"] {
    margin: 3px 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.universal-form--popup .universal-form__checkbox-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.universal-form--popup .universal-form__checkbox-text a {
    color: #231f20;
    text-decoration: underline;
}

.universal-form--popup .universal-form__checkbox-text a:hover {
    color: #ebcc00;
}

.universal-form--popup .universal-form__message {
    margin-top: 15px;
    padding: 15px;
    font-size: 15px;
    text-align: center;
    display: none;
}

.universal-form--popup .universal-form__message.success {
    display: block;
    color: #27ae60;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.universal-form--popup .universal-form__message.error {
    display: block;
    color: #c0392b;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}
.universal-form-active:empty{
    display: none;
}
.universal-form__button {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #231f20;
    background: #ebcc00;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
}

.universal-form__button:hover:not(.is-disabled):not(.loading) {
    background: #d4b800;
    transform: translateY(-2px);
}

.universal-form__button.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.universal-form__button.loading {
    color: transparent;
    pointer-events: none;
}

.universal-form__button.loading:after {
    content: '';
    position: a bsolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(35, 31, 32, 0.3);
    border-top-color: #231f20;
    border-radius: 50%;
    animation: form-spin 0.6s linear infinite;
}

.universal-form__error {
    display: none;
    margin-top: 5px;
    font-size: 12px;
    color: #e74c3c;
}

.universal-form__error:not(:empty) {
    display: block;
    min-height: 16px;
}

.universal-form__field.has-error .universal-form__error {
    display: block;
}

.universal-form__input.error,
.universal-form__textarea.error {
    border-color: #e74c3c !important;
    animation: form-shake 0.5s;
}

.universal-form__checkbox.error-highlight {
    outline: 2px solid #e74c3c;
    outline-offset: 2px;
    border-radius: 4px;
    animation: form-shake 0.5s;
}

.universal-form__checkbox.error-highlight .universal-form__checkbox-text {
    color: #e74c3c;
}

body.universal-form-popup-open {
    overflow: hidden;
}

@keyframes form-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes form-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes form-spin {
    to { transform: rotate(360deg); }
}

@keyframes form-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 768px) {
    .universal-form-popup {
        padding: 10px;
    }

    .universal-form--popup {
        padding: 45px 20px 20px;
    }

    .universal-form--popup .universal-form__title {
        font-size: 24px;
    }
}
