/**
 * 🎨 MODERN RECIPE GRID BLOCK
 * Сучасний дизайн як Tasty/AllRecipes
 */

/* ================================
   SMOOTH SCROLL CONTROL
   ================================ */

/* ✅ Вимикаємо браузерний smooth scroll для контролю через JS */
html {
    scroll-behavior: auto !important;
}

/* ================================
   MAIN CONTAINER
   ================================ */

.gotuimo-recipe-grid-block {
    width: 100%;
    padding: 80px 0;
    background: #fafafa;
    scroll-margin-top: 80px; /* ✅ Відступ для якорів */
}

.recipe-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ✅ FILTER TOGGLE BUTTON - Третій елемент в рядку */
    .recipe-filters-mobile-toggle {
        display: flex !important;
        align-items: center;
    justify-content: center;
        gap: 8px;
    padding: 12px 24px;
        /* ✅ Звичайний стан: біла кнопка з червоним текстом */
        background: #ffffff;
        color: #ef4444;
        border: 2px solid #ef4444;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
        transition: all 0.3s ease;
    white-space: nowrap; /* ✅ Не переносити текст */
    flex-shrink: 0; /* ✅ Не стискати */
    }
    
    .recipe-filters-mobile-toggle:hover {
        /* ✅ При наведенні: червона кнопка з білим текстом */
        background: #ef4444;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        transform: translateY(-2px);
}

/* ================================
   MOBILE DRAWER STYLES
   ================================ */

