/* --- Variáveis de Design --- */
:root {
    --ifood-red: #ea1d2c;
    --ifood-text-main: #3e3e3e;
    --ifood-text-sub: #717171;
    --ifood-bg-light: #f2f2f2;
    --ifood-border: #f2f2f2;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Container da Seção --- */
.ifood-products {
    width: 100%;
    margin: 0 auto;
    padding: 0px 0px;
    background-color: #fff;
}

/* --- Título da Categoria (Sticky) --- */
.category-group {
    margin-bottom: 30px;
}

.category-title {
    position: -webkit-sticky;
    position: sticky;
    top: 80px; /* Ajuste conforme a altura do seu header fixo */
    z-index: 10;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ifood-text-main);
    padding: 15px 0;
    margin-top: 0;
    border-bottom: 1px solid var(--ifood-border);
    letter-spacing: -0.5px;
}

/* --- Lista de Produtos --- */
.product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas no Desktop */
    gap: 15px;
    padding-top: 15px;
}

/* --- Item Individual (Row) --- */
.product-item-row {
    display: flex;
    background: #fff;
    border: 1px solid var(--ifood-border);
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.product-item-row:hover {
    border-color: #dcdcdc;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* --- Ajuste do conteúdo injetado (product_html) --- */
/* Supondo que o product_html tenha classes como .image e .caption */

.product-item-row .product-thumb {
    display: flex;
    flex-direction: row-reverse; /* Imagem na Direita */
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

.product-item-row .image {
    flex: 0 0 100px; /* Tamanho fixo da imagem */
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--ifood-bg-light);
}

.product-item-row .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-item-row .description-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-item-row h4, 
.product-item-row .name a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ifood-text-main);
    text-decoration: none;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item-row .description {
    font-size: 0.875rem;
    color: var(--ifood-text-sub);
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item-row .price {
    font-size: 1rem;
    font-weight: 600;
    color: #2e7d32; /* Verde iFood para preço */
}

.product-item-row .price-old {
    font-size: 0.8rem;
    color: var(--ifood-text-sub);
    text-decoration: line-through;
    margin-right: 5px;
}

/* --- Responsividade Mobile --- */
@media (max-width: 768px) {
    .product-list {
        grid-template-columns: 1fr; /* 1 coluna no mobile */
        gap: 0;
    }

    .product-item-row {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--ifood-border);
        padding: 20px 0;
        margin-bottom: 0;
    }

    .product-item-row:hover {
        transform: none;
        box-shadow: none;
    }

    .category-title {
        top: 70px; /* Ajuste para header mobile */
        padding: 12px 0;
        font-size: 1.1rem;
    }

    .product-item-row .image {
        flex: 0 0 85px;
        height: 85px;
    }
}