/* Fix z-index product cards */
.wp-block-kadence-column {
    z-index: auto !important;
}

:where(.kb-row-layout-wrap:has(.wp-block-kadence-navigation)) {
    z-index: auto !important;
}

.site-header-upper-wrap {
    padding: 0 10px;
}

/* ── Кнопка пользователя в mobile-drawer ── */
.popup-drawer .drawer-header {
    padding-bottom: 10px !important;
    border-bottom: 1px solid #E9ECF4;
}

.popup-drawer .drawer-inner {
    justify-content: space-between;
}

.popup-drawer .drawer-content {
    padding: 0px !important;
}

.popup-drawer .drawer-content p {
    margin: 0 !important;
}

.drawer-header .menu-toggle-close {
    align-self: center !important;
}

.kdc-drawer-user {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none !important;
    width: 100%;
    flex-flow: wrap !important;
}

.kdc-drawer-user:hover,
.kdc-drawer-user:focus {
    background: none;
    box-shadow: none;
    text-decoration: none;
}

.kdc-drawer-user__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background-color: #E9ECF4;
    flex-shrink: 0;
}

.kdc-drawer-user__name {
    font-size: 12px;
    color: #282727;
    line-height: 44px;
}

.header-html .header-html-inner {
    gap: 16px;
    display: flex;
}

.header-navigation .header-menu-container ul ul.sub-menu, .header-navigation .header-menu-container ul ul.submenu {
    background-color: var(--global-palette9);
    border-radius: 8px;
}

.header-navigation .header-menu-container ul ul.sub-menu, .header-navigation .header-menu-container ul ul.submenu .kt-tabs-title-list {
    padding: 20px 30px 20px 30px;
}

.header-account-button {
    display: inline-flex;
    flex-flow: column;
}

.header-account-button .nav-drop-title-wrap {
    flex-flow: column;
    padding-right: 0;
}

.header-account-button .nav-drop-title-wrap .dropdown-nav-toggle {
    display: none;
}

.wp-block-woocommerce-customer-account a {
    flex-direction: column;
    gap: 0px;
    padding: 0;
}

.wp-block-woocommerce-customer-account a svg {
    height: 24px !important;
    width: 24px !important;
}

.kadence-child-favorite-button:hover,
.kadence-child-favorite-button:focus {
    color: var(--global-palette2);
    box-shadow: none;
}

.kadence-child-favorite-button:hover .kadence-child-favorite-text,
.kadence-child-favorite-button:hover svg path {
    color: var(--global-palette2);
}

.kadence-child-favorite-icon svg {
    width: 20px;
    height: 20px;
}


.header-cart-wrap .header-cart-button,
.header-mobile-cart-wrap .header-cart-button {
    position: relative;
}

.header-cart-wrap .header-cart-button .header-cart-total,
.header-mobile-cart-wrap .header-cart-button .header-cart-total {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 26px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-image: url("../images/count-products.svg");
    background-repeat: no-repeat;
    background-position: 2px center;
    background-size: contain;
    background-color: transparent !important;
    color: #fff !important;
    font-size: 14px;
    line-height: 1;
    border-radius: 0 !important;
    padding: 0 !important;
    min-width: unset !important;
}

/* ── [kdc_account_button] shortcode ── */
.kadence-child-account-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-decoration: none !important;
    cursor: pointer;
    gap: 4px;
}

.kadence-child-account-button:hover,
.kadence-child-account-button:focus {
    color: var(--global-palette2);
    text-decoration: none;
    box-shadow: none;
}

.kadence-child-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.kadence-child-account-text {
    font-size: 10px;
    font-weight: 400;
}

/* ── [cart_button] shortcode ── */
.kdc-cart-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none !important;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.kdc-cart-btn:hover,
.kdc-cart-btn:focus {
    color: var(--global-palette2);
    text-decoration: none;
    box-shadow: none;
}

.kdc-cart-btn__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.kdc-cart-btn__count {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 26px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-image: url("../images/count-products.svg");
    background-repeat: no-repeat;
    background-position: 2px center;
    background-size: contain;
    background-color: transparent;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
}

.kdc-cart-btn__label {
    font-size: 10px;
    font-weight: 400;
}

/* ── [kdc_home_button] / [kdc_catalog_button] shortcodes ── */
.kdc-home-btn,
.kdc-catalog-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none !important;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.kdc-home-btn:hover,
.kdc-home-btn:focus,
.kdc-catalog-btn:hover,
.kdc-catalog-btn:focus {
    color: var(--global-palette2);
    text-decoration: none;
    box-shadow: none;
}

.kdc-home-btn__icon,
.kdc-catalog-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.kdc-home-btn__label,
.kdc-catalog-btn__label {
    font-size: 10px;
    font-weight: 400;
}

/* ── [kdc_profile_button] ── */

.kdc-profile-btn {
    position: relative;
    display: inline-flex;
}