/* ✅ DRAWER - За замовчуванням ПОВНІСТЮ ПРИХОВАНИЙ */
.recipe-filters-mobile-drawer {
    display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        pointer-events: none; /* Дозволяємо клік через drawer коли закритий */
    opacity: 0; /* ✅ ПОВНІСТЮ невидимий за замовчуванням */
    visibility: hidden; /* ✅ Не займає місце в DOM */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .recipe-filters-mobile-drawer.is-open {
        pointer-events: auto; /* Блокуємо кліки позаду коли відкритий */
    opacity: 1; /* ✅ Робимо видимим */
    visibility: visible; /* ✅ Показуємо */
    }
    
    /* Overlay */
    .recipe-filters-mobile-drawer .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .recipe-filters-mobile-drawer.is-open .drawer-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    
/* Drawer Content - ПРИХОВАНИЙ ЗА ЕКРАНОМ СПРАВА */
    .recipe-filters-mobile-drawer .drawer-content {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important; /* ✅ Прикріплюємо до ПРАВОГО краю */
    left: auto !important; /* ✅ ВАЖЛИВО: заборона зліва */
    bottom: 0 !important;
    width: 85% !important;
    max-width: 400px !important;
    background: white !important;
    transform: translateX(100%) !important; /* ✅ Зсуваємо ЗА екран ВПРАВО */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* ✅ Відступ для WP Admin Bar (mobile: 46px) */
body.admin-bar .recipe-filters-mobile-drawer .drawer-content {
    top: 46px;
}

/* ✅ Desktop: ширший drawer */
@media (min-width: 769px) {
    .recipe-filters-mobile-drawer .drawer-content {
        max-width: 480px; /* Ширше на desktop */
        width: 40%;
    }
}

/* ✅ Відступ для WP Admin Bar на desktop (783px+: висота 32px) */
@media (min-width: 783px) {
    body.admin-bar .recipe-filters-mobile-drawer .drawer-content {
        top: 32px;
    }
    }
    
    .recipe-filters-mobile-drawer.is-open .drawer-content {
    transform: translateX(0) !important; /* ✅ Force правильну позицію */
    }
    
    /* Drawer Header */
    .recipe-filters-mobile-drawer .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #e5e7eb;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .recipe-filters-mobile-drawer .drawer-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #111827;
    }
    
    .recipe-filters-mobile-drawer .drawer-close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: #f3f4f6;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #6b7280;
        flex-shrink: 0; /* ✅ Не стискається */
        font-size: 28px; /* ✅ Розмір × символу */
        line-height: 1;
        font-weight: 300;
    }
    
    .recipe-filters-mobile-drawer .drawer-close:hover {
        background: #ef4444;
        color: white;
    }
    
    /* Drawer Body */
    .recipe-filters-mobile-drawer .drawer-body {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }
    
    /* Drawer Footer з кнопками */
    .recipe-filters-mobile-drawer .drawer-footer {
        padding: 16px 20px;
        border-top: 1px solid #e5e7eb;
        background: white;
        display: flex;
        flex-direction: column; /* ✅ Вертикально */
        align-items: center; /* ✅ Центруємо кнопки */
        gap: 12px;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    
    .recipe-filters-mobile-drawer .drawer-footer .drawer-apply {
        width: 100% !important;
        max-width: 400px !important;
        padding: 14px 24px !important;
        background: #ffffff !important;
        color: #ef4444 !important;
        border: 2px solid #ef4444 !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.5 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
        display: block !important;
        text-align: center !important;
        min-height: 52px !important; /* ✅ Фіксована висота */
        box-sizing: border-box !important;
    }
    
    .recipe-filters-mobile-drawer .drawer-footer .drawer-apply:hover {
        /* ✅ При наведенні: червона кнопка з білим текстом */
        background: #ef4444;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    
    .recipe-filters-mobile-drawer .drawer-footer .drawer-reset {
        width: 100% !important;
        max-width: 400px !important;
        padding: 14px 24px !important;
        background: #ffffff !important;
        color: #ef4444 !important;
        border: 2px solid #ef4444 !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.5 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
        display: block !important;
        text-align: center !important;
        min-height: 52px !important; /* ✅ Фіксована висота */
        box-sizing: border-box !important;
    }
    
    .recipe-filters-mobile-drawer .drawer-footer .drawer-reset:hover {
        /* ✅ При наведенні: червона кнопка з білим текстом */
        background: #ef4444;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    
    /* Блокування скролу body коли drawer відкритий */
    body.drawer-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* ================================
   LAYOUT: SIDEBAR + GRID
   ================================ */

/* НЕ ДОДАЄМО grid на .gotuimo-native-filters! Він вже є в .recipe-filters-layout! */

.gotuimo-recipe-grid-block .recipe-filters-layout {
    display: block; /* ✅ Простий block - грід на всю ширину */
}

/* ================================
   FILTERS SIDEBAR (ПРИХОВАНО - використовуємо drawer)
   ================================ */

/* ✅ ВАЖЛИВО: Приховуємо ТІЛЬКИ sidebar (не весь layout!) */
.recipe-filters-sidebar,
aside.recipe-filters-sidebar {
    display: none !important; /* Фільтри тепер тільки в drawer */
}

/* ✅ Layout показуємо, але без sidebar він займе всю ширину */
.recipe-filters-layout {
    display: block !important;
    grid-template-columns: 1fr !important; /* Тільки одна колонка для контенту */
}

.gotuimo-recipe-grid-block .recipe-filters-sidebar {
    display: none !important; /* Додаткове правило для специфічності */
}

/* Filter Groups */
.gotuimo-recipe-grid-block .filter-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.gotuimo-recipe-grid-block .filter-group:last-child {
    border-bottom: none;
}

/* Filter Titles */
.gotuimo-recipe-grid-block .filter-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    /* ✅ Collapsible */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.gotuimo-recipe-grid-block .filter-title:hover {
    background: #f9fafb;
}

.gotuimo-recipe-grid-block .filter-title .collapse-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: #6b7280;
}

.gotuimo-recipe-grid-block .filter-title.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* Filter Items */
.gotuimo-recipe-grid-block .filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.gotuimo-recipe-grid-block .filter-checkbox-label:hover {
    color: #ef4444;
}

.gotuimo-recipe-grid-block .filter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}
.gotuimo-recipe-grid-block .filter-checkbox-label input[type="checkbox"]:checked {
    background: #ef4444;
    border-color: #ef4444;
}

.gotuimo-recipe-grid-block .filter-checkbox-label span {
    font-size: 14px;
    color: #4b5563;
}

/* Show More Button */
.gotuimo-recipe-grid-block .show-more-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.gotuimo-recipe-grid-block .show-more-btn:hover {
    background: #f9fafb;
    border-color: #ef4444;
    color: #ef4444;
}

/* Radio Buttons (Difficulty) */
.gotuimo-recipe-grid-block .filter-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gotuimo-recipe-grid-block .filter-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gotuimo-recipe-grid-block .filter-radio-label:hover {
    background: #f9fafb;
}

.gotuimo-recipe-grid-block .filter-radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ef4444;
}

