/* ==========================================================================
   КАТАЛОГ И КАРТОЧКИ ТОВАРОВ
   ========================================================================== */
.catalog_section {
    padding: 80px 0;
    background-color: var(--white);
    overflow: visible !important;
    display: block !important;
}

.catalog_filter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 45px;
}

.filter_btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    background-color: var(--background);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.filter_btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter_btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

#productsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
    overflow: visible !important;
}

.product_card {
    background: #ffffff;
    border: 1px solid #eef2f5;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: productFadeIn 0.4s ease-in-out forwards;
}

.product_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.product_img_wrap {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fdfdfd;
    padding: 15px;
}

.product_img_wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product_info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product_header_block {
    margin-bottom: 20px;
}

.product_title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 12px 0;
}

.product_description_full {
    font-size: 0.88rem;
    color: #666666;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

.product_footer_block {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.product_meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 0 15px 0;
    width: 100%;
}

.product_price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product_badge, .product_dosage {
    background: #f0f4f8;
    color: #4a5568;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.btn_catalog_cart {
    width: 85%;
    max-width: 240px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    background-color: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    margin: 0 auto;
    text-align: center;
}

.btn_catalog_cart:hover {
    background-color: var(--primary-hover);
}

@keyframes productFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .catalog_filter {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .filter_btn {
        width: 100%;
    }
    #productsGrid {
         grid-template-columns: 1fr !important;
         overflow: visible !important;
    }
}