/* Незалогиненный — кнопка «Вход» */
.kdc-profile-btn__guest {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.kdc-profile-btn__guest:hover,
.kdc-profile-btn__guest:focus {
    color: var(--global-palette2);
    background: none;
    box-shadow: none;
}

/* Триггер-кнопка (залогиненный) */
.kdc-profile-btn__trigger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.kdc-profile-btn__trigger:hover,
.kdc-profile-btn__trigger:focus {
    color: var(--global-palette2);
    background: none;
    box-shadow: none;
}

.kdc-profile-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.kdc-profile-btn__text {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

/* Дропдаун — показывается по hover/focus-within */
.kdc-profile-btn__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    pointer-events: none;
}

.kdc-profile-btn:hover .kdc-profile-btn__dropdown,
.kdc-profile-btn:focus-within .kdc-profile-btn__dropdown {
    display: flex;
    pointer-events: auto;
}

.kdc-profile-btn__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    color: var(--global-palette3);
    text-decoration: none !important;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.kdc-profile-btn__item:hover,
.kdc-profile-btn__item:focus {
    background: #F6F7FB;
    color: var(--global-palette1);
    text-decoration: none;
    box-shadow: none;
}

.kdc-profile-btn__item--logout:hover,
.kdc-profile-btn__item--logout:focus {
    color: #8B0101;
    background: #FFF0F0;
}

/* Search shortcode. */
.kadence-child-search {
    width: 449px;
    background: #E9ECF4;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    box-shadow: none;
}

.kadence-child-search__input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent !important;
    border: 0 !important;
    outline: 0;
    font-size: 12px;
    color: var(--global-palette3);
    box-shadow: none !important;
}

.kadence-child-search__button {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--global-palette3);
    display: inline-flex;
    align-items: center;
    box-shadow: none;
}

.kadence-child-search__button:hover,
.kadence-child-search__button:focus {
    background: transparent;
    color: var(--global-palette3)
}

/* ── [kdc_icon_menu] shortcode ── */
.kdc-icon-menu {
    margin: 0;
    padding: 0;
}

.kdc-icon-menu__list {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-flow: column;
}

.kdc-icon-menu__item {
    margin: 0;
    padding: 0;
}

.kdc-icon-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--global-palette3);
    text-decoration: none !important;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.kdc-icon-menu__link:hover,
.kdc-icon-menu__link:focus {
    color: var(--global-palette2);
    text-decoration: none;
    box-shadow: none;
}

.kdc-icon-menu__link.is-active {
    color: var(--global-palette2);
}

.kdc-icon-menu__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Bottom header menu (forced via child theme code). */
.site-bottom-header-wrap .site-header-row.site-header-row-has-sides.site-header-row-no-center {
    display: flex;
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container {
    width: 100%;
    position: relative;
}

.site-bottom-header-wrap .site-header-bottom-section-left {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.site-bottom-header-wrap #site-navigation,
.site-bottom-header-wrap .main-navigation,
.site-bottom-header-wrap .primary-menu-container.header-menu-container {
    width: 100%;
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu {
    width: 100%;
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--global-palette1);
    border-radius: 8px;
    overflow: visible;
    position: relative;
    z-index: 5;
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li {
    margin: 0;
    flex: 1 1 auto;
    position: relative;
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li > a {
    display: block;
    padding: 16px;
    text-align: center;
    color: var(--global-palette9);
}

.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li > a:hover,
.site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li > a:focus {
    color: #FFA003;
}

.header-mobile-contact-wrap .header-contact-item {
    margin-top: 16px !important;
}

.header-navigation ul ul li.menu-item>a {
    color: #6D7482 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.header-navigation ul ul li.menu-item>a:hover {
    color: var(--global-palette2) !important;
    background-color: transparent !important;
}

@media (max-width: 1024px) {
    .kadence-child-favorite-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .site-bottom-header-wrap {
        width: 100%;
    }

    .site-bottom-header-wrap,
    .site-bottom-header-wrap .site-header-row-container-inner,
    .site-bottom-header-wrap .site-container,
    .site-bottom-header-wrap .site-header-row,
    .site-bottom-header-wrap .site-header-bottom-section-left {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .site-bottom-header-wrap .site-header-row-container-inner,
    .site-bottom-header-wrap .site-container {
        padding-left: 0;
        padding-right: 0;
    }

    .site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 0;
        flex-wrap: nowrap;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        justify-content: flex-start;
        padding-inline-start: 0;
        scroll-behavior: auto;
    }

    .site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu::-webkit-scrollbar {
        display: none;
    }

    .site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li {
        flex: 0 0 auto;
    }

    .site-bottom-header-wrap .primary-menu-container.header-menu-container > ul.menu > li > a {
        white-space: nowrap;
    }

    .header-cart-wrap .header-cart-button .header-cart-total,
    .header-mobile-cart-wrap .header-cart-button .header-cart-total {
        top: 4px;
    }

    .kdc-cart-btn,
    .kdc-home-btn,
    .kdc-catalog-btn,
    .kadence-child-account-button {
        color: #6D7482;
    }

    .kdc-cart-btn.is-active,
    .kdc-home-btn.is-active,
    .kdc-catalog-btn.is-active,
    .kadence-child-account-button.is-active {
        color: var(--global-palette3);
    }

    .kdc-cart-btn__label,
    .kdc-home-btn__label,
    .kdc-catalog-btn__label,
    .kadence-child-account-text {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .site-bottom-header-wrap {
        display: none !important;
    }

    .kadence-child-search {
        width: 320px;
    }
}

@media (max-width: 480px) {
    .kadence-child-search {
        width: 100%;
    }
}

/* ── Homepage only ── */
.home .site-main-header-wrap .site-header-row-container-inner > .site-container {
    padding-bottom: 0;
}

.home .entry-content-wrap {
    padding-top: 0;
}

.header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > a {
    background: transparent !important;
    color: var(--global-palette2) !important;
}