.gotuimo-recipe-grid-block .filter-radio-label span {
    font-size: 15px;
    color: #4b5563;
}

.gotuimo-recipe-grid-block .filter-radio-label input[type="radio"]:checked + span {
    color: #dc2626;
    font-weight: 600;
}

/* Slider (Cook Time) */
.gotuimo-recipe-grid-block .filter-slider {
    padding: 12px 0;
}

.gotuimo-recipe-grid-block .native-time-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.gotuimo-recipe-grid-block .native-time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.gotuimo-recipe-grid-block .native-time-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(239, 68, 68, 0.4);
}

.gotuimo-recipe-grid-block .native-time-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.gotuimo-recipe-grid-block .native-time-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(239, 68, 68, 0.4);
}

.gotuimo-recipe-grid-block .time-value {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Reset Button */
.gotuimo-recipe-grid-block .native-reset-filters {
    width: 100%;
    padding: 12px 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.gotuimo-recipe-grid-block .native-reset-filters:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ================================
   RECIPE GRID
   ================================ */

.gotuimo-recipe-grid-block .recipe-filters-results {
    min-width: 0;
}

/* Search & Sort */
.gotuimo-recipe-grid-block .recipe-filters-top {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.gotuimo-recipe-grid-block .recipe-search {
    flex: 1;
}
.gotuimo-recipe-grid-block .native-search-input {
    width: 100%;
    padding: 12px 20px; /* ✅ Як у select */
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5; /* ✅ Як у select */
    height: auto;
    min-height: 44px; /* ✅ Мінімальна висота як у select */
    transition: all 0.2s ease;
    box-sizing: border-box; /* ✅ Для точної висоти */
}
.gotuimo-recipe-grid-block .native-search-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.gotuimo-recipe-grid-block .recipe-sort select {
    padding: 12px 40px 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5 !important; /* ✅ Фіксуємо висоту рядка */
    height: auto !important;
    min-height: 44px; /* ✅ Мінімальна висота для читабельності */
    color: #111827 !important; /* ✅ Чорний текст */
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    vertical-align: middle; /* ✅ Вертикальне вирівнювання */
    display: inline-flex; /* ✅ Flexbox для центрування */
    align-items: center; /* ✅ Центруємо текст по вертикалі */
}
.gotuimo-recipe-grid-block .recipe-sort select:focus {
    outline: none;
    border-color: #ef4444;
}
.gotuimo-recipe-grid-block .recipe-sort select option {
    color: #111827 !important; /* ✅ Чорний текст в опціях */
    background: white;
    font-weight: 500;
    padding: 10px 15px !important; /* ✅ Відступ в dropdown */
    line-height: 1.8 !important;
    min-height: 40px !important;
    margin: 4px 0 !important; /* ✅ Відступ між опціями */
}

/* ✅ Додаткові стилі для Safari/Chrome/Firefox */
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
    .gotuimo-recipe-grid-block .recipe-sort select option {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* ✅ Спробуємо збільшити висоту через size */
    .gotuimo-recipe-grid-block .recipe-sort select:focus,
    .gotuimo-recipe-grid-block .recipe-sort select:active {
        size: 5; /* Показувати 5 опцій одразу */
    }
}

/* ✅ Для Firefox - специфічні стилі */
@-moz-document url-prefix() {
    .gotuimo-recipe-grid-block .recipe-sort select option {
        padding: 12px 20px !important;
        line-height: 2 !important;
    }
}

/* SEO Block */
.gotuimo-recipe-grid-block .recipes-seo-block {
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 32px;
    text-align: center; /* ✅ Центруємо текст */
    max-width: 800px; /* ✅ Обмежуємо ширину */
    margin-left: auto; /* ✅ Центруємо блок */
    margin-right: auto;
}

.gotuimo-recipe-grid-block .seo-block-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.gotuimo-recipe-grid-block .seo-block-text {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.gotuimo-recipe-grid-block .seo-block-text p {
    margin-bottom: 12px;
}

/* Promo Block */
.gotuimo-recipe-grid-block .recipes-promo-block {
    padding: 40px;
    background: #ef4444;
    border-radius: 16px;
    margin-bottom: 32px;
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.gotuimo-recipe-grid-block .promo-block-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.gotuimo-recipe-grid-block .promo-block-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.gotuimo-recipe-grid-block .promo-block-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.95);
}

.gotuimo-recipe-grid-block .promo-block-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: white;
    color: #ef4444;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gotuimo-recipe-grid-block .promo-block-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .gotuimo-recipe-grid-block .recipes-promo-block {
        padding: 24px;
    }
    
    .gotuimo-recipe-grid-block .promo-block-title {
        font-size: 24px;
    }
}

/* ✅ УНІВЕРСАЛЬНІ Active Filters Chips (ПРИХОВАНІ за замовчуванням) */
.active-filters-chips {
    display: none !important; /* ✅ Приховано за замовчуванням */
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    background: #f9fafb !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    border: 1px solid #e5e7eb !important;
}

/* ✅ Показуємо тільки коли є фільтри */
.active-filters-chips.has-filters {
    display: flex !important;
}

/* Active Filters Chips з батьківським класом */
.gotuimo-recipe-grid-block .active-filters-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.gotuimo-recipe-grid-block .chips-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.gotuimo-recipe-grid-block .chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

/* ✅ УНІВЕРСАЛЬНИЙ filter-chip */
.filter-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 8px 6px 12px !important;
    background: white !important;
    border: 1px solid #d1d5db !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    color: #374151 !important;
    transition: all 0.2s ease !important;
}

