/* Сетка продуктов */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--emerald);
}

.product-img-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Живой состав */
.composition-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    line-height: 1.6;
    color: var(--dark-gray);
}

/* Убедимся, что ссылки имеют относительное позиционирование */
.ing-link {
    color: var(--emerald);
    border-bottom: 1px dashed var(--emerald);
    cursor: help;
    position: relative; /* Критично для позиционирования поповера */
    font-weight: 500;
    display: inline-block; /* Чтобы поповер корректно считал координаты */
}

/* Popover (Всплывающая подсказка) */
.ing-popover {
    position: absolute;
    bottom: calc(100% + 10px); /* Чуть выше ссылки */
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: var(--white);
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 12px;
    z-index: 9999; /* Максимальный приоритет */
    display: none;
    pointer-events: none; /* Чтобы поповер не мешал курсору */
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Треугольник снизу */
.ing-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--white) transparent transparent transparent;
}

@keyframes popIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Кнопка сообщения об изменениях */
.report-change-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: transparent;
    border: 1px solid #eee;
    border-radius: 8px;
    color: var(--medium-gray);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.report-change-btn:hover {
    background: #fff5f5;
    color: #e53e3e;
    border-color: #feb2b2;
}

