/* ====
   CATALOG SECTION
   ==== */

.halal-catalog {
    padding: 4rem 0;
    background-color: var(--light-gray);
    display: flex;
    align-items: stretch; /* Растягивает элементы по высоте, чтобы они были на одной линии */
    gap: 10px; /* Минимальный зазор между фильтрами и поиском */
    margin-bottom: 2rem;
    width: 100%;
}




/* Группа селектов слева */
.catalog-filters {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center; /* Выравнивание внутри группы */
}

.filter-select,
.filter-input {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
    background-color: var(--white);
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--emerald);
}

.filter-select {
    min-width: 180px;
}

.filter-input {
    flex: 1;
    min-width: 200px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f3f4f6;
}

.product-body {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.product-manufacturer {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.product-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-halal {
    background-color: #d1fae5;
    color: #065f46;
}

.status-haram {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-doubtful {
    background-color: #fef3c7;
    color: #92400e;
}

.status-unchecked {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Стили для кнопок фильтрации (Обучение и Методология) */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--emerald);
    background: transparent;
    color: var(--emerald);
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(16, 185, 129, 0.1);
}

.filter-btn.active {
    background: var(--emerald);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Контейнер для фильтров и поиска */
.catalog-controls {
    display: flex;
    justify-content: space-between; /* Фильтры слева, поиск справа */
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
}

/* Группа селектов слева */
.catalog-filters {
    display: flex;
    gap: 10px;
    flex-shrink: 0; /* Чтобы фильтры не сжимались */
}

/* Группа поиска справа */
.catalog-search-wrapper {
    flex-grow: 1; /* Поиск занимает оставшееся пространство */
    display: flex;
    
}

/* Стилизация самих элементов */
.filter-select, .filter-input {
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin: 0;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--emerald);
}

.filter-input {
    width: 100%; /* Занимает всю ширину своего контейнера */
}


.ingredients-header .filter-input {
    max-width: 400px; /* Или та ширина, которая вам нравится для компактного вида */
    width: 100%;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .catalog-controls {
        flex-direction: column; /* На мобилках в колонку */
        align-items: stretch;
    }
    
    .catalog-search-wrapper {
        max-width: 100%;
        order: -1; /* Поиск будет сверху на мобильных */
    }
    
    .catalog-filters {
        flex-direction: row;
    }
    
    .filter-select {
        flex: 1; /* Селекты пополам на мобильных */
    }
}


@media (max-width: 768px) {
    .catalog-filters {
        flex-direction: column;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

