/* ========================================================================
 * public/assets/css/recetas_cards.css
 * ESTILOS DE VISTA DE TARJETA (CARD GRID) PARA RECETAS
 * Esta vista debe ser la predeterminada y robusta.
 * ======================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.recipe-card {
    background-color: var(--color-bg-section);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex; 
    flex-direction: column; /* Layout vertical (Tarjeta) */
}

/* Contenedor de la imagen y el tag de tipo */
.recipe-header {
    position: relative;
    height: 200px; 
    overflow: hidden;
}
.recipe-header .recipe-tag {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.2rem 0.5rem;
    z-index: 10;
    background-color: var(--color-accent);
    color: var(--color-bg-section);
    font-weight: bold;
    border-radius: 12px 0 12px 0;
}
.recipe-header .recipe-img-link, .recipe-header .recipe-img {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Cuerpo principal de la tarjeta */
.recipe-body {
    padding: 1rem 1.5rem; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Título y descripción */
.recipe-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.recipe-desc, .recipe-ingredientes {
    margin-bottom: 0.5rem;
    color: var(--color-text-dim);
    font-size: 0.9em;
}

/* Contenedor de iconos bajo el título */
.recipe-badges-line {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem; 
}

/* Pie de página (botón) */
.recipe-footer-content {
    margin-top: auto; 
    padding-top: 1rem;
    display: flex;
    justify-content: center; 
}

.recipe-footer-content .btn-ver-receta {
    margin-top: 0;
    align-self: center; 
    width: 100%; 
    max-width: 150px; 
    text-align: center;
}

/* --- ESTILOS DE ICONOGRAFÍA (Comunes) --- */
.recipe-badges-line .meta-badge { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; 
    height: 30px;
    padding: 0 !important;
    border-radius: 50% !important; 
    font-size: 0.9em;
    font-weight: 600;
    color: var(--color-bg-main); 
}
.meta-picante { background-color: #e34c26 !important; }
.meta-vegano { background-color: #38a169 !important; }
.meta-gluten-free { background-color: #4dc0b5 !important; }
.meta-lactosa { background-color: #795548 !important; }