.filter-chip:hover {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.filter-chip .chip-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    background: #ef4444 !important;
    color: white !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.filter-chip .chip-remove:hover {
    background: #dc2626 !important;
    transform: scale(1.1) !important;
}

.gotuimo-recipe-grid-block .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 6px 12px; /* ✅ Менше padding справа */
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s ease;
}

.gotuimo-recipe-grid-block .filter-chip:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.gotuimo-recipe-grid-block .filter-chip .chip-remove {
    display: inline-flex; /* ✅ inline-flex для кращого центрування */
    align-items: center;
    justify-content: center;
    width: 20px; /* ✅ Трохи більше */
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px; /* ✅ Трохи менше */
    font-weight: 600; /* ✅ Менша вага */
    line-height: 1;
    padding: 0; /* ✅ Важливо! */
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gotuimo-recipe-grid-block .filter-chip .chip-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.gotuimo-recipe-grid-block .chips-clear {
    padding: 6px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gotuimo-recipe-grid-block .chips-clear:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Empty State */
.gotuimo-recipe-grid-block .recipe-empty-state {
    grid-column: 1 / -1;
    padding: 80px 24px;
    text-align: center;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #d1d5db;
}

.gotuimo-recipe-grid-block .empty-state-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.6;
}

.gotuimo-recipe-grid-block .empty-state-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.gotuimo-recipe-grid-block .empty-state-text {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 8px;
}

.gotuimo-recipe-grid-block .empty-state-cta {
    font-size: 18px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 32px;
}

.gotuimo-recipe-grid-block .empty-state-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #ef4444;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gotuimo-recipe-grid-block .empty-state-button:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Result Count */
.gotuimo-recipe-grid-block .recipe-results-header {
    margin-bottom: 24px;
}
.gotuimo-recipe-grid-block .native-result-count {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

/* ✅ УНІВЕРСАЛЬНІ правила для grid (працюють СКРІЗЬ без батьківського класу) */
.native-recipe-grid,
.recipe-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
    margin-bottom: 40px;
    grid-auto-rows: 1fr !important;
    width: 100% !important;
    max-width: none !important;
}

/* Grid - МАКСИМАЛЬНА СПЕЦИФІЧНІСТЬ (для override) */
#recipes-grid .gotuimo-native-filters .native-recipe-grid,
#recipes-grid .gotuimo-native-filters .recipe-grid,
.gotuimo-recipe-grid-block .gotuimo-native-filters .native-recipe-grid,
.gotuimo-recipe-grid-block .gotuimo-native-filters .recipe-grid,
.gotuimo-recipe-grid-block .recipe-filters-results .native-recipe-grid,
.gotuimo-recipe-grid-block .recipe-filters-results .recipe-grid,
.gotuimo-recipe-grid-block .native-recipe-grid,
.gotuimo-recipe-grid-block .recipe-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
    margin-bottom: 40px;
    grid-auto-rows: 1fr !important;
    width: 100% !important;
    max-width: none !important;
}

