/* ==========================================================================
   1. ГЛОБАЛЬНІ ЗМІННІ ТА БАЗА
   ========================================================================== */
#rank-math-analytics-stats-content{
    display:none;
}

:root {
    --color-accent: #1a73e8;
    --color-text: #333;
    --color-border: #e6e6e6;
    --radius-main: 10px;
    --gap-grid: 8px;
    --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --site-width: 1200px; /* СТАНДАРТ НОУТБУКА */
}

*, *:before, *:after { box-sizing: border-box; }

body {
    color: #333; /* Текст темно-серый для контраста */
}

/* ГЛОБАЛЬНИЙ ШРИФТ */
body, html, p, li, span, a, input, button, select, textarea {
    font-family: var(--font-main) !important;
    font-size: 15px;
    line-height: 1.4;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* Скидання відступів для контенту */
.entry-content:not(:first-child), 
.entry-summary:not(:first-child), 
.page-content:not(:first-child) {
    margin-top: 0;
}

a {color: var(--color-accent);text-decoration: none!important;transition: color 0.2s ease;cursor: pointer;}
a:hover { color: #0056b3; }

/* ==========================================================================
   2. МАКЕТ ТА КОНТЕЙНЕРИ (1200px)
   ========================================================================== */

/* Центруємо і обмежуємо весь сайт */
.grid-container, 
.site-header .inside-header, 
.site-footer .inside-site-footer {
    max-width: var(--site-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Прибираємо зайві відступи контейнера */
.separate-containers .site-main {
    margin: 0px auto !important;
}

/* Внутрішні відступи контенту та білі "острови" */
.inside-article, 
.sidebar .widget, 
.site-header,
.main-navigation {
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.separate-containers .inside-article, 
.separate-containers .comments-area, 
.separate-containers .page-header, 
.separate-containers .paging-navigation, 
.one-container .site-content, 
.inside-page-header {
    padding: 10px !important;
}

/* Закруглення кутів як у додатках */
.separate-containers .inside-article {
    border-radius: 10px; 
}

/* МОБІЛЬНІ ПРАВКИ МАКЕТУ */
@media (max-width: 768px) {
    .separate-containers .site-main { margin-top: 0 !important; }
    .inside-header { padding: 0 10px; }
    
    /* Змінюємо 70px на 60px відповідно до висоти тулбару */
    body { padding-bottom: 60px !important; } 
}
/* ==========================================================================
   3. ТИПОГРАФІКА (Compact)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main) !important;
    font-weight: 500;
    color: #333;
    line-height: 24px;
    margin-top: 0;
    margin-bottom: 7px !important;
    letter-spacing: -0.3px;
}

h1 { font-size: 18px; }
h2 { font-size: 18px !important; line-height: 1.2; }
h3 { font-size: 18px !important; }
h4 { font-size: 16px !important; }

p { margin-top: 0 !important; margin-bottom: 7px !important; }
p:last-child { margin-bottom: 0 !important; }

ul, ol {margin-top: 0;padding-left: 10px;margin: 0 0 7px 8px;}
li { margin-bottom: 4px !important; }

/* Скидання списків для WooCommerce та меню */
.woocommerce ul.products, 
.product-subcategories, 
ul.menu, 
.footer-bar ul {
    list-style: none !important; 
    padding-left: 0 !important; 
    margin-bottom: 0 !important;
}

/* ==========================================================================
   4. БАЗОВІ КНОПКИ (Global Buttons)
   ========================================================================== */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) #respond input#submit.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) a.button.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt, .woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) input.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce #respond input#submit.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce a.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce button.button.alt, :where(body:not(.woocommerce-block-theme-has-button-styles)):where(:not(.edit-post-visual-editor)) .woocommerce input.button.alt,
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button, 
.woocommerce-checkout #place_order, 
.add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: var(--color-accent);
    border-radius: var(--radius-main);
    font-size: 17px;
    font-weight: 500;
    padding: 17px 7px;
    line-height: 1;
    margin: 0;
    width: 100%;
    
    /* ИМПЛАНТАЦИЯ: фиксируем бордер */
    border: 1px solid transparent !important;
    background-image: linear-gradient(#ffffff, #ffffff), 
                      linear-gradient(90deg, #e11d48, #fbbf24, #10b981, #3b82f6, #8b5cf6, #e11d48) !important;
    background-origin: border-box !important;
    background-clip: padding-box, border-box !important;
    background-size: 100% 100%, 200% 100% !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important; /* Убираем стандартный контур браузера */
}

/* Состояние при наведении, нажатии и фокусе — чтобы рамка не пропадала */
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.add_to_cart_button:hover,
.add_to_cart_button:active, 
.add_to_cart_button:focus,
.woocommerce button.button:active,
.woocommerce button.button:focus {
    background-color: #fff !important; 
    color: var(--color-accent) !important;
    
    /* Рамка продолжает жить */
    border: 1px solid transparent !important;
    background-image: linear-gradient(#ffffff, #ffffff), 
                      linear-gradient(90deg, #e11d48, #fbbf24, #10b981, #3b82f6, #8b5cf6, #e11d48) !important;
    
    /* Запуск анимации */
    animation: rainbow-spin 1.5s linear infinite !important;
}

/* Убираем изменение размера (scale), если оно не нужно */
.add_to_cart_button:active, 
.woocommerce button.button:active {
    transform: none !important;
}

/* Анимация */
@keyframes rainbow-spin {
    0% { background-position: 0% 0%, 0% 0%; }
    100% { background-position: 0% 0%, 200% 0%; }
}

/* Скидання стилів для блочних кнопок WP (Gutenberg fix) */
a.wp-block-button__link:not(.has-background):active, 
a.wp-block-button__link:not(.has-background):focus, 
a.wp-block-button__link:not(.has-background):hover {
    color: #538ac6;
    background-color: #ffffff;
}
a.button:hover span {
     color: inherit!important;
}
/* ==========================================================================
   5. НАВІГАЦІЯ ПО КАТЕГОРІЯХ (Subcategories)
   ========================================================================== */
.product-subcategories {
    display: flex;
    gap: var(--gap-grid);
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.subcategory-item {
    border: 1px solid var(--color-border); 
    border-radius: var(--radius-main);
    background: #fff; 
    text-align: center; 
    overflow: hidden;
}

/* Приховуємо обгортку картинки, якщо там плейсхолдер */
.subcategory-img-wrapper:has(img[src*="woocommerce-placeholder"]) {
    display: none !important;
}

/* Додатково: якщо картинка прихована, можна трохи підправити стиль заголовка */
.subcategory-img-wrapper:has(img[src*="woocommerce-placeholder"]) + h3 {
    margin-top: 0 !important;
}

.subcategory-item a { 
    display: block; 
    text-decoration: none; 
    color: inherit; 
}

.subcategory-item img { 
    width: 100%; 
    height: auto; 
    display: block; 
    margin: 0; 
}

.subcategory-item h3 {
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 4px;
    margin: 0 !important;
    line-height: 1.1;
    color: #333;
}

/* Адаптивність категорій */
@media (max-width: 768px) {
    .product-subcategories {
        flex-wrap: nowrap; /* Гор. скрол на мобільних */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0px 0 0px 0px;
    }
    .product-subcategories::-webkit-scrollbar { display: none; }
    .subcategory-item { 
        flex: 0 0 28%; 
        min-width: 95px; 
    }
}

@media (min-width: 769px) {
    .product-subcategories { flex-wrap: wrap; }
    .subcategory-item { 
        flex: 0 0 auto; 
        width: 110px !important; 
    }
}

/* ==========================================================================
   6. СІТКА ТОВАРІВ (PRODUCT GRID CONTAINER)
   ========================================================================== */
.woocommerce ul.products {
    display: flex !important; 
    flex-wrap: wrap !important;
    gap: var(--gap-grid) !important;
    margin: 0 !important; 
    padding: 0 !important;
}

/* Прибираємо старі псевдоелементи, що ламають flex */
.woocommerce ul.products::before, 
.woocommerce ul.products::after { 
    display: none !important; 
}

/* Оболонка картки товару (Shell) */
.woocommerce ul.products li.product {
    display: flex; 
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-main);
    padding: 0 !important;
    overflow: hidden; 
    position: relative; 
    margin: 0 !important;
}

/* ==========================================================================
   7. АДАПТИВНІСТЬ КОЛОНОК (RESPONSIVE COLUMNS)
   ========================================================================== */

/* 1. Мобільний (< 768px): 2 колонки */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        /* (100% / 2) - gap adjustment */
        flex: 0 0 calc(50% - 4px) !important; 
        width: calc(50% - 4px) !important;
    }
}

/* 2. Планшет (769px - 1024px): 4 колонки */
@media (min-width: 769px) and (max-width: 1024px) {
    .woocommerce ul.products li.product {
        /* (100% / 4) - gap adjustment */
        flex: 0 0 calc(25% - 6px) !important; 
        width: calc(25% - 6px) !important;
    }
}

/* 3. Ноутбук і ПК (> 1025px): 5 КОЛОНОК (Стандарт IPRO) */
@media (min-width: 1025px) {
    .woocommerce ul.products li.product {
        /* (100% / 5) = 20% minus gap adjustment */
        flex: 0 0 calc(16% - 6.4px) !important;
        width: calc(16% - 6.4px) !important;
    }
}
.inside-header {
    padding: 7px 15px;
}
/* ==========================================================================
   8. ЗОБРАЖЕННЯ ТОВАРУ (IMAGES)
   ========================================================================== */
.woocommerce ul.products li.product a img {
    width: 100% !important; 
    height: auto !important;
    margin: 0 !important; 
    display: block !important;
    border-radius: 0 !important; 
    border-bottom: 1px solid #f7f7f7;
    
    /* Квадратна пропорція для однакової висоти карток */
    aspect-ratio: 1 / 1; 
    object-fit: cover;
}

.woocommerce ul.products li.product a.woocommerce-loop-product__link {
    display: block; 
    width: 100%; 
    padding: 0; 
    margin: 0;
}
/* ==========================================================================
   9. СТАТУСИ НАЯВНОСТІ (TRAFFIC LIGHTS)
   ========================================================================== */
.catalog-stock-status {
    font-size: 11px !important;
    font-family: var(--font-main);
    line-height: 15px; 
    font-weight: 500;
    margin-top: 6px !important; 
    margin-bottom: 0 !important;
    padding: 0 8px !important;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px;
    height: 16px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* Крапка-індикатор */
.catalog-stock-status .status-dot { 
    width: 6px; 
    height: 6px; 
    border-radius: 50%; 
    display: inline-block; 
    flex-shrink: 0; 
}

.catalog-stock-status b { 
    font-weight: 700; 
    color: #444; 
    margin-left: 3px; 
}

/* Кольорові схеми */
.catalog-stock-status.instock { color: #27ae60; } 
.catalog-stock-status.instock .status-dot { background-color: #27ae60; }

.catalog-stock-status.preorder {color: #1a73e8;} 
.catalog-stock-status.preorder .status-dot {background-color: #1a73e8;}

.catalog-stock-status.out { color: #c0392b; } 
.catalog-stock-status.out .status-dot { background-color: #c0392b; }

/* ==========================================================================
   10. НАЗВА ТОВАРУ (TITLE CLAMPING)
   ========================================================================== */
.woocommerce-loop-product__title {
    padding: 0 8px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    font-size: 14px !important;
    line-height: 16px !important;
    height: 48px !important; /* Фіксуємо рівно 3 рядки (16px * 3) */
    font-weight: 500 !important;
    color: #333;
    
    /* Обрізка тексту трьома крапками після 3 рядків */
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   11. БЛОК ЦІНА + КНОПКА (FLEX ROW)
   ========================================================================== */
.price-and-cart {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: auto; /* Притискає блок до низу картки */
    width: 100%;
    padding: 0 7px 7px 7px !important;
    gap: 5px;
}

/* Ціна всередині блоку */
.price-and-cart .price {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #222 !important;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

/* Кнопка "Купити" всередині блоку */
.price-and-cart .add_to_cart_button {
    height: 30px !important;
    min-width: 70px;
    font-size: 12px;
    margin: 0 !important;
    border: 1px solid transparent;
    display: inline-flex; /* Fix alignment */
}

/* Приховуємо стандартну ціну WooCommerce, щоб не дублювалася */
.woocommerce ul.products li.product > .price { 
    display: none !important; 
}

/* Фіксація стилів кнопки у списку товарів */
.woocommerce ul.products li.product .button {
    display: inline-flex;
}

/* ==========================================================================
   12. ГОЛОВНА КАРТКА ТОВАРУ В КОШИКУ
   ========================================================================== */
#fkcart-modal .fkcart-item-wrap .fkcart--item {
    padding: 7px 15px 10px 15px;
    margin-bottom: 7px !important;
    border-bottom: 1px solid #eee;
    position: relative !important; /* Для позиціонування блоку залишків */
}

/* Гнучкий контейнер (Назва + Ціна) */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 7px !important;
}

/* Інші стилі FunnelKit (відступи між елементами) */
#fkcart-modal .fkcart-slider-body .fkcart-item-wrap .fkcart--item {
    gap: 10px !important;
}

#fkcart-modal .fkcart-preview-ui .fkcart-slider-heading {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* ==========================================================================
   13. ЗОБРАЖЕННЯ ТОВАРУ В КОШИКУ
   ========================================================================== */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-image-wrapper {
    width: 80px !important;
    height: 80px !important;
    display: block !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

#fkcart-modal .fkcart-image-wrapper img {
    display: block !important;
    vertical-align: middle;
}

/* ==========================================================================
   14. НАЗВА ТА МЕТА-ДАНІ
   ========================================================================== */
/* Блок із заголовком (Забирає весь вільний простір) */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-wrap-start .fkcart-item-meta {
    flex: 1 1 auto !important; /* Гнучко розтягується */
    min-width: 0 !important;   /* Захист від довгих слів */
    gap: 3px !important;
    max-width: unset !important;
    padding-right: 0px !important;
    height: 100%;
    justify-content: space-between;
}

/* Обмеження назви до 2 рядків */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-title {
    display: block;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25 !important;
    font-size: 14px;
    font-weight: 500 !important;
    max-height: 2.5em;
    word-break: break-word;
}

/* ==========================================================================
   15. ЦІНА ТА ЗНИЖКИ (ПРАВА КОЛОНКА)
   ========================================================================== */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-wrap-start .fkcart-item-misc {
    display: flex !important;
    flex-direction: column !important; /* Елементи один під одним */
    align-items: flex-end !important;  /* Притискаємо до правого краю */
    flex: 0 0 auto !important;         /* Забороняємо стискатися */
    white-space: nowrap !important;
    text-align: right !important;
    position: static !important;
    max-width: none !important;
    width: auto !important;
}

/* Налаштування цін: Нова зверху, стара знизу */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-price,
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-discounted-price {
    white-space: normal !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: flex-end !important;
}

/* Розмір шрифту перекресленої ціни */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-price del .woocommerce-Price-amount, 
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-price del .woocommerce-Price-amount * {
    font-size: 19px;
}
.fkcart-summary-amount .woocommerce-Price-amount, .fkcart-item-price .woocommerce-Price-amount{
    font-size: 18px;
}

/* Прибираємо зайві відступи у цін */
#fkcart-modal .fkcart-item-wrap .fkcart--item .fkcart-item-price del {
    margin-top: 0 !important;
    margin-right: 0 !important;
}
#fkcart-modal .fkcart--item .fkcart-discounted-price {
    margin-top: 0px !important;
}

/* Захист ціни під час AJAX */
.fkcart-item-price {
    position: static !important; 
}

/* ==========================================================================
   16. КНОПКИ КІЛЬКОСТІ (+ / -)
   ========================================================================== */
#fkcart-modal .fkcart-quantity-selector {
    border-radius: 10px !important;
}

#fkcart-modal .fkcart-quantity-selector .fkcart-quantity__input {
    min-height: 30px !important;
    height: 38px !important;
    padding: 0 !important;
    max-height: 42px !important;
    min-width: 32px !important;
    width: 32px !important;
}

#fkcart-modal .fkcart-quantity-selector .fkcart-quantity-button {
    height: 24px;
    width: 34px !important;
}

/* Приховуємо стрілки input type="number" */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Мобільний фікс розміру шрифту для input (щоб iOS не зумив) */
@media screen and (max-width: 767px) {
    @media screen and (-webkit-min-device-pixel-ratio: 0) {
        body #fkcart-modal .fkcart-quantity-selector .fkcart-quantity__input {
            font-size: 14px !important;
        }
    }
}

/* ==========================================================================
   17. ВИВІД ЗАЛИШКІВ (CUSTOM STOCK IPRO)
   ========================================================================== */
/* Додаємо місце знизу картки, тільки якщо є інформація про залишки */
.fkcart--item:has(.ipro-cart-stock-wrapper:not(:empty)) {
    padding-bottom: 25px !important; 
}

.ipro-cart-stock-wrapper {
    position: absolute !important;
    bottom: 2px !important; 
    width: auto !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    margin-top: 4px;
}

/* Плавність під час оновлення кошика */
.fkcart-is-loading .ipro-cart-stock-wrapper {
    opacity: 0 !important;
    transition: opacity 0.1s;
}

/* Ховаємо сам блок, якщо він порожній */
.ipro-cart-stock-wrapper:empty {
    display: none !important;
}

/* Стилі тексту залишків */
.ipro-cart-stock .ipro-instock {
    color: #27ae60;
    font-weight: 500;
    padding: 3px 10px;
    font-size: 12px;
}
.ipro-preorder {
    color: #1a73e8;
    font-weight: 500;
    padding: 3px 10px;
    font-size: 12px;
}
.ipro-cart-stock { font-size: 11px; color: #666; display: block; }
.ipro-need-more { color: #2980b9; font-style: italic; }
/* ==========================================================================
   17.2 ВИВІД ПІДКАЗОК ОПТУ В КОШИКУ (IN-CART UPSELL CSS POSITIONING)
   ========================================================================== */

/* 1. Робимо відступ знизу картки для повідомлення про опт */
.fkcart--item:has(.ipro-cart-upsell) {
    padding-bottom: 35px !important; 
}

/* 2. МАГІЯ: Якщо у товара є І залишки, І опт — робимо подвійний відступ */
.fkcart--item:has(.ipro-cart-stock-wrapper:not(:empty)):has(.ipro-cart-upsell) {
    padding-bottom: 55px !important;
}

/* 3. Позиціонуємо сам блок опту внизу, розтягуючи на всю ширину (мінус падінги) */
.ipro-cart-upsell {
    position: absolute !important;
    left: 15px !important;
    right: 15px !important;
    bottom: 4px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    text-align: left !important;
    width: calc(100% - 30px) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* 4. ЗАХИСТ ВІД НАКЛАДАННЯ: Якщо вже є текст залишків (який сидить на bottom: 2px), піднімаємо опт вище */
.fkcart--item:has(.ipro-cart-stock-wrapper:not(:empty)) .ipro-cart-upsell {
    bottom: 25px !important; 
}

/* 5. Кольорові схеми (Orange / Green) */
.ipro-cart-upsell.ipro-upsell-orange {
    color: #ea580c !important;
    background: #fff7ed !important;
    border: 1px solid #ffedd5 !important;
}
.ipro-cart-upsell.ipro-upsell-green {
    color: #10b981 !important; 
    background: #ecfdf5 !important; 
    border: 1px solid #d1fae5 !important;
}
/* ==========================================================================
   18. ФОН ТА ОБОЛОНКА (BACKDROP & DRAWER)
   ========================================================================== */
.ipro-backdrop {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5); 
    z-index: 99998;
    opacity: 0; 
    visibility: hidden; 
    transition: 0.3s;
}
.ipro-backdrop.is-open { opacity: 1; visibility: visible; }

.ipro-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}
.ipro-drawer.is-open { transform: translateX(0); }

/* Mobile Footer Bar Fix (Якщо панель знизу, меню має бути коротшим) */
@media (max-width: 768px) {
    .ipro-drawer {
        height: calc(100dvh - 60px) !important;
        top: 0 !important;
    }
}

/* ==========================================================================
   19. ХЕДЕР МЕНЮ (GRID LAYOUT)
   ========================================================================== */
.ipro-drawer-header {
    display: grid !important;
    grid-template-columns: 1fr 60px; 
    grid-template-rows: auto auto;    
    background: #fff !important;
    padding: 0 !important;
    border-bottom: 1px solid #eee;
    height: auto !important;
    flex-shrink: 0; /* Щоб хедер не стискався */
}

/* Кнопка "Назад" (Верхній поверх, зліва) */
.ipro-back-btn {
   grid-column: 1 / 2;
   grid-row: 1 / 2;
   display: flex !important;
   align-items: center;
   padding: 0 20px;
   min-height: 50px;
   color: #888;
   font-size: 13px;
   background: none;
   border: none;
   border-right: 1px solid #eee;
   border-bottom: 1px solid #eee;
   cursor: pointer;
}

.ipro-back-btn :hover{
   background-color: #fff !important;
}

/* Якщо кнопки назад немає (головний рівень), ховаємо її */
.ipro-back-btn[style*="hidden"] {
    display: none !important;
}

.ipro-back-btn svg {
    margin-right: 4px;
    flex-shrink: 0;
    color: #bbb;
}
.ipro-back-btn .back-text {
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    display: inline-block;
}

/* Кнопка закриття (Верхній поверх, справа) */
.ipro-close-btn {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    font-size: 30px;
    color: #bbb;
    min-height: 50px;
    width: 60px;
    cursor: pointer;
}
.ipro-close-btn svg {
    color: #bbb;
    transition: transform 0.3s ease;
}
.ipro-close-btn:active svg {
    transform: scale(0.8);
    color: #333;
}

/* Активний заголовок (Нижній поверх - НА ВСЮ ШИРИНУ) */
.ipro-current-title {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    display: flex;
    width: 100%;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    height: 55px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #538ac626;
    border-left: 4px solid #1a73e873;
    background: #f8fbff;
    position: relative;
}

/* Прибираємо подвійну лінію на головному рівні */
.ipro-drawer-header:not(:has(.is-active)) .ipro-current-title {
    border-top: none;
}

.ipro-current-title a {
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #1a73e8;
    line-height: 1.2;
    text-decoration: none;
    display: block;
    padding: 0 20px;
}
/* Розтягуємо посилання на весь блок */
.ipro-current-title a::after {
    content: "";
    position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
}

.ipro-current-title::after {
    content: 'Подивитись всі товари категорії';
    font-size: 11px;
    color: #333;
    font-weight: 500;
    margin-top: 0px;
    text-transform: lowercase;
}

/* ==========================================================================
   20. СЛАЙДЕР ТА СПИСКИ МЕНЮ
   ========================================================================== */
/* Область перегляду (Viewport) */
.ipro-slider-viewport {
    flex-grow: 1; 
    overflow-x: hidden; 
    overflow-y: auto; 
    position: relative;
    width: 100%;
}

/* Обгортка для зсуву (Wrapper) */
.ipro-slider-wrapper {
    width: 100%; 
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Рівні меню */
.ipro-menu-level {
    margin: 0 !important; 
    padding: 0 !important; 
    list-style: none !important;
    width: 100%; 
    background: #fff;
}

/* Ховаємо посилання-заглушки */
.ipro-menu-level li a[href="#"],
.ipro-menu-level.level-0 > li:first-child { /* Перший елемент головного меню */
    display: none !important;
}

/* Стиль пункту меню */
.ipro-menu-level li a {
    min-height: 45px;
    gap: 12px;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #f2f2f2;
    color: #333!important;
    font-size: 15px;
}
.ipro-menu-level li a:active { background: #f9f9f9; }

/* Іконка категорії */
.ipro-menu-icon {
    flex-shrink: 0;
    width: 24px !important;
    height: 24px !important;
    object-fit: contain;
}

/* Текст пункту */
.ipro-menu-text {
    flex-grow: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-align: left;
}

/* Стрілка (строго справа) */
.ipro-menu-level li a.has-arrow::after {
    content: '›';
    margin-left: auto; 
    font-size: 20px;
    line-height: 1;
    color: #999;
}

/* ПІДМЕНЮ (Абсолютне позиціонування праворуч) */
.ipro-menu-level ul.sub-menu {
    position: absolute; 
    top: 0; 
    left: 100%; /* Знаходиться за екраном праворуч */
    width: 100%; 
    height: auto; 
    min-height: 100%;
    margin: 0 !important; 
    padding: 0 !important; 
    list-style: none !important;
    background: #fff;
    display: none; 
}

/* Показуємо, коли активне (але все ще праворуч, поки wrapper не зсунеться) */
.ipro-menu-level ul.sub-menu.is-active {
    display: block;
}

/* ==========================================================================
   21. КНОПКА БУРГЕР (UNIFIED TRIGGER FIXED)
   ========================================================================== */

/* Об'єднана обгортка для іконки та тексту (яку ми додали у віджет) */
.ipro-unified-trigger {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    cursor: pointer;
    gap: 0px; /* Відступ між іконкою та текстом */
}

/* Сама кнопка шорткоду всередині обгортки */
.ipro-burger-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    /* margin: 0 !important; */
    height: 24px !important; /* Фіксована висота як у всіх іконок */
    margin-bottom: 0px;
    width: auto !important;
    pointer-events: none; /* Клік проходить наскрізь до .ipro-unified-trigger */
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
}

/* Лінії бургера */
.burger-lines {
    flex-direction: column;
    gap: 4px;
}

.burger-lines span {
    display: block;
    width: 20px !important;
    height: 2px !important;
    background: #333333 !important;
    border-radius: 1px !important;
}

/* Текст під бургер-іконкою */
.ipro-unified-trigger .btn-text {
    display: block;
    font-size: 10px; /* Або твій стандартний розмір */
    line-height: 1;
    color: #333;
    pointer-events: none; /* Щоб текст не заважав кліку */
}

/* Прибираємо стандартний бургер теми */
button.menu-toggle {
    display: none !important;
}

/* ==========================================================================
   22. ПОШУК FIBOSEARCH (FIXED & FULL)
   ========================================================================== */
/* 1. КОНТЕЙНЕР: Змушуємо його бути видимим і розтягуватися */
.ipro-fibo-col .dgwt-wcas-search-wrapp {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important; /* Це важливо: розтягуємо на всю ширину колонки */
    height: 100% !important;
    min-width: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 2. ІКОНКА: Центруємо і забороняємо зникати */
.ipro-fibo-col .dgwt-wcas-search-icon {
    display: flex !important;
    width: 24px !important;
    height: 24px !important;
    position: relative !important;
    left: auto !important; right: auto !important; top: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: none !important;
}

/* 3. SVG (ЛУПА) */
.ipro-fibo-col svg.dgwt-wcas-ico-magnifier-handler {
    width: 20px !important;
    height: 20px !important;
    fill: #333333 !important;
    display: block !important;
}

/* Активний стан (зміна кольору при кліку) */
.ipro-toolbar-item:active svg.dgwt-wcas-ico-magnifier-handler path {
    fill: var(--color-accent) !important;
}

/* 4. ПРИХОВУВАННЯ ЗАЙВОГО (Input, стрілки, прелоадери) */
.ipro-fibo-col .dgwt-wcas-search-form,
.ipro-fibo-col .dgwt-wcas-search-icon-arrow,
.ipro-fibo-col .dgwt-wcas-icon-preloader,
.ipro-fibo-col .dgwt-wcas-sf-wrapp {
    display: none !important;
}

/* 5. СТИЛІ ВИПАДАЮЧОГО ВІКНА (Твої оригінальні стилі - залишені без змін) */
.dgwt-wcas-si img {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0px;
    max-height: 100%;
    max-width: 100%;
}
.dgwt-wcas-si { width: 67px; height: 100%; }

.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
    padding-top: 4px; padding-bottom: 3px;
}
.dgwt-wcas-open-pirx .dgwt-wcas-details-inner, 
.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion {
    padding-left: 15px; padding-right: 15px;
}
.dgwt-wcas-suggestion { padding: 5px 7px; }
.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
    padding-bottom: 3px; margin-top: 7px;
}

/* Фікс для верхнього меню (щоб не дублювався пошук там) */
#mobile-menu-control-wrapper .dgwt-wcas-menu-bar-item {
    display: none !important;
}
/* ==========================================================================
   23. ІКОНКА ПРОФІЛЮ (CSS SHAPE)
   ========================================================================== */
.ipro-icon-user {
    width: 24px;
    height: 24px;
    position: relative;
    display: block;
}

/* Голова */
.ipro-icon-user::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border: 2px solid #333333;
    border-radius: 50%;
}

/* Плечі */
.ipro-icon-user::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    border: 2px solid #333333;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

/* Активний стан */
.ipro-toolbar-item:active .ipro-icon-user::before,
.ipro-toolbar-item:active .ipro-icon-user::after {
    border-color: var(--color-accent) !important;
}

/* ==========================================================================
   24. КНОПКА КОШИКА В ТУЛБАРІ (FUNNELKIT TOGGLER)
   ========================================================================== */
.ipro-cart-wrapper .fkcart-mini-toggler {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: 24px !important;
    margin: 0 !important;
    width: 100% !important;
    justify-content: center;
}

.ipro-cart-wrapper .fkcart-shortcode-icon-wrap {
    width: 24px !important;
    height: 24px !important;
    color: #333333 !important;
    position: relative !important;
    overflow: visible !important;
}

.ipro-cart-wrapper .fkcart-shortcode-qty {
    display: flex !important;
}

.ipro-toolbar-item:active .fkcart-shortcode-icon-wrap {
    color: var(--color-accent) !important;
}

/* ==========================================================================
   25. КНОПКА GOOGLE ВХОДУ (NEXTEND SOCIAL LOGIN)
   ========================================================================== */
/* Скидаємо старі стилі контейнера */
div.nsl-container[data-align="left"], 
div.nsl-container[data-align="center"], 
div.nsl-container[data-align="right"] {
    text-align: center !important;
}

/* Сама кнопка (Pill Shape - Google Guideline) */
div.nsl-container .nsl-button-google[data-skin="light"] {
    background-color: #ffffff !important;
    border: 1px solid #747775 !important;
    border-radius: 24px !important;
    box-shadow: none !important;
    color: #1f1f1f !important;
    font-family: 'Roboto', 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    height: 44px !important;
    padding: 0 20px 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s, border-color 0.2s !important;
    min-width: 240px !important;
    text-decoration: none !important;
    position: relative;
}

/* Ховер ефект */
div.nsl-container .nsl-button-google[data-skin="light"]:hover {
    background-color: #f0f4f9 !important;
    border-color: #747775 !important;
    color: #1f1f1f !important;
    cursor: pointer;
}

/* Вирівнювання іконки */
div.nsl-container .nsl-button-svg-container {
    padding: 8px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Розмір логотипу Google */
div.nsl-container svg {
    width: 20px !important;
    height: 20px !important;
}

/* Текст кнопки */
div.nsl-container .nsl-button-default div.nsl-button-label-container {
    margin: 0 0 0 4px !important;
    padding: 0 !important;
    font-size: 14px !important;
    letter-spacing: 0.2px !important;
    flex: 1 !important;
    text-align: center !important;
}

.nsl-container-buttons a {
    text-decoration: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   26. ПОВІДОМЛЕННЯ WOOCOMMERCE (SUCCESS/ERROR NOTICES)
   ========================================================================== */
.woocommerce-notices-wrapper {
    margin-bottom: 10px;
}

/* Прибираємо браузерну обводку при фокусі */
.woocommerce-message:focus,
.woocommerce-error:focus,
.woocommerce-info:focus,
.woocommerce-notices-wrapper:focus {
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
}

/* Стиль повідомлення */
.woocommerce-message {
    background-color: #ffffff !important;
    border: 1px solid #eee !important;
    border-left: 4px solid #28a745 !important; /* Зелений */
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
    padding: 7px 15px !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Ховаємо стандартну іконку */
.woocommerce-message::before {
    display: none !important;
}

/* Кнопка всередині повідомлення (напр. "Переглянути кошик") */
.woocommerce-message .button {
    background: #f8f9fa !important;
    color: #1a73e8 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.2s ease !important;
}
.woocommerce-message .button:hover {
    background: #eef5ff !important;
    border-color: #1a73e87a !important;
}

/* Мобільна адаптація повідомлень */
@media (max-width: 768px) {
    .woocommerce-message {
        flex-direction: column;
        text-align: center;
    }
}

/* Скидання відступів для помилок/інфо */
.woocommerce-error, .woocommerce-info, .woocommerce-message {
    padding: inherit;
    margin: inherit;
}
/* ==========================================================================
   27. ХЛІБНІ КРИХТИ (BREADCRUMBS)
   ========================================================================== */
.woocommerce-breadcrumb {
    margin: 0 0 2px 0 !important; 
    padding: 5px 0 !important;
    font-size: 13px !important; 
    color: #777 !important;
}

.woocommerce-breadcrumb a { 
    color: var(--color-accent) !important; 
    text-decoration: none !important; 
}

/* Мобільна адаптація: горизонтальний скрол */
@media (max-width: 768px) {
    .woocommerce-breadcrumb {
        display: flex !important; 
        white-space: nowrap !important;
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px !important; 
        scrollbar-width: none; /* Firefox */
    }
    .woocommerce-breadcrumb::-webkit-scrollbar { display: none; /* Chrome/Safari */ }
}

/* ==========================================================================
   28. ЗАВАНТАЖЕННЯ (INFINITE SCROLL LOADER)
   ========================================================================== */
.loader {
    text-align: center;
    padding: 20px;
    font-weight: bold;
    width: 100%;
    color: #666;
}

/* Ховаємо стандартну пагинацію, коли працює JS */
.infinite-scroll-enabled .woocommerce-pagination {
    display: none;
}

/* ==========================================================================
   29. ЗАГЛУШКИ ЗОБРАЖЕНЬ (PLACEHOLDERS & SPINNERS)
   ========================================================================== */
.category-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
}

/* Анімація спінера */
.spinner {
    animation: rotate 2s linear infinite;
    width: 60px;
    height: 60px;
}

.spinner .path {
    stroke: #1a73e8; /* Ваш фірмовий синій */
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ==========================================================================
   30. УТИЛІТИ ПРИХОВУВАННЯ (VISIBILITY UTILS)
   ========================================================================== */
/* Ховаємо мобільний футер-бар на десктопах */
@media (min-width: 769px) { 
    .footer-bar { display: none !important; } 
}

/* Приховуємо стандартні елементи додавання в кошик (щоб не миготіли) */
.added_to_cart.wc-forward { display: none !important; }
.add_to_cart_button.added::after { display: none !important; content: none !important; }
.add_to_cart_button.loading::after { display: none !important; content: none !important; }

/* Фікс прозорості кнопки при кліку */
.add_to_cart_button.added { opacity: 1 !important; }

/* Запобігаємо зсуву тексту в кнопці */
.add_to_cart_button.loading, 
.add_to_cart_button.added {
    padding-right: 7px !important; 
}
/* ==========================================================================
   31. СТОРІНКА ТОВАРУ: ІНФО ПРО ЗАЛИШКИ (STOCK INFO BOX)
   ========================================================================== */
.ipro-stock-info-single {
    font-size: 13px; 
    margin-bottom: 15px; 
    padding: 10px 15px;
    background: #f8f9fa; 
    border-radius: var(--radius-main); 
    border: 1px solid #eee;
    color: #555; 
    display: block; 
    width: 100%;
}

/* ==========================================================================
   32. СТОРІНКА ТОВАРУ: СХОЖІ ТОВАРИ (MOBILE CAROUSEL)
   ========================================================================== */
/* На мобільному "Схожі товари" та "Ap-sells" стають горизонтальним слайдером */
@media (max-width: 768px) {
    .related.products ul.products, 
    .upsells.products ul.products {
        flex-wrap: nowrap !important; 
        overflow-x: auto !important; 
        padding-bottom: 10px !important;
        -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
        scrollbar-width: none;
    }

    .related.products ul.products::-webkit-scrollbar,
    .upsells.products ul.products::-webkit-scrollbar {
        display: none;
    }

    /* Фіксована ширина карток у слайдері */
    .related.products ul.products li.product, 
    .upsells.products ul.products li.product {
        flex: 0 0 41% !important;
        width: 41% !important;
         /* Відступ між слайдами */
    }
}

/* ==========================================================================
   33. КНОПКА ВІДКРИТТЯ У ВІДЖЕТІ (SIDEBAR BUTTON)
   ========================================================================== */
/* Чорна кнопка "Фільтри", яка з'являється у сайдбарі (якщо використовується) */
.ipro-btn-open {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #222;
    color: #fff;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background 0.2s;
}

.ipro-btn-open:hover {
    background: #444;
}

/* Іконка-бургер всередині кнопки */
.ipro-btn-open span:not(.btn-text) {
    display: block; 
    width: 18px; 
    height: 2px; 
    background: #fff; 
    margin-bottom: 3px;
}
.ipro-btn-open span:last-child { margin-bottom: 0; }

/* ==========================================================================
   34. ЛОГІКА ВИДИМОСТІ (ALWAYS VISIBLE ON MOBILE)
   ========================================================================== */
/* 1. Ховаємо на ПК (залишаємо тільки для мобільних) */
@media (min-width: 769px) {
    .ipro-mobile-toolbar,
    #ipro-filter-popup { 
        display: none !important; 
    }
}

/* 2. Показуємо на мобільному ВСЮДИ */
@media (max-width: 768px) {
    .ipro-mobile-toolbar { 
        display: flex !important; 
    }
    
    /* Попап ініціалізуємо як flex, він керується класом .active */
    #ipro-filter-popup { 
        display: flex !important; 
    }
}

/* Ми видалили приховування на Checkout та Cart, 
   тепер сайдбар-навігація буде доступна всюди. */
/* ==========================================================================
   35. ГЕОМЕТРІЯ НИЖНЬОЇ ПАНЕЛІ (TOOLBAR FIXED)
   ========================================================================== */
.ipro-mobile-toolbar {
    position: fixed !important;
    bottom: 0; left: 0;
    width: 100% !important; height: 60px !important;
    background: #ffffff !important;
    border-top: 1px solid #eeeeee !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 999999 !important;
    
    /* FLEX: Розподіляємо простір */
    display: flex !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    padding: 0 !important; margin: 0 !important;
}

/* УНІВЕРСАЛЬНА КОЛОНКА (АДАПТИВНА) */
.ipro-mobile-toolbar .ipro-col {
    /* Рівномірний розподіл ширини */
    flex: 1 1 0px !important; 
    width: auto !important;
    max-width: none !important;
    
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 60px !important;
    position: relative !important;
    border: none !important; background: none !important;
    padding: 0 !important; margin: 0 !important;
}

/* ВМІСТ КНОПОК */
.ipro-toolbar-item, 
.ipro-burger-btn, 
.fkcart-mini-toggler,
.ipro-fibo-col .dgwt-wcas-search-wrapp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    
    /* Прибираємо системну підсвітку при натисканні */
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
}

/* ТЕКСТ */
.btn-text {
    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #777 !important;
    margin-top: 5px !important;
    text-align: center;
    display: block !important;
}

/* Активний стан (Тільки зміна кольору тексту) */
.ipro-toolbar-item:active .btn-text,
.ipro-burger-btn:active .btn-text,
.fkcart-mini-toggler:active .btn-text {
    color: var(--color-accent) !important;
}

/* Спец-фікси */
.ipro-cart-wrapper .fkcart-mini-toggler { position: relative !important; }
.ipro-cart-wrapper .fkcart-shortcode-icon-wrap { margin: 0 !important; padding: 0 !important; }
.ipro-burger-btn .burger-lines {margin-bottom: 5px;display: flex;}
/* ==========================================================================
   36. ПОПАП ФІЛЬТРІВ (ГОЛОВНИЙ КОНТЕЙНЕР)
   ========================================================================== */
#ipro-filter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* ВИСОТА: Весь екран мінус 60px знизу (для тулбару) */
    height: calc(100% - 60px);
    z-index: 999998; /* Нижче за тулбар */
    background: #fff;
    flex-direction: column; /* Header -> Body -> Footer */
    
    /* Анімація */
    transform: translateY(110%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    visibility: hidden;
    opacity: 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    border-radius: 12px 12px 0 0;
}

#ipro-filter-popup.active {
    transform: translateY(0);
    visibility: visible; opacity: 1;
}

/* ==========================================================================
   37. ВМІСТ ПОПАПУ (HEADER & BODY)
   ========================================================================== */
.ipro-popup-header {
    flex: 0 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee; background: #fff;
    border-radius: 12px 12px 0 0;
}
.ipro-popup-title {font-size: 18px;font-weight: 500;color: #333;}
.ipro-close-icon {
    background: #f4f4f4; border: none; font-size: 24px;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #555; line-height: 1; padding: 0;
}

.ipro-filter-body {
    flex: 1 1 auto; /* Скролиться тільки це */
    overflow-y: auto;
    padding: 0 10px;
    -webkit-overflow-scrolling: touch;
}

/* Стилі груп */
.ipro-filter-group {margin-bottom: 10px;border-bottom: 1px solid #eee;padding-bottom: 10px;}
.ipro-filter-group:last-child { border-bottom: none; }
.ipro-filter-label {display: flex;font-weight: 600;font-size: 14px;margin-bottom: 10px;color: #333;}
.ipro-filter-terms {display: flex;flex-wrap: wrap;gap: 10px;}

/* Кольори */
.ipro-term-color {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    display: inline-block;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ipro-term-color.active::after, .ipro-term-color:hover::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: -19px;
    bottom: -19px;
    border-radius: 50%;
}

/* Кнопки (Розміри) */
.ipro-term-button {
    padding: 9px 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
}
.ipro-term-button.active, .ipro-term-button:hover {
    background: #fff;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Ціна */
.ipro-price-slider-container { padding: 0 5px; }
.ipro-price-inputs { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ipro-price-inputs input {
    width: 45%; padding: 8px; text-align: center;
    border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-weight: 500;
    -moz-appearance: textfield;
}
.ipro-separator { color: #999; font-weight: 500; }

.price-and-cart .price .woocommerce-Price-amount{font-size: 22px;font-weight: 500;}

/* Слайдер jQuery UI */
.ui-slider-horizontal { height: 4px !important; background: #eee !important; border: none !important; margin-bottom: 10px; }
.ui-slider-range { background: var(--color-accent) !important; }
.ui-slider-handle {
    width: 30px !important;
    height: 30px !important;
    background: #fff !important;
    border: 2px solid #1a73e8b3 !important;
    border-radius: 50% !important;
    top: -13px !important;
    cursor: grab !important;
    outline: none;
}

/* ==========================================================================
   38. ФУТЕР ПОПАПУ (КНОПКА)
   ========================================================================== */
.ipro-popup-footer {
    flex: 0 0 auto;
    padding: 7px 10px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.ipro-btn-show {
    width: 100%;
    padding: 10px 8px;
    background: #1a73e8;
    color: #fff;
    border: 1px solid;
    border-radius: var(--radius-main);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.ipro-btn-show:hover {background: #1a73e8;color: #fff;}
.ipro-btn-show:active { transform: scale(0.98); }

#ipro-count-placeholder {
    font-weight: 500;
    color: #fff;
    text-align: center;
}

/* ==========================================================================
   39. БЛОКУВАННЯ СКРОЛУ
   ========================================================================== */
body.ipro-no-scroll { overflow: hidden !important; height: 100vh !important; touch-action: none; }
html.ipro-no-scroll { overflow: hidden !important; }

.woocommerce-pagination{display:none;}

/* Головний контейнер панелі управління */
.ipro-catalog-control {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Строго один рядок */
    padding: 7px 0 !important;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
    margin-bottom: 10px !important;
    gap: 15px;
    width: 100% !important;
}

/* Лічильник (ліворуч) */
.ipro-catalog-control .woocommerce-result-count {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #444 !important;
    white-space: nowrap !important;
    flex-shrink: 0;
}

/* Форма сортування (праворуч) */
.ipro-catalog-control .woocommerce-ordering {
    margin: 0 !important;
    padding: 0 !important;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

/* Сама кнопка-селект */
.ipro-catalog-control select.orderby {
    appearance: none;
    -webkit-appearance: none;
    width: auto !important;
    min-width: 140px;
    max-width: 190px;
    height: 38px;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    font-size: 13px !important;
    font-weight: 500;
    padding: 0 30px 0 12px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    transition: all 0.2s ease;
}

.ipro-catalog-control select.orderby:hover {
    border-color: #1a73e859 !important;
    background-color: #fff !important;
}

/* Адаптація для мобільних (до 480px) */
@media (max-width: 480px) {
    .ipro-catalog-control {
        gap: 8px;
        padding: 7px 0px 7px 7px !important;
        border-top: 1px solid #eee;
    }
    .ipro-catalog-control .woocommerce-result-count {
        font-size: 12px !important;
    }
    .ipro-catalog-control select.orderby {
        min-width: 125px;
        font-size: 14px !important;
        height: 36px;
        padding-right: 22px !important;
        background-position: right 7px center !important;
    }
}

.main-navigation .main-nav ul li a {
    display: flex;
}

.main-navigation .dgwt-wcas-sf-wrapp{
    padding: 0;
}

.main-navigation .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    padding: 7px 15px 7px 39px;
    line-height: 18px;
    font-size: 16px;
    border: 2px solid transparent;
    border-radius: 10px;
    height: auto;
    background-color: #eee;
}

.main-navigation .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    min-height: 26px;
    min-width: 26px;
    height: 26px;
    width: 26px;
    left: 9px;
    top: 6px;
}

/* Тільки для десктопів */
@media (min-width: 768px) {

    /* Налаштування головної сітки */
    form.checkout.woocommerce-checkout {
        display: grid !important;
        grid-template-columns: 1fr 400px !important; /* Ліво - гнучке, Право - 400px */
        column-gap: 20px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        align-items: start !important; /* Притискає все до верху */
        justify-content: space-around;
    }

    /* ЛІВА КОЛОНКА (Контакти, Адреса, Коментар) */
    #customer_details {
        grid-column: 1 !important;
        grid-row: 1 / span 10 !important; /* Займає ліву сторону на всю висоту */
        display: flex !important;
        flex-direction: column !important;
        float: none !important;
        width: 100% !important;
        max-width: 400px;
        justify-self: center;
    }

    /* Вирівнюємо внутрішні колонки (коментар тепер під контактами) */
    #customer_details .col-1, 
    #customer_details .col-2 {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }

    /* ПРАВА КОЛОНКА - Заголовок (у самий верх) */
    #order_review_heading {
        grid-column: 2 !important;
        grid-row: 1 !important; /* ПЕРШИЙ рядок праворуч */
        margin: 0 0 20px 0 !important;
        padding-top: 0 !important;
    }

    /* ПРАВА КОЛОНКА - Список товарів */
    #order_review {
        grid-column: 2 !important;
        grid-row: 2 !important; /* ДРУГИЙ рядок праворуч */
        min-width: 400px;
        border: 1px solid #eee !important;
        padding: 15px !important;
        border-radius: 8px !important;
        background: #fff !important;
    }

    /* ПРАВА КОЛОНКА - Оплата */
    #payment {
        grid-column: 2 !important;
        grid-row: 3 !important; /* ТРЕТІЙ рядок праворуч */
        margin-top: 20px !important;
    }

    /* Фіксація правої колонки при скролі (опціонально) */
    #order_review, #payment {
        position: sticky;
        top: 18px;
    }
    
    /* Корекція положення оплати відносно замовлення при sticky */
    #payment { top: 450px; } /* Підбирається під висоту замовлення */
}

.ipro-drawer-header.button:hover {
    background-color: #fff!important;
}

.site-logo {
    display: inline-block;
    max-width: 70px;
}

.site-branding .main-title{
    display: none;
}

@media (max-width: 768px) {
    .inside-header

 {
        padding-right: 10px!important; 
        padding-left: 10px!important;
    }
}

button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, a.button:hover, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, a.button:focus, a.wp-block-button__link:not(.has-background):active, a.wp-block-button__link:not(.has-background):focus, a.wp-block-button__link:not(.has-background):hover {
        background-color: #ffffff;
        color: #1a73e8;
}

/* --- IPRO GLOBAL TOOLBAR FIX (Нативний CSS метод) --- */

/* 1. Робимо головний блок "точкою відліку" для координат */
.ipro-mobile-toolbar .ipro-toolbar-item {
    position: relative; 
}

/* 2. Текст опускаємо на задній план, щоб він не перекривав кліки */
.ipro-mobile-toolbar .btn-text {
    position: relative;
    z-index: 1;
    pointer-events: none; /* Прозорий для дотиків */
}

/* 3. МАГІЯ: Створюємо невидимий шар від рідних іконок, який накриває всю кнопку */
/* Клас FiboSearch та FunnelKit Cart */
.ipro-mobile-toolbar .dgwt-wcas-search-icon::after,
.ipro-mobile-toolbar .fkcart-mini-toggler::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Цей шар буде поверх тексту */
    cursor: pointer;
}

input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
    padding: 0px;
}
button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.wp-block-button__link:not(.has-background) {
    background-color: #ffffff;
}