/* Recipe Card */
.gotuimo-recipe-grid-block .native-recipe-card,
.gotuimo-recipe-grid-block .gotuimo-blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; /* ✅ Flex для внутрішнього контенту */
    flex-direction: column;
    height: 100%; /* ✅ Заповнюємо grid cell */
}
.gotuimo-recipe-grid-block .native-recipe-card:hover,
.gotuimo-recipe-grid-block .gotuimo-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ✅ Категорії в картках - ABSOLUTE NUCLEAR */
.gotuimo-recipe-grid-block .gotuimo-blog-card__categories,
.native-recipe-card .gotuimo-blog-card__categories,
.gotuimo-blog-card .gotuimo-blog-card__categories {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    row-gap: 0.5rem !important;
    column-gap: 0.5rem !important;
    margin: 0 0 0.75rem 0 !important;
    padding: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
}

.gotuimo-recipe-grid-block .gotuimo-blog-category,
.native-recipe-card .gotuimo-blog-category,
.gotuimo-blog-card .gotuimo-blog-category,
a.gotuimo-blog-category,
.gotuimo-blog-card__categories a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    color: #fff !important;
    transition: all 0.2s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    line-height: 1.2 !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
    vertical-align: baseline !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    min-height: auto !important;
    max-height: auto !important;
    height: auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: 100% !important;
}

.gotuimo-recipe-grid-block .gotuimo-blog-category:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ✅ Контент картки - NUCLEAR RESET */
.gotuimo-recipe-grid-block .gotuimo-blog-card__content {
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ✅ Заголовок картки */
.gotuimo-recipe-grid-block .gotuimo-blog-card__title {
    margin: 0.75rem 0 0.5rem 0 !important;
    clear: both !important;
    position: relative !important;
}

/* ✅ Мета-інфо картки */
.gotuimo-recipe-grid-block .gotuimo-blog-card__meta {
    margin-top: 0.5rem !important;
    clear: both !important;
}

.gotuimo-recipe-grid-block .native-recipe-card a,
.gotuimo-recipe-grid-block .gotuimo-blog-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.gotuimo-recipe-grid-block .native-recipe-card img,
.gotuimo-recipe-grid-block .gotuimo-blog-card img,
.gotuimo-recipe-grid-block .gotuimo-blog-card__image img {
    width: 100% !important;
    height: 220px !important; /* ✅ Фіксована висота */
    object-fit: cover !important;
    transition: transform 0.3s ease;
    flex-shrink: 0; /* ✅ Не стискаємо */
}
.gotuimo-recipe-grid-block .native-recipe-card:hover img,
.gotuimo-recipe-grid-block .gotuimo-blog-card:hover img {
    transform: scale(1.05);
}

.gotuimo-recipe-grid-block .recipe-card-content {
    padding: 20px;
    flex: 1; /* ✅ Займає решту простору */
    display: flex;
    flex-direction: column;
}

.gotuimo-recipe-grid-block .recipe-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
}
.gotuimo-recipe-grid-block .recipe-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.gotuimo-recipe-grid-block .recipe-card-title a:hover {
    color: #ef4444;
}

.gotuimo-recipe-grid-block .recipe-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-top: auto; /* ✅ Прибиваємо до низу */
}
.gotuimo-recipe-grid-block .recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pagination */
.gotuimo-recipe-grid-block .native-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.gotuimo-recipe-grid-block .page-numbers {
    padding: 10px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.gotuimo-recipe-grid-block .page-numbers:hover,
.gotuimo-recipe-grid-block .page-numbers.current {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* ================================
   MOBILE RESPONSIVE
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
    .gotuimo-recipe-grid-block .native-recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .gotuimo-recipe-grid-block {
        padding: 40px 0;
    }
    
    .recipe-grid-container {
        padding: 0 16px;
    }
    
    .gotuimo-recipe-grid-block .recipe-filters-top {
        flex-direction: column;
        align-items: center; /* ✅ Центруємо поля */
        max-width: 600px; /* ✅ Обмежуємо ширину */
        margin: 0 auto 32px; /* ✅ Центруємо блок */
    }
    
    .gotuimo-recipe-grid-block .recipe-search,
    .gotuimo-recipe-grid-block .recipe-sort,
    .gotuimo-recipe-grid-block .recipe-filters-mobile-toggle {
        width: 100%; /* ✅ Всі елементи на всю доступну ширину */
        max-width: 400px; /* ✅ Але не більше 400px */
    }
    
    .gotuimo-recipe-grid-block .recipe-sort select {
        width: 100%; /* ✅ Select на всю ширину контейнера */
    }
    
    /* ✅ Центруємо текст "Показано X з Y" */
    .gotuimo-recipe-grid-block .recipe-results-header,
    .gotuimo-recipe-grid-block .native-result-count {
        text-align: center;
    }
    
    /* ✅ MOBILE GRID - МАКСИМАЛЬНА СПЕЦИФІЧНІСТЬ */
    #recipes-grid .gotuimo-native-filters .native-recipe-grid,
    #recipes-grid .gotuimo-native-filters .recipe-grid,
    .gotuimo-recipe-grid-block .gotuimo-native-filters .native-recipe-grid,
    .gotuimo-recipe-grid-block .gotuimo-native-filters .recipe-grid,
    .gotuimo-recipe-grid-block .recipe-filters-results .native-recipe-grid,
    .gotuimo-recipe-grid-block .recipe-filters-results .recipe-grid,
    .gotuimo-recipe-grid-block .native-recipe-grid,
    .gotuimo-recipe-grid-block .recipe-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ================================
   LAZY LOAD
   ================================ */

.lazy-load-sentinel {
    height: 1px;
    width: 100%;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

.loading-spinner::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border: 3px solid #e5e7eb;
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gotuimo-recipe-grid-block .native-recipe-card {
    animation: fadeIn 0.5s ease backwards;
}
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(1) { animation-delay: 0.05s; }
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(2) { animation-delay: 0.1s; }
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(3) { animation-delay: 0.15s; }
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(4) { animation-delay: 0.2s; }
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(5) { animation-delay: 0.25s; }
.gotuimo-recipe-grid-block .native-recipe-card:nth-child(6) { animation-delay: 0.3s; }

/* ================================
   FLOATING FILTER BUTTON
   ================================ */

/* ✅ Floating кнопка фільтрів (показується при прокрутці) */
.recipe-filters-floating-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 998;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.recipe-filters-floating-toggle.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.recipe-filters-floating-toggle:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.5);
}

.recipe-filters-floating-toggle:active {
    transform: scale(0.95);
}

/* ✅ Іконка фільтра (SVG) */
.recipe-filters-floating-toggle svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* ✅ Mobile adjustments */
@media (max-width: 768px) {
    .recipe-filters-floating-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .recipe-filters-floating-toggle svg {
        width: 24px;
        height: 24px;
    }